/* Scryn 랜딩 — 브랜드 시스템(Logo System v1)
   색: Navy #0B1F33 · Graphite #14171A · Warm Ivory #EFEAE0 (세 가지 조합만)
   글꼴: Geist(워드마크·라틴) + Pretendard(한글) · 간격: 8px 체계 */
:root {
  --navy: #0B1F33;
  --navy-2: #102a44;
  --graphite: #14171A;
  --ivory: #EFEAE0;
  --ivory-2: #F7F4EE;
  --paper: #FBFAF7;
  --ink: #14171A;
  --ink-2: #4A4F57;
  --ink-3: #8A8F97;
  --line: rgba(20, 23, 26, .12);
  --line-light: rgba(239, 234, 224, .16);
  --signal: #D92D20;          /* 위변조 의심 — 결과 표시에만 */
  --ok: #067647;
  --r: 14px;
  --font: "Geist", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", system-ui, sans-serif;
  --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 32px; --space-6: 48px; --space-8: 64px;
  /* 분석 중 확인창(기존 스크립트)이 쓰는 이름 */
  --card: var(--paper); --text: var(--ink); --text2: var(--ink-2);
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; line-height: 1.55; font-size: 16px; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { word-break: keep-all; overflow-wrap: break-word; }   /* 한글은 어절 단위로 줄바꿈 */
img, svg, canvas, video { display: block; }
[hidden] { display: none !important; }

/* ── 로고 ── */
.mark { width: 24px; height: 24px; fill: currentColor; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--graphite); }
.wordmark { font-family: "Geist", sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -.04em; line-height: 1; }
.brand-light { color: var(--ivory); }

/* ── 인트로 ── */
.intro { position: fixed; inset: 0; z-index: 100; background: #EDE9DF; transition: opacity .8s ease, visibility .8s; }
/* 영상이 화면을 꽉 채운다(가장자리만 잘림) — 영상 바탕색과 페이지 바탕색이 달라 보이는 띠가 생기지 않게 */
.intro video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 세로 화면: 영상을 다 보인다(가로로 잘리면 로고가 잘린다) — 바탕을 영상 바탕색(#EDE9DF)과 맞춰 띠가 보이지 않게 */
@media (max-aspect-ratio: 1/1) { .intro video { object-fit: contain; } }
.intro-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.intro-skip { position: absolute; right: 24px; bottom: 24px; background: transparent; border: 1px solid rgba(20,23,26,.25);
  color: var(--graphite); border-radius: 999px; padding: 8px 16px; font: 500 13px var(--font); cursor: pointer; opacity: .7; }
.intro-skip:hover { opacity: 1; }
.no-intro .intro, .intro.done { opacity: 0; visibility: hidden; pointer-events: none; }
.with-intro body { overflow: hidden; }
.with-intro.intro-over body { overflow: auto; }

/* ── 상단 ── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; gap: var(--space-4);
  padding: 16px clamp(16px, 4vw, 48px); color: var(--ivory); transition: background .3s, color .3s, box-shadow .3s; }
.nav .brand { color: var(--ivory); }
.nav-links { display: flex; gap: var(--space-3); margin-left: auto; font-size: 14px; font-weight: 500; }
.nav-links a { opacity: .8; } .nav-links a:hover { opacity: 1; }
.nav.scrolled:not(.solid) { background: rgba(11, 31, 51, .72); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line-light); }
.nav.solid { background: rgba(251, 250, 247, .88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.nav.solid .brand { color: var(--graphite); }
.nav.solid .btn-light { background: var(--graphite); color: var(--ivory); }

/* ── 버튼 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 14px 24px; font: 600 15px var(--font); cursor: pointer; transition: transform .15s, background .2s, color .2s, box-shadow .2s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-light { background: var(--ivory); color: var(--graphite); }
.btn-light:hover { box-shadow: 0 8px 24px rgba(239, 234, 224, .18); }
.btn-ghost { background: transparent; color: var(--ivory); box-shadow: inset 0 0 0 1px rgba(239,234,224,.35); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px rgba(239,234,224,.8); }
.btn-dark { background: var(--graphite); color: var(--ivory); }
.btn-dark:hover { background: var(--navy); }
.btn-block { width: 100%; }

/* ── 3D 장면(고정 배경) ── */
.backdrop { position: fixed; inset: 0; z-index: 0; background: var(--navy); pointer-events: none; }
.backdrop::before { content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(55% 65% at 72% 48%, rgba(56, 96, 140, .38), transparent 70%),
    radial-gradient(40% 50% at 8% 92%, rgba(239, 234, 224, .05), transparent 70%),
    linear-gradient(rgba(239,234,224,.04) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(239,234,224,.04) 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: radial-gradient(120% 90% at 60% 50%, #000 40%, transparent 88%); }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; display: block; transition: opacity .5s ease; }
/* 인트로 동안 3D 는 숨겨 두고, 입자가 모이는 끝에 나타난다 */
.with-intro:not(.scene-in) #scene, .with-intro:not(.scene-in) .anchors { opacity: 0; }
.no-webgl #scene { display: none; }
main, .footer { position: relative; z-index: 3; }
.anchors { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }   /* 라벨이 화면 밖으로 나가 페이지 폭을 늘리지 않게 */
.anchor { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--ivory); background: rgba(11, 31, 51, .78);
  border: 1px solid var(--line-light); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .35s; will-change: transform; }
.anchor.on { opacity: 1; }
.anchor .dot { width: 7px; height: 7px; border-radius: 2px; background: var(--ivory); }
#a-hit .dot { background: var(--signal); box-shadow: 0 0 0 4px rgba(217, 45, 32, .25); }
.anchor b { font-weight: 600; }

/* ── 히어로 ── */
.hero { position: relative; min-height: 100svh; color: var(--ivory); display: flex; align-items: center;
  padding: 96px clamp(16px, 4vw, 48px) 72px; }
.hero-copy { width: 100%; max-width: 1240px; margin: 0 auto; }
.hero-copy > * { max-width: 560px; }
.eyebrow { font: 600 12px "Geist", var(--font); letter-spacing: .12em; color: rgba(239, 234, 224, .7); margin-bottom: var(--space-3); }
.eyebrow.dark { color: var(--ink-3); }
.hero-kicker { margin-top: 0; margin-bottom: var(--space-3); line-height: 1.5; }   /* h1 이지만 눈썹 글씨 크기로 */
.hero-title { margin: 0; font-size: clamp(40px, 6.2vw, 84px); line-height: 1.06; letter-spacing: -.035em; font-weight: 700; max-width: none; }
.lead { margin-top: var(--space-3); font-size: clamp(16px, 1.6vw, 19px); color: rgba(239, 234, 224, .78); }
.hero-cta { display: flex; gap: 12px; margin-top: var(--space-6); flex-wrap: wrap; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin-top: var(--space-6);
  font-size: 13px; color: rgba(239, 234, 224, .6); }
.hero-tags li::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--ivory); opacity: .55; margin-right: 8px; vertical-align: 2px; }
.scroll-cue { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px;
  font: 600 10px "Geist", var(--font); letter-spacing: .24em; color: rgba(239,234,224,.5); }
.scroll-cue span { width: 1px; height: 40px; background: linear-gradient(rgba(239,234,224,0), rgba(239,234,224,.7)); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.br-md { display: none; }
@media (min-width: 1100px) { .br-md { display: inline; } }

/* ── 스크롤 스토리: 섹션 높이만큼 스크롤하는 동안 화면에 고정 ── */
.story { position: relative; height: calc(var(--len, 3) * 100svh); color: var(--ivory); }
.pin { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; padding: 88px clamp(16px, 4vw, 48px) 48px; overflow: hidden; }
.story-copy { width: 100%; max-width: 1240px; margin: 0 auto; }
.story-copy > * { max-width: 520px; }
.story-title { font-size: clamp(26px, 3vw, 38px); line-height: 1.18; letter-spacing: -.03em; font-weight: 700; margin-bottom: var(--space-4); }
.beats { display: grid; }
.beat { grid-area: 1 / 1; opacity: 0; transform: translateY(24px); transition: opacity .3s ease, transform .45s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
/* 새 문단은 이전 문단이 거의 사라진 뒤에 들어온다 — 두 문단이 겹쳐 보이지 않게 */
.beat.on { opacity: 1; transform: none; pointer-events: auto; transition: opacity .5s ease .22s, transform .6s cubic-bezier(.2,.7,.2,1) .22s; }
.beat.past { transform: translateY(-24px); }
.beat-n { display: block; font: 600 13px "Geist", var(--font); letter-spacing: .1em; color: rgba(239,234,224,.55); margin-bottom: var(--space-2); }
.beat h2 { font-size: clamp(32px, 4.4vw, 58px); line-height: 1.1; letter-spacing: -.035em; font-weight: 700; }
.beat h3 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -.02em; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.beat p { margin-top: var(--space-2); font-size: clamp(15px, 1.4vw, 18px); color: rgba(239,234,224,.75); }
.tag-note { font-size: 11px; font-weight: 600; letter-spacing: 0; color: rgba(239,234,224,.7); border: 1px solid var(--line-light); border-radius: 6px; padding: 1px 6px; }
.rail { position: relative; height: 2px; margin-top: var(--space-6); background: rgba(239,234,224,.14); border-radius: 2px; overflow: hidden; max-width: 240px; }
.rail span { position: absolute; inset: 0; background: var(--ivory); transform-origin: left; transform: scaleX(var(--p, 0)); }
.det-index { list-style: none; padding: 0; margin-top: var(--space-6); display: grid; gap: 6px; counter-reset: d; }
.det-index li { counter-increment: d; font-size: 13px; color: rgba(239,234,224,.4); transition: color .3s; display: flex; gap: 12px; }
.det-index li::before { content: counter(d, decimal-leading-zero); font: 600 12px "Geist", var(--font); letter-spacing: .06em; }
.det-index li.on { color: var(--ivory); }
.beat-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.beat-tags span { font: 600 11.5px "Geist", var(--font); letter-spacing: .02em; color: rgba(239,234,224,.82); padding: 4px 10px;
  border: 1px solid var(--line-light); border-radius: 999px; background: rgba(239,234,224,.05); }
.story-note { margin-top: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--line-light); font-size: 13.5px; line-height: 1.6;
  color: rgba(239,234,224,.62); }
/* 스크립트가 없거나 움직임 줄이기: 고정 없이 모든 문단을 차례로 보인다 */
html:not(.story-on) .story { height: auto; }
html:not(.story-on) .pin { position: relative; height: auto; min-height: 0; padding-top: 96px; padding-bottom: 96px; }
html:not(.story-on) .beats { gap: var(--space-6); }
html:not(.story-on) .beat { grid-area: auto; opacity: 1; transform: none; }
html:not(.story-on) .rail { display: none; }

/* ── 섹션 공통 ── */
.section { padding: clamp(72px, 10vw, 128px) clamp(16px, 4vw, 48px); }
/* 밝은 지면(활용·도입·체험)은 불투명 — 스크롤해 올라오며 3D 장면을 덮는다 */
.paper { position: relative; background: var(--paper); border-radius: 28px 28px 0 0; box-shadow: 0 -30px 60px rgba(0,0,0,.18); }
.section-line { border-top: 1px solid var(--line); }

/* ── 활용 ── */
.cases { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.case { display: flex; flex-direction: column; gap: 8px; min-height: 208px; padding: var(--space-4); background: var(--ivory-2);
  border: 1px solid var(--line); border-radius: 20px; }
.case-k { font: 700 28px "Geist", var(--font); letter-spacing: -.02em; color: var(--navy); margin-bottom: auto; }
.case h3 { font-size: 21px; letter-spacing: -.02em; margin-top: var(--space-4); }
.case p { color: var(--ink-2); font-size: 15px; }

/* ── 도입: 네 단계를 한 줄 위에 ── */
.adopt { max-width: 1240px; margin: 0 auto; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--navy); }
.adopt-step { position: relative; padding: var(--space-4) var(--space-3) 0 0; }
.adopt-step::before { content: ""; position: absolute; top: -8px; left: 0; width: 14px; height: 14px; box-sizing: border-box; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--navy); }
.step-n { font: 600 13px "Geist", var(--font); letter-spacing: .08em; color: var(--ink-3); }
.adopt-step h3 { font-size: 20px; letter-spacing: -.02em; margin-top: 8px; }
.adopt-step p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.section-head { max-width: 1240px; margin: 0 auto var(--space-8); }
.section-head h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.15; letter-spacing: -.03em; font-weight: 700; }
.section-head p { margin-top: var(--space-2); color: var(--ink-2); max-width: 40em; font-size: 17px; }

/* ── 체험 ── */
.try-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--space-4); align-items: start; }
.uploader { background: var(--ivory-2); border: 1px solid var(--line); border-radius: 24px; padding: var(--space-3); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 48px 20px;
  border: 1.5px dashed rgba(20,23,26,.22); border-radius: 18px; cursor: pointer; transition: .2s; margin-bottom: var(--space-2); }
.drop:hover, .drop.over { border-color: var(--navy); background: rgba(11, 31, 51, .03); }
.drop.has { border-style: solid; border-color: var(--navy); }
.drop-icon svg { width: 40px; height: 40px; fill: var(--navy); }
.drop-t { font-weight: 600; font-size: 17px; margin-top: 8px; }
.drop-d { font-size: 13px; color: var(--ink-3); }
.fname { font-size: 14px; font-weight: 600; color: var(--navy); margin-top: 4px; word-break: break-all; }
.foot { font-size: 13px; color: var(--ink-3); margin-top: var(--space-2); text-align: center; }
.samples-t { font-weight: 600; margin-bottom: var(--space-2); }
.samples { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-2); }
.samples-loading { color: var(--ink-3); font-size: 14px; }
.scard { background: var(--ivory-2); border: 1px solid var(--line); border-radius: 16px; padding: 10px; cursor: pointer; text-align: left;
  font-family: inherit; color: inherit; transition: .2s; }
.scard:hover { border-color: var(--navy); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(11,31,51,.1); }
.scard img { width: 100%; height: 160px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.sinfo { padding: 10px 4px 4px; }
.sname { font-size: 14px; font-weight: 600; line-height: 1.35; margin-bottom: 8px; }
.sbadges { display: flex; flex-wrap: wrap; gap: 6px; }
.sbadge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--navy); color: var(--ivory); }

/* ── 하단 ── */
.footer { background: var(--navy); color: var(--ivory); padding: var(--space-8) clamp(16px, 4vw, 48px); }
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.footer-tag { font-weight: 600; font-size: 17px; text-align: right; }
.footer-sub { font-size: 13px; color: rgba(239,234,224,.55); margin-top: 4px; text-align: right; }

/* ── 분석 중 ── */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(11, 31, 51, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 24px; }
.ov-card { text-align: center; color: var(--ivory); max-width: 420px; }
.ov-mark { display: block; width: 72px; height: 72px; margin: 0 auto var(--space-4); overflow: visible; fill: var(--ivory); }
.ov-text { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.ov-sub { font-size: 14px; color: rgba(239,234,224,.65); margin-top: 8px; }
.ov-bar { height: 3px; background: rgba(239,234,224,.15); border-radius: 3px; overflow: hidden; margin-top: var(--space-4); }
.ov-bar span { display: block; height: 100%; width: 30%; background: var(--ivory); animation: bar 1.6s ease-in-out infinite; }
@keyframes bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }


/* ── 등장 ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── 반응형 ── */
@media (max-width: 960px) {
  .try-grid { grid-template-columns: 1fr; }
  .cases { grid-template-columns: 1fr; }
  .case { min-height: 0; }
  /* 좁은 화면: 네 단계를 세로 줄 위에 */
  .adopt { grid-template-columns: 1fr; row-gap: var(--space-4); border-top: 0; border-left: 2px solid var(--navy); padding-left: 28px; }
  .adopt-step { padding: 0; }
  .adopt-step::before { top: 2px; left: -37px; }
  /* 좁은 화면: 3D 가 위, 글은 아래 — 글 뒤에 네이비 그라데이션을 깔아 읽히게 */
  .hero { align-items: flex-end; padding-bottom: 96px; }
  .pin { align-items: flex-end; padding-bottom: 40px; }
  .hero-copy, .story-copy { position: relative; }
  .hero-copy::before, .story-copy::before { content: ""; position: absolute; inset: -48px calc(-1 * clamp(16px, 4vw, 48px)) -40px; z-index: -1;
    background: linear-gradient(rgba(11,31,51,0), rgba(11,31,51,.92) 38%); }
  .story-copy > * { max-width: none; }
  .det-index { display: none; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .footer-tag, .footer-sub { text-align: left; }
}
