/* GYEOL — 공통 컴포넌트 */

/* 헤더 */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-inline: var(--gutter);
  transition: transform .7s var(--ease), background-color .5s var(--ease), color .5s var(--ease);
}
.site-header.is-solid { background: var(--white); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__slogan { font-size: 12px; letter-spacing: .02em; }
.site-header__logo { display: block; width: 62px; height: 62px; position: relative; z-index: 2; }
.site-header__logo img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .5s var(--ease); }

.site-nav { justify-self: end; display: flex; gap: clamp(18px, 2.4vw, 36px); font-size: 12px; font-weight: 500; letter-spacing: .14em; }
.site-nav a { position: relative; padding-block: 6px; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: .14em; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.menu-toggle { display: none; justify-self: end; position: relative; z-index: 2; min-width: 44px; min-height: 44px; text-align: right; font-size: 13px; letter-spacing: .04em; }
.is-menu-open .menu-toggle { color: var(--charcoal); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 1; background: var(--white); color: var(--charcoal);
  padding: 120px var(--gutter) 40px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { font-family: var(--display); font-size: clamp(38px, 12vw, 56px); font-weight: 300; line-height: 1.4; letter-spacing: -.01em; }
.mobile-menu nav a[aria-current="page"] { font-weight: 500; }
.mobile-menu p { font-size: 13px; color: var(--earth); }

/* 페이지 머리 */
.page-head {
  padding: calc(var(--header-h) + clamp(56px, 8vw, 128px)) var(--gutter) 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.page-head h1 {
  font-family: var(--display);
  font-size: clamp(18px, 4.56vw, 90px);
  font-weight: 300; line-height: 1; letter-spacing: -.02em;
}
.page-head__sub { margin-top: clamp(12px, 1.4vw, 20px); font-size: clamp(14px, 1.5vw, 22px); font-weight: 300; letter-spacing: -.01em; line-height: 1.4; }
.page-head__text { margin-top: clamp(8px, .8vw, 12px); max-width: 36em; font-size: 15px; color: var(--earth); }

/* 링크 */
.text-link {
  display: inline-block; font-size: 13px; font-weight: 500; letter-spacing: .02em;
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size .7s var(--ease);
}
.text-link:hover { background-size: 40% 1px; }
.text-button {
  min-height: 48px; padding: 0 28px; border: 1px solid var(--charcoal);
  font-size: 13px; font-weight: 500; letter-spacing: .02em;
  transition: background-color .5s var(--ease), color .5s var(--ease), opacity .5s var(--ease);
}
.text-button:hover:not(:disabled) { background: var(--charcoal); color: var(--white); }
.text-button:disabled { opacity: .3; cursor: default; }
.back-link { font-size: 12px; letter-spacing: .04em; color: var(--earth); }
.back-link::before { content: "← "; }
.back-link:hover { color: var(--charcoal); }

/* 이미지: 아주 미세한 확대 */
.zoom { display: block; overflow: hidden; }
.zoom img { width: 100%; transition: transform 1.8s var(--ease); }
@media (hover: hover) { a.zoom:hover img, a:hover > .zoom img { transform: scale(1.018); } }

/* 페이지 넘김 */
.turn { margin-top: var(--section); padding: 0 var(--gutter); }
.turn__link {
  display: block; margin: 12px 0 8px -.03em;
  font-family: var(--display);
  font-size: clamp(38px, 8.4vw, 150px); font-weight: 300; line-height: 1.12; letter-spacing: -.02em;
  transition: color .6s var(--ease);
}
.turn__link:hover { color: var(--earth); }
.turn__note { font-size: 13px; color: var(--earth); }

/* 푸터 */
.site-footer {
  margin-top: clamp(96px, 12vw, 180px); padding: 40px var(--gutter) 32px;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 40px; align-items: start;
  font-size: 12px;
}
.site-footer__brand { grid-column: 1 / 6; display: flex; gap: 24px; align-items: center; }
.site-footer__brand img { width: 56px; height: auto; flex: none; }
.site-footer__brand p { max-width: 20em; color: var(--earth); line-height: 1.7; }
.site-footer__nav { grid-column: 8 / -1; justify-self: end; display: flex; flex-wrap: wrap; gap: 8px 28px; letter-spacing: .14em; font-size: 11px; font-weight: 500; }
.site-footer__nav a:hover { color: var(--earth); }
.site-footer__copy { grid-column: 1 / -1; display: flex; justify-content: space-between; color: var(--earth); font-size: 11px; }

/* 영상 블록 */
.video-block video { width: 100%; }
.story-figure .label { margin-top: 12px; }
.story-figure .video-block__toggle { min-height: 32px; }
.video-block__toggle { display: block; min-width: 44px; min-height: 44px; font-size: 12px; letter-spacing: .04em; color: var(--earth); text-align: left; }
.video-block__toggle:hover { color: var(--charcoal); }

/* 저널 질문 */
.question {
  margin-top: var(--section); padding: clamp(64px, 8vw, 128px) var(--gutter);
  background: var(--charcoal); color: var(--white);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center;
}
.question .label { color: inherit; opacity: .75; }
.question__text { grid-column: 1 / 7; }
.question h2 { white-space: pre-line; margin-top: 20px; font-size: clamp(27px, 3.4vw, 50px); font-weight: 300; line-height: 1.35; letter-spacing: -.025em; }
.question__desc { margin-top: 24px; max-width: 30em; font-size: 15px; opacity: .78; }
.question__form { margin-top: clamp(32px, 4vw, 56px); max-width: 520px; }
.question textarea {
  display: block; width: 100%; padding: 14px 0; resize: none;
  background: transparent; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .4); border-radius: 0;
  font-size: 18px; font-weight: 300; line-height: 1.7; outline: none;
  transition: border-color .4s var(--ease);
}
.question textarea:focus { border-bottom-color: var(--white); }
.question textarea::placeholder { color: rgba(255, 255, 255, .5); }
.question__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.question__count { font-size: 12px; opacity: .7; }
.tones { display: flex; gap: 10px; border: 0; margin: 0; padding: 0; min-width: 0; }
.tone { position: relative; display: block; width: 28px; height: 28px; background: var(--swatch); border: 1px solid rgba(255, 255, 255, .4); cursor: pointer; }
.tone input { position: absolute; inset: -8px; width: auto; height: auto; margin: 0; opacity: 0; cursor: pointer; }
.tone:has(input:checked) { outline: 1px solid var(--white); outline-offset: 3px; }
.tone:has(input:focus-visible) { outline: 2px solid var(--white); outline-offset: 3px; }
.question__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.question .text-button { border-color: var(--white); }
.question .text-button:hover:not(:disabled) { background: var(--white); color: var(--charcoal); }
.question__note { margin-top: 16px; font-size: 12px; line-height: 1.7; opacity: .65; }
.question__preview { grid-column: 8 / -1; justify-self: center; width: min(100%, 340px); }
.question__preview canvas { width: 100%; height: auto; }

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .site-header { grid-template-columns: 1fr auto 1fr; }
  .site-header__slogan, .site-nav { display: none; }
  .site-header::before { content: ""; }
  .site-header__logo { grid-column: 2; width: 50px; height: 50px; }
  .menu-toggle { display: block; grid-column: 3; }

  .page-head__text { font-size: 14px; }
  .site-footer__brand, .site-footer__nav { grid-column: 1 / -1; justify-self: start; }

  .question__text, .question__preview { grid-column: 1 / -1; }
  .question__preview { margin-top: 56px; width: min(72%, 320px); }
}
