/* Pendura website. "Road at night": the same tokens as the app (apps/mobile/src/constants/theme.ts). */
:root {
  --bg: #0b0f14;
  --surface: #141a21;
  --raised: #1b232c;
  --sunken: #0f141a;
  --border: #26303b;
  --border-strong: #34404d;
  --text: #f2f5f7;
  --body: #c9d0d6;
  --muted: #a3adb6;
  --faint: #6b7682;
  --accent: #f5b93d;
  --accent-text: #f5b93d;
  --on-accent: #0b0f14;
  --accent-rgb: 245, 185, 61;
  --accent-soft: rgba(var(--accent-rgb), 0.12);
  --success: #5fd3b5;
  --danger: #ff8a7a;
  --nav-bg: rgba(11, 15, 20, 0.72);
  --nav-border: rgba(38, 48, 59, 0.6);
  --bezel: #05080b;
  --phone-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 6px rgba(27, 35, 44, .6);
  --teal-glow: var(--teal-glow);
  --radius: 22px;
  --max: 1120px;
  color-scheme: dark;
}

/* Light: the app's light tokens (warm paper, darker amber so text keeps AA contrast). */
:root[data-theme="light"] {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --raised: #ffffff;
  --sunken: #efece5;
  --border: #e4dfd4;
  --border-strong: #d3ccbe;
  --text: #14181d;
  --body: #3a4149;
  --muted: #5a636d;
  --faint: #868d95;
  --accent: #c98a0e;
  --accent-text: #8a5a00;
  --on-accent: #1a1306;
  --accent-rgb: 201, 138, 14;
  --success: #11806a;
  --danger: #c2412f;
  --nav-bg: rgba(247, 245, 240, 0.78);
  --nav-border: rgba(228, 223, 212, 0.9);
  --bezel: #14181d;
  --phone-shadow: 0 40px 80px -36px rgba(60, 45, 20, .35), 0 0 0 6px rgba(211, 204, 190, .5);
  --teal-glow: rgba(17, 128, 106, .06);
  color-scheme: light;
}

/* Screens: each theme shows the app in the same theme. */
.shot-light { display: none; }
:root[data-theme="light"] .shot-light { display: block; }
:root[data-theme="light"] .shot-dark { display: none; }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--border-strong); color: var(--text);
}
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

/* Header */
.nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.lang { border: 1px solid var(--border-strong); border-radius: 999px; padding: 4px 12px; color: var(--text) !important; }
@media (max-width: 720px) { .nav-links .hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 16px; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 40px -10px rgba(var(--accent-rgb), .55); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn small { font-weight: 500; opacity: .75; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 720px; pointer-events: none;
  background: radial-gradient(closest-side at 70% 40%, rgba(var(--accent-rgb), .16), transparent 70%),
              radial-gradient(closest-side at 20% 10%, var(--teal-glow), transparent 70%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; text-align: center; } .hero .actions { justify-content: center; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--accent-text); background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), .25); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.4s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.035em; margin: 0 0 22px; font-weight: 700; }
h1 em { font-style: normal; color: var(--accent-text); }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 560px; margin: 0 0 32px; }
@media (max-width: 900px) { .lead { margin-inline: auto; } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fineprint { font-size: 14px; color: var(--faint); margin-top: 18px; }

/* Phones */
.phone {
  position: relative; width: 280px; aspect-ratio: 1206 / 2622;
  border-radius: 46px; padding: 10px; background: var(--bezel);
  border: 1px solid var(--border-strong);
  box-shadow: var(--phone-shadow);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; }
.hero-phones { position: relative; height: 620px; display: flex; justify-content: center; align-items: center; }
.hero-phones .phone:first-child { transform: translateX(-38%) rotate(-6deg) scale(.88); position: absolute; opacity: .75; }
.hero-phones .phone:last-child { position: relative; transform: translateX(18%); }
@media (max-width: 900px) { .hero-phones { height: 560px; } }
@media (max-width: 480px) { .hero-phones .phone:first-child { display: none; } .hero-phones .phone:last-child { transform: none; } }

/* Road divider: a dashed lane that moves */
.road { height: 4px; margin: 40px 0; background: repeating-linear-gradient(90deg, var(--border-strong) 0 28px, transparent 28px 52px); animation: drive 1.8s linear infinite; opacity: .7; }
@keyframes drive { to { background-position: 52px 0; } }

/* Sections */
section { padding: 80px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.kicker { color: var(--accent-text); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.025em; margin: 10px 0 16px; }
h3 { font-size: 21px; letter-spacing: -0.01em; margin: 0 0 8px; }
.muted { color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: linear-gradient(180deg, var(--surface), var(--sunken));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
}
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); margin-bottom: 18px;
}
.icon svg { width: 22px; height: 22px; }

/* Feature rows with a phone */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 40px 0; }
.feature.flip .feature-text { order: 2; }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; gap: 32px; } .feature.flip .feature-text { order: 0; } .feature .phone { margin-inline: auto; } }
.feature .phone { justify-self: center; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; color: var(--muted); }
.checks li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 4px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F5B93D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Safety band */
.band {
  border: 1px solid rgba(var(--accent-rgb), .25); border-radius: 28px; padding: 44px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(var(--accent-rgb), .12), transparent 55%), var(--surface);
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
}
@media (max-width: 720px) { .band { grid-template-columns: 1fr; padding: 30px; } }
.speed { font-size: 64px; font-weight: 750; letter-spacing: -0.04em; line-height: 1; color: var(--accent-text); }
.speed span { font-size: 22px; color: var(--muted); font-weight: 600; margin-left: 4px; }

/* Steps: two even columns, the number beside the name */
.stages { counter-reset: s; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
@media (max-width: 420px) { .stages { grid-template-columns: minmax(0, 1fr); } }
.stages li {
  counter-increment: s; display: flex; align-items: center; gap: 14px; min-height: 64px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 16px;
}
.stages li::before {
  content: counter(s); flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--border-strong); color: var(--muted); font-size: 14px; font-weight: 700;
}
.stages li:first-child { border-color: rgba(var(--accent-rgb), .35); background: linear-gradient(90deg, var(--accent-soft), var(--surface)); }
.stages li:first-child::before { border-color: var(--accent); color: var(--accent-text); }
.stages strong { display: block; font-size: 15px; line-height: 1.3; }

/* FAQ */
details { border-bottom: 1px solid var(--border); padding: 20px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent-text); font-size: 24px; line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin: 12px 0 0; }

/* CTA */
.cta { text-align: center; padding: 100px 0; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 60% at 50% 100%, rgba(var(--accent-rgb), .14), transparent 70%); pointer-events: none; }
.cta .actions { justify-content: center; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 40px 0 56px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* Legal pages */
.legal { padding: 64px 0 40px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(34px, 5vw, 48px); }
.legal h2 { font-size: 24px; margin: 44px 0 10px; }
.legal h3 { font-size: 18px; margin: 26px 0 6px; }
.legal p, .legal li { color: var(--body); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--border); }
.legal th { color: var(--text); font-weight: 600; }
.legal td { color: var(--body); }
.updated { color: var(--faint); font-size: 15px; }
.note { background: var(--accent-soft); border: 1px solid rgba(var(--accent-rgb), .25); border-radius: 14px; padding: 14px 18px; color: var(--text) !important; }
.todo { background: rgba(255, 138, 122, .14); color: var(--danger); border-radius: 6px; padding: 0 6px; font-weight: 600; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
