/* ============================================================
   1st Learn Driving School — Site layout, motion & responsive
   Layered on top of colors_and_type.css (the design system).
   ============================================================ */

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
a { color: inherit; }
img { max-width: 100%; }
::selection { background: var(--brand-red-soft); color: var(--brand-red-strong); }

/* ---------- Layout container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- Section rhythm ---------- */
.section { padding: 96px 0; }
.section--muted { background: var(--bg-muted); }
.section--tight { padding: 72px 0; }

/* ---------- Responsive display type ---------- */
.h-display {
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.04;
}
.h2 { font-size: clamp(28px, 4vw, 36px); line-height: 1.15; }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 620ms cubic-bezier(.22,.61,.36,1),
              transform 620ms cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Generic grids ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: start;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-height);
  /* Translucent "glass" bar so the banner shows through at the top of
     the page; a blur keeps overlaid text crisp against busy imagery. */
  background: rgba(16,24,40,0.30);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  transition: box-shadow 200ms ease-out, background 200ms ease-out, border-color 200ms ease-out;
}
/* Once scrolled past the dark banner onto the lighter sections, flip
   the glass bar to white (keeping the translucency) with dark text. */
.nav.is-scrolled {
  background: rgba(255,255,255,0.72);
  border-bottom-color: var(--border-1);
  box-shadow: 0 1px 0 var(--border-1), 0 8px 24px -16px rgba(0,0,0,0.28);
}
.nav.is-scrolled .nav__link,
.nav.is-scrolled .nav__phone { color: var(--fg-1); }
.nav.is-scrolled .nav__link.is-active { color: var(--brand-red); }
.nav.is-scrolled .nav__toggle {
  border-color: var(--border-1);
  background: #fff; color: var(--fg-1);
}
.nav__inner {
  height: 100%; max-width: var(--container); margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__link {
  position: relative;
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.90);
  text-decoration: none; padding: 6px 0;
  transition: color 150ms ease-out;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--brand-red); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform 180ms ease-out;
}
.nav__link:hover { color: var(--brand-red); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--brand-red); }
.nav__link.is-active::after { transform: scaleX(1); }
.nav__phone {
  display: inline-flex; gap: 6px; align-items: center;
  font-size: 14px; color: rgba(255,255,255,0.90); text-decoration: none; white-space: nowrap;
  transition: color 150ms ease-out;
}
.nav__phone:hover { color: #fff; }
.nav__menu { display: flex; align-items: center; gap: 24px; }
.nav__toggle { display: none; }

/* ---------- Buttons (anchor + button) ---------- */
.btn {
  font-family: var(--font-sans); font-weight: 500;
  border-radius: var(--r-sm); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color 150ms ease-out, color 150ms ease-out,
              transform 120ms ease-out, box-shadow 150ms ease-out;
}
.btn--sm { font-size: 14px; line-height: 20px; height: 38px; padding: 0 16px; }
.btn--md { font-size: 16px; line-height: 24px; height: 44px; padding: 0 24px; }
.btn--primary { background: var(--brand-red); color: #fff; }
.btn--primary:hover { background: var(--brand-red-strong); box-shadow: 0 8px 20px -10px rgba(231,0,11,0.7); }
.btn--primary:active { transform: translateY(1px); }
.btn--secondary { background: #fff; color: var(--fg-1); border-color: var(--border-1); }
.btn--secondary:hover { background: var(--bg-muted); }
.btn--outline-red { background: #fff; color: var(--fg-1); border-color: var(--brand-red-border); }
.btn--outline-red:hover { background: var(--brand-red-soft); color: var(--brand-red-strong); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.28); }
.btn--ghost-light:hover { background: rgba(255,255,255,0.10); }
.btn--block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border-radius: var(--r-lg); padding: 24px;
  box-shadow: var(--shadow-1);
  transition: box-shadow 220ms ease-out, transform 220ms ease-out;
}
.card--lift:hover { box-shadow: var(--shadow-2); transform: translateY(-4px); }
.card--border { box-shadow: none; border: 1px solid var(--border-2); }

/* ---------- Icon tile ---------- */
.tile {
  width: 48px; height: 48px; border-radius: var(--r-md);
  display: grid; place-items: center; flex: none;
}

/* ---------- Page header band (inner pages) ---------- */
.pagehead {
  background:
    radial-gradient(120% 140% at 85% -20%, var(--brand-red-soft) 0%, rgba(254,242,242,0) 60%),
    var(--bg);
  border-bottom: 1px solid var(--border-1);
  padding: 84px 0 72px;
}
.pagehead__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-red-soft); color: var(--brand-red-strong);
  font-size: 12px; line-height: 16px; font-weight: 600;
  padding: 5px 12px; border-radius: var(--r-full);
  letter-spacing: 0.02em;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--brand-red);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 56px;
  position: relative; overflow: hidden;
}
.cta-band__flag {
  position: absolute; inset: 0; opacity: 0.10; pointer-events: none;
  background-image:
    repeating-conic-gradient(#fff 0 90deg, transparent 0 180deg);
  background-size: 34px 34px;
  background-position: top right;
  -webkit-mask-image: linear-gradient(245deg, #000 0%, transparent 52%);
          mask-image: linear-gradient(245deg, #000 0%, transparent 52%);
}

/* ---------- Footer ---------- */
.footer { background: rgb(16,24,40); color: #fff; padding: 64px 0 28px; }
.footer a { color: rgba(255,255,255,0.65); text-decoration: none; transition: color 150ms ease-out; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr; gap: 48px; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border-1); border: 0; margin: 0; }
.muted { color: var(--fg-2); }
.eyebrow-line {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand-red);
}
.eyebrow-line::before,
.eyebrow-line::after { content: ""; width: 26px; height: 2px; background: var(--brand-red); border-radius: 2px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 860px) {
  .section { padding: 72px 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 28px; }
  .nav__links { gap: 18px; }
  /* collapse menu to a toggle */
  .nav__menu { display: none; }
  .nav__menu.is-open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: rgba(16,24,40,0.97);
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.10);
    padding: 22px 24px; box-shadow: 0 16px 32px -20px rgba(0,0,0,0.6);
  }
  .nav__menu.is-open .nav__links {
    flex-direction: column; align-items: flex-start; gap: 18px; width: 100%;
  }
  .nav__menu.is-open .nav__link { font-size: 16px; }
  .nav__toggle {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; border-radius: var(--r-sm);
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.12); color: #fff; cursor: pointer;
  }
}
@media (max-width: 620px) {
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .pagehead { padding: 60px 0 52px; }
  .cta-band { padding: 32px 22px; }
}

/* ============================================================
   Tile tints (icon chips)
   ============================================================ */
.tile--red    { background: var(--brand-red-soft); color: var(--brand-red); }
.tile--green  { background: var(--success-bg);     color: var(--success); }
.tile--purple { background: var(--purple-bg);      color: var(--purple); }
.tile--yellow { background: var(--warning-bg);     color: var(--warning); }
.tile--blue   { background: var(--info-bg);        color: var(--info); }
.tile--indigo { background: var(--indigo-bg);      color: var(--indigo); }
.tile svg { width: 22px; height: 22px; }

/* ============================================================
   Hero — full-width car banner
   ============================================================ */
/* Pull the banner up under the translucent sticky nav so the photo
   shows through the glass bar at the top of the page. */
.hero-banner { position: relative; isolation: isolate; margin-top: calc(-1 * var(--nav-height)); }
/* The photo spans the full width and scales with the viewport. */
.hero-banner__bg {
  position: absolute; inset: 0; z-index: -2;
  background-color: #14100d;
  background-image: url("assets/car-banner.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
/* Two stacked gradients:
   1) left-to-right darkening so the headline stays legible over the car;
   2) a bottom fade into the next section's muted background for a
      seamless transition. */
.hero-banner__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(105deg, rgba(10,12,16,0.86) 0%, rgba(10,12,16,0.58) 42%, rgba(10,12,16,0.18) 72%, rgba(10,12,16,0.05) 100%),
    linear-gradient(to bottom, rgba(10,12,16,0.25) 0%, rgba(10,12,16,0) 24%, rgba(10,12,16,0) 64%, var(--bg-muted) 100%);
}
.hero-banner__inner {
  /* On laptop/desktop the banner fills the whole screen height. */
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 128px; padding-bottom: 132px;
}
/* Text sits on the darker left side and turns white for contrast.
   Kept slightly more compact than the default display type so more of
   the car photo stays visible. */
.hero-banner .hero-copy { max-width: 540px; color: #fff; }
.hero-banner .hero-copy .h-display { color: #fff; font-size: clamp(32px, 4.6vw, 48px); }
.hero-banner .hero-copy .lead { color: rgba(255,255,255,0.92); font-size: clamp(15px, 1.4vw, 17px); }
.hero-banner .stat-strip__num { color: #fff; font-size: clamp(22px, 2vw, 28px); line-height: 32px; }

/* min-width:0 stops the counter numbers from widening the layout
   while the stats animate. */
.hero-copy { min-width: 0; }

/* ---- Hero eyebrow pill ---- */
.pagehead__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-red-soft); color: var(--brand-red-strong);
  font-size: 12px; line-height: 16px; font-weight: 600;
  padding: 5px 12px; border-radius: var(--r-full);
  letter-spacing: 0.02em;
}

/* ============================================================
   Stat strip
   ============================================================ */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.stat-strip__num { font-size: clamp(26px, 2.4vw, 34px); line-height: 38px; font-weight: 700; color: var(--fg-1); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ============================================================
   Journey steps
   ============================================================ */
.journey { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; }

/* ============================================================
   Contact section
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.field-input {
  width: 100%; padding: 0 12px; height: 42px; background: var(--bg-input);
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-family: var(--font-sans); font-size: 14px; color: var(--fg-1);
  outline: none; transition: border-color 150ms, background 150ms;
}
.field-input--area { height: 110px; padding: 10px 12px; resize: none; }
.field-input:focus { border-color: var(--brand-red-border); background: #fff; }

/* ============================================================
   Additional responsive
   ============================================================ */
@media (max-width: 860px) {
  .hero-banner__inner { padding-top: 120px; padding-bottom: 112px; }
  .journey { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  /* Slimmer header on phones (25% shorter). Overriding the token keeps
     the sticky offset, mobile-menu drop point and hero pull-up in sync. */
  :root { --nav-height: 66px; }
  .nav__brand img { height: 67px !important; }

  /* On phones use the portrait-friendly crop, shown at full width as a
     top band. The copy then sits below it on a dark panel that blends
     from the photo's lower edge and fades into the next section. */
  .hero-banner__bg {
    background-image: url("assets/car-banner-mobile.png");
    background-size: 100% auto;
    background-position: top center;
  }
  .hero-banner__scrim {
    background:
      linear-gradient(180deg,
        rgba(20,16,13,0) 80vw,
        rgba(20,16,13,0.5) 88vw,
        rgba(20,16,13,0.92) 93vw,
        rgba(20,16,13,0.95) 88%,
        var(--bg-muted) 100%);
  }
  .hero-banner__inner { min-height: 0; padding-top: calc(93vw + 16px); padding-bottom: 84px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .journey { grid-template-columns: 1fr; }
  /* On phones, move the trust-pill eyebrow below the hero title */
  .hero-copy .hero-title  { order: 1; }
  .hero-copy .hero-eyebrow { order: 2; }
  .hero-copy .lead         { order: 3; }
  .hero-copy .hero-cta     { order: 4; }
  .hero-copy .hero-stats   { order: 5; }
}

/* ============================================================
   Misc components
   ============================================================ */
.nav__brand { display: flex; align-items: center; height: 100%; }

.avatar {
  width: 40px; height: 40px; border-radius: 999px; background: var(--bg-input);
  display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--fg-1);
  flex: none;
}

/* ============================================================
   Pricing cards
   ============================================================ */
.pricing-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  align-items: stretch; margin-top: 60px;
}
.price-card {
  position: relative; height: 100%;
  background: #fff; border-radius: var(--r-lg); border: 1px solid var(--border-2);
  padding: 26px 24px; display: flex; flex-direction: column; gap: 20px;
}
.price-card--featured { border-color: var(--brand-red); box-shadow: var(--shadow-2); }
.price-card__name { font-size: 18px; font-weight: 700; line-height: 24px; }
.price-card__amt { font-size: 34px; line-height: 38px; font-weight: 700; color: var(--fg-1); }
.price-card__badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand-red); color: #fff; font-size: 12px; font-weight: 500;
  padding: 4px 12px; border-radius: var(--r-full); white-space: nowrap;
}

/* ADI Pass Plus feature card */
.adi-card {
  background: #fff; border: 1px solid var(--brand-red-border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1); padding: 32px;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: start;
}
.adi-card__main { display: flex; flex-direction: column; gap: 14px; }
.adi-card__aside { display: flex; flex-direction: column; gap: 14px; }
.adi-includes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }

@media (max-width: 980px) {
  .pricing-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .adi-card { grid-template-columns: 1fr; gap: 22px; padding: 26px; }
  /* Centre the ADI Pass Plus title once the card stacks */
  .adi-card__main .eyebrow-line { align-self: center; text-align: center; }
}
@media (max-width: 560px) {
  .pricing-cards { grid-template-columns: 1fr; }
  .adi-includes { grid-template-columns: 1fr; }
}

/* Pricing feature rows get a green check */
.price-list li {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 14px; line-height: 20px; color: var(--fg-1);
}
.price-list li::before {
  content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px;
  background-color: var(--success);
  -webkit-mask: var(--check-mask) center / contain no-repeat;
          mask: var(--check-mask) center / contain no-repeat;
}
:root {
  --check-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
