/* ============================================================
   Car Plate AI · Website — Single Source of Truth
   Ferrari palette: Rosso Corsa #FF2800 · Giallo gold · Carbon black
   All 4 pages share this file. Never hardcode values elsewhere.
   ============================================================ */

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ───────────────────────────────────────── */
:root {
  --red:        #FF2800;
  --red-dark:   #7A1200;
  --gold:       #FFCC40;
  --gold-dim:   #C89A00;
  --bg:         #0F0F0F;
  --bg-warm:    #381F1B;
  --surface:    rgba(255,255,255,0.07);
  --surface-hi: rgba(255,255,255,0.12);
  --border:     rgba(255,255,255,0.10);
  --border-hi:  rgba(255,204,64,0.30);
  --text:       #F7F5F0;
  --muted:      #C0B0A8;
  --radius:     16px;
  --max-w:      1080px;
  --fs-xxl: clamp(2.4rem, 6vw, 3.8rem);
  --fs-xl:  clamp(1.7rem, 4vw, 2.4rem);
  --fs-lg:  1.1rem;
  --fs-sm:  0.875rem;
}

/* ── Foundation ──────────────────────────────────────────── */
html { scroll-behavior: smooth; background: var(--bg); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg) 35%);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Ambient glow radiating down from racing stripe */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 300px;
  background: radial-gradient(ellipse at 50% -60px, rgba(255,40,0,0.13) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Header — stripe + sticky nav ───────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 200;
}

.stripe {
  height: 4px;
  background: var(--red);
  box-shadow: 0 2px 14px rgba(255,40,0,0.55);
}

nav {
  background: rgba(10,10,10,0.84);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

/* ── Main ────────────────────────────────────────────────── */
main { flex: 1; position: relative; z-index: 1; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  padding: 80px 24px 100px;
  overflow: hidden;
}

.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* Floating particles */
.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particles span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: drift var(--dur, 10s) var(--del, 0s) linear infinite;
}

.particles span:nth-child(1)  { left:  7%; --dur:  9s; --del: 0.0s; }
.particles span:nth-child(2)  { left: 18%; --dur: 13s; --del: 1.2s; }
.particles span:nth-child(3)  { left: 29%; --dur:  8s; --del: 0.5s; }
.particles span:nth-child(4)  { left: 43%; --dur: 14s; --del: 2.0s; }
.particles span:nth-child(5)  { left: 57%; --dur: 10s; --del: 0.8s; }
.particles span:nth-child(6)  { left: 68%; --dur: 11s; --del: 3.1s; }
.particles span:nth-child(7)  { left: 79%; --dur:  9s; --del: 1.7s; }
.particles span:nth-child(8)  { left: 88%; --dur: 12s; --del: 0.3s; }
.particles span:nth-child(9)  { left: 23%; --dur:  7s; --del: 4.0s; }
.particles span:nth-child(10) { left: 63%; --dur: 11s; --del: 2.6s; }

/* Hero text */
.hero-text { animation: fadeInUp 0.7s ease both; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--gold);
  background: rgba(255,204,64,0.10);
  border: 1px solid rgba(255,204,64,0.22);
  border-radius: 50px;
  padding: 5px 14px;
  margin-bottom: 24px;
  letter-spacing: 0.4px;
}

.hero-logo {
  width: 128px;
  height: 128px;
  border-radius: 22px;
  margin-bottom: 20px;
  display: block;
  box-shadow: 0 0 0 4px var(--red-dark), 0 0 48px rgba(255,204,64,0.3);
  animation: logoPulse 4s ease-in-out infinite;
}

.hero h1 {
  font-size: var(--fs-xxl);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 18px;
}

/* Gold shimmer on the italic "On a plate." */
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--gold) 0%, #fff8d0 50%, var(--gold) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldShimmer 3.5s 1s linear infinite;
}

.hero-sub {
  font-size: var(--fs-lg);
  color: var(--muted);
  max-width: 440px;
  margin-bottom: 36px;
  line-height: 1.7;
}

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

.app-store-badge img {
  display: block;
  height: 50px;
  width: auto;
  border-radius: 10px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-badge:hover img {
  transform: translateY(-2px);
  opacity: 0.88;
}

.hero-note {
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.7;
}

/* Phone mockup */
.hero-phone {
  position: relative;
  display: flex;
  justify-content: center;
  animation: fadeInUp 0.9s 0.15s ease both;
}

.phone-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 300px; height: 300px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(255,40,0,0.20) 0%, transparent 70%);
  pointer-events: none;
  animation: glowPulse 3.5s ease-in-out infinite alternate;
}

.phone-frame {
  width: 232px;
  aspect-ratio: 9/19.5;
  background: #111;
  border-radius: 44px;
  border: 2px solid rgba(255,255,255,0.14);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.8),
    0 40px 90px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.10);
  position: relative;
  overflow: hidden;
  transform: perspective(1100px) rotateY(-10deg) rotateX(3deg);
  transition: transform 0.5s cubic-bezier(0.23,1,0.32,1);
  flex-shrink: 0;
}

.phone-frame:hover {
  transform: perspective(1100px) rotateY(-4deg) rotateX(1deg);
}

/* Dynamic Island */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 84px; height: 26px;
  background: #000;
  border-radius: 18px;
  z-index: 2;
}

/* Home indicator */
.phone-frame::after {
  content: '';
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 4px;
  background: rgba(255,255,255,0.35);
  border-radius: 3px;
  z-index: 2;
}

.phone-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 42px;
  display: block;
}

/* ── Social proof strip ──────────────────────────────────── */
.proof-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 24px;
}

.proof-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 32px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}

.proof-item .icon { color: var(--gold); }

/* Half-star rating */
.stars { color: var(--gold); letter-spacing: 1px; line-height: 1; }
.stars .half { display: inline-block; width: 0.5em; overflow: hidden; vertical-align: bottom; }

.proof-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Features section ────────────────────────────────────── */
.features-section { padding: 96px 24px; }

.section-header {
  text-align: center;
  margin-bottom: 52px;
}

.section-tag {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #fff;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--muted);
  font-size: var(--fs-lg);
  max-width: 460px;
  margin: 0 auto;
}

.cards-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* ── Card ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Shimmer sweep on hover */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  transition: left 0.55s ease;
  pointer-events: none;
}

.card:hover::before { left: 160%; }

/* Left red accent bar */
.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(to bottom, var(--red), rgba(255,40,0,0));
  border-radius: 2px 0 0 2px;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hi);
  box-shadow: 0 16px 48px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,204,64,0.08);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
  line-height: 1;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.card p {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.72;
}

/* ── Bottom CTA section ──────────────────────────────────── */
.cta-section {
  padding: 96px 24px;
  text-align: center;
}

.cta-section h2 {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.8px;
}

.cta-section p {
  color: var(--muted);
  font-size: var(--fs-lg);
  margin-bottom: 36px;
}

/* ── Primary button (red gradient + shimmer) ─────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(to bottom, var(--red), var(--red-dark));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 15px 38px;
  border-radius: 50px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 24px rgba(255,40,0,0.40);
  border: 1.5px solid rgba(255,255,255,0.16);
  letter-spacing: 0.2px;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  animation: shimmer 2.8s ease infinite;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(255,40,0,0.55);
}

/* ── Prose pages (privacy, terms) ────────────────────────── */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.prose h1 {
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #fff;
  margin-bottom: 6px;
}

.prose .meta {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.prose h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
  margin: 44px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Red accent bar on each section heading */
.prose h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--red);
  border-radius: 2px;
  flex-shrink: 0;
}

.prose p, .prose li {
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 14px;
}

.prose ul {
  padding-left: 22px;
  margin-bottom: 16px;
}

.prose a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,204,64,0.3);
  transition: border-color 0.2s;
}

.prose a:hover { border-color: var(--gold); }

/* ── Contact page ────────────────────────────────────────── */
.contact-page {
  max-width: 480px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}

.contact-logo {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  margin: 0 auto 24px;
  display: block;
  animation: logoPulse 4s ease-in-out infinite;
}

.contact-page h1 {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.contact-page .sub {
  color: var(--muted);
  font-size: var(--fs-lg);
  margin-bottom: 40px;
  line-height: 1.7;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  margin-top: auto;
  padding: 28px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

footer .sep { opacity: 0.4; }

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover { color: var(--text); }

/* ── Scroll reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

/* Stagger siblings inside a .stagger parent */
.stagger .reveal:nth-child(1) { transition-delay: 0.00s; }
.stagger .reveal:nth-child(2) { transition-delay: 0.10s; }
.stagger .reveal:nth-child(3) { transition-delay: 0.20s; }
.stagger .reveal:nth-child(4) { transition-delay: 0.30s; }

/* ── Keyframes ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes drift {
  0%   { bottom: -8px;  opacity: 0;    transform: translateX(0); }
  10%  { opacity: 0.22; }
  90%  { opacity: 0.10; }
  100% { bottom: 105%;  opacity: 0;    transform: translateX(18px); }
}

@keyframes shimmer {
  0%   { left: -120%; }
  100% { left: 220%;  }
}

@keyframes goldShimmer {
  0%   { background-position: 0%   center; }
  100% { background-position: 200% center; }
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 8px 24px rgba(255,40,0,0.35)); }
  50%       { filter: drop-shadow(0 8px 32px rgba(255,40,0,0.60)); }
}

@keyframes glowPulse {
  from { opacity: 0.6; transform: translate(-50%,-50%) scale(0.9); }
  to   { opacity: 1.0; transform: translate(-50%,-50%) scale(1.1); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 60px 24px 72px; }
  .hero-content { grid-template-columns: 1fr; text-align: center; gap: 48px; }
  .hero-sub { margin: 0 auto 36px; }
  .hero-actions { justify-content: center; }
  .hero-logo { margin: 0 auto 20px; }
  .hero-phone { order: -1; } /* show phone above text on mobile */
  .cards-grid { grid-template-columns: 1fr; }
  .proof-item { padding: 6px 20px; }
  .proof-sep { display: none; }
}

@media (max-width: 480px) {
  .hero h1 { letter-spacing: -1px; }
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero h1 em { -webkit-text-fill-color: var(--gold); background: none; }
}


