/* 솜이랑 (somandlee) — 마케팅 사이트
 * "필름 다이어리" 정체성을 웹으로. theme/tokens.ts 1:1 미러.
 * 시그니처: JetBrains Mono "며칠째" 카운터 + 필름 프레임 코너 틱 + 웜 헤어라인.
 */

:root {
  /* 캔버스 / 서피스 — 따뜻한 아이보리 종이 */
  --bg: #f7f2e9;
  --surface: #fffdf8;
  --surface-soft: #efe6d6;
  --surface-strong: #e6dcc8;
  /* 잉크 — 에스프레소(순흑 금지) */
  --ink: #2b2622;
  --body: #3c352e;
  --muted: #8d8174;
  --muted-soft: #bcae9c;
  /* 악센트 — 테라코타 */
  --accent: #c75b39;
  --accent-press: #a8472b;
  --accent-soft: #f2e0d4;
  --on-accent: #fffdf8;
  /* 라인 */
  --line: #e7ddcc;
  --line-soft: #f0e8d9;
  /* 다크 면 */
  --navy: #2f2a26;
  --inverse-ink: #fbf6ec;

  --maxw: 1120px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 18px 50px -28px rgba(43, 38, 34, 0.4);
  --shadow-soft: 0 10px 30px -20px rgba(43, 38, 34, 0.35);

  --sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 필름 그레인(맨 위, 아주 옅게) + 종이결 웜 그라데이션 */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
    radial-gradient(1200px 600px at 80% -10%, rgba(199, 91, 57, 0.05), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(143, 129, 116, 0.06), transparent 55%);
  background-repeat: repeat, no-repeat, no-repeat;
  background-size: 160px 160px, auto, auto;
  background-attachment: fixed;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── 공통 텍스트 어휘 ───────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  opacity: 0.55;
}

h1, h2, h3 { color: var(--ink); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; margin: 0; text-wrap: balance; }
.lead { color: var(--body); font-size: 19px; line-height: 1.75; }
.muted { color: var(--muted); }

/* ── 헤더 ──────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 233, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-soft); }
.brand .name { font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: -0.01em; }
.brand .tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 14px; color: var(--body); font-weight: 500; transition: color 0.18s; }
.nav a:hover { color: var(--accent); }
.nav .pill {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent-soft); background: var(--accent-soft);
  padding: 6px 12px; border-radius: 999px;
}
@media (max-width: 720px) { .nav .nav-link { display: none; } }

/* ── 버튼 ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  padding: 14px 22px; border-radius: 14px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.16s ease, background 0.18s, box-shadow 0.18s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 24px -12px rgba(199, 91, 57, 0.7); }
.btn-primary:hover { background: var(--accent-press); transform: translateY(-1px); box-shadow: 0 16px 32px -14px rgba(199, 91, 57, 0.78); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted-soft); background: #fff; transform: translateY(-1px); }
.btn .sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; opacity: 0.85; text-transform: uppercase; }

/* ── 히어로 ────────────────────────────────────── */
.hero { padding: 72px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(40px, 5.6vw, 66px); letter-spacing: -0.035em; line-height: 1.06; }
.hero h1 .accent { color: var(--accent); }
.hero .lead { margin: 22px 0 32px; max-width: 30em; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .meta { margin-top: 26px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }
.hero .meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero .meta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* 필름 프레임 — 시그니처 */
.frame { position: relative; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
/* 뒤에 살짝 기울어진 종이 카드 — 필름 스택 깊이감 */
.frame::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--surface-soft); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
  transform: rotate(-2.4deg) translate(-12px, 12px);
}
.frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; aspect-ratio: 16 / 11; }
.frame .badge {
  position: absolute; top: 30px; left: 30px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--inverse-ink); background: rgba(34, 30, 27, 0.62);
  backdrop-filter: blur(4px); padding: 7px 12px; border-radius: 9px;
}
/* 코너 틱(필름 프레임 모서리) */
.tick { position: absolute; width: 16px; height: 16px; border: 1.5px solid var(--muted-soft); opacity: 0.85; }
.tick.tl { top: 7px; left: 7px; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.tick.tr { top: 7px; right: 7px; border-left: 0; border-bottom: 0; border-radius: 0 4px 0 0; }
.tick.bl { bottom: 7px; left: 7px; border-right: 0; border-top: 0; border-radius: 0 0 0 4px; }
.tick.br { bottom: 7px; right: 7px; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }

@media (max-width: 880px) {
  .hero { padding: 44px 0 24px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 38px; }
  .hero .frame { order: -1; }
  .frame::before { display: none; }
}

/* ── 카운터 시그니처 밴드 ──────────────────────── */
.counter-band { padding: 64px 0; }
.counter-card {
  position: relative; text-align: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 56px 24px; box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.counter-card .eyebrow { justify-content: center; }
.counter-num {
  font-family: var(--sans); font-weight: 800; font-variant-numeric: tabular-nums;
  font-size: clamp(96px, 18vw, 184px); line-height: 0.9; color: var(--ink); letter-spacing: -0.04em;
  display: inline-flex; align-items: baseline; gap: 14px;
}
.counter-num .unit { font-size: clamp(28px, 5vw, 44px); font-weight: 700; color: var(--accent); letter-spacing: -0.02em; }
.counter-card p { max-width: 30em; margin: 18px auto 0; color: var(--muted); font-size: 16px; }
.counter-card .strip { position: absolute; left: 0; right: 0; height: 14px; display: flex; gap: 10px; justify-content: center; opacity: 0.5; }
.counter-card .strip.top { top: 14px; } .counter-card .strip.bot { bottom: 14px; }
.counter-card .strip i { width: 16px; height: 8px; background: var(--surface-strong); border-radius: 2px; }

/* ── 섹션 헤더 ─────────────────────────────────── */
.section { padding: 76px 0; }
.section-head { max-width: 34em; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head p { color: var(--muted); margin: 16px 0 0; font-size: 17px; }

/* ── 기능(지그재그 에디토리얼) ─────────────────── */
.features { display: flex; flex-direction: column; gap: clamp(44px, 6vw, 76px); }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.feature:nth-child(even) .ph { order: 2; }        /* 짝수 행은 이미지를 오른쪽으로 */
.feature .ph {
  position: relative; aspect-ratio: 5 / 4; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow);
}
.feature .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.feature:hover .ph img { transform: scale(1.045); }
.feature .body { padding: 4px 6px; }
.feature .fno { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--accent); text-transform: uppercase; }
.feature h3 { font-size: clamp(22px, 2.6vw, 28px); margin: 14px 0 12px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 26em; }
@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; gap: 20px; max-width: 460px; margin: 0 auto; }
  .feature:nth-child(even) .ph { order: 0; }       /* 모바일은 항상 이미지 먼저 */
}

/* ── 다크 인용 밴드 ────────────────────────────── */
.quote {
  background:
    radial-gradient(120% 120% at 85% -10%, rgba(199, 91, 57, 0.18), transparent 55%),
    var(--navy);
  color: var(--inverse-ink); border-radius: var(--radius-lg); padding: 72px 48px; text-align: center; position: relative; overflow: hidden;
}
.quote .eyebrow { color: #e8b9a6; justify-content: center; }
.quote .eyebrow::before { background: #e8b9a6; }
.quote blockquote { margin: 0 auto; max-width: 18em; font-size: clamp(24px, 3.6vw, 34px); font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; color: var(--inverse-ink); }
.quote .by { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(251, 246, 236, 0.6); margin-top: 24px; }

/* ── 신뢰(로컬 우선) — 헤어라인 원장 ──────────── */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.trust .item { padding: 32px 30px 8px; border-left: 1px solid var(--line); }
.trust .item:first-child { border-left: 0; padding-left: 2px; }
.trust .item .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--accent); text-transform: uppercase; }
.trust .item h3 { font-size: 18px; margin: 14px 0 8px; }
.trust .item p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
@media (max-width: 760px) {
  .trust { grid-template-columns: 1fr; }
  .trust .item { border-left: 0; border-top: 1px solid var(--line); padding: 26px 2px 6px; }
  .trust .item:first-child { border-top: 0; }
}

/* ── CTA ───────────────────────────────────────── */
.cta-band { text-align: center; padding: 92px 0 84px; }
.cta-band h2 { font-size: clamp(30px, 4.4vw, 46px); }
.cta-band p { color: var(--muted); margin: 18px auto 34px; max-width: 26em; }
.cta-band .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── 푸터 ──────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 64px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.site-footer .brand .name { font-size: 17px; }
.site-footer .col-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.site-footer .links { display: flex; flex-direction: column; gap: 10px; }
.site-footer .links a { font-size: 14px; color: var(--body); transition: color 0.16s; }
.site-footer .links a:hover { color: var(--accent); }
.site-footer .copy { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted-soft); margin-top: 30px; width: 100%; }

/* ── 문서 페이지(개인정보/약관) ───────────────── */
.doc { padding: 64px 0 88px; }
.doc .inner { max-width: 760px; margin: 0 auto; }
.doc h1 { font-size: clamp(30px, 5vw, 40px); margin-bottom: 10px; }
.doc .updated { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 40px; }
.doc h2 { font-size: 21px; margin: 40px 0 12px; }
.doc h3 { font-size: 16px; margin: 24px 0 8px; color: var(--ink); }
.doc p, .doc li { color: var(--body); font-size: 16px; line-height: 1.8; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 11px 14px; text-align: left; vertical-align: top; }
.doc th { background: var(--surface-soft); font-weight: 600; color: var(--ink); }
.doc .back { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); display: inline-block; margin-bottom: 28px; }

/* ── 스크롤 등장(스프링 이징 + 스태거) ─────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.75s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.features .feature:nth-child(2), .trust .item:nth-child(2) { transition-delay: 0.09s; }
.features .feature:nth-child(3), .trust .item:nth-child(3) { transition-delay: 0.18s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* 앵커 이동 시 스티키 헤더에 가리지 않게 */
#features, #story { scroll-margin-top: 88px; }

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
