/*
 * dashtr — the marketing site.
 *
 * The palette is the app's own, lifted from src/theme/tokens.ts rather than
 * approximated: someone arriving here from the Play listing should recognise
 * the product the moment it loads. Gold on near-black, warm neutrals, and a
 * deep teal that is informational and never brand.
 *
 * One typeface, Archivo, which is what the app ships. Hierarchy comes from
 * size, weight and tracking, as it does on the screens.
 */

:root {
  /* From the app's dark theme. */
  --bg: #0a0908;
  --surface: #151311;
  --surface-2: #1c1916;
  --text: #f3eee4;
  --muted: #a79e8f;
  --faint: #6f675c;
  --gold: #e3b85c;
  --gold-deep: #b98f3a;
  --on-gold: #1a1509;
  --teal: #4e9aa8;
  --good: #5fcb92;
  --line: rgba(243, 238, 228, 0.1);

  --radius: 16px;
  --radius-lg: 24px;
  --max: 1120px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Archivo, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* A visible focus ring everywhere. The app holds itself to this; so does this. */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---- Header --------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 16px 0;
  transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease),
    border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(10, 9, 8, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  height: 26px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ---- Buttons -------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
    border-color 0.2s var(--ease);
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--gold);
  color: var(--on-gold);
}

.btn-gold:hover {
  background: #eec575;
}

.btn-quiet {
  border-color: var(--line);
  color: var(--text);
  background: rgba(243, 238, 228, 0.03);
}

.btn-quiet:hover {
  border-color: rgba(227, 184, 92, 0.5);
}

/* ---- Hero ----------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

/* The three.js canvas sits behind everything and never takes a click. */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/*
 * A scrim between the canvas and the words.
 *
 * Gold on near-black is a narrow contrast budget to begin with, and a lit metal
 * surface moving underneath the headline eats what is left. This keeps the text
 * side dark whatever the wheel is doing, so the copy never depends on where the
 * highlight happens to be.
 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
      100deg,
      var(--bg) 0%,
      rgba(10, 9, 8, 0.92) 34%,
      rgba(10, 9, 8, 0.45) 58%,
      rgba(10, 9, 8, 0.1) 100%
    ),
    linear-gradient(to bottom, rgba(10, 9, 8, 0.55) 0%, transparent 22%, transparent 70%, var(--bg) 100%);
}

@media (max-width: 1000px) {
  /* On a narrow screen the wheel is above the text, so the shading turns with it. */
  .hero::before {
    background: linear-gradient(
      to bottom,
      rgba(10, 9, 8, 0.3) 0%,
      rgba(10, 9, 8, 0.82) 38%,
      var(--bg) 62%
    );
  }
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero-inner {
  max-width: 660px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(227, 184, 92, 0.3);
  background: rgba(227, 184, 92, 0.07);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 24px;
}

.hero h1 .accent {
  background: linear-gradient(135deg, #f6d99a 0%, var(--gold) 45%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
  margin: 0 0 36px;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-note {
  margin-top: 26px;
  font-size: 14px;
  color: var(--faint);
}

/* ---- Sections ------------------------------------------------------- */

section {
  position: relative;
  padding: 100px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 16px;
}

.section-head p {
  color: var(--muted);
  margin: 0;
  font-size: 18px;
}

.kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}

/* ---- Cards ---------------------------------------------------------- */

.grid {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(227, 184, 92, 0.32);
}

.card h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  font-weight: 600;
}

.card p {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
}

.card .icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(227, 184, 92, 0.1);
  border: 1px solid rgba(227, 184, 92, 0.22);
  margin-bottom: 20px;
  color: var(--gold);
}

.card .icon svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The one claim the product is built on gets its own treatment. */
.card.feature-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}

@media (max-width: 720px) {
  .card.feature-wide {
    grid-template-columns: 1fr;
  }
}

.permission-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}

.permission-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--muted);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

.permission-list .tick {
  color: var(--good);
  flex: none;
}

/* ---- Numbers -------------------------------------------------------- */

.stat {
  border-left: 2px solid rgba(227, 184, 92, 0.35);
  padding-left: 20px;
}

.stat .n {
  display: block;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat .l {
  color: var(--muted);
  font-size: 15px;
}

/* ---- Price ---------------------------------------------------------- */

.price-card {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 44px 34px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(227, 184, 92, 0.09), rgba(21, 19, 17, 0.9));
  border: 1px solid rgba(227, 184, 92, 0.3);
}

.price-card .amount {
  font-size: 58px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 12px 0 6px;
}

.price-card .once {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  text-align: left;
  display: grid;
  gap: 12px;
}

.price-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 16px;
}

.price-list .tick {
  color: var(--gold);
  flex: none;
  margin-top: 3px;
}

/* ---- FAQ ------------------------------------------------------------ */

details.faq {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

details.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

details.faq summary::-webkit-details-marker {
  display: none;
}

details.faq summary::after {
  content: '+';
  color: var(--gold);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.25s var(--ease);
  flex: none;
}

details.faq[open] summary::after {
  transform: rotate(45deg);
}

details.faq p {
  color: var(--muted);
  margin: 14px 0 0;
  max-width: 68ch;
}

/* ---- Footer --------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.footer-links a {
  color: var(--muted);
  font-size: 15px;
}

.footer-links a:hover {
  color: var(--gold);
}

.site-footer .fine {
  color: var(--faint);
  font-size: 14px;
  margin: 32px 0 0;
}

/* ---- Document pages (privacy, terms, support) ------------------------ */

.doc {
  padding: 150px 0 80px;
}

.doc .wrap {
  max-width: 760px;
}

.doc h1 {
  font-size: clamp(32px, 5vw, 46px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 12px;
  font-weight: 700;
}

.doc .updated {
  color: var(--faint);
  font-size: 15px;
  margin: 0 0 44px;
}

.doc h2 {
  font-size: 23px;
  letter-spacing: -0.02em;
  margin: 48px 0 14px;
  font-weight: 600;
}

.doc h3 {
  font-size: 18px;
  margin: 30px 0 10px;
  font-weight: 600;
}

.doc p,
.doc li {
  color: var(--muted);
}

.doc li {
  margin-bottom: 9px;
}

.doc strong {
  color: var(--text);
  font-weight: 600;
}

.doc .callout {
  background: rgba(227, 184, 92, 0.07);
  border: 1px solid rgba(227, 184, 92, 0.26);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 32px 0;
}

.doc .callout p {
  margin: 0;
  color: var(--text);
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 15px;
}

.doc th,
.doc td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.doc th {
  color: var(--text);
  font-weight: 600;
}

.doc td {
  color: var(--muted);
}

/* ---- Scroll reveal --------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0ms);
}

[data-reveal].shown {
  opacity: 1;
  transform: none;
}

/*
 * Anyone who has asked their system for less movement gets none of it: the
 * content is the point and the animation is decoration.
 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 760px) {
  .nav {
    display: none;
  }

  section {
    padding: 72px 0;
  }

  .hero {
    padding-top: 110px;
  }
}
