/* ============================================================
   Plavue — Design System tokens + components
   Pretendard Variable · Three-color moment signature · 32px radius
   ============================================================ */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@latest/dist/web/static/pretendard.css");

:root {
  /* Moment signature (reserved) */
  --private: #E65100;  --private-deep: #B23F00;  --private-soft: #FFEDD5;
  --shared: #8A9A5B;   --shared-deep: #6B7A44;   --shared-soft: #EEF1E2;
  --public: #1A237E;   --public-deep: #101864;   --public-soft: #E0E3F2;

  /* Category (treemap only) */
  --cat-work: #3B4252;     --cat-work-soft: #E5E7EB;
  --cat-family: #8D6E63;   --cat-family-soft: #EFE7E3;
  --cat-friends: #6B7A8F;  --cat-friends-soft: #E6EAEF;
  --cat-health: #9B7B95;   --cat-health-soft: #EDE5EB;
  --cat-fitness: #7B8D7A;  --cat-fitness-soft: #E5EAE5;
  --cat-learn: #4B6358;    --cat-learn-soft: #E0E6E3;
  --cat-play: #A87B4B;     --cat-play-soft: #EFE5D8;

  /* Surface */
  --canvas: #FFFFFF;
  --surface-soft: #F7F7F8;
  --surface-muted: #F2F2F4;
  --hairline: #E5E5E7;
  --hairline-soft: #EFEFF1;

  /* Text */
  --ink-deep: #1A1A1A;
  --ink: #2E2E2E;
  --charcoal: #525252;
  --slate: #737373;
  --steel: #A3A3A3;
  --stone: #D4D4D4;

  /* Eval / semantic */
  --star: #EAB308;
  --star-empty: #E5E5E7;

  /* Radius */
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;
  --r-xxl: 24px; --r-xxxl: 32px; --r-feature: 40px; --r-full: 999px;

  /* Shadow */
  --glow-1: 0px 4px 16px rgba(0,0,0,0.06);
  --glow-2: 0px 8px 32px rgba(0,0,0,0.10);

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          system-ui, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;

  /* Page accent (tweakable; defaults to ink) */
  --max: 1280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.1px;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--private-soft); color: var(--private-deep); }

/* ---------- Type scale ---------- */
.t-hero   { font-size: 56px; font-weight: 700; line-height: 1.16; letter-spacing: -0.5px; }
.t-display { font-size: 44px; font-weight: 700; line-height: 1.18; letter-spacing: -0.4px; }
.t-h-lg   { font-size: 32px; font-weight: 600; line-height: 1.25; letter-spacing: -0.3px; }
.t-h-md   { font-size: 24px; font-weight: 600; line-height: 1.30; letter-spacing: -0.2px; }
.t-h-sm   { font-size: 20px; font-weight: 600; line-height: 1.35; letter-spacing: -0.2px; }
.t-sub-lg { font-size: 18px; font-weight: 600; line-height: 1.44; letter-spacing: -0.1px; }
.t-sub-md { font-size: 18px; font-weight: 400; line-height: 1.44; letter-spacing: -0.1px; }
.t-body-lg { font-size: 17px; font-weight: 400; line-height: 1.50; }
.t-body   { font-size: 16px; font-weight: 400; line-height: 1.50; }
.t-body-sm { font-size: 14px; font-weight: 400; line-height: 1.45; }
.t-cap    { font-size: 12px; font-weight: 600; line-height: 1.35; letter-spacing: 0; }

.ink-deep { color: var(--ink-deep); }
.slate { color: var(--slate); }
.steel { color: var(--steel); }

/* ---------- Layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 48px; }
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--slate);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 600; letter-spacing: -0.1px;
  border-radius: var(--r-full); cursor: pointer; border: none;
  transition: transform .15s ease-out, background .15s ease-out, opacity .15s ease-out;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink-deep); color: #fff; padding: 14px 28px; }
.btn-primary:hover { background: #000; }
.btn-secondary {
  background: transparent; color: var(--ink-deep);
  border: 1.5px solid var(--ink-deep); padding: 12px 26px;
}
.btn-secondary:hover { background: var(--surface-soft); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--hairline); padding: 10px 20px;
}
.btn-ghost:hover { border-color: var(--ink); }

/* App store buttons */
.store-btn {
  display: inline-flex; align-items: center; gap: 11px; min-width: 176px;
  background: var(--ink-deep); color: #fff; border-radius: var(--r-full);
  padding: 12px 22px 12px 20px; transition: transform .15s ease-out, background .15s;
}
.store-btn:hover { background: #000; transform: translateY(-2px); }
.store-btn:active { transform: scale(0.98); }
.store-btn svg { width: 22px; height: 22px; flex: none; }
.store-btn .sb-top { font-size: 10px; opacity: .75; line-height: 1; letter-spacing: .2px; }
.store-btn .sb-bot { font-size: 16px; font-weight: 600; line-height: 1.15; margin-top: 2px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; border-radius: var(--r-full); padding: 5px 11px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge-private { background: var(--private-soft); color: var(--private-deep); }
.badge-shared  { background: var(--shared-soft);  color: var(--shared-deep); }
.badge-public  { background: var(--public-soft);  color: var(--public-deep); }
.badge-private .dot { background: var(--private); }
.badge-shared .dot  { background: var(--shared); }
.badge-public .dot  { background: var(--public); }

/* ---------- Logo wordmark ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 34px; height: 34px; border-radius: 9px; object-fit: cover;
  box-shadow: 0 2px 8px rgba(230,81,0,.22);
}
.logo-word {
  font-size: 21px; font-weight: 700; letter-spacing: -0.4px;
  background: linear-gradient(135deg, #F57C1F 0%, #E65100 55%, #D8430E 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.78); backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent; transition: border-color .25s, background .25s;
}
.nav.scrolled { border-color: var(--hairline-soft); background: rgba(255,255,255,0.9); }
.nav-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-size: 15px; font-weight: 500; color: var(--charcoal); white-space: nowrap;
  padding: 8px 14px; border-radius: var(--r-full); transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--surface-soft); color: var(--ink-deep); }
.nav-right { display: flex; align-items: center; gap: 12px; }

/* Download dropdown */
.nav-download { position: relative; }
.nav-download-btn { display: inline-flex; align-items: center; gap: 6px; }
.nav-download-btn .dl-caret { transition: transform .2s ease-out; opacity: .85; }
.nav-download.open .nav-download-btn .dl-caret { transform: rotate(180deg); }
.download-menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  background: var(--canvas); border: 1px solid var(--hairline-soft); border-radius: var(--r-xl);
  box-shadow: var(--glow-2); padding: 10px; display: flex; flex-direction: column; gap: 8px;
  min-width: 220px; z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top right;
  transition: opacity .18s ease-out, transform .18s ease-out, visibility .18s;
}
.nav-download.open .download-menu { opacity: 1; visibility: visible; transform: none; }
.download-menu .store-btn { width: 100%; min-width: 0; }

/* Hero: compact, equal-width store buttons; CTA: wider two-line buttons */
.hero .hero-cta .store-btn { width: 190px; min-width: 0; }
#download .hero-cta .store-btn { width: 190px; min-width: 0; }
.store-btn .sb-top, .store-btn .sb-bot { white-space: nowrap; }

/* Language toggle */
.lang-toggle {
  display: inline-flex; background: var(--surface-muted); border-radius: var(--r-full);
  padding: 3px; font-size: 13px; font-weight: 600;
}
.lang-toggle button {
  border: none; background: transparent; cursor: pointer; color: var(--slate);
  padding: 5px 12px; border-radius: var(--r-full); font-family: var(--font); font-weight: 600;
  transition: background .2s, color .2s;
}
.lang-toggle button.active { background: var(--canvas); color: var(--ink-deep); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- Cards ---------- */
.card {
  background: var(--canvas); border-radius: var(--r-xxxl);
  border: 1px solid var(--hairline-soft);
}
.card-feature {
  background: var(--canvas); border-radius: var(--r-xl);
  border: 1px solid var(--hairline-soft); padding: 28px;
  transition: transform .25s ease-out, box-shadow .25s ease-out, border-color .25s;
}
.card-feature:hover { transform: translateY(-4px); box-shadow: var(--glow-1); border-color: var(--hairline); }

/* moment card (used in mockups & sections) */
.moment-card {
  background: #fff; border-radius: var(--r-xl); border: 1px solid var(--hairline-soft);
  padding: 16px 16px 16px 18px; position: relative; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.moment-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
}
.moment-card.mc-private::before { background: var(--private); }
.moment-card.mc-shared::before  { background: var(--shared); }
.moment-card.mc-public::before  { background: var(--public); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ---------- Phone frame ---------- */
.phone {
  width: 300px; aspect-ratio: 300 / 620; position: relative;
  background: #fff; border-radius: 46px; padding: 11px;
  box-shadow: 0 1px 0 1.5px #d9d9dd, 0 28px 60px -18px rgba(0,0,0,.32), var(--glow-1);
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 36px; overflow: hidden;
  background: var(--canvas); position: relative;
}

/* Phone wrapping a real app screenshot — bezel adapts to image ratio */
.phone-shot { aspect-ratio: auto; height: auto; padding: 10px; }
.phone-shot .phone-screen { height: auto; aspect-ratio: auto; }
.app-shot {
  width: 100%; height: auto; display: block; border-radius: 34px;
  background: #fff;
}

/* Subtle breathing motion so the screens feel alive */
@keyframes phoneFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.phone-shot { animation: phoneFloat 6s ease-in-out infinite; will-change: transform; }
#private .phone-shot  { animation-delay: -0.8s; }
#shared .phone-shot   { animation-delay: -1.5s; }
#discover .phone-shot { animation-delay: -3.0s; }
#territory .phone-shot{ animation-delay: -2.2s; }
#lookback .phone-shot { animation-delay: -4.0s; }
#ingest .phone-shot   { animation-delay: -3.4s; }

/* Floating UI accent chip layered over a phone */
.shot-chip {
  position: absolute; z-index: 5; display: flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--hairline-soft); box-shadow: var(--glow-2);
  border-radius: 15px; padding: 12px 16px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-deep); max-width: 256px; line-height: 1.35;
  animation: chipFloat 5s ease-in-out infinite;
}
@keyframes chipFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
.chip-ai { top: 46px; left: 4px; }
.chip-ai .chip-spark { color: var(--shared); font-size: 16px; flex: none; }
@media (prefers-reduced-motion: reduce) {
  .phone-shot, .shot-chip { animation: none; }
}
@media (max-width: 1023px) { .shot-chip { display: none; } }
.phone-notch {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 26px; background: #15151a; border-radius: 999px; z-index: 8;
}
.phone-status {
  position: absolute; top: 0; left: 0; right: 0; height: 44px; z-index: 7;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; font-size: 12px; font-weight: 600; color: var(--ink-deep);
}

/* lang helpers — html always carries data-lang; hide the inactive language */
html[data-lang="ko"] .en { display: none !important; }
html[data-lang="en"] .ko { display: none !important; }

/* ---------- Footer ---------- */
.footer { background: var(--ink-deep); color: #fff; }
.footer a { color: #cfcfcf; }
.footer a:hover { color: #fff; }
