/* ===========================================================================
   ALIS DRIVING SCHOOL — King's Lynn

   Palette off Ali's own sign: black lettering, an L-plate red L, light grey.
   One accent. Structure over spectacle — a local business people need to trust
   and ring, so the site is organised like a company: real pages, a real nav,
   a price with no small print. Nothing shouts except the phone number.

   Shared by every page. Generated pages come from build.mjs.
   =========================================================================== */

:root {
  --paper:      #f2f2ef;
  --surface:    #ffffff;
  --sunken:     #e9e9e5;
  --ink:        #141414;
  --ink-2:      #4a4a45;
  --steel:      #7c7c75;
  --plate:      #da251d;
  --plate-deep: #a8180f;
  --edge:       rgba(20, 20, 18, .13);
  --edge-soft:  rgba(20, 20, 18, .07);
  --on-plate:   #ffffff;

  --panel-bg:   #141414;
  --panel-fg:   #f2f2ef;
  --panel-fg-2: rgba(242, 242, 239, .72);
  --panel-rule: rgba(242, 242, 239, .16);

  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body:    'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;

  --fs-h1:   clamp(2.2rem, 1.5rem + 2.3vw, 3.3rem);
  --fs-h2:   clamp(1.55rem, 1.2rem + 1.2vw, 2.15rem);
  --fs-h3:   1.1rem;
  --fs-lead: clamp(1.05rem, 1rem + .35vw, 1.22rem);
  --fs-md:   1rem;
  --fs-sm:   .9375rem;
  --fs-xs:   .8125rem;

  --gutter: clamp(20px, 4vw, 56px);
  --band:   clamp(52px, 5.5vw, 88px);
  --rail:   1160px;

  --ease: cubic-bezier(.22, .78, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111110; --surface: #1a1a18; --sunken: #0b0b0a;
    --ink: #f2f2ef; --ink-2: #bdbdb5; --steel: #8d8d85;
    --plate: #ff5a4e; --plate-deep: #ff8177;
    --edge: rgba(255,255,255,.14); --edge-soft: rgba(255,255,255,.07);
    --on-plate: #1a0a08;
    --panel-bg: #1a1a18; --panel-fg: #f2f2ef;
    --panel-fg-2: #bdbdb5; --panel-rule: rgba(255,255,255,.14);
  }
}
:root[data-theme="dark"] {
  --paper: #111110; --surface: #1a1a18; --sunken: #0b0b0a;
  --ink: #f2f2ef; --ink-2: #bdbdb5; --steel: #8d8d85;
  --plate: #ff5a4e; --plate-deep: #ff8177;
  --edge: rgba(255,255,255,.14); --edge-soft: rgba(255,255,255,.07);
  --on-plate: #1a0a08;
  --panel-bg: #1a1a18; --panel-fg: #f2f2ef;
  --panel-fg-2: #bdbdb5; --panel-rule: rgba(255,255,255,.14);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: var(--fs-md); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100dvh;
}
main { flex: 1; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -.025em; line-height: 1.12; }
h1 { font-size: var(--fs-h1); letter-spacing: -.035em; line-height: 1.05; font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
p  { margin: 0; text-wrap: pretty; }
a  { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--plate); outline-offset: 3px; border-radius: 2px; }

.rail    { max-width: var(--rail); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--band); }
.section + .section { border-top: 1px solid var(--edge-soft); }

.eyebrow {
  display: block; font-family: var(--display); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--steel); margin-bottom: 12px;
}
.lead { font-size: var(--fs-lead); color: var(--ink-2); line-height: 1.55; max-width: 54ch; }
.prose { max-width: 62ch; color: var(--ink-2); display: grid; gap: 16px; }
.prose strong { color: var(--ink); font-weight: 600; }

/* --- the mark: his logo rebuilt in type, crisp at any size ------------------ */
.mark { display: inline-flex; align-items: baseline; font-family: var(--display);
        font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.mark .l { color: var(--plate); display: inline-block; transform: rotate(-7deg);
           transform-origin: 50% 62%; padding-inline: .03em; }

/* --- buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 600; font-size: var(--fs-sm);
  padding: 13px 22px; min-height: 46px; border-radius: 4px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}
.btn-primary { background: var(--plate); color: var(--on-plate); }
.btn-primary:hover { background: var(--plate-deep); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { border-color: var(--edge); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

/* --- header ---------------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--edge-soft);
}
.top-in { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.top .mark { font-size: 1.3rem; text-decoration: none; }
.nav { display: none; margin-left: auto; gap: 2px; }
.nav a {
  font-size: var(--fs-sm); font-weight: 500; text-decoration: none; color: var(--ink-2);
  padding: 10px 13px; border-radius: 4px;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--sunken); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.top .btn { margin-left: auto; }
@media (min-width: 900px) { .nav { display: flex; } .top .btn { margin-left: 12px; } }

/* Small screens get the same pages from a scrollable strip under the header —
   a burger menu hides five links that all fit. */
.nav-mobile {
  display: flex; gap: 4px; overflow-x: auto; padding: 0 var(--gutter) 10px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.nav-mobile::-webkit-scrollbar { display: none; }
.nav-mobile a {
  flex: none; font-size: var(--fs-xs); font-weight: 600; text-decoration: none;
  color: var(--ink-2); padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--edge); white-space: nowrap;
}
.nav-mobile a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (min-width: 900px) { .nav-mobile { display: none; } }

/* --- page header (inner pages) --------------------------------------------- */
.page-head { padding-block: clamp(38px, 4.5vw, 66px) clamp(28px, 3vw, 40px); }
.page-head .lead { margin-top: 16px; }

/* --- hero (home) ----------------------------------------------------------- */
.hero { padding-block: clamp(36px, 4.5vw, 68px); }
.hero-in { display: grid; gap: clamp(30px, 4vw, 54px); align-items: center; }
@media (min-width: 900px) { .hero-in { grid-template-columns: 1.05fr .95fr; } }
.hero-mark { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.1rem); }
.hero-sub {
  display: block; font-family: var(--display); font-weight: 600; font-size: var(--fs-xs);
  letter-spacing: .3em; text-transform: uppercase; color: var(--ink-2); margin-top: 8px;
}
.hero h1 { margin-top: clamp(20px, 2.6vw, 30px); }
.hero h1 em { font-style: normal; color: var(--plate); }
.hero .lead { margin-top: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: var(--fs-sm); color: var(--steel); }
.hero-photo { position: relative; border-radius: 6px; overflow: hidden; background: var(--sunken); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
@media (min-width: 900px) { .hero-photo img { aspect-ratio: 4 / 4.6; } }
.hero-badge {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 46px 20px 18px;
  background: linear-gradient(to top, rgba(10,10,9,.85), rgba(10,10,9,0));
  color: #fff; font-size: var(--fs-xs); line-height: 1.45;
}
.hero-badge b { display: block; font-family: var(--display); font-weight: 600; font-size: var(--fs-sm); }

/* --- trust strip ----------------------------------------------------------- */
.trust { background: var(--panel-bg); color: var(--panel-fg); }
.trust-in { display: grid; gap: 1px; background: var(--panel-rule); }
@media (min-width: 560px) { .trust-in { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .trust-in { grid-template-columns: repeat(4, 1fr); } }
.trust-cell { background: var(--panel-bg); padding: 22px clamp(16px, 2.5vw, 28px); }
.trust-cell b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.5rem;
                letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.trust-cell span { display: block; margin-top: 3px; font-size: var(--fs-xs); color: var(--panel-fg-2); }

/* --- section heads --------------------------------------------------------- */
.head { max-width: 60ch; margin-bottom: clamp(28px, 3.2vw, 42px); }
.head p { margin-top: 12px; color: var(--ink-2); }
.head-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }

/* --- cards ----------------------------------------------------------------- */
.cards { display: grid; gap: clamp(14px, 1.6vw, 20px); }
@media (min-width: 700px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) and (max-width: 999px) { .cards-6 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards-6 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--edge); border-radius: 6px;
        padding: clamp(22px, 2.4vw, 30px); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: var(--fs-sm); }
.card-n {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 4px;
  background: var(--sunken); color: var(--plate);
  font-family: var(--display); font-weight: 700; font-size: .9rem;
  font-variant-numeric: tabular-nums; margin-bottom: 16px;
}
a.card { text-decoration: none; transition: border-color .16s var(--ease), transform .16s var(--ease); }
a.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card-link { display: inline-block; margin-top: 14px; font-family: var(--display);
             font-weight: 600; font-size: var(--fs-sm); color: var(--plate); }

/* --- price ----------------------------------------------------------------- */
.price-grid { display: grid; gap: clamp(20px, 3vw, 40px); align-items: start; }
@media (min-width: 860px) { .price-grid { grid-template-columns: .8fr 1.2fr; } }
.price-box { background: var(--panel-bg); color: var(--panel-fg); border-radius: 6px;
             padding: clamp(26px, 3vw, 38px); }
.price-box .eyebrow { color: var(--panel-fg-2); }
.price-num { font-family: var(--display); font-weight: 700; letter-spacing: -.04em; line-height: 1;
             font-size: clamp(3rem, 2rem + 3.4vw, 4.2rem); font-variant-numeric: tabular-nums; }
.price-per { margin-top: 10px; font-size: var(--fs-sm); color: var(--panel-fg-2); }
.price-box .btn { margin-top: 26px; width: 100%; }
.incl { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px;
        background: var(--edge); border: 1px solid var(--edge); border-radius: 6px; overflow: hidden; }
.incl li { background: var(--surface); padding: 16px clamp(16px, 2vw, 22px);
           display: grid; gap: 4px; font-size: var(--fs-sm); }
@media (min-width: 560px) { .incl li { grid-template-columns: 160px 1fr; gap: 16px; align-items: baseline; } }
.incl b { font-family: var(--display); font-weight: 600; }
.incl span { color: var(--ink-2); }

/* --- wall of passes -------------------------------------------------------- */
.wall { display: grid; gap: 2px; background: var(--edge); grid-template-columns: repeat(2, 1fr);
        border: 1px solid var(--edge); border-radius: 6px; overflow: hidden; }
@media (min-width: 900px) { .wall { grid-template-columns: repeat(4, 1fr); } }
.wall figure { margin: 0; overflow: hidden; background: var(--sunken); aspect-ratio: 1; }
.wall img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.wall figure:hover img { transform: scale(1.05); }
.wall-more {
  background: var(--panel-bg); color: var(--panel-fg); aspect-ratio: 1;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: clamp(18px, 2vw, 24px); text-decoration: none; transition: background .2s var(--ease);
}
.wall-more:hover { background: var(--plate); color: var(--on-plate); }
.wall-more b { font-family: var(--display); font-weight: 600; font-size: var(--fs-sm); line-height: 1.25; }
.wall-more span { font-size: var(--fs-xs); opacity: .78; }

/* --- contact --------------------------------------------------------------- */
.contact-grid { display: grid; gap: clamp(24px, 3vw, 44px); align-items: start; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.details { list-style: none; margin: 0; padding: 0; }
.details li { padding: 18px 0; border-top: 1px solid var(--edge); display: grid; gap: 4px; }
.details li:first-child { border-top: 0; padding-top: 0; }
.details .k { font-family: var(--display); font-size: var(--fs-xs); font-weight: 600;
              letter-spacing: .12em; text-transform: uppercase; color: var(--steel); }
.details .v { font-size: var(--fs-lead); letter-spacing: -.01em; }
.details a { text-decoration: none; border-bottom: 1px solid var(--edge); }
.details a:hover { color: var(--plate); border-color: var(--plate); }

.callout { background: var(--plate); color: var(--on-plate); border-radius: 6px;
           padding: clamp(26px, 3vw, 38px); }
.callout p { margin-top: 12px; font-size: var(--fs-sm); opacity: .9; }
.callout-num {
  display: inline-block; margin-top: 22px; text-decoration: none; color: inherit;
  font-family: var(--display); font-weight: 700; letter-spacing: -.035em;
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); font-variant-numeric: tabular-nums;
  border-bottom: 3px solid currentColor; padding-bottom: 2px;
}

/* --- closing strip on inner pages ------------------------------------------ */
.endbar { background: var(--panel-bg); color: var(--panel-fg); }
.endbar-in { padding-block: clamp(34px, 4vw, 54px); display: flex; flex-wrap: wrap;
             gap: 20px; align-items: center; justify-content: space-between; }
.endbar h2 { font-size: var(--fs-h2); }
.endbar p { margin-top: 8px; color: var(--panel-fg-2); font-size: var(--fs-sm); }

/* --- footer ---------------------------------------------------------------- */
.foot { border-top: 1px solid var(--edge); }
.foot-in { padding-block: 30px; display: grid; gap: 18px; font-size: var(--fs-xs); color: var(--steel); }
@media (min-width: 720px) { .foot-in { grid-template-columns: 1fr auto; align-items: center; } }
.foot .mark { font-size: 1rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--plate); }
.foot-legal { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
