/* ==========================================================================
   RogerDeck marketing site — visual tokens mirror src/theme/tokens.ts
   (the dark palette, the platform's own type, the ROGERDECK brand lockup)
   so the public site and the product read as the same company.
   ========================================================================== */

:root {
  /* Neutrals — dark (palette.ink*) */
  --ink-000: #0d0e10;
  --ink-100: #1a1c20;
  --ink-200: #25272b;
  --ink-300: #34373d;
  --ink-400: #82848a;
  --ink-900: #f0f0f2;

  /* Brand — accentDark from tokens.ts */
  --accent: #4d93ff;
  --accent-pressed: #3e76cc;

  /* Status */
  --green: #30d158;
  --yellow: #ffd60a;

  --bg: var(--ink-000);
  --bg-raised: var(--ink-100);
  --bg-card: var(--ink-100);
  --border: var(--ink-300);
  --text: var(--ink-900);
  --text-muted: var(--ink-400);

  /* The system face, the same rule as the app (src/theme/tokens.ts, 8d4a373): the
     faces a template reaches for (Outfit, Inter, Poppins...) read as machine-made,
     and the brand's own letterform is the drawn stencil-R logo. Nothing is
     downloaded, so no visitor's IP goes to a font host. On Windows 11 the
     Variable cuts matter: plain Segoe UI at 60px looks like a dialog box.
     Mono is the platform's, and only for data. */
  --font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Roboto Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --max-width: 1120px;

  /* Motion — a sharper deceleration than generic ease, so things settle with
     intent instead of coasting to a stop. Durations: fast for hover/press
     feedback, medium for hover lifts, slow for content arriving on the page. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.15s;
  --dur-med: 0.35s;
  --dur-slow: 0.7s;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Respect it. Everything below still runs once, in place, so nothing is ever
   permanently hidden for someone who asked for reduced motion — it just
   arrives instantly instead of easing in. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------- reveal */
/* Applied by script.js to a curated list of sections as they enter the
   viewport, never in the plain CSS class — if JS never runs, content is
   already visible, not stuck at opacity 0. --i is set per-item by the
   script for a stagger; it defaults to 0 for anything set inline instead. */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

/* ------------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 14, 16, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

/* The brand is the horizontal logo: ROGERDECK with the stencil R as its first letter.
   Never a mark set beside the word (it reads "R ROGERDECK"). The logo is 10:1, so 160px
   wide is 16px tall. Clear space is one R-stem width, 22% of the height (3.5px here),
   which the nav padding and the footer margin already exceed. Minimum width is 120px:
   in the nav row the logo may shrink from 160px to 120px and no further. */
.brand {
  display: block;
  flex: 0 1 160px;
  min-width: 120px;
  line-height: 0;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

/* In the footer the brand is not a flex item, so it takes its width directly. */
.footer-brand .brand {
  width: 160px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 1px;
  background: var(--accent);
  transition: right var(--dur-med) var(--ease-out);
}

.nav-links a:hover::after,
.nav-links a[aria-current='page']::after {
  right: 0;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #04101f;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--accent-pressed);
  color: #04101f;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 10px;
  font-size: 20px;
  line-height: 1;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

/* The hero moves again (Ed, 23 September). Three things, all restored from the
   August motion pass after the type pass took them out: a glow that drifts
   behind the hero, five bars that stand for a live radio, and one fade-up on
   arrival. Reduced motion still flattens every one of them, at the top of this
   file. */

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(60% 55% at 82% 0%, rgba(77, 147, 255, 0.16), transparent 60%);
  animation: hero-glow-drift 14s var(--ease-out) infinite alternate;
}

@keyframes hero-glow-drift {
  0% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  100% { transform: translate(-3%, 2%) scale(1.08); opacity: 1; }
}

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

/* The hero is in view on load, so it plays once on arrival rather than waiting
   for a scroll. Staggered by hand: the order is fixed and short. */
.hero .signal-meter,
.hero h1,
.hero p.lede,
.hero .cta-row,
.hero .hero-note {
  animation: hero-in var(--dur-slow) var(--ease-out) both;
}

.hero .signal-meter { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.12s; }
.hero p.lede { animation-delay: 0.22s; }
.hero .cta-row { animation-delay: 0.32s; }
.hero .hero-note { animation-delay: 0.4s; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* Five bars at slightly different heights and speeds, so they never lock into a
   visible loop. It carries no text: the eyebrow it used to sit inside is gone.
   Home page only. */
.signal-meter {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 22px;
  margin: 0 0 22px;
}

.signal-meter span {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: bottom;
  animation: signal-bounce 1.1s ease-in-out infinite;
}

.signal-meter span:nth-child(1) { animation-duration: 0.9s; animation-delay: -0.4s; }
.signal-meter span:nth-child(2) { animation-duration: 1.3s; animation-delay: -0.1s; }
.signal-meter span:nth-child(3) { animation-duration: 0.8s; animation-delay: -0.7s; }
.signal-meter span:nth-child(4) { animation-duration: 1.2s; animation-delay: -0.3s; }
.signal-meter span:nth-child(5) { animation-duration: 1s; animation-delay: -0.55s; }

@keyframes signal-bounce {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  max-width: 18ch;
}

.hero p.lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 0 36px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #04101f;
}

.btn-primary:hover {
  background: var(--accent-pressed);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -10px rgba(77, 147, 255, 0.5);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-note {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* --------------------------------------------------------------- section */

section {
  padding: 88px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.section-head {
  max-width: 62ch;
  margin: 0 0 48px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

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

/* ---------------------------------------------------------------- pillars */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pillar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) ease,
    box-shadow var(--dur-med) var(--ease-out);
}

.pillar:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.45);
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(77, 147, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  transition: transform var(--dur-med) var(--ease-out), background-color var(--dur-med) ease;
}

.pillar:hover .pillar-icon {
  transform: rotate(-8deg) scale(1.1);
  background: rgba(77, 147, 255, 0.2);
}

.pillar h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pillar p {
  color: var(--text-muted);
  margin: 0;
  font-size: 15.5px;
}

/* No status pills and no status dots (Branding, 22 Sep). "Shipped" is the
   default and goes unsaid; whatever isn't live ends its own sentence with
   "In development." or "Coming soon.", and a standalone note is a muted .hint. */

/* -------------------------------------------------------------- how-steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  position: relative;
  padding-left: 0;
}

.step-num {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.step p {
  color: var(--text-muted);
  margin: 0;
  font-size: 15px;
}

/* -------------------------------------------------------------- roles row */

.roles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.role-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14.5px;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);
}

.role-chip:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

/* ---------------------------------------------------------------- callout */

.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}

.callout.beta {
  border-color: rgba(255, 214, 10, 0.4);
  background: linear-gradient(180deg, rgba(255, 214, 10, 0.05), var(--bg-card) 60%);
}

.callout h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.callout p {
  color: var(--text-muted);
  margin: 0;
  max-width: 60ch;
}

/* --------------------------------------------------------------- surfaces */

.surfaces {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.surface-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: var(--bg-card);
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) ease,
    box-shadow var(--dur-med) var(--ease-out);
}

.surface-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.45);
}

.surface-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

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

.surface-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.7;
}

/* ------------------------------------------------------------------ final */

.final-cta {
  text-align: center;
  padding: 96px 0;
}

.final-cta h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.final-cta p {
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 auto 36px;
}

.final-cta .cta-row {
  justify-content: center;
}

/* ----------------------------------------------------------------- footer */

footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

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

.footer-brand {
  max-width: 320px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 14px 0 0;
}

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

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.footer-col a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-size: 14.5px;
  margin-bottom: 10px;
  transition: color var(--dur-fast) ease;
}

.footer-col a:hover {
  color: var(--accent);
}

/* The one brand device, used once: the Morse R, ·–· ("received"), before the
   copyright in the footer. Nowhere else on the site. */
.morse-r {
  fill: var(--accent);
  vertical-align: middle;
  margin-right: 10px;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------------------------------------------------------- pricing */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) ease,
    box-shadow var(--dur-med) var(--ease-out);
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.45);
}

.plan-card.featured:hover {
  border-color: var(--accent);
}

.plan-card:not(.featured):hover {
  border-color: var(--ink-400);
}

.plan-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(77, 147, 255, 0.08), var(--bg-card) 55%);
  position: relative;
}


.plan-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan-price .amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.plan-price .period {
  color: var(--text-muted);
  font-size: 14px;
}

.plan-desc {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0;
}

.plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text);
}

.plan-features li svg {
  flex-shrink: 0;
  margin-top: 3px;
}

/* ------------------------------------------------------------------ forms */

.contact-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
}

.hint {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
  margin-top: 20px;
}

/* When a page has more than one thing that isn't live yet, they sit under one
   muted "Coming soon" label instead of each ending in its own "Coming soon."
   A single item keeps the trailing sentence. */
.soon {
  margin-top: 32px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

.soon-label {
  font-weight: 600;
  margin: 0 0 6px;
}

.soon ul {
  margin: 0;
  padding-left: 18px;
}

.soon li + li {
  margin-top: 4px;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .pillars,
  .steps,
  .surfaces,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .callout {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .footer-grid {
    flex-direction: column;
  }
}

/* On phones the nav row is logo + button + menu toggle. The logo may not go below
   120px (brand rule), so the gaps give instead: 12px keeps the row inside 352px and
   lets the logo grow back toward 160px on wider phones. */
@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .nav .wrap {
    gap: 12px;
  }
}

/* Below 360px the 12px-gap row still runs past the viewport (measured +32px at 320px).
   The logo is already at its 120px floor, so this tightens the two remaining flexible
   pieces instead: the wrap's own side padding and the "Request access" button. */
@media (max-width: 359px) {
  .nav .wrap {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .nav-cta {
    padding: 10px 12px;
  }

  .nav-toggle {
    padding: 8px 8px;
  }
}
