/* ============================================================
   BKC Driving School — main stylesheet
   Brand: royal blue + red, with the NSW yellow L-plate as the accent.
   Fonts: Baloo 2 for headings (matches the logo), Figtree for body.
   ============================================================ */

:root {
  /* colour */
  --blue:      #2833ae;
  --blue-dark: #1e2789;
  --navy:      #1a2140;
  --red:       #e23a34;
  --red-dark:  #c62f29;
  --yellow:    #f5c518;

  --ink:   #1b2138;   /* main text */
  --muted: #4d566d;   /* secondary text */
  --paper: #ffffff;
  --mist:  #f3f6fc;   /* tinted section background */
  --line:  #e4e8f3;

  --radius:   14px;
  --radius-lg: 22px;
  --shadow:    0 10px 30px rgba(26, 33, 64, .08);
  --shadow-sm: 0 4px 14px rgba(26, 33, 64, .07);

  --wrap: 1140px;
  --font-display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  color: var(--navy);
  margin: 0 0 .5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- layout helpers ---------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding: 4.5rem 0; }
.section--tint { background: var(--mist); }
.section--blue { background: var(--blue); color: #eef1ff; }
.section--blue h2, .section--blue h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .82rem;
  color: var(--red);
  margin-bottom: .6rem;
}
.section-head { max-width: 620px; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* the "lane marking" — a little road reference used as a divider accent */
.lane {
  height: 6px; width: 74px; border-radius: 6px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 16px, transparent 16px 26px);
  margin-bottom: 1.4rem;
}
.center .lane { margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--blue);
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600;
  background: var(--btn-bg); color: #fff;
  padding: .8rem 1.4rem; border-radius: 999px; border: 0;
  cursor: pointer; text-decoration: none; font-size: 1rem;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  box-shadow: 0 6px 16px rgba(40, 51, 174, .22);
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.btn-call { --btn-bg: var(--red); box-shadow: 0 6px 16px rgba(226, 58, 52, .28); }
.btn-call:hover { background: var(--red-dark); }
.btn-ghost {
  background: transparent; color: var(--blue);
  border: 2px solid var(--blue); box-shadow: none; padding: calc(.8rem - 2px) 1.4rem;
}
.btn-ghost:hover { background: var(--blue); color: #fff; }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.08rem; }
.btn svg { width: 18px; height: 18px; }

/* ============================================================
   Header / navigation
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: 0 6px 20px rgba(26,33,64,.08); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; }
.brand-text { font-family: var(--font-display); font-weight: 500; color: var(--navy); font-size: 1.15rem; line-height: 1; }
.brand-text strong { color: var(--blue); font-weight: 700; }

.site-nav { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
.site-nav > a {
  font-family: var(--font-display); font-weight: 500;
  color: var(--ink); padding: .5rem .8rem; border-radius: 8px;
  text-decoration: none; font-size: 1rem;
}
.site-nav > a:hover { background: var(--mist); text-decoration: none; }
.site-nav > a.active { color: var(--blue); }
.header-call { margin-left: .5rem; }

.nav-toggle {
  display: none; margin-left: auto;
  width: 46px; height: 46px; border: 1px solid var(--line);
  background: #fff; border-radius: 10px; cursor: pointer; position: relative;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 20px; height: 2.5px; background: var(--navy); border-radius: 2px;
  transform: translate(-50%, -50%); transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle .bars::before { transform: translate(-50%, -8px); }
.nav-toggle .bars::after  { transform: translate(-50%, 6px); }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translate(-50%, -50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; overflow: hidden; background: var(--mist); }
.hero::after { /* soft yellow glow, cheap way to add warmth without an image */
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,197,24,.35), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem;
  align-items: center; padding: 4.2rem 0 4.6rem;
}
.hero h1 { margin-bottom: .6rem; }
.hero .lead { max-width: 40ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1.4rem; }
.trust-row { display: flex; flex-wrap: wrap; gap: .5rem .4rem; margin-top: 1.2rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .35rem .8rem; font-size: .9rem; font-weight: 500; color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.chip svg { width: 16px; height: 16px; color: var(--blue); }

/* hero visual — built in CSS so it works with no photo, but you can drop one in */
.hero-card {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow);
}
.hero-photo {
  /* ✏️ OPTIONAL PHOTO (hero panel):
     Want a real photo instead of the blue branded panel? Add a wide/landscape image
     of your car (with the BKC roof sign / L-plates) or a learner at the wheel.
     Roughly 1000 x 700 pixels. Save it as a .jpg or .png (NOT .webp) named car.jpg
     in the images/ folder, then delete the two slashes at the start of the line
     directly below so the photo shows. Until then the panel just stays branded blue. */
  /* background-image: url("../images/car.jpg"); */
  background-color: var(--blue);
  background-size: cover; background-position: center;
  border-radius: var(--radius); aspect-ratio: 4 / 3;
  position: relative;
  display: grid; place-items: center; overflow: hidden;
}
.hero-photo .plate { transform: rotate(-4deg); }
.lplate {
  --s: 96px;
  width: var(--s); height: var(--s); border-radius: 14px;
  background: var(--yellow); color: #111; position: relative;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800;
  font-size: calc(var(--s) * .62); box-shadow: 0 12px 26px rgba(0,0,0,.25);
}
.lplate span { position: absolute; top: 8px; right: 10px; font-size: 13px; font-weight: 700;
  border: 2px solid #111; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
.hero-card .journey { margin-top: 1.2rem; }

/* learner journey strip — L to P to full licence (a real sequence, hence the arrows) */
.journey { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.journey .step { text-align: center; flex: 1; }
.journey .dot {
  width: 40px; height: 40px; margin: 0 auto .35rem; border-radius: 10px;
  display: grid; place-items: center; font-family: var(--font-display);
  font-weight: 800; color: #fff; font-size: 1.1rem;
}
.journey .step small { color: var(--muted); font-size: .78rem; }
.journey .l  .dot { background: var(--yellow); color: #111; }
.journey .p  .dot { background: var(--red); }
.journey .f  .dot { background: var(--blue); }
.journey .arrow { color: var(--muted); flex: 0 0 auto; }

/* ============================================================
   Hero polish (home page)
   Adds a little depth + motion to the hero panel so it doesn't
   read as a flat blue box, especially on phones. CSS only.
   ============================================================ */
/* soft light across the panel + a subtle "road" line near the base */
.hero-photo::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 28% 12%, rgba(255,255,255,.20), transparent 55%),
    linear-gradient(160deg, rgba(255,255,255,.05), rgba(0,0,0,.22));
}
.hero-photo::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: 15%;
  height: 6px; border-radius: 6px; transform: rotate(-4deg); pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 18px, transparent 18px 34px);
  opacity: .85;
}
/* keep the L-plate above those overlays and let it float gently */
.hero-photo .plate { position: relative; z-index: 1; animation: plate-float 4.5s ease-in-out infinite; }
@keyframes plate-float {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50%      { transform: rotate(-4deg) translateY(-9px); }
}

/* the L → P → Full strip lights up one step at a time (class set in main.js) */
.journey .dot { transition: transform .3s ease, box-shadow .3s ease; }
.journey .step.is-active .dot { transform: scale(1.14); box-shadow: 0 8px 18px rgba(26,33,64,.22); }
.journey .step.is-active small { color: var(--ink); font-weight: 600; }

/* ============================================================
   Feature cards / grids
   ============================================================ */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .35rem; }
.card p:last-child { margin-bottom: 0; }
.icon-badge {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: #eef0ff; color: var(--blue); margin-bottom: 1rem;
}
.icon-badge svg { width: 24px; height: 24px; }

/* split content block (text + panel) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.checklist li { display: flex; gap: .7rem; margin-bottom: .7rem; }
.checklist svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--red); margin-top: 3px; }

/* ============================================================
   Packages
   ============================================================ */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; align-items: start; }
.plan {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.8rem; box-shadow: var(--shadow-sm); position: relative;
}
.plan.featured { border-color: var(--blue); box-shadow: var(--shadow); }
.plan .tag {
  position: absolute; top: -13px; left: 1.8rem; background: var(--blue); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: .78rem;
  padding: .2rem .7rem; border-radius: 999px;
}
.plan h3 { margin-bottom: .2rem; }
.plan .highlight { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--navy); line-height: 1.1; }
.plan .highlight small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.plan .per { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.plan ul { list-style: none; padding: 0; margin: 1rem 0 1.4rem; }
.plan li { display: flex; gap: .55rem; padding: .35rem 0; border-top: 1px dashed var(--line); }
.plan li:first-child { border-top: 0; }
.plan li svg { width: 18px; height: 18px; color: var(--blue); flex: 0 0 auto; margin-top: 4px; }
.plan .btn { width: 100%; justify-content: center; }

.info-table { width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.info-table th, .info-table td { text-align: left; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.info-table th { background: var(--mist); font-family: var(--font-display); color: var(--navy); }
.info-table tr:last-child td { border-bottom: 0; }
.info-table td:last-child { font-weight: 600; color: var(--navy); }

.note { font-size: .92rem; color: var(--muted); margin-top: 1rem; }

/* ============================================================
   Areas
   ============================================================ */
.area-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.area {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; display: flex; align-items: center; gap: .6rem; font-weight: 500;
}
.area svg { width: 20px; height: 20px; color: var(--red); flex: 0 0 auto; }
.area.base { border-color: var(--blue); background: #f5f6ff; }
.map-embed { border: 0; width: 100%; height: 100%; min-height: 320px; border-radius: var(--radius); }

/* ============================================================
   FAQ accordion (native <details>)
   ============================================================ */
.faq { max-width: 780px; margin-inline: auto; }
.qa { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: .8rem; overflow: hidden; }
.qa summary {
  list-style: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--navy);
  padding: 1.1rem 1.3rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: var(--radius); }
.qa summary .plus { flex: 0 0 auto; width: 22px; height: 22px; position: relative; }
.qa summary .plus::before, .qa summary .plus::after {
  content: ""; position: absolute; inset: 0; margin: auto; background: var(--blue);
}
.qa summary .plus::before { width: 14px; height: 2.5px; }
.qa summary .plus::after  { width: 2.5px; height: 14px; transition: transform .2s ease; }
.qa[open] summary .plus::after { transform: rotate(90deg); opacity: 0; }
.qa .answer { padding: 0 1.3rem 1.2rem; }
.qa .answer p { color: var(--muted); margin: 0; }

/* ============================================================
   Contact + form
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem; align-items: start; }
.info-list { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.info-list li { display: flex; gap: .9rem; margin-bottom: 1.1rem; }
.info-list .ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; background: #eef0ff;
  color: var(--blue); display: grid; place-items: center; }
.info-list .ic svg { width: 22px; height: 22px; }
.info-list strong { display: block; font-family: var(--font-display); color: var(--navy); }
.info-list a { color: var(--ink); }

form.enquiry { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.8rem; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-note { font-size: .88rem; color: var(--muted); margin-top: .8rem; }

/* ============================================================
   CTA band + footer
   ============================================================ */
.cta-band { background: linear-gradient(120deg, var(--blue), var(--blue-dark)); color: #fff; border-radius: var(--radius-lg); padding: 2.6rem; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d9ddff; max-width: 46ch; margin-inline: auto; }
.cta-band .btn-call { margin-top: .6rem; }

.site-footer { background: var(--navy); color: #c9cee6; padding: 3.2rem 0 1.4rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: .9rem; }
.site-footer a { color: #c9cee6; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-logo { background: #fff; padding: .8rem 1rem; border-radius: 12px; display: inline-block; margin-bottom: 1rem; }
.footer-logo img { width: 210px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.4rem; padding-top: 1.2rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: #aab0d4; }

/* ============================================================
   Scroll reveal (only active with JS on; content shows without it)
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
  .grid-3, .grid-4, .price-grid { grid-template-columns: 1fr 1fr; }
  .area-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  /* Base (works with JS off): the menu simply stacks under the logo. */
  .header-inner { flex-wrap: wrap; }
  .site-nav { flex-direction: column; align-items: stretch; width: 100%; margin: 0 0 .6rem; gap: .15rem; }
  .site-nav > a { padding: .7rem .6rem; border-radius: 10px; }
  .header-call { justify-content: center; margin: .3rem 0 0; }

  .grid-3, .grid-4, .price-grid, .grid-2, .area-grid, .footer-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .section { padding: 3.2rem 0; }
  .cta-band { padding: 2rem 1.3rem; }
  .split { gap: 2rem; }

  /* With JS on, collapse the menu into a hamburger drawer instead. */
  .js .nav-toggle { display: block; }
  .js .header-inner { flex-wrap: nowrap; }
  .js .site-nav {
    position: fixed; inset: 72px 0 auto 0; width: auto; margin: 0;
    background: #fff; padding: 1rem 1.25rem 1.5rem; gap: .2rem;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-130%); transition: transform .25s ease; visibility: hidden;
  }
  .js .site-nav.open { transform: none; visibility: visible; }
}

/* ---- home hero on phones: headline first, bigger tap targets ---- */
@media (max-width: 680px) {
  .hero-grid { padding: 2.4rem 0 2.8rem; gap: 1.8rem; }
  .hero-card { order: 0; }                 /* show the text before the visual */
  .hero .lead { max-width: none; }
  .hero-cta { gap: .6rem; }
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }  /* full-width buttons */
  .trust-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: 1.4rem; }
  .trust-row .chip { justify-content: center; }
  .hero-photo { aspect-ratio: 16 / 10; }   /* a touch shorter so it fits the screen */
  .lplate { --s: 78px; }
}

/* respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  .hero-photo .plate { animation: none; }
  .journey .dot { transition: none; }
}
