/* ============================================================
   CLOSE — product site
   Brand tokens are verbatim from the CLOSE design system.
   Three full-page directions are skinned via [data-dir] on <html>.
   ============================================================ */

:root {
  /* brand */
  --brand: #10A0B0;
  --brand-deep: #004050;
  --peak-1: #2EB6CD;
  --peak-2: #0E8FBF;
  --peak-3: #2A5798;
  --peak-4: #1F3D6E;
  /* status */
  --good: #0F8C5D;
  --good-bg: #E4F4ED;
  --warn: #B57305;
  --warn-bg: #FBF0DC;
  --bad: #C53030;
  --gold: #B58210;
  /* ink + surfaces (light) */
  --ink: #0C2030;
  --ink-soft: #2A3F50;
  --dim: #6B7A8A;
  --line: #D6DFE6;
  --bg: #FFFFFF;
  --bg-2: #F3F6FA;
  --sand: #F1F9FC;
  --card: #FFFFFF;
  --num: #063C49;
  --deep: #072530;          /* dark teal band */
  --deep-ink: #CFE0E6;
  --deep-dim: #6E8C97;

  /* tunables (driven by tweaks) */
  --accent: var(--brand);
  --maxw: 1140px;

  --shadow-soft: 0 1px 2px rgba(12,32,48,.05), 0 18px 44px rgba(12,32,48,.10);
  --shadow-lift: 0 2px 6px rgba(12,32,48,.07), 0 40px 90px rgba(12,32,48,.16);
  --shadow-frame: 0 2px 6px rgba(12,32,48,.06), 0 50px 120px rgba(8,28,40,.22);

  --ease: cubic-bezier(.22,1,.36,1);
  --pop: cubic-bezier(.22,1.4,.4,1);

  --ff: "Hanken Grotesk", -apple-system, system-ui, sans-serif;
  --page-bg: var(--bg);
}

/* dark theme remap */
[data-theme="dark"] {
  --ink: #EAF3F6;
  --ink-soft: #B6C8D1;
  --dim: #7E96A4;
  --line: #1C3742;
  --bg: #07171D;
  --bg-2: #0B222B;
  --sand: #0E2A33;
  --card: #0E2630;
  --num: #D7EEF3;
  --brand: #2EB6CD;
  --good-bg: #0E2E25;
  --deep: #04141A;
  --shadow-soft: 0 1px 2px rgba(0,0,0,.4), 0 18px 44px rgba(0,0,0,.5);
  --shadow-lift: 0 2px 8px rgba(0,0,0,.5), 0 40px 90px rgba(0,0,0,.6);
  --shadow-frame: 0 2px 8px rgba(0,0,0,.5), 0 50px 120px rgba(0,0,0,.65);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff);
  background: var(--page-bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .5s ease, color .5s ease;
}

.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }
.section { padding-block: clamp(64px, 9vw, 132px); position: relative; }
.eyebrow {
  font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before {
  content: ""; width: 18px; height: 1.5px; background: currentColor; opacity: .55; border-radius: 2px;
}
.dim { color: var(--dim); }
.soft { color: var(--ink-soft); }

h1, h2, h3 { letter-spacing: -.025em; line-height: 1.04; }
.display {
  font-size: clamp(44px, 7.4vw, 92px); font-weight: 800; letter-spacing: -.04em; line-height: .96;
}
.h2 { font-size: clamp(30px, 4.2vw, 52px); font-weight: 800; }
.h3 { font-size: clamp(20px, 2.4vw, 27px); font-weight: 700; letter-spacing: -.02em; }
.lead { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; color: var(--ink-soft); font-weight: 400; }
.kicker { font-size: 15px; font-weight: 600; color: var(--dim); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  font-family: var(--ff); font-size: 15.5px; font-weight: 700; letter-spacing: -.01em;
  padding: 14px 22px; border-radius: 13px; border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: transform .18s var(--ease), background .25s ease, box-shadow .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(0,64,80,.2), 0 12px 28px color-mix(in oklab, var(--accent), transparent 68%); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,64,80,.2), 0 18px 38px color-mix(in oklab, var(--accent), transparent 58%); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--dim); }
.btn-arrow { transition: transform .25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* on dark bands */
.on-deep .btn-ghost { color: #fff; border-color: rgba(255,255,255,.26); }
.on-deep .btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }

/* ---------- pills / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft);
  background: var(--card);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.pill.good { color: var(--good); background: var(--good-bg); border-color: transparent; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in oklab, var(--page-bg), transparent 22%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled { border-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand .word { font-size: 19px; font-weight: 800; letter-spacing: .02em; }
.brand .v { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; color: var(--accent);
  background: color-mix(in oklab, var(--accent), transparent 88%); padding: 2px 6px; border-radius: 6px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { font-size: 14.5px; font-weight: 600; color: var(--ink-soft); text-decoration: none;
  padding: 8px 13px; border-radius: 9px; transition: color .2s, background .2s; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); background: var(--bg-2); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-soft); display: grid; place-items: center; cursor: pointer;
  transition: background .2s, color .2s, transform .15s; }
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ---------- ring mark ---------- */
.mark { display: inline-block; flex: none; }

/* ---------- device / screenshot framing ---------- */
.shot { display: block; max-width: 100%; height: auto; }
.shot-browser {
  border-radius: 16px; box-shadow: var(--shadow-frame); border: 1px solid var(--line);
  overflow: hidden; background: var(--card);
}
/* Phone screenshots are bare app captures (they already include the status bar
   + dynamic island), so we add the physical iPhone body here: a black bezel via
   a thick rounded border, a titanium rail via the first box-shadow ring, then
   depth. box-sizing keeps the framed phone at its intended width. */
.shot-phone {
  box-sizing: border-box;
  border: 13px solid #0b0b0c;
  border-radius: 56px;
  background: #0b0b0c;
  box-shadow:
    0 0 0 2px #b9b9bd,                       /* titanium edge */
    0 2px 6px rgba(12,32,48,.10),
    0 40px 80px rgba(8,28,40,.30);
}
.backdrop {
  border-radius: 26px;
  background:
    radial-gradient(120% 120% at 50% 0%, color-mix(in oklab, var(--accent), transparent 90%), transparent 60%),
    var(--bg-2);
}

/* ---------- hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(40px, 6vw, 80px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-copy { max-width: 600px; }
.hero h1 { margin: 18px 0 0; }
.hero .lead { margin-top: 22px; max-width: 30em; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 22px; margin-top: 34px; flex-wrap: wrap; }
.hero-meta .m { display: flex; flex-direction: column; gap: 2px; }
.hero-meta .m b { font-size: 23px; font-weight: 800; color: var(--num); letter-spacing: -.02em; }
.hero-meta .m span { font-size: 12.5px; color: var(--dim); font-weight: 600; }
.hero-phone { justify-self: center; position: relative; }
.hero-phone img { width: clamp(260px, 30vw, 340px); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { max-width: none; }
  .hero .lead { margin-inline: auto; }
  .hero-cta, .hero-meta, .eyebrow { justify-content: center; }
  .hero-meta { justify-content: center; }
}

/* ---------- problem strip ---------- */
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.prob {
  padding: 26px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.prob .n { font-size: 13px; font-weight: 800; color: var(--accent); letter-spacing: .1em; }
.prob h3 { margin: 12px 0 8px; font-size: 19px; font-weight: 700; }
.prob p { font-size: 14.5px; color: var(--dim); line-height: 1.5; }
@media (max-width: 760px) { .problem-grid { grid-template-columns: 1fr; } }

/* ---------- how it works ---------- */
.how-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; margin-top: 56px; align-items: start; }
.step { position: relative; }
.step .num {
  font-size: 15px; font-weight: 800; color: var(--accent); letter-spacing: .12em;
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.step .num::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.step h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.step p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.how-ring { display: grid; place-items: center; }
@media (max-width: 820px) { .how-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- feature rows (alternating) ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.feature + .feature { margin-top: clamp(64px, 8vw, 120px); }
.feature.flip .feature-media { order: 2; }
.feature-copy { max-width: 480px; }
.feature-copy .h2 { margin: 14px 0 16px; }
.feature-list { margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }
.feature-list .fl { display: flex; gap: 13px; align-items: flex-start; }
.feature-list .fl .ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in oklab, var(--accent), transparent 88%); color: var(--accent); margin-top: 1px; }
.feature-list .fl b { font-weight: 700; font-size: 15.5px; }
.feature-list .fl p { font-size: 14px; color: var(--dim); line-height: 1.45; margin-top: 2px; }
.feature-media { position: relative; }
@media (max-width: 880px) {
  .feature { grid-template-columns: 1fr; gap: 36px; }
  .feature.flip .feature-media { order: 0; }
  .feature-copy { max-width: none; }
}

/* phone duo */
.phone-duo { display: flex; justify-content: center; align-items: flex-end; gap: 18px; }
.phone-duo img:first-child { width: clamp(190px, 22vw, 250px); }
.phone-duo img:last-child { width: clamp(160px, 19vw, 215px); margin-bottom: 26px; }

/* ---------- command center gallery ---------- */
.cc-main { margin-top: 52px; }
.cc-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.cc-thumb { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-soft);
  background: var(--card); position: relative; }
.cc-thumb img { display: block; width: 100%; }
.cc-thumb .cap { font-size: 13px; font-weight: 700; padding: 13px 15px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.cc-thumb .cap span { font-weight: 500; color: var(--dim); font-size: 12px; }
@media (max-width: 760px) { .cc-thumbs { grid-template-columns: 1fr; } }

/* ---------- trust ---------- */
.trust-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.trust-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.tc { padding: 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.tc .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 13px;
  background: color-mix(in oklab, var(--accent), transparent 88%); color: var(--accent); }
.tc h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 5px; }
.tc p { font-size: 13.5px; color: var(--dim); line-height: 1.45; }
@media (max-width: 880px) { .trust-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .trust-cards { grid-template-columns: 1fr; } }

/* ---------- metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 56px;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--card); }
.metric { padding: 34px 28px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: none; }
.metric .v { font-size: clamp(34px, 4vw, 46px); font-weight: 800; color: var(--num); letter-spacing: -.03em; line-height: 1; }
.metric .l { font-size: 13px; font-weight: 700; margin-top: 12px; }
.metric .s { font-size: 12.5px; color: var(--dim); margin-top: 4px; }
.metric .delta { font-size: 12px; font-weight: 800; color: var(--good); margin-left: 8px; }
@media (max-width: 820px) { .metrics { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: none; }
  .metric:nth-child(1), .metric:nth-child(2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 480px) { .metrics { grid-template-columns: 1fr; }
  .metric { border-right: none; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: none; } }

/* ---------- final CTA ---------- */
.cta-band { border-radius: 28px; padding: clamp(48px, 7vw, 96px) clamp(28px, 5vw, 72px); text-align: center; position: relative; overflow: hidden; }
.cta-band .h2 { max-width: 16em; margin-inline: auto; }
.cta-band .lead { max-width: 30em; margin: 18px auto 0; }
.cta-band .hero-cta { justify-content: center; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 44px; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot .tag { font-size: 14px; color: var(--dim); }
.foot .links { display: flex; gap: 22px; }
.foot .links a { font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.foot .links a:hover { color: var(--accent); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }

/* ============================================================
   DARK BAND helper (used by direction B)
   ============================================================ */
.on-deep { background: var(--deep); color: #fff; }
.on-deep .lead, .on-deep .soft { color: var(--deep-ink); }
.on-deep .dim { color: var(--deep-dim); }
.on-deep .eyebrow { color: var(--peak-1); }
.on-deep .metric .v, .on-deep .hero-meta .m b { color: #fff; }
.on-deep .pill { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); color: var(--deep-ink); }

/* ============================================================
   DIRECTION A — "Open Air"  (default: white, airy, editorial)
   ============================================================ */
[data-dir="a"] { --page-bg: var(--bg); --maxw: 1140px; }
[data-dir="a"] .alt { background: var(--bg-2); }
[data-dir="a"] .cta-band { background:
    radial-gradient(130% 130% at 50% -20%, color-mix(in oklab, var(--accent), transparent 86%), transparent 55%), var(--bg-2);
  border: 1px solid var(--line); }
[data-dir="a"] .how-deco { display: none; }

/* ============================================================
   DIRECTION B — "The Desk"  (operational, dark teal bands, dense)
   ============================================================ */
[data-dir="b"] { --page-bg: var(--bg); --maxw: 1180px; }
[data-dir="b"] .display { font-size: clamp(42px, 6.6vw, 80px); letter-spacing: -.035em; }
/* hero becomes a dark band */
[data-dir="b"] .hero { background: var(--deep); color: #fff; border-radius: 0 0 32px 32px; }
[data-dir="b"] .hero .lead { color: var(--deep-ink); }
[data-dir="b"] .hero .eyebrow { color: var(--peak-1); }
[data-dir="b"] .hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.26); }
[data-dir="b"] .hero .btn-ghost:hover { background: rgba(255,255,255,.08); }
[data-dir="b"] .hero .hero-meta .m b { color: #fff; }
[data-dir="b"] .hero .hero-meta .m span { color: var(--deep-dim); }
[data-dir="b"] .hero .backdrop { background: rgba(255,255,255,.04); }
[data-dir="b"] .hero .brand-faint { color: rgba(255,255,255,.5); }
/* alternating sections get a tint */
[data-dir="b"] .alt { background: var(--bg-2); }
[data-dir="b"] .prob { background: var(--sand); border-color: transparent; box-shadow: none; }
[data-dir="b"] .cta-band { background: var(--deep); color: #fff; }
[data-dir="b"] .cta-band .lead { color: var(--deep-ink); }
[data-dir="b"] .cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.26); }
[data-dir="b"] .metrics { background: var(--card); }
[data-dir="b"] .how-deco { display: none; }

/* ============================================================
   DIRECTION C — "Daily Three"  (warm, sand, ring-led narrative)
   ============================================================ */
[data-dir="c"] { --page-bg: var(--sand); --maxw: 1080px; }
[data-dir="c"] body, [data-dir="c"] .nav { background: var(--sand); }
[data-dir="c"] .alt { background: var(--bg); border-radius: 32px; }
[data-dir="c"] .prob { background: var(--bg); border-color: transparent; }
[data-dir="c"] .metrics { background: var(--bg); }
[data-dir="c"] .cc-thumb, [data-dir="c"] .tc { background: var(--bg); }
[data-dir="c"] .display { font-size: clamp(46px, 8vw, 100px); letter-spacing: -.045em; }
/* giant beat numbers in How it works */
[data-dir="c"] .how-deco { display: block; font-size: clamp(56px, 9vw, 120px); font-weight: 800;
  letter-spacing: -.05em; line-height: .8; color: color-mix(in oklab, var(--accent), transparent 78%); margin-bottom: 10px; }
[data-dir="c"] .step .num { display: none; }
[data-dir="c"] .cta-band { background:
    radial-gradient(130% 130% at 50% -10%, color-mix(in oklab, var(--accent), transparent 80%), transparent 60%), var(--bg); }
[data-dir="c"] .shot-browser { border-radius: 18px; }
/* sand-default sections keep base; .alt floats white panels */
[data-dir="c"] .section.alt { margin-inline: max(0px, calc((100vw - var(--maxw) - 56px) / 2)); }

/* how-deco hidden by default */
.how-deco { display: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
