/* Revv marketing site — flight-deck editorial system.
   Tokens mirror RevvApp/src/constants/theme.ts and docs/design-language.md:
   charcoal planes, hairline rules, violet accent, Plus Jakarta Sans,
   tabular numerals, one hero metric per section, no decorative shadows. */

:root {
  color-scheme: dark;
  --bg: #101014;
  --plane-1: #19191f;
  --plane-2: #24242d;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.15);
  --ink: #f7f7fc;
  --muted: #aeaabd;
  --dim: #6f6b7d;
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.18);
  --road-blue: #4a7cff;
  --good: #43d6b5;
  --good-soft: rgba(67, 214, 181, 0.14);
  --warn: #ffd44a;
  --danger: #ff5c7a;
  --max: 1180px;
  --radius-panel: 24px;
  --radius-phone: 44px;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/PlusJakartaSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/PlusJakartaSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/PlusJakartaSans-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p,
dl,
ul {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.015em;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(3.3rem, 7.6vw, 6.6rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.02;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
  line-height: 1.2;
}

p {
  color: var(--muted);
}

.wrap {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}

/* ---------- shared editorial primitives ---------- */

.eyebrow {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lede {
  max-width: 620px;
  font-size: clamp(1.08rem, 1.9vw, 1.3rem);
  line-height: 1.6;
}

.caption {
  max-width: 560px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hairline {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 8px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px var(--good-soft);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--hairline);
  background: rgba(16, 16, 20, 0.94);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  width: 116px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: var(--plane-2);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, filter 160ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: rgba(255, 255, 255, 0.3);
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--road-blue));
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 36px rgba(139, 92, 246, 0.22);
}

.button.primary:hover,
.button.primary:focus-visible {
  filter: brightness(1.07);
}

.store-badge {
  display: inline-flex;
  border-radius: 12px;
  text-decoration: none;
  transition: filter 160ms ease;
}

.store-badge:hover,
.store-badge:focus-visible {
  filter: brightness(1.12);
}

.store-badge img {
  height: 54px;
  width: auto;
}

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

.hero {
  border-bottom: 1px solid var(--hairline);
  background:
    radial-gradient(ellipse 90% 60% at 78% -10%, rgba(139, 92, 246, 0.14), transparent 60%),
    var(--bg);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.62fr);
  gap: 56px;
  align-items: center;
  width: min(100% - 40px, var(--max));
  min-height: calc(100svh - 78px);
  margin: 0 auto;
  padding: 68px 0 76px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px;
  margin: 56px 0 0;
  border-top: 1px solid var(--hairline);
}

.hero-stats div {
  min-width: 0;
  padding: 18px 16px 0 0;
}

.hero-stats div + div {
  padding-left: 16px;
  border-left: 1px solid var(--hairline);
}

.hero-stats dt,
.meta-label {
  margin-bottom: 8px;
  color: var(--dim);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-stats dd {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.4rem, 2.8vw, 2.35rem);
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.hero-footnote {
  margin: 14px 0 0;
  color: var(--dim);
  font-size: 0.8rem;
}

/* ---------- phones ---------- */

.phone {
  position: relative;
  width: min(100%, 372px);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-phone);
  overflow: hidden;
  background: #050507;
  box-shadow: 0 44px 90px rgba(0, 0, 0, 0.5);
}

.phone img {
  width: 100%;
  height: auto;
}

.hero-phone {
  justify-self: center;
}

.demo-chip {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 6px 11px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: rgba(16, 16, 20, 0.82);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- sections ---------- */

.section {
  padding: 96px 0;
}

.section.alt {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: #141419;
}

.section-head {
  max-width: 860px;
  margin-bottom: 48px;
}

/* receipt split */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.58fr);
  gap: 64px;
  align-items: center;
}

.receipt-lines {
  margin: 36px 0 0;
  border-top: 1px solid var(--hairline);
}

.receipt-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}

.receipt-line dt {
  color: var(--dim);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.receipt-line dd {
  margin: 0;
  color: var(--ink);
  font-size: 1.28rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.receipt-line dd small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

/* inside-the-app cards */

.screen-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.screen-card {
  display: grid;
  gap: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-panel);
  background: var(--plane-1);
  padding: 26px;
}

.screen-card .phone {
  width: min(100%, 330px);
  margin: 0 auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.screen-card h3 {
  margin-top: 24px;
}

.screen-card p {
  margin-bottom: 0;
}

/* how it works */

.step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-panel);
  overflow: hidden;
}

.step-list article {
  padding: 30px 28px 34px;
  background: var(--plane-1);
}

.step-list article + article {
  border-left: 1px solid var(--hairline);
}

.step-list span {
  display: inline-block;
  margin-bottom: 40px;
  color: var(--accent);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.step-list p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* plus comparison */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.plan {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-panel);
  background: var(--plane-1);
  padding: 30px;
}

.plan.plus {
  border-color: rgba(139, 92, 246, 0.45);
  background:
    radial-gradient(ellipse 120% 70% at 85% -20%, var(--accent-soft), transparent 60%),
    var(--plane-1);
}

.plan-name {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.plan-price {
  margin-bottom: 22px;
  color: var(--dim);
  font-size: 0.88rem;
}

.plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 11px 0;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.97rem;
}

.plan li::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
  transform: translateY(-2px);
}

.plan.plus li::before {
  background: var(--accent);
}

.plan-footnote {
  margin: 18px 0 0;
  color: var(--dim);
  font-size: 0.8rem;
}

/* privacy strip */

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hairline);
}

.privacy-grid article {
  padding: 24px 22px 0 0;
}

.privacy-grid article + article {
  padding-left: 22px;
  border-left: 1px solid var(--hairline);
}

.privacy-grid h3 {
  font-size: 1.02rem;
}

.privacy-grid p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

/* final CTA */

.final-cta {
  padding: 72px 0 104px;
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: var(--radius-panel);
  background:
    radial-gradient(ellipse 90% 90% at 88% 10%, var(--accent-soft), transparent 55%),
    var(--plane-1);
  padding: 44px;
}

.cta-panel h2 {
  margin-bottom: 10px;
}

.cta-panel p {
  margin-bottom: 0;
}

.cta-panel .store-badge {
  flex: 0 0 auto;
}

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

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 30px 0;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.88rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--ink);
}

/* ---------- policy pages ---------- */

.policy {
  width: min(100% - 40px, 840px);
  margin: 0 auto;
  padding: 72px 0 96px;
}

.policy h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
}

.policy h2 {
  margin-top: 40px;
  margin-bottom: 10px;
  font-size: 1.32rem;
}

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

.policy ul {
  padding-left: 22px;
}

.notice {
  margin: 30px 0;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--plane-1);
  padding: 16px 20px;
  color: var(--ink);
}

/* ---------- motion ---------- */

.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 640ms cubic-bezier(0.16, 1, 0.3, 1), transform 640ms cubic-bezier(0.16, 1, 0.3, 1);
}

.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.motion-ready .stagger > [data-reveal]:nth-child(2) {
  transition-delay: 110ms;
}

.motion-ready .stagger > [data-reveal]:nth-child(3) {
  transition-delay: 220ms;
}

.motion-ready .stagger > [data-reveal]:nth-child(4) {
  transition-delay: 330ms;
}

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

@media (max-width: 980px) {
  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
    padding-top: 52px;
  }

  .hero-phone {
    justify-self: start;
  }

  .screen-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .step-list {
    grid-template-columns: 1fr;
  }

  .step-list article + article {
    border-left: 0;
    border-top: 1px solid var(--hairline);
  }

  .step-list span {
    margin-bottom: 20px;
  }
}

@media (max-width: 680px) {
  .nav-links a:not(.button) {
    display: none;
  }

  .wrap,
  .hero-grid,
  .nav {
    width: min(100% - 32px, var(--max));
  }

  h1 {
    font-size: clamp(2.9rem, 14vw, 4.4rem);
  }

  .section {
    padding: 68px 0;
  }

  .hero-stats div {
    padding-right: 10px;
  }

  .hero-stats div + div {
    padding-left: 10px;
  }

  .privacy-grid {
    grid-template-columns: 1fr;
  }

  .privacy-grid article {
    padding: 22px 0 0;
  }

  .privacy-grid article + article {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--hairline);
    margin-top: 22px;
  }

  .cta-panel,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .screen-card .phone {
    width: min(100%, 300px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

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