/* 에강모 홈페이지 v2 · 무채색 토큰 */
:root {
  --bg: #FFFFFF;
  --fg: #1D1D1F;
  --muted: #6E6E73;
  --faint: #86868B;
  --line: #E8E8ED;
  --surface: #F5F5F7;
  --surface-2: #EBEBF0;
  --btn-bg: #1D1D1F;
  --btn-fg: #FFFFFF;
  --header: rgba(255, 255, 255, .78);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --fg: #F5F5F7; --muted: #A1A1A6; --faint: #86868B; --line: #2A2A2E;
    --surface: #161618; --surface-2: #232326; --btn-bg: #F5F5F7; --btn-fg: #1D1D1F;
    --header: rgba(0, 0, 0, .72); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --fg: #F5F5F7; --muted: #A1A1A6; --faint: #86868B; --line: #2A2A2E;
  --surface: #161618; --surface-2: #232326; --btn-bg: #F5F5F7; --btn-fg: #1D1D1F;
  --header: rgba(0, 0, 0, .72); color-scheme: dark;
}

/* 기본 */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", system-ui, sans-serif;
  font-size: 17px; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1 { font-size: clamp(44px, 6.4vw, 80px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.08; }
h2 { font-size: clamp(32px, 4.2vw, 48px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.container { width: min(1040px, 100% - 48px); margin-inline: auto; }
.wide { width: min(1400px, 100% - 48px); margin-inline: auto; }
.section { padding-block: 140px; }
.sub { color: var(--muted); font-size: 19px; }
.meta { font-size: 13.5px; color: var(--faint); letter-spacing: .01em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 8px; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 26px;
  border-radius: 999px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { opacity: .86; }
.btn-secondary { background: var(--surface); color: var(--fg); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .45); height: 54px; padding: 0 28px; }
.btn-outline:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .8); }
.chip { display: inline-block; margin-bottom: 18px; padding: 5px 11px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
.chip-invert { background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .85); }

/* 헤더 */
.header {
  position: sticky; top: 0; z-index: 20; background: var(--header);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.header.scrolled { border-bottom-color: var(--line); }
.header .container { height: 64px; display: flex; align-items: center; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.brand img { border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14.5px; font-weight: 500; color: var(--muted); }
.nav a { transition: color .15s; }
.nav a:hover { color: var(--fg); }
.soon { color: var(--faint); cursor: default; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.soon em { font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; padding: 2px 7px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.theme-toggle:hover { background: var(--surface); color: var(--fg); }
.theme-toggle .ic-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ic-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .ic-moon { display: block; }
}
.menu-btn { display: none; width: 38px; height: 38px; border: 0; background: transparent; cursor: pointer; padding: 0; position: relative; }
.menu-btn span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--fg); transition: transform .2s, top .2s; }
.menu-btn span:first-child { top: 15px; } .menu-btn span:last-child { top: 22px; }
.menu-open .menu-btn span:first-child { top: 18.5px; transform: rotate(45deg); }
.menu-open .menu-btn span:last-child { top: 18.5px; transform: rotate(-45deg); }

/* 히어로 */
.hero { padding: 96px 0 0; }
.hero-text { text-align: center; }
.hero .lead { margin: 26px auto 0; max-width: 36em; font-size: 21px; line-height: 1.55; color: var(--muted); }
.hero .cta { margin-top: 38px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero-photo { margin-top: 72px; position: relative; }
.hero-photo img { width: 100%; height: auto; aspect-ratio: 1600 / 685; object-fit: cover; border-radius: 24px; }
.hero-photo figcaption { position: absolute; right: 18px; bottom: 16px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .45); color: #fff; font-size: 12.5px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero-photo img { animation: hero-in 1.1s cubic-bezier(.2, .7, .2, 1) both; will-change: transform; }
@keyframes hero-in { from { opacity: 0; transform: scale(1.025) translateY(10px); } to { opacity: 1; transform: none; } }
.hero-text h1, .hero-text .lead, .hero-text .cta { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-text .lead { animation-delay: .08s; } .hero-text .cta { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 마퀴 */
.marquee { margin-top: 40px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { padding: 0 28px; font-size: 15px; font-weight: 500; color: var(--faint); white-space: nowrap; letter-spacing: -0.01em; }
.marquee-track span::after { content: "·"; margin-left: 56px; color: var(--line); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 숫자 */
.stats { padding: 96px 0 0; }
.stats ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats b { display: block; font-size: clamp(40px, 5vw, 60px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stats span { display: block; margin-top: 12px; font-size: 15px; color: var(--muted); }
.stats .note { margin-top: 36px; text-align: center; font-size: 12.5px; color: var(--faint); }

/* 소개 */
.about-top { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about .story { font-size: 19px; line-height: 1.7; color: var(--muted); padding-top: 10px; }
.about .story p + p { margin-top: 16px; }
.about-photo { margin-top: 72px; }
.about-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 24px; }
.who { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.who li { background: var(--surface); border-radius: 22px; padding: 30px 28px; }
.who b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.who p { margin-top: 10px; color: var(--muted); font-size: 15.5px; line-height: 1.6; }

/* 모임 기록 */
.records { padding-bottom: 120px; }
.records h2 + .sub { margin-top: 14px; }
.carousel { margin-top: 48px; }
.car-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; padding-inline: max(24px, (100vw - 1400px) / 2 + 24px);
  scroll-padding-inline: max(24px, (100vw - 1400px) / 2 + 24px);
}
.car-track::-webkit-scrollbar { display: none; }
.car-track li { flex: 0 0 min(72vw, 980px); scroll-snap-align: center; }
.car-track img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 22px; }
.car-ctl { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; }
.car-idx { font-size: 13.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.car-btns { display: flex; gap: 8px; }
.car-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); color: var(--fg); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: background .15s;
}
.car-btn:hover { background: var(--surface-2); }
.rec-grid { margin-top: 96px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.rec { display: flex; flex-direction: column; }
.rec .img { border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface); }
.rec .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.rec:hover .img img { transform: scale(1.03); }
.rec .meta { margin-top: 16px; }
.rec h3 { margin-top: 6px; font-size: 18px; }
.rec p { margin-top: 4px; font-size: 15px; color: var(--muted); }
.rec-next .img { display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; font-weight: 600; font-size: 16px; line-height: 1.45; background: var(--surface); transition: background .15s; }
.rec-next:hover .img { background: var(--surface-2); }
.video { margin-top: 96px; }
.video .frame { aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: var(--surface); }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video .meta { margin-top: 14px; }
.flow { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 0; font-size: 15px; color: var(--muted); }
.flow li + li::before { content: "→"; margin: 0 12px; color: var(--line); }

/* 플로팅 CTA */
.float-cta {
  position: fixed; left: 50%; bottom: 22px; z-index: 30; transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px 0 16px; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg); font-size: 14.5px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18); transition: transform .35s cubic-bezier(.2, .7, .2, 1), opacity .35s;
}
.float-cta.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.float-cta .dot { width: 8px; height: 8px; border-radius: 50%; background: #34C759; box-shadow: 0 0 0 0 rgba(52, 199, 89, .5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, .5); } 70% { box-shadow: 0 0 0 8px rgba(52, 199, 89, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); } }

/* 참여하기 */
.join { background: var(--surface); }
.ways { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.way {
  display: flex; flex-direction: column; background: var(--bg); border-radius: 24px; padding: 32px 30px 28px; min-height: 240px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.way:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0, 0, 0, .08); }
.way h3 { font-size: 22px; }
.way p { margin-top: 10px; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.way .link { margin-top: auto; padding-top: 22px; font-size: 15px; font-weight: 600; }
.way .link::after { content: " →"; }
.join .alt { margin-top: 32px; font-size: 15px; color: var(--muted); }
.join .alt a { color: var(--fg); font-weight: 600; border-bottom: 1px solid var(--line); }
.join .alt a:hover { border-bottom-color: var(--fg); }

/* 포토월 */
.wall { position: relative; background: #0A0A0B; color: #fff; min-height: 820px; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 120px 24px; }
.wall-grid { position: absolute; inset: -60px -16px; bottom: auto; min-height: calc(100% + 400px); display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-rows: 110px; grid-auto-flow: row dense; gap: 14px; opacity: .3; filter: saturate(.85); }
.wall-grid li { border-radius: 16px; overflow: hidden; background: #1a1a1c; }
.wall-grid { animation: wall-drift 70s ease-in-out infinite alternate; will-change: transform; }
@keyframes wall-drift { from { transform: translateY(0); } to { transform: translateY(-340px); } }
.wall-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wall-grid li:nth-child(7n+1) { grid-row: span 3; }
.wall-grid li:nth-child(7n+2) { grid-row: span 2; }
.wall-grid li:nth-child(7n+3) { grid-row: span 4; }
.wall-grid li:nth-child(7n+4) { grid-row: span 3; }
.wall-grid li:nth-child(7n+5) { grid-row: span 2; }
.wall-grid li:nth-child(7n+6) { grid-row: span 3; }
.wall-grid li:nth-child(7n+7) { grid-row: span 4; }
.wall::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 48% 52% at 50% 50%, rgba(10, 10, 11, .92) 0%, rgba(10, 10, 11, .55) 60%, rgba(10, 10, 11, 0) 100%); pointer-events: none; }
.wall::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 120px; background: linear-gradient(#0A0A0B, transparent); pointer-events: none; }
.wall-content { position: relative; z-index: 1; text-align: center; max-width: 720px; display: flex; flex-direction: column; align-items: center; }
.wall-content h2 { color: #fff; font-size: clamp(36px, 5vw, 56px); }
.wall-content p { margin-top: 22px; font-size: 18px; line-height: 1.65; color: rgba(255, 255, 255, .72); }
.wall-content .btn { margin-top: 40px; }
.wall-note { margin-top: 56px; font-size: 13px; color: rgba(255, 255, 255, .4); }

/* 푸터 */
.footer { padding: 0 0 36px; font-size: 14.5px; overflow: hidden; }
.wordmark { font-size: clamp(120px, 24vw, 360px); font-weight: 800; letter-spacing: -0.06em; line-height: .95; text-align: center; color: var(--surface-2); margin: 40px 0 -0.08em; user-select: none; }
.foot-grid { padding-top: 64px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.foot-brand .tagline { margin-top: 14px; color: var(--muted); line-height: 1.6; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.foot-col h4 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--faint); letter-spacing: .02em; }
.foot-col a { color: var(--muted); transition: color .15s; }
.foot-col a:hover { color: var(--fg); }
.foot-col .soon { font-size: 14.5px; }
.footer .contact { font-style: normal; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer .contact b { color: var(--fg); font-weight: 600; }
.legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; display: flex; gap: 8px 24px; flex-wrap: wrap; }
.legal a { color: var(--muted); } .legal a:hover { color: var(--fg); }
.legal span:last-child { margin-left: auto; }
.footer-plain { padding-top: 24px; }

/* 문서 페이지 */
.doc { padding: 72px 0 120px; }
.doc .container { max-width: 720px; }
.doc h1 { font-size: clamp(34px, 4.5vw, 48px); }
.doc-lead { margin-top: 20px; font-size: 19px; line-height: 1.65; color: var(--muted); }
.doc-meta { margin-top: 14px; font-size: 13.5px; color: var(--faint); }
.doc section { margin-top: 56px; }
.doc h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.doc p, .doc li { margin-top: 12px; font-size: 16.5px; line-height: 1.75; color: var(--muted); }
.doc ul, .doc ol { margin-top: 4px; padding-left: 20px; }
.doc ul { list-style: disc; } .doc ol { list-style: decimal; }
.doc .doc-table + p { margin-top: 18px; }
.doc li { margin-top: 8px; }
.doc .contact { margin-top: 14px; font-style: normal; display: flex; flex-direction: column; gap: 6px; font-size: 16px; color: var(--muted); }
.doc .contact b { color: var(--fg); font-weight: 600; }
.doc-table { margin-top: 18px; width: 100%; border-collapse: collapse; font-size: 15px; }
.doc-table th, .doc-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.doc-table th { font-weight: 600; color: var(--faint); font-size: 13px; }
.doc-table td { color: var(--muted); }
.doc-table td:first-child { color: var(--fg); white-space: nowrap; }

/* 등장 모션 */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track, .hero-photo img, .hero-text h1, .hero-text .lead, .hero-text .cta, .float-cta .dot, .wall-grid { animation: none; }
  html { scroll-behavior: auto; }
}

/* 반응형 */
@media (max-width: 1024px) {
  .section { padding-block: 110px; }
  .wall-grid { grid-template-columns: repeat(3, 1fr); }
  .rec-grid { grid-template-columns: repeat(2, 1fr); }
  .about-top { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 860px) {
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 12px 24px 20px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 17px;
  }
  .nav a, .nav .soon { padding: 10px 0; }
  .menu-open .nav { display: flex; }
  .menu-btn { display: block; }
  .header .btn-sm { display: none; }
}
@media (max-width: 768px) {
  .container { width: min(1040px, 100% - 40px); }
  .wide { width: 100%; }
  .section { padding-block: 88px; }
  .br-wide { display: none; }
  .hero { padding-top: 64px; }
  .hero .lead { font-size: 18px; }
  .hero .cta .btn { flex: 1 1 100%; }
  .hero-photo { margin-top: 48px; }
  .hero-photo img { aspect-ratio: 4 / 3; border-radius: 0; }
  .hero-photo figcaption { right: 14px; bottom: 12px; }
  .stats { padding-top: 72px; }
  .stats ul { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .who { grid-template-columns: 1fr; }
  .about-photo { margin-top: 48px; }
  .about-photo img { aspect-ratio: 4 / 3; border-radius: 18px; }
  .car-track { padding-inline: 20px; scroll-padding-inline: 20px; gap: 10px; }
  .car-track li { flex-basis: 86vw; }
  .car-track img { aspect-ratio: 4 / 3; border-radius: 16px; }
  .rec-grid { grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 72px; }
  .rec h3 { font-size: 16px; }
  .video { margin-top: 72px; }
  .ways { grid-template-columns: 1fr; }
  .way { min-height: 0; }
  .wall { min-height: 640px; padding: 96px 20px; }
  .wall-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 80px; gap: 10px; inset: -30px -10px; }
  .wall-grid li { border-radius: 12px; }
  .wall-content p { font-size: 16px; }
  .wall-content .btn { width: 100%; }
  .float-cta { bottom: 16px; font-size: 14px; }
  .marquee { margin-top: 28px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; padding-top: 48px; }
  .foot-brand { grid-column: 1 / -1; }
  .legal span:last-child { margin-left: 0; }
  .doc { padding: 48px 0 88px; }
  .doc-table { font-size: 14px; } .doc-table th, .doc-table td { padding: 10px 6px; }
}
