/* 공통: 리셋, 글자, 레이아웃 뼈대, 머리말·꼬리말, 버튼, 링크, 포커스 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--s-5);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-company);
  font-size: var(--t-body-size);
  line-height: var(--t-body-lh);
  font-weight: var(--weight-regular);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

/* 형광펜: 캐릭터가 '기억한' 말에만 칠한다. 사이트의 유일한 강조색 */
mark {
  background: linear-gradient(transparent 40%, var(--memory-mark) 40%, var(--memory-mark) 94%, transparent 94%);
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
  z-index: 10;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-pill);
  background: var(--cta-bg);
  color: var(--cta-text);
  font-weight: var(--weight-semibold);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* 레이아웃 */
.wrap {
  width: 100%;
  max-width: calc(var(--page-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 머리말 */
.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: var(--s-5);
  padding-block: var(--s-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--touch-min);
  text-decoration: none;
}

.brand-mark {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
}

.brand-name {
  font-size: var(--t-h3-size);
  line-height: var(--t-h3-lh);
  font-weight: var(--weight-bold);
  letter-spacing: var(--track-heading);
}

.brand-latin {
  font-size: var(--t-meta-size);
  line-height: var(--t-meta-lh);
  font-weight: var(--weight-semibold);
  color: var(--text-meta);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--s-1);
  margin-inline: calc(var(--s-2) * -1);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  padding-inline: var(--s-2);
  font-size: var(--t-small-size);
  line-height: var(--t-small-lh);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  color: var(--text-primary);
  text-decoration: underline;
}

@media (max-width: 39.99rem) {
  .site-nav {
    flex-basis: 100%;
  }
}

/* 버튼: 무채색 캡슐 하나 + 밑줄 글 링크 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--cta-height);
  padding: 0 var(--s-6);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--cta-bg);
  color: var(--cta-text);
  font-size: var(--t-body-size);
  line-height: var(--t-small-lh);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out);
}

.btn:hover {
  background: var(--cta-bg-hover);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.text-link:hover {
  text-decoration-color: var(--text-meta);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-6);
}

/* 꼬리말 */
.site-footer {
  margin-top: var(--section-gap);
  padding-block: var(--s-8) var(--s-6);
  background: var(--bg-sheet);
  color: var(--text-secondary);
  font-size: var(--t-small-size);
  line-height: var(--t-small-lh);
}

.footer-grid {
  display: grid;
  gap: var(--s-6);
}

.footer-lede {
  margin-top: var(--s-2);
  color: var(--text-meta);
}

.footer-detail {
  display: grid;
  gap: var(--s-4);
}

.biz-info {
  display: grid;
  gap: var(--s-1);
}

.biz-info div {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--s-2);
}

.biz-info dt {
  color: var(--text-meta);
}

/* 주소의 '304-1호(재송동,'이 괄호 뒤에서 끊기지 않게 한 덩어리로 */
.nobr {
  white-space: nowrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s-5);
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.copyright {
  color: var(--text-meta);
  font-size: var(--t-meta-size);
  line-height: var(--t-meta-lh);
}

@media (min-width: 64rem) {
  .footer-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--s-5);
  }

  .footer-grid > :first-child {
    grid-column: 1 / span 5;
  }

  .footer-detail {
    grid-column: 6 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
