/* DashBar landing page, dashapps.net/dashbar.
   Every value below comes from the App Store listing frames (Figma p3DVz9J2lsoDrNPuXMh7Zn, page "Final With
   Changes") or from DASHBAR_TOKENS.md in the dashbar repo; the PR lists each one with its source. The bar
   mockups in the listing are raster images, so their colours were sampled from those images and agree with
   the --db-* defaults in DASHBAR_TOKENS.md. Mobile first; wider layouts in the min-width queries. */

/* ---------- fonts: self-hosted, SIL Open Font License 1.1 (fonts/OFL-*.txt) ---------- */
@font-face { font-family: "DM Serif Text"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/dashbar/assets/fonts/dm-serif-text-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/dashbar/assets/fonts/archivo-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/dashbar/assets/fonts/archivo-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/dashbar/assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;

  /* colour: listing frames */
  --bg: #111827;                       /* every frame's background */
  --panel: #1c2233;                    /* module cards, phone panel (02, 01, 05) */
  --text: #ffffff;
  --text-lede: rgba(255, 255, 255, 0.72); /* hero lede (01) */
  --text-muted: #9ca3af;               /* section intros, card copy (02, 04, 05, 06) */
  --text-eyebrow: rgba(255, 255, 255, 0.55); /* mono labels (all frames) */
  --rule: rgba(255, 255, 255, 0.25);   /* lockup divider, callout border (01, 06) */
  --edge: rgba(255, 255, 255, 0.14);   /* dark card border (09) */
  --shot-border: #464d63;              /* layout thumbnail border (04) */
  --blue: #4361ee;                     /* "Brand blue", buttons, one-tap icon (09, 02) */
  --amber: #fbbf24;                    /* card accent, nudge icon, countdown strip (02, 06) */
  --green: #34d399;                    /* card accent, "Unlocked" (02, 05) */
  --placeholder: #ece6dd;              /* storefront placeholder blocks (sampled, 04) */
  --placeholder-line: #f1ede7;         /* placeholder text lines (sampled, 04) */

  /* colour: the bar itself (DASHBAR_TOKENS.md defaults; bar fill sampled from the listing images) */
  --bar-bg: #111827;
  --bar-text: #ffffff;                 /* --db-text */
  --bar-accent: #4361ee;               /* --db-accent */
  --bar-progress: #38bdf8;             /* --db-progress */
  --bar-success: #34d399;              /* --db-success */
  --bar-divider: rgba(255, 255, 255, 0.08); /* --db-divider */
  --frost-bg: linear-gradient(180deg, rgba(15, 12, 26, 0.88), rgba(8, 6, 16, 0.96)); /* --db-ambient-bg */
  --frost-text: #f2e9ff;               /* --db-ambient-text */
  --frost-glow-1: #4361ee;             /* --db-glow-1 */
  --frost-glow-2: #38bdf8;             /* --db-glow-2 */
  --glass-bg: rgba(17, 17, 17, 0.85);  /* --db-bg-glass */
  --glass-sheen-top: rgba(255, 255, 255, 0.18); /* --db-glass-sheen-top */
  --glass-sheen-mid: rgba(255, 255, 255, 0.05); /* --db-glass-sheen-mid */
  --glass-rim: rgba(255, 255, 255, 0.3);        /* --db-glass-rim */

  /* type: listing frames */
  --font-display: "DM Serif Text", Georgia, "Times New Roman", serif;
  --font-body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-bar: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; /* --db-font */
  --track-lockup: 0.18em;              /* 2.52px at 14px (all frames) */
  --track-display: -0.02em;            /* -1.68px at 84px (02, 04, 05, 06) */

  /* shape */
  --r-card: 16px;                      /* cards, layout thumbnails (02, 04, 05) */
  --r-button: 10px;                    /* primary button (09) = --db-radius-md */
  --r-logo: 4px;                       /* logo tile (all frames) */
  --r-pill: 999px;                     /* chips, callout (06, 09) */
  --r-phone: 44px;                     /* phone body (01, 05) */
  --r-screen: 36px;                    /* phone screen (01, 05) */
  --shadow-pill: 0 8px 28px rgba(0, 0, 0, 0.28);           /* --db-pill-shell-shadow */

  /* rhythm */
  --gutter: clamp(20px, 6.7vw, 96px);  /* frame side padding 96 (all frames) */
  --section-y: clamp(64px, 8vw, 112px);
  --max: 1408px;                       /* content width (06) */
}

*, *::before, *::after { 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: var(--bg);
  color: var(--text);
  font: 400 17px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- type ---------- */
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: var(--track-display); line-height: 1.1; }
h1 { font-size: clamp(40px, 4.6vw, 72px); }
h2 { font-size: clamp(34px, 5vw, 72px); }
.eyebrow {
  font: 400 14px/1.2 var(--font-mono);
  letter-spacing: var(--track-lockup);
  text-transform: uppercase;
  color: var(--text-eyebrow);
}
.section-head { display: grid; gap: 20px; max-width: 980px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head > p:last-child { font-size: clamp(17px, 1.5vw, 21px); color: var(--text-muted); max-width: 62ch; }

/* ---------- buttons and the "coming soon" callout ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 14px 26px;
  border-radius: var(--r-button);
  font: 600 17px/1 var(--font-body);
  text-decoration: none;
}
.btn-primary { background: var(--blue); color: var(--text); }
.btn-primary:hover { box-shadow: inset 0 0 0 2px var(--rule); }
/* The listing's callout chip (06, "from your store" callout): plain text in a hairline capsule. Not a link
   and not drawn as a button, so nothing looks clickable that is not. */
.soon {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  background: var(--bg);
  font: 600 16px/1.2 var(--font-body);
  color: var(--text);
}
.soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--bar-divider); }
.nav { display: flex; align-items: center; gap: 12px; padding-block: 6px; min-height: 56px; }
.lockup { display: inline-flex; align-items: center; gap: 16px; }
.lockup img { width: 34px; height: 34px; border-radius: var(--r-logo); }
.lockup-name { font: 400 14px/1 var(--font-mono); letter-spacing: var(--track-lockup); text-transform: uppercase; }
.nav .lockup { flex: none; }
/* On phones the logo stands alone; the name stays in the accessibility tree. */
.nav .lockup-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nav-links {
  display: flex; flex: 1; min-width: 0; justify-content: flex-end;
  overflow-x: auto; scrollbar-width: none;  /* scrolls sideways only if the links ever outgrow the row */
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 7px;
  font-size: 16px; color: var(--text-muted); text-decoration: none; white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }
.nav .soon { display: none; flex: none; margin-left: auto; font-size: 14px; padding: 6px 12px; }

/* ---------- hero (01) ---------- */
.hero { overflow-x: clip; }
.hero-inner { display: grid; }
.hero-copy { display: grid; gap: 24px; align-content: center; padding-block: clamp(40px, 6vw, 80px); }
.hero .lede { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; color: var(--text-lede); max-width: 40ch; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.trial-note { font-size: 16px; color: var(--text-muted); max-width: 56ch; }
.hero-panel { position: relative; display: grid; place-items: center; padding-block: 40px; }
/* The panel colour, bled past the container: to both screen edges on phones, to the right edge on desktop. */
.hero-panel::before { content: ""; position: absolute; z-index: -1; inset: 0 calc(-1 * var(--gutter)); background: var(--panel); }
.hero-panel { isolation: isolate; }

.phone {
  width: min(272px, 72vw);
  aspect-ratio: 354 / 723;
  background: #000;
  border-radius: var(--r-phone);
  padding: 9px;
}
.screen {
  position: relative; height: 100%;
  background: #fff;
  border-radius: var(--r-screen);
  overflow: hidden;
  padding: 44px 18px 0;
  color: #111;
}
.store-head { display: flex; justify-content: space-between; margin-bottom: 18px; }
.ph { background: var(--placeholder); border-radius: 8px; }
.ph-banner { height: 15%; margin-bottom: 18px; }
.ph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.ph-tile { aspect-ratio: 1; margin-bottom: 8px; }
.ph-line { height: 5px; width: 70%; border-radius: 3px; background: var(--placeholder-line); margin-bottom: 6px; }
.ph-line.short { width: 25%; }

/* ---------- the bar (shared by every mockup) ---------- */
.mock-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--bar-bg); color: var(--bar-text);
  font-family: var(--font-bar);
}
.mock-bar .cart, .lay-twin .cart { position: relative; flex: none; width: 22px; height: 22px; }
.cart svg { width: 100%; height: 100%; }
.badge { position: absolute; top: -6px; right: -8px; width: 13px; height: 13px; border-radius: 50%; background: var(--bar-accent); border: 1.5px solid var(--bar-bg); }
.sum { display: grid; gap: 3px; flex: 1; min-width: 0; overflow: hidden; }
.total-label { font-size: 9px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; }
.total { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.skel { display: block; height: 9px; width: min(64px, 100%); border-radius: 3px; background: rgba(255, 255, 255, 0.55); }
.cta {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  background: var(--bar-accent); color: #fff;
  border-radius: var(--r-button);
  font-weight: 700; font-size: 13px; padding: 10px 14px;
}
.cta svg { width: 12px; height: 12px; }

/* hero demo bar: the Inset Bar shape with the free-shipping progress module above the core row (01, 05) */
.demo {
  position: absolute; left: 10px; right: 10px; bottom: 14px;
  flex-direction: column; align-items: stretch; gap: 0;
  border-radius: 20px;                 /* --db-pill-shell-radius */
  box-shadow: var(--shadow-pill);
  overflow: hidden;
}
.demo-track { height: 4px; background: rgba(255, 255, 255, 0.12); }
.demo-fill { height: 100%; width: 72%; background: var(--bar-progress); transition: width 0.2s ease, background-color 0.3s ease; }
.demo-msg { font-size: 11px; line-height: 1.3; text-align: center; padding: 8px 12px 6px; border-bottom: 1px solid var(--bar-divider); }
.demo .core { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; }
.demo .total { font-size: 15px; }
.demo .cta { border-radius: var(--r-pill); }
.demo.unlocked .demo-fill { background: var(--bar-success); }
.demo.unlocked .demo-msg { color: var(--bar-success); }
.confetti-piece { position: absolute; top: 18px; width: 6px; height: 10px; border-radius: 2px; pointer-events: none; animation: fall 0.9s ease-out forwards; }
@keyframes fall { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }

/* ---------- sections ---------- */
.block { padding-block: var(--section-y); border-top: 1px solid var(--bar-divider); }
.note { margin-top: 32px; font-size: 16px; color: var(--text-muted); max-width: 62ch; }

/* layouts (04) */
.layouts, .finishes { display: grid; gap: 28px 24px; grid-template-columns: 1fr; }
.layout, .finish {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  padding: 10px 10px 22px;
}
.layout > :not(.shot), .finish > :not(.finish-stage) { margin-inline: 10px; }
.layout .num { margin-top: 10px; }
.layout h3, .finish h3 { font: 400 25px/1.1 var(--font-body); }
.finish h3 { margin-top: 12px; }
.layout p, .finish p { font-size: 16px; line-height: 1.45; color: var(--text-muted); }
.shot, .finish-stage {
  position: relative; overflow: hidden;
  aspect-ratio: 260 / 220;
  background: #fff;
  border: 2px solid var(--shot-border);
  border-radius: 10px;
}
.shot-store { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 6% 4% 0; height: 58%; }
.shot-store .ph { border-radius: 6px; }
.shot .mock-bar, .finish-stage .mock-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 10px 12px 14px; }
.lay-qc { border-radius: 0; }
/* Thumbnail bars are narrower than the hero's: a tighter button keeps the total from running under it. */
.shot .mock-bar, .finish-stage .mock-bar, .lay-twin { gap: 8px; }
.shot .cta, .lay-twin .cta { padding: 8px 10px; font-size: 12px; gap: 5px; }
.shot .mock-bar { padding: 10px 8px 10px 12px; }
.lay-pill { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; }
.pill-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bar-bg); color: var(--bar-text);
  border-radius: var(--r-pill); padding: 11px 16px;
  font: 700 11px/1 var(--font-bar); letter-spacing: 0.2px; text-transform: uppercase;
  box-shadow: var(--shadow-pill);
}
.pill-toggle svg { width: 12px; height: 12px; }
.shot .lay-peek { flex-direction: column; align-items: stretch; gap: 6px; padding-top: 6px; border-radius: 18px 18px 0 0; }
.grip { align-self: center; width: 36px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.32); }
.sheet-label { align-self: center; font-size: 9px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.62; }
.lay-peek .core { display: flex; align-items: center; gap: 10px; }
.shot .lay-inset { left: 8px; right: 8px; bottom: 8px; border-radius: 20px; box-shadow: var(--shadow-pill); }
.lay-inset .cta { border-radius: var(--r-pill); }
.lay-twin { position: absolute; left: 8px; right: 8px; bottom: 12px; display: flex; gap: 6px; }
.lay-twin .dock-pill { position: static; flex: 1; min-width: 0; border-radius: var(--r-pill); padding: 10px 12px; }
.lay-twin .cta { border-radius: var(--r-pill); }

/* finishes */
.finish-stage { aspect-ratio: 16 / 7; }
.finish-stage .shot-store { height: 100%; padding-bottom: 4%; }
.finish-stage .mock-bar { left: 14px; right: 14px; bottom: 14px; border-radius: 20px; }
.skin-frost { background: var(--frost-bg); color: var(--frost-text); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.08); }
.skin-frost > * { position: relative; }
.skin-frost .glow {
  position: absolute; left: -40px; bottom: -30px; width: 220px; height: 90px;
  border-radius: 110px / 45px;
  background: radial-gradient(circle, var(--frost-glow-1), var(--frost-glow-2));
  filter: blur(46px); opacity: 0.5;
}
.skin-frost .cta { box-shadow: 0 4px 18px rgba(155, 92, 255, 0.4); }
.skin-frost .skel { background: linear-gradient(90deg, #d4b8ff, var(--frost-glow-1)); }
.skin-glass {
  background: linear-gradient(180deg, var(--glass-sheen-top), var(--glass-sheen-mid) 18%, transparent 34%), var(--glass-bg);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.skin-glass .cta { box-shadow: inset 0 0 0 1px var(--glass-rim), 0 2px 12px rgba(0, 0, 0, 0.18); }
.finish-stage.glass .mock-bar { bottom: 22%; }

/* modules (02) */
.group-label {
  margin: 8px 0 18px;
  font: 400 14px/1.2 var(--font-mono); letter-spacing: var(--track-lockup); text-transform: uppercase;
  color: var(--text-eyebrow);
}
.modules { display: grid; gap: 20px; margin-bottom: 44px; }
.modules:last-child { margin-bottom: 0; }
.module {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--panel);
  border-radius: var(--r-card);
  padding: 24px;
  border-top: 2px solid transparent;
}
.module.accent-amber { border-top-color: var(--amber); }
.module.accent-blue { border-top-color: var(--blue); }
.module.accent-green { border-top-color: var(--green); }
.num { font: 400 11px/1 var(--font-mono); color: var(--text-eyebrow); }
.icon { width: 48px; height: 48px; }
.module h4 { font: 600 21px/1.2 var(--font-body); }
.module p { font-size: 16px; line-height: 1.4; color: var(--text-muted); }

/* pricing */
.plans { display: grid; gap: 20px; align-items: start; }
.plan { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-card); padding: 28px 26px; display: grid; gap: 14px; }
.plan h3 { font: 600 21px/1.2 var(--font-body); }
.tagline { font-size: 16px; line-height: 1.4; color: var(--text-muted); }
.price { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.amount { font: 400 clamp(48px, 5vw, 64px)/1 var(--font-display); letter-spacing: var(--track-display); }
.per { font-size: 16px; color: var(--text-muted); }
.plan ul { display: grid; gap: 11px; margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--edge); }
.plan li { position: relative; padding-left: 26px; font-size: 16px; line-height: 1.4; }
.plan li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px;
  background: no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%2334d399' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.plans-foot { margin-top: 32px; }

/* support */
.support {
  display: grid; gap: 24px; align-items: center;
  background: var(--panel); border-radius: var(--r-card); padding: clamp(26px, 4vw, 48px);
}
.support h2 { font-size: clamp(32px, 4vw, 52px); margin-bottom: 14px; }
.support p { font-size: 18px; color: var(--text-muted); overflow-wrap: anywhere; }
.support p a { color: var(--text); }
.support .btn { justify-self: start; }

/* footer */
.site-foot { border-top: 1px solid var(--bar-divider); }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; justify-content: space-between; padding-block: 24px 36px; font-size: 16px; color: var(--text-muted); }
.foot-links { display: flex; gap: 22px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); }

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .layouts { grid-template-columns: repeat(2, 1fr); }
  .finishes { grid-template-columns: repeat(2, 1fr); }
  .nav-links { justify-content: flex-start; margin-left: 8px; }
  .modules { grid-template-columns: repeat(2, 1fr); }
  .support { grid-template-columns: 1fr auto; }
}
@media (min-width: 720px) {
  .nav .soon { display: inline-flex; }
}
@media (min-width: 900px) {
  .nav { gap: 20px; }
  .nav .lockup-name { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .nav-links { flex: none; margin-left: 12px; gap: 8px; }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .modules-3 { grid-template-columns: repeat(3, 1fr); }
  .modules { grid-template-columns: repeat(4, 1fr); }
  .modules-3 { grid-template-columns: repeat(3, 1fr); }
  .module-wide { grid-column: span 2; }
}
@media (min-width: 1024px) {
  /* 1000 : 600 split of the 1600 frame (01, 05), inside the header's container. The panel's colour runs
     from its own left edge to the right edge of the screen. */
  .hero-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 3fr); }
  .hero-copy { padding-right: clamp(32px, 4vw, 72px); }
  .hero-panel { padding-block: 56px; }
  .hero-panel::before { inset: 0 -100vw 0 0; }
  /* Never wider than its column, and short enough to sit in one screen with the header. */
  .phone { width: min(320px, 100%, calc((100vh - 200px) * 354 / 723)); min-width: 220px; }
  .layouts { grid-template-columns: repeat(3, 1fr); }
}
/* Five across only where each thumbnail still has room for its bar (about 240px a card). */
@media (min-width: 1400px) {
  .layouts { grid-template-columns: repeat(5, 1fr); }
}
