/* Trove — trytrove.io
   Editorial "private register" in the Vitrine identity: near-black warm field,
   two-tone burgundy, system font only. Hairline structure, marginal index,
   tabular figures, film grain. Tokens mirror the app (theme-tokens.js). */

:root {
  color-scheme: dark;

  --bg: #110E10;
  --bg-top: #15101300;
  --surface: #1A1518;
  --surface-2: #241E21;
  --edge: #2C2528;

  --accent: #7A1F2B;
  --accent-bright: #C2455A;
  --accent-text: #D75C72;
  --accent-fg: #FFF1EC;
  --accent-tint: rgba(194, 69, 90, 0.12);

  --ink: #ECEAE7;
  --muted: #B0A6A2;
  --faint: #837873;

  --hair: rgba(255, 255, 255, 0.09);
  --hair-soft: rgba(255, 255, 255, 0.055);
  --hair-strong: rgba(255, 255, 255, 0.16);

  --positive: #5FD08A;
  --danger: #F08585;

  --maxw: 1200px;
  --gutter: clamp(22px, 5.5vw, 76px);
  --label-col: clamp(96px, 13vw, 168px);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { 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;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  overflow-x: hidden;
}

main, .masthead, .footer { position: relative; }

img { max-width: 100%; display: block; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: #e6798c; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { margin: 0; font-weight: 600; color: #fff; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* index/eyebrow label — the editorial signature */
.idx {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}
.idx b { color: var(--accent-text); font-weight: 600; }

.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* ---------- Masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}
.masthead.stuck {
  background: rgba(17, 14, 16, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--hair);
}
.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 18px;
}
.wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}
.wordmark:hover { color: #fff; }
.mast-nav { display: flex; align-items: center; gap: 30px; }
.mast-nav a:not(.dl) {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.mast-nav a:not(.dl):hover { color: var(--ink); }
.dl {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  padding: 8px 18px;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.dl:hover { color: #fff; border-color: rgba(255,255,255,0.34); background: rgba(255,255,255,0.04); }
.hide-sm { display: inline; }

/* ---------- Editorial spread grid ---------- */
.spread {
  display: grid;
  grid-template-columns: var(--label-col) 1fr;
  column-gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(56px, 9vw, 104px);
  border-top: 1px solid var(--hair);
}
.spread > .label { padding-top: 5px; }
.spread > .label .idx { display: block; line-height: 1.5; }
.spread > .label .note-side {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--faint);
  max-width: 22ch;
}
.spread-head {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.06;
  max-width: 18ch;
}
.spread-lede {
  margin-top: 16px;
  font-size: clamp(16px, 1.9vw, 19px);
  color: var(--muted);
  max-width: 54ch;
  line-height: 1.55;
}

/* definition-list specs (replaces check bullets) */
.specs { margin-top: clamp(26px, 4vw, 40px); border-top: 1px solid var(--hair-soft); }
.spec {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) 1.3fr;
  gap: 8px 28px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hair-soft);
}
.spec dt { font-size: 16px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.spec dd { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.5; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 11vh, 128px) clamp(40px, 7vw, 80px); }
.hero::before {
  content: "";
  position: absolute;
  top: -34%;
  right: -6%;
  width: 78%;
  height: 120%;
  background: radial-gradient(46% 42% at 70% 30%, rgba(122, 31, 43, 0.42), rgba(122,31,43,0.08) 45%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero-eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint);
}
.hero-eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent-bright); display: inline-block; }
.hero h1 {
  margin-top: 22px;
  font-size: clamp(40px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 600;
}
.hero h1 .mark { position: relative; white-space: nowrap; }
.hero h1 .mark::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.08em; height: 3px;
  background: var(--accent-bright); border-radius: 2px;
}
.hero-lede {
  margin-top: 26px;
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 46ch;
}
.hero-cta { margin-top: 34px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero-meta { margin-top: 26px; font-size: 13px; color: var(--faint); letter-spacing: 0.01em; }

/* App Store badge */
.appstore {
  display: inline-flex; align-items: center; gap: 11px;
  background: #fff; color: #0b0b0b;
  border-radius: 13px; padding: 10px 18px 10px 15px; text-decoration: none;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset;
}
.appstore:hover { color: #0b0b0b; transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(0,0,0,0.6); }
.appstore svg { width: 26px; height: 26px; fill: #0b0b0b; flex: none; }
.appstore .as-t { display: flex; flex-direction: column; line-height: 1.04; }
.appstore .as-s { font-size: 10.5px; letter-spacing: 0.02em; color: #444; }
.appstore .as-b { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.textlink {
  font-size: 15px; font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; gap: 7px;
}
.textlink:hover { color: #fff; }
.textlink .arr { transition: transform 0.2s var(--ease); }
.textlink:hover .arr { transform: translateY(2px); }

/* ---------- Spot board band (replaces stat strip) ---------- */
.board {
  border-block: 1px solid var(--hair);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.board-cell { padding: clamp(20px, 3vw, 30px) clamp(14px, 2vw, 26px); border-left: 1px solid var(--hair-soft); }
.board-cell:first-child { border-left: 0; }
.board-cell .m { font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.board-cell .v { margin-top: 10px; font-size: clamp(22px, 3vw, 30px); font-weight: 600; color: #fff; letter-spacing: -0.02em; }
.board-cell .c { margin-top: 6px; font-size: 13px; font-weight: 600; }
.up { color: var(--positive); }
.down { color: var(--danger); }
.board-foot {
  grid-column: 1 / -1; border-top: 1px solid var(--hair-soft);
  padding: 13px clamp(14px, 2vw, 26px);
  font-size: 12.5px; letter-spacing: 0.04em; color: var(--faint);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ---------- Ledger table (catalog) ---------- */
.ledger { width: 100%; }
.ledger-cap { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); padding-bottom: 12px; border-bottom: 1px solid var(--hair); }
.lrow { display: grid; grid-template-columns: 18px 1fr auto; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--hair-soft); }
.lrow .dot { width: 11px; height: 11px; border-radius: 3px; }
.lrow .nm { font-size: 15.5px; color: var(--ink); font-weight: 500; }
.lrow .mt { font-size: 13px; color: var(--faint); }
.lrow .val { font-size: 15.5px; font-weight: 600; color: #fff; }

/* ---------- Market grid (value) ---------- */
.quote-rows { border-top: 1px solid var(--hair); }
.qrow { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--hair-soft); }
.qrow .qn { font-size: 15.5px; color: var(--ink); font-weight: 500; display: flex; align-items: center; gap: 10px; }
.qrow .qn i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.qrow .qp { font-size: 15.5px; font-weight: 600; color: #fff; }
.qrow .qc { font-size: 13px; font-weight: 600; width: 64px; text-align: right; }
.dgrid-cap { margin-top: 30px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.dgrid { margin-top: 12px; display: grid; grid-template-columns: 64px repeat(5, 1fr); gap: 4px; }
.dgrid .hd { font-size: 11px; color: var(--faint); display: flex; align-items: center; justify-content: center; height: 26px; letter-spacing: 0.04em; }
.dgrid .rh { font-size: 11px; color: var(--faint); display: flex; align-items: center; height: 34px; }
.dcell { height: 34px; border-radius: 3px; }

/* ---------- Brief column (intelligence) ---------- */
.note { border-left: 2px solid var(--accent-bright); padding-left: clamp(18px, 2.5vw, 30px); }
.note .h { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); }
.note p { margin-top: 14px; font-size: clamp(18px, 2.3vw, 23px); line-height: 1.5; color: var(--ink); letter-spacing: -0.01em; max-width: 40ch; }
.note .by { margin-top: 18px; font-size: 13px; color: var(--faint); letter-spacing: 0.02em; }
.tags { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 600; color: var(--accent-text); border: 1px solid var(--hair); border-radius: 999px; padding: 4px 11px; letter-spacing: 0.02em; }

/* ---------- Performance figure ---------- */
.figure { display: flex; align-items: baseline; gap: 14px; }
.figure .big { font-size: clamp(54px, 9vw, 96px); font-weight: 600; letter-spacing: -0.04em; line-height: 0.9; color: var(--positive); }
.figure .unit { font-size: 15px; color: var(--faint); letter-spacing: 0.04em; }
.perf-chart { margin-top: 28px; }
.perf-key { margin-top: 12px; display: flex; gap: 22px; font-size: 13px; color: var(--muted); }
.perf-key span { display: inline-flex; align-items: center; gap: 8px; }
.perf-key i { width: 14px; height: 2px; display: inline-block; }

/* ---------- Privacy manifesto ---------- */
.manifesto { font-size: clamp(28px, 5.4vw, 60px); line-height: 1.02; letter-spacing: -0.035em; max-width: 16ch; }
.manifesto em { font-style: normal; color: var(--accent-text); }

/* ---------- Pricing ---------- */
.plans { position: relative; border: 1px solid var(--hair); border-radius: 14px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; background: rgba(255, 255, 255, 0.012); }
.plan { display: flex; flex-direction: column; position: relative; padding: clamp(28px, 3.6vw, 46px); }
.plan + .plan { border-left: 1px solid var(--hair); }
.plan.pro { background: radial-gradient(130% 80% at 100% 0%, rgba(194, 69, 90, 0.20), transparent 55%), linear-gradient(180deg, rgba(122, 31, 43, 0.20), rgba(122, 31, 43, 0.03)); }
.badge { position: absolute; top: clamp(26px, 3.4vw, 44px); right: clamp(26px, 3.4vw, 44px); font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-fg); background: var(--accent); padding: 5px 11px; border-radius: 999px; }
.plan .pn { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.plan.pro .pn { color: var(--accent-text); }
.plan .price { margin-top: 20px; font-size: clamp(42px, 5.5vw, 58px); font-weight: 600; letter-spacing: -0.035em; color: #fff; line-height: 0.95; display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.plan .price small { font-size: 16px; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.plan .psub { margin-top: 11px; font-size: 14px; color: var(--muted); }
.plan.pro .psub { color: var(--accent-text); }
.plan .pfeat { list-style: none; margin: 30px 0 34px; padding: 0; flex: 1 1 auto; }
.plan .pfeat li { position: relative; padding: 9px 0 9px 28px; font-size: 14.5px; color: var(--ink); line-height: 1.45; }
.plan .pfeat li::before { content: ""; position: absolute; left: 3px; top: 13px; width: 6px; height: 11px; border: solid var(--faint); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.plan.pro .pfeat li::before { border-color: var(--accent-bright); }
.plan .pbtn {
  margin-top: auto;
  display: inline-flex; align-items: center; justify-content: center; width: 100%;
  font-size: 15px; font-weight: 600; border-radius: 999px; padding: 15px 20px;
  transition: transform 0.18s var(--ease), box-shadow 0.22s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.plan .pbtn:active { transform: translateY(0) scale(0.985); }
.pbtn.primary { background: linear-gradient(180deg, #9a2937, #761d29); color: var(--accent-fg); box-shadow: 0 10px 26px -12px rgba(194, 69, 90, 0.65); }
.pbtn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(194, 69, 90, 0.85); color: var(--accent-fg); }
.pbtn.ghost { border: 1px solid var(--hair-strong); color: var(--ink); }
.pbtn.ghost:hover { border-color: rgba(255, 255, 255, 0.34); color: #fff; background: rgba(255, 255, 255, 0.035); transform: translateY(-2px); }
.plan-note { margin-top: 22px; font-size: 13px; color: var(--faint); }

/* ---------- Closing ---------- */
.closing { padding-block: clamp(72px, 12vw, 150px); text-align: center; position: relative; overflow: hidden; }
.closing::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 92%; max-width: 920px; height: 130%; background: radial-gradient(50% 46% at 50% 24%, rgba(122, 31, 43, 0.36), transparent 70%); pointer-events: none; z-index: 0; }
.closing > * { position: relative; z-index: 1; }
.closing h2 { font-size: clamp(34px, 6.5vw, 76px); line-height: 0.98; letter-spacing: -0.035em; max-width: 14ch; margin-inline: auto; }
.closing p { margin: 22px auto 0; color: var(--muted); font-size: 18px; max-width: 46ch; }
.closing .hero-cta { justify-content: center; margin-top: 34px; }

/* ---------- Footer colophon ---------- */
.footer { border-top: 1px solid var(--hair); padding-block: clamp(36px, 5vw, 56px); }
.colophon { display: grid; grid-template-columns: var(--label-col) 1fr; column-gap: clamp(24px, 4vw, 56px); }
.colophon .idx { padding-top: 4px; }
.colo-body { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.colo-body .wordmark { font-size: 18px; }
.colo-tag { margin-top: 7px; font-size: 13.5px; color: var(--faint); max-width: 30ch; }
.colo-links { display: flex; gap: 24px; flex-wrap: wrap; }
.colo-links a { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.colo-links a:hover { color: var(--ink); }
.colo-fine { margin-top: 22px; font-size: 12.5px; color: var(--faint); letter-spacing: 0.03em; }

/* ---------- Device frame (hero only) ---------- */
.device { --w: 280px; width: var(--w); aspect-ratio: 280/586; border-radius: 44px; padding: 10px;
  background: linear-gradient(155deg, #2a2327, #131011 60%);
  box-shadow: 0 2px 2px rgba(255,255,255,0.06) inset, 0 0 0 2px rgba(0,0,0,0.6), 0 50px 90px -34px rgba(0,0,0,0.8), 0 0 80px -16px rgba(122,31,43,0.4);
  transform: perspective(1700px) rotateY(-11deg) rotateX(3deg); transition: transform 0.7s var(--ease); }
.device:hover { transform: perspective(1700px) rotateY(-5deg) rotateX(1.5deg); }
.device-screen { position: relative; width: 100%; height: 100%; border-radius: 35px; overflow: hidden; background: linear-gradient(180deg, #161114, #0C0A0B); }
.device-island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 80px; height: 22px; background: #000; border-radius: 13px; z-index: 6; }
.screen-glow { position: absolute; inset: -40% 0 auto 0; height: 60%; background: radial-gradient(50% 60% at 50% 0%, rgba(194,69,90,0.2), transparent 70%); pointer-events: none; }
.screen-pad { position: relative; z-index: 2; height: 100%; padding: 44px 17px 16px; display: flex; flex-direction: column; }
.s-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.s-hero-num { font-size: 42px; font-weight: 300; letter-spacing: -0.03em; color: #fff; line-height: 1.05; margin-top: 4px; }
.s-gain { font-size: 12.5px; font-weight: 600; color: var(--positive); margin-top: 4px; }
.s-chart { margin: 14px -2px 10px; }
.s-label { font-size: 8.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin: 6px 0 8px; }
.s-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 13px; padding: 9px 11px; margin-bottom: 7px; }
.s-plate { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.s-row-main { flex: 1; min-width: 0; }
.s-row-name { font-size: 12px; font-weight: 600; color: var(--ink); }
.s-row-meta { font-size: 10px; color: var(--faint); }
.s-row-price { font-size: 12px; font-weight: 600; color: #fff; }
.s-dock { margin-top: auto; display: flex; justify-content: space-around; align-items: center; height: 44px; border-radius: 999px; background: rgba(36,30,33,0.66); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--hair-strong); }
.s-dock i { width: 17px; height: 17px; border-radius: 5px; background: var(--faint); display: block; }
.s-dock i.on { background: var(--accent-bright); }
.hero-device { justify-self: center; }

/* ---------- Reveal ---------- */
/* Content is visible by default; only the .js gate hides it for the entrance
   animation, so a JS/observer failure can never leave a section blank. */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); will-change: opacity, transform; }
html.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.07s; }
.reveal[data-d="2"] { transition-delay: 0.14s; }
.draw { stroke-dasharray: var(--len, 1000); }
html.js .draw { stroke-dashoffset: var(--len, 1000); transition: stroke-dashoffset 1.5s var(--ease); }
html.js .draw.in { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .device { transform: none; }
  html.js .draw { stroke-dashoffset: 0; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-device { justify-self: start; margin-top: 10px; }
  .device { transform: none; }
  .device:hover { transform: none; }
  .spread { grid-template-columns: 1fr; row-gap: 22px; }
  .spread > .label { display: flex; align-items: baseline; gap: 14px; }
  .spread > .label .note-side { display: none; }
}
@media (max-width: 720px) {
  .board { grid-template-columns: 1fr 1fr; }
  .board-cell:nth-child(3) { border-left: 0; }
  .board-cell:nth-child(odd) { border-left: 0; }
  .board-cell:nth-child(n+3) { border-top: 1px solid var(--hair-soft); }
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--hair); }
  .spec { grid-template-columns: 1fr; gap: 4px; }
  .dgrid { grid-template-columns: 50px repeat(5, 1fr); }
}
@media (max-width: 520px) {
  .hide-sm { display: none; }
  .colophon { grid-template-columns: 1fr; row-gap: 16px; }
  .colo-body { flex-direction: column; }
}
