/* =========================================================
   청소년미래전략연구소 (IYFS) — 웹사이트 스타일
   브랜드 규정: 로고/README.md (색상·서체·마크 사용 규정)
   ========================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand */
  --navy: #182B4A;          /* 감청: 기본 텍스트·주조색 */
  --teal: #35A0A6;          /* 청록: 마크 윗획 전용 (밝은 바탕) */
  --teal-light: #5FC8CE;    /* 청록 반전: 감청/먹빛 바탕 강조·CTA */
  --teal-text: #1F7277;     /* 작은 강조 텍스트용, 밝은 바탕 4.97:1 이상 */
  --ink: #101A2B;           /* 먹빛: 푸터 바탕, CTA 위 글자 */
  --paper: #FBFBFA;
  --paper-2: #F1F1EE;

  /* Text */
  --text-body: #2C3A52;
  --text-muted: #5D677D;    /* 작은 보조 텍스트 최저 기준 (paper-2 위 5.0:1) */
  --border: rgba(24, 43, 74, .10);
  --border-strong: rgba(24, 43, 74, .18);
  --on-dark: #FBFBFA;
  --on-dark-muted: rgba(251, 251, 250, .82);
  --on-dark-subtle: rgba(251, 251, 250, .64);
  --on-dark-border: rgba(251, 251, 250, .16);

  /* Type */
  --font-ko: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --font-en: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --tracking-mark: -0.045em;  /* 국문 워드마크 자간 −4.5% (README 규정) */

  /* Spacing (4px base) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* Layout */
  --max: 1240px;
  --gutter: 32px;
  --header-h: 72px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (max-width: 640px) {
  :root { --gutter: 20px; --header-h: 64px; }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 8px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-body);
  font-family: var(--font-ko);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--teal-text);
  outline-offset: 3px;
}
.hero :focus-visible,
.cta :focus-visible,
.site-footer :focus-visible { outline-color: var(--teal-light); }

::selection { background: var(--teal-light); color: var(--ink); }

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

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--navy); color: var(--on-dark);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Brand mark (inline <use>) — <use> 섀도 트리에는 클래스 선택자가 닿지 않으므로 사용자 정의 속성으로 색을 전달 */
.mark--color   { --mark-accent: var(--teal);       --mark-body: var(--navy); }
.mark--reverse { --mark-accent: var(--teal-light); --mark-body: var(--paper); }

/* Display toggles */
body[data-english="off"] .en-only { display: none !important; }
body[data-supergraphic="off"] .hero-supergraphic { display: none; }

/* ---------- 3. Shared: 본문 체계 ---------- */
/* 원칙: 섹션마다 큰 제목 하나 + 줄글. 모든 글은 하나의 왼쪽 기준선에서 시작하고,
   본문은 한 가지 스타일(.prose)만 쓴다. 본문 속 소제목·라벨·캡션은 두지 않는다. */
:root {
  --body-size: 17px;
  --body-lh: 1.75;
  --measure: 38em;
  --headline-gap: clamp(32px, 3.5vw, 48px);   /* 제목 → 본문 */
  --para-gap: 1.1em;                          /* 문단 사이 */
}
@media (min-width: 900px) { :root { --body-size: 18px; } }

.section { padding-block: clamp(80px, 8vw, 120px); }
.section--alt { background: var(--paper-2); }

.headline {
  max-width: 18em;
  font-size: clamp(28px, 3.6vw, 50px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.045em;
  color: var(--navy);
  text-wrap: balance;
}
.headline--sm { font-size: clamp(26px, 3vw, 42px); }

.prose {
  max-width: var(--measure);
  margin-top: var(--headline-gap);
  font-size: var(--body-size);
  line-height: var(--body-lh);
  font-weight: 400;
  color: var(--text-body);
}
.prose p { text-wrap: pretty; }
/* 문장별 줄바꿈 문단: 데스크톱에서 한 문장이 한 줄에 보이도록 측정폭 해제 */
.prose .lines { width: max-content; max-width: calc(min(100vw, var(--max)) - 2 * var(--gutter)); text-wrap: wrap; }
.prose-list { margin-top: var(--s-3); }
.prose-list li { position: relative; padding-left: 1.1em; }
.prose-list li + li { margin-top: var(--s-2); }
.prose-list li::before { content: ""; position: absolute; left: 0; top: .82em; width: .38em; height: 2px; background: var(--teal); }
.prose > * + * { margin-top: var(--para-gap); }

/* ---------- 4. Buttons (square, per source) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  min-height: 52px;
  padding: 0 var(--s-6);
  border: 1.5px solid transparent;
  border-radius: 0;
  font-family: var(--font-ko);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-arrow { display: inline-block; transition: transform .2s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn--lg { min-height: 60px; padding: 0 var(--s-8); font-size: 17px; }

.btn--accent { background: var(--teal-light); color: var(--ink); }
.btn--accent:hover { background: #7DD6DB; }

.btn--ghost-dark { border-color: rgba(251, 251, 250, .5); color: var(--on-dark); }
.btn--ghost-dark:hover { border-color: var(--on-dark); background: rgba(251, 251, 250, .08); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(251, 251, 250, .86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-6);
}

.brand {
  display: inline-flex; align-items: center; gap: var(--s-3);
  min-height: 44px;
  text-decoration: none; color: var(--navy);
}
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name {
  font-size: 18px; font-weight: 700;
  letter-spacing: var(--tracking-mark);
  white-space: nowrap;
}

.site-nav ul { display: flex; align-items: center; gap: var(--s-1); }
.site-nav a {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 44px;
  padding: 0 var(--s-3);
  font-size: 15px; font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.site-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 8px;
  height: 2px; background: var(--teal);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.site-nav a:hover { color: var(--navy); }
.site-nav a:hover::after,
.site-nav a[aria-current="true"]::after { transform: scaleX(1); }
.site-nav a[aria-current="true"] { color: var(--navy); font-weight: 600; }

.site-nav .nav-cta {
  margin-left: var(--s-3);
  padding: 0 var(--s-5);
  min-height: 40px;
  background: var(--navy); color: var(--on-dark);
  font-weight: 600;
}
.site-nav .nav-cta:hover { background: var(--ink); color: var(--on-dark); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0; background: transparent; color: var(--navy);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 22px; height: 2px; margin-inline: auto;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after  { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); background: var(--navy); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { transform: translateY(-7px) rotate(-45deg); background: var(--navy); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--border-strong);
    box-shadow: 0 16px 32px -16px rgba(16, 26, 43, .25);
    display: none;
  }
  .site-nav.is-open { display: block; }
  /* JS 미동작 시에도 탐색 가능하도록 */
  .no-js .nav-toggle { display: none; }
  .no-js .site-nav { position: static; display: block; box-shadow: none; border: 0; background: transparent; }

  .site-nav ul {
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s-2) var(--gutter) var(--s-6);
  }
  .site-nav li + li { border-top: 1px solid var(--border); }
  .site-nav a { min-height: 56px; padding: 0; font-size: 17px; width: 100%; }
  .site-nav a:not(.nav-cta)::after { display: none; }
  .site-nav li:last-child { border-top: 0; padding-top: var(--s-4); }
  .site-nav .nav-cta { margin: 0; justify-content: center; min-height: 52px; }
}


/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--navy);
  color: var(--on-dark);
}
.hero-inner {
  position: relative;
  padding-top: clamp(80px, 9vw, 136px);
  padding-bottom: clamp(72px, 8vw, 112px);
}
.hero-supergraphic {
  position: absolute; z-index: -1;
  right: -6vw; bottom: -16vw;
  width: 62vw; height: 62vw;
  max-width: 720px; max-height: 720px;
  opacity: .09;
  pointer-events: none;
}
.hero-title {
  max-width: 11em;
  font-size: clamp(34px, 5.2vw, 72px);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--on-dark);
}
.hero-title-a { font-weight: 500; color: var(--on-dark-muted); }
.hero-title-b { font-weight: 700; }
.hero .prose,
.cta .prose { color: var(--on-dark-muted); }
.hero .btn-row,
.cta .btn-row { margin-top: var(--s-10); }

@media (max-width: 640px) {
  .hero-supergraphic { width: 120vw; height: 120vw; right: -48vw; bottom: -36vw; }
  .hero .btn-row .btn,
  .cta .btn-row .btn { flex: 1 1 100%; }
}

/* ---------- 7. 설립취지: 원문 인용 ---------- */
.charter { margin: calc(var(--para-gap) * 2) 0 0; }
.charter blockquote {
  margin: 0;
  padding-left: var(--s-6);
  border-left: 2px solid var(--teal);   /* 장식선(텍스트 아님) */
}
.charter blockquote p + p { margin-top: var(--para-gap); }
.charter strong { font-weight: 600; color: var(--navy); }
.charter figcaption { margin-top: var(--s-3); padding-left: var(--s-6); color: var(--text-muted); }

/* ---------- 8. 핵심 가치: 네 문장 ---------- */

/* ---------- 9. 마무리 CTA ---------- */
.cta { background: var(--navy); color: var(--on-dark); }
.cta .container { padding-block: clamp(72px, 7vw, 104px); }
.cta .headline { color: var(--on-dark); }

/* ---------- 10. Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--on-dark-subtle);
  font-size: 15px;
}
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--s-12) var(--s-16);
  padding-block: clamp(40px, 4vw, 56px) var(--s-10);
}
.footer-brand { display: flex; align-items: center; gap: var(--s-5); }
.footer-mark { width: 52px; height: 52px; flex: none; }
.footer-rule { width: 1px; align-self: stretch; min-height: 44px; background: rgba(251, 251, 250, .3); }
.footer-name {
  font-size: 20px; font-weight: 700; line-height: 1.3;
  letter-spacing: var(--tracking-mark);
  color: var(--on-dark);
}
.footer-en {
  margin-top: 6px;
  font-family: var(--font-en);
  font-size: 9px; font-weight: 500;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: rgba(251, 251, 250, .72);
}

/* 칼럼 제목은 국문 워드마크, 내용 줄은 영문 디스크립터와 같은 높이에 오도록 맞춤 */
.footer-cols { display: flex; flex-wrap: wrap; gap: var(--s-12) clamp(48px, 7vw, 96px); padding-top: 4px; }
.footer-head {
  margin-bottom: 3px;
  font-size: 13px; font-weight: 600;
  letter-spacing: .02em;
  color: var(--on-dark);
}
.contact-list { display: grid; gap: var(--s-2); }
.contact-list div { display: flex; gap: var(--s-4); }
.contact-list dt { min-width: 3em; color: var(--on-dark-subtle); }
.contact-list dd { color: var(--on-dark-muted); }
.site-footer a {
  color: var(--on-dark-muted);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.site-footer a:hover { color: var(--teal-light); text-decoration: underline; text-underline-offset: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-6); }
.footer-links a { display: inline-block; padding-block: 6px; margin-block: -6px; } /* 터치 영역은 넓히되 줄 높이는 이메일 줄과 동일 */

.placeholder {
  font-size: 13px;
  color: var(--teal-light);
}

.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3) var(--s-6);
  padding-block: var(--s-6) var(--s-8);
  border-top: 1px solid var(--on-dark-border);
  font-size: 13px;
  color: var(--on-dark-subtle);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
.footer-legal li + li::before { content: "|"; margin-right: var(--s-3); opacity: .5; }
.footer-meta { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
.footer-meta p + p::before { content: "|"; margin-right: var(--s-3); opacity: .5; }
.footer-legal-btn {
  padding: 0; border: 0; background: none;
  font: inherit; color: var(--on-dark-muted); cursor: pointer;
}
.footer-legal-btn:hover { color: var(--teal-light); text-decoration: underline; text-underline-offset: 4px; }

.policy-dialog {
  width: min(520px, calc(100vw - 2 * var(--gutter)));
  padding: var(--s-8);
  border: 0;
  background: var(--paper);
  color: var(--text-body);
  font-size: 15px; line-height: 1.75;
}
.policy-dialog::backdrop { background: rgba(16, 26, 43, .6); }
.policy-dialog h2 { margin-bottom: var(--s-4); font-size: 20px; font-weight: 700; color: var(--navy); letter-spacing: -0.03em; }
.policy-date { margin-top: var(--s-3); font-size: 13px; color: var(--text-muted); }
.policy-dialog form { margin-top: var(--s-6); }
.policy-dialog .btn { background: var(--navy); color: var(--on-dark); }
.policy-dialog .btn:hover { background: var(--ink); }

@media (max-width: 480px) {
  .footer-brand { gap: var(--s-4); }
  .footer-mark { width: 44px; height: 44px; }
  .footer-name { font-size: 18px; }
}


