/* ─── Tokens ───────────────────────────────────────────────── */
:root {
  --color-bg:        #050b16;
  --color-border:    rgba(255,255,255,0.09);
  --color-text:      #eef1f7;
  --color-muted:     rgba(255, 255, 255, 0.72);
  --color-accent:    #c0251e;
  --color-accent-lt: #e03229;
  --font-serif:      'Cormorant Garamond', Georgia, serif;
  --font-sans:       'Inter', system-ui, sans-serif;
  --radius:          12px;
  --transition:      160ms ease;
}

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

html {
  scroll-behavior: smooth;
  overscroll-behavior: none;
  /* prevent horizontal scroll at the document level */
  overflow-x: hidden;
  max-width: 100%;
}

/* Remove tap flash on iOS/Android */
* { -webkit-tap-highlight-color: transparent; }

/* ─── Page-wide atmosphere ─────────────────────────────────── */
/*
  Background lives on body so the dark atmosphere is continuous
  across every section — no breaks or seams.

  To use a real photo later, replace the background-image lines with:
    background-image: url('hero.jpg');
    background-size: cover;
    background-attachment: fixed;      (parallax on desktop)
    background-position: center top;
  Then keep the ::before dark overlay to maintain text contrast.
*/
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  /* smooth momentum scroll on iOS */
  -webkit-overflow-scrolling: touch;

  background-color: var(--color-bg);
}

/* Grain texture — fixed so it covers the whole page uniformly */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* ── Background image — fixed behind everything ── */
.bg-image {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url('bg-image.png');
  background-size: cover;
  background-position: center top;
  filter: brightness(0.72) saturate(0.85);
  /* force GPU compositing so iOS doesn't reposition on address-bar toggle */
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* ── Vignette overlay ── */
.bg-vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  background: linear-gradient(
    to bottom,
    rgba(5, 10, 25, 0.05)   0%,
    rgba(5, 10, 25, 0.08)   35%,
    rgba(5, 11, 28, 0.50)   58%,
    rgba(5, 11, 22, 0.88)   76%,
    #050b16                  90%
  );
}

a { color: inherit; text-decoration: none; }

/* Prevent 300ms tap delay on touch devices */
a, button, [role="button"] { touch-action: manipulation; }

/* ─── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem 1.5rem 4rem;
}


.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  width: 100%;
}

/* ── Logo — pinned to top-center of hero ── */
.logo-wrap {
  position: absolute;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(140px, 32vw, 240px);
  z-index: 2;
}

.site-logo {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Pill tags ── */
.hero__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.pill {
  display: inline-block;
  padding: 0.3rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.725rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-muted);
  background: rgba(255,255,255,0.025);
}
.pill--accent {
  border-color: rgba(192,37,30,0.45);
  color: rgba(224,112,112,0.9);
  background: rgba(192,37,30,0.07);
}

/* ── Headline — serif italic + light-weight mix ── */
.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 12vw, 8.5rem);
  font-weight: 300;
  line-height: 0.93;
  letter-spacing: -0.025em;
  color: var(--color-text);
  margin-bottom: 1.375rem;
}
.hero__title em {
  font-style: italic;
  font-weight: 600;
  color: #ffffff;
}

/* ── Subheading ── */
.hero__sub {
  font-size: clamp(0.9375rem, 2.5vw, 1.0625rem);
  font-weight: 300;
  color: var(--color-muted);
  line-height: 1.75;
  max-width: 460px;
  margin: 0 auto 2.25rem;
}

/* ── Inline email bar ── */
.hero__bar {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
  /* left padding for text, right padding for the button */
  padding: 0.375rem 0.375rem 0.375rem 1.5rem;
  max-width: 460px;
  margin: 0 auto 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hero__bar:focus-within {
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 0 0 3px rgba(192,37,30,0.14);
}

.hero__bar-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  /* 1rem = 16px — prevents iOS auto-zoom on focus */
  font-size: 1rem;
  font-weight: 300;
  color: var(--color-text);
  min-width: 0;
}
.hero__bar-input::placeholder { color: var(--color-muted); }

/* 44px min touch target */
.hero__bar-btn {
  flex-shrink: 0;
  width: 2.75rem;   /* 44px */
  height: 2.75rem;  /* 44px */
  border-radius: 50%;
  background: var(--color-accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background var(--transition), transform var(--transition);
}
.hero__bar-btn:hover { background: var(--color-accent-lt); transform: scale(1.06); }
.hero__bar-btn:active { transform: scale(0.97); }

.hero__micro {
  font-size: 0.75rem;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  margin-bottom: 4rem;
}

/* ── Social proof stats ── */
.hero__proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.hero__proof-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.hero__proof-num {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.hero__proof-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.hero__proof-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--color-border);
  flex-shrink: 0;
}

/* ─── Section bridge ───────────────────────────────────────── */
.section-bridge {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
  gap: 1.25rem;
}
.section-bridge::before,
.section-bridge::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  max-width: 200px;
}
.section-bridge__mark {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
  white-space: nowrap;
}

/* ─── Form section ─────────────────────────────────────────── */
.form-section {
  position: relative;
  z-index: 1;
  padding: 5rem 1.5rem 7rem;
  display: flex;
  justify-content: center;
}

/* Subtle grey glow behind the card */
.form-section::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: min(600px, 100%);
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.025) 0%, transparent 70%);
  pointer-events: none;
  overflow: hidden;
}

.form-card {
  position: relative;
  background: rgba(255,255,255,0.028);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: calc(var(--radius) * 1.75);
  padding: clamp(1.75rem, 6vw, 3.5rem);
  width: 100%;
  max-width: 520px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 32px 80px rgba(0,0,0,0.45);
}

.form-card__top { margin-bottom: 2rem; }

.form-card__heading {
  font-family: var(--font-serif);
  font-size: clamp(1.875rem, 6vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 0.625rem;
  color: var(--color-text);
}

.form-card__sub {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.65;
}

/* ─── Form fields ──────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 1.125rem; }

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}

.form__group { display: flex; flex-direction: column; gap: 0.35rem; }

.form__label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.form__input {
  width: 100%;
  /* 1rem = 16px — required to prevent iOS auto-zoom on input focus */
  padding: 0.8125rem 1rem;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--color-text);
  background: rgba(255,255,255,0.045);
  outline: none;
  /* min 44px height for touch targets */
  min-height: 2.75rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.form__input::placeholder { color: rgba(240,237,232,0.2); }
.form__input:focus {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}

/* Instagram @ prefix */
.form__prefix-wrap { position: relative; display: flex; align-items: center; }
.form__prefix {
  position: absolute;
  left: 1rem;
  font-size: 1rem;
  color: var(--color-muted);
  pointer-events: none;
  user-select: none;
}
.form__input--prefixed { padding-left: 1.875rem; }

/* Car row */
.form__fieldset { border: none; padding: 0; display: flex; flex-direction: column; gap: 0.375rem; }

.form__car-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 0.625rem;
}
.form__car-field { display: flex; flex-direction: column; gap: 0.25rem; }
.form__car-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-muted);
  text-align: center;
}
.form__car-field .form__input { text-align: center; padding-left: 0.5rem; padding-right: 0.5rem; }

/* Remove number spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.form__micro {
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-top: -0.25rem;
}

/* ─── Submit button ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  /* min 44px height for touch targets */
  min-height: 2.75rem;
  padding: 0.9375rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: none;
  transition: background var(--transition), opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn--primary {
  background: #e03229;
  color: #ffffff;
  box-shadow: 0 4px 24px rgba(224,50,41,0.35);
}
.btn--primary:hover:not(:disabled) {
  background: #f03830;
  box-shadow: 0 6px 32px rgba(224,50,41,0.45);
  transform: translateY(-1px);
}
.btn--primary:active:not(:disabled) { transform: translateY(0); }
.btn--primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn--full { width: 100%; }

/* ─── Success state ────────────────────────────────────────── */
.form-success {
  text-align: center;
  padding: 2rem 0 1rem;
  animation: fadeUp 0.45s ease forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.form-success__icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 0 32px rgba(192,37,30,0.4);
}
.form-success__heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  margin-bottom: 0.625rem;
}
.form-success__body {
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.65;
  margin-bottom: 1.75rem;
}
.form-success__ig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  background: rgba(255,255,255,0.05);
  transition: background var(--transition), border-color var(--transition);
}
.form-success__ig:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
}
.form-success__ig:active { background: rgba(255,255,255,0.08); }

/* ─── Footer ───────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--color-border);
  padding: 1.75rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__copy { font-size: 0.78rem; color: var(--color-muted); }
.footer__ig {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: color var(--transition);
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}
.footer__ig:hover { color: var(--color-text); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   Strategy: base styles target mobile, then scale up.
═══════════════════════════════════════════════════════════ */

/* ─── Small phones (≤ 390px) ──────────────────────────────── */
@media (max-width: 390px) {
  .logo-wrap { width: clamp(120px, 52vw, 160px); top: 0.75rem; }
  .hero {
    padding: 3.5rem 1.125rem 3rem;
  }
  .hero__title {
    font-size: 2.875rem;
    line-height: 0.95;
  }
  .hero__sub {
    font-size: 0.9rem;
  }
  .hero__bar {
    padding-left: 1.125rem;
  }
  .hero__proof {
    gap: 1.25rem;
  }
  .hero__proof-num {
    font-size: 1.25rem;
  }
  .form-card {
    padding: 1.5rem 1.125rem;
    border-radius: var(--radius);
  }
  .form-card__heading {
    font-size: 1.75rem;
  }
  /* Stack car row fully on tiny screens */
  .form__car-row {
    grid-template-columns: 1fr 1fr;
  }
  .form__car-field:last-child {
    grid-column: 1 / -1;
  }
}

/* ─── Mobile (≤ 600px) ────────────────────────────────────── */
@media (max-width: 600px) {
  /* Hero */
  .hero {
    padding: 4rem 1.25rem 3.5rem;
    justify-content: center;
  }
  .hero__bar {
    width: 100%;
  }
  .hero__micro {
    margin-bottom: 3rem;
  }
  /* Hide vertical dividers in proof row — they collide when items wrap */
  .hero__proof-divider {
    display: none;
  }
  .hero__proof {
    gap: 1.5rem 2rem;
  }

  /* Bridge */
  .section-bridge {
    padding: 0 1.25rem;
  }

  /* Form */
  .form-section {
    padding: 3.5rem 1rem 5rem;
  }
  .form-card {
    border-radius: var(--radius);
    padding: 1.75rem 1.25rem;
  }
  /* Stack first/last name + email into single column */
  .form__row {
    grid-template-columns: 1fr;
  }
  /* Car row: year + make on one line, model spans full width */
  .form__car-row {
    grid-template-columns: 1fr 1fr;
  }
  .form__car-field:last-child {
    grid-column: 1 / -1;
  }
  /* Make Instagram success button full-width — easier to tap */
  .form-success__ig {
    width: 100%;
  }

  /* Footer */
  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1.25rem;
    gap: 0.5rem;
  }
}

/* ─── Tablet (601px – 900px) ─────────────────────────────── */
@media (min-width: 601px) and (max-width: 900px) {
  .hero {
    padding: 5rem 2.5rem 4.5rem;
  }
  .hero__inner {
    max-width: 600px;
  }
  .form-section {
    padding: 4.5rem 2rem 6rem;
  }
  .form-card {
    max-width: 480px;
  }
}

/* ─── Desktop (≥ 901px) ──────────────────────────────────── */
@media (min-width: 901px) {
  .logo-wrap { width: clamp(200px, 20vw, 260px); top: 1.5rem; }
  .hero {
    padding: 6rem 3rem 5rem;
  }
  .hero__inner {
    max-width: 760px;
  }
  .hero__bar {
    max-width: 500px;
  }
  .form-section {
    padding: 6rem 3rem 8rem;
  }
  .form-card {
    max-width: 540px;
    padding: 3.5rem;
  }
}

/* ─── Large desktop (≥ 1280px) ──────────────────────────── */
@media (min-width: 1280px) {
  .hero__title {
    font-size: 9rem;
  }
  .hero__inner {
    max-width: 860px;
  }
}

/* ─── Reduced motion — respect user preference ───────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
