/* ============================================================
   SIM TO GRID — brand system
   Colors pulled from the logo: #006CB5 blue, #EEE3DF cream, #000000.
   Architecture mirrors lounge.academysim.com.
   ============================================================ */

:root {
  --void:    #000000;
  --carbon:  #0A0A0A;
  --panel:   #121316;
  --raised:  #191B1F;
  --line:    #24272C;

  --blue:    #006CB5;
  --blue-lt: #2A93DD;
  --blue-dk: #004E84;
  --cream:   #EEE3DF;
  --gold:    #F0D68A;   /* Academy Sim Racing brand gold */
  --gold-dk: #D4B65E;
  --dim:     #8A8F98;
  --faint:   #5A5F68;

  --display: "Saira Condensed", "Arial Narrow", sans-serif;
  --body:    "Inter", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  --s-0:  clamp(1rem, .96rem + .2vw, 1.08rem);
  --s-1:  clamp(1.2rem, 1.1rem + .5vw, 1.5rem);
  --s-2:  clamp(1.75rem, 1.5rem + 1.2vw, 2.6rem);
  --s-3:  clamp(2.4rem, 1.9rem + 2.4vw, 4rem);
  --s-4:  clamp(3.2rem, 2.2rem + 5vw, 7rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1280px;
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--void); color: var(--cream);
  font-family: var(--body); font-size: var(--s-0); line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { list-style: none; padding: 0; }
button { font: inherit; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; z-index: 999; background: var(--blue); color: #fff; padding: .75rem 1.25rem; font-weight: 700; }
.skip:focus { left: 0; top: 0; }
:focus-visible { outline: 2px solid var(--blue-lt); outline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; text-transform: uppercase; line-height: .96; letter-spacing: -.005em; }
h2 { font-size: var(--s-3); }
h3 { font-size: var(--s-1); letter-spacing: .01em; }
.it { font-style: italic; }
.blue { color: var(--blue-lt); }
p { max-width: 66ch; }
.lede { font-size: var(--s-1); color: var(--dim); line-height: 1.5; font-weight: 300; }
section { padding-block: clamp(4rem, 9vw, 7rem); }
.hairline { border-top: 1px solid var(--line); }

.eyebrow { font-family: var(--mono); font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--blue-lt); margin-bottom: .9rem; }
.eyebrow.d { color: var(--faint); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .55rem; white-space: nowrap; font-family: var(--mono); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 1rem 1.6rem; border: 1px solid transparent; border-radius: var(--r); text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-lt); }
.btn-ghost { border-color: var(--line); color: var(--cream); }
.btn-ghost:hover { border-color: var(--blue); background: var(--panel); }
.btn-cream { background: var(--cream); color: #000; }
.btn-cream:hover { background: #fff; }
.ar { transition: transform .15s; }
.btn:hover .ar { transform: translateX(3px); }

/* Header */
.head { position: sticky; top: 0; z-index: 100; background: rgba(0,0,0,.88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.head-in { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 1.5rem; }
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex: none; }
.logo svg { width: 40px; height: 40px; }
.logo-t { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 1.3rem; text-transform: uppercase; line-height: 1; }
.logo-t .b { color: var(--blue-lt); }
.nav { display: flex; align-items: center; gap: 1.5rem; min-width: 0; }
.nav a { font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); text-decoration: none; transition: color .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--cream); }
.nav a.ext::after { content: "↗"; margin-left: .25rem; color: var(--blue-lt); }
.head-r { display: flex; align-items: center; gap: .6rem; flex: none; white-space: nowrap; }
.head-cta { padding: .72rem 1.15rem; }

/* Call button — solid cream, equal weight to the blue Book now */
.head-tel {
  gap: .45rem;
  white-space: nowrap;
  flex: none;
  padding: .72rem 1rem;
}
.ph-ico { width: 14px; height: 14px; flex: none; }
.head-tel .ph-num {
  font-size: .76rem; letter-spacing: .02em; font-weight: 600;
  white-space: nowrap;
}
.mbar .btn .ph-ico { width: 16px; height: 16px; }
.burger { display: none; background: none; border: 1px solid var(--line); color: var(--cream); padding: .55rem .7rem; border-radius: var(--r); cursor: pointer; }
.burger svg { width: 18px; height: 18px; }
@media (max-width: 1240px) {
  .head-tel .ph-num { display: none; }
  .head-tel { padding: .72rem .8rem; }
}
@media (max-width: 1020px) {
  .burger { display: block; }
  .nav { position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--void); border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 2rem; transform: translateY(-130%); transition: transform .28s ease; }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav a { padding: 1.05rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
}

/* Hero */
.hero { position: relative; min-height: 82vh; display: grid; align-items: end; padding-block: 6rem 3rem; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 42%;
  filter: saturate(.92) contrast(1.06);
}
.hero-bg .ph { width: 100%; height: 100%; background: radial-gradient(circle at 72% 32%, rgba(0,108,181,.32), transparent 58%), repeating-linear-gradient(115deg, #0C0D10 0 3px, #0A0B0D 3px 6px); display: grid; place-items: center; }
.hero-bg .ph span { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); text-align: center; line-height: 2.2; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.72) 42%, rgba(0,0,0,.35) 100%),
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.30) 35%, rgba(0,0,0,.92) 100%);
}
@media (max-width: 880px) {
  .hero-bg::after {
    background: linear-gradient(180deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.62) 40%, rgba(0,0,0,.95) 100%);
  }
}
.hero > .wrap { position: relative; z-index: 1; }
.hero h1 { font-size: var(--s-4); letter-spacing: -.015em; max-width: 15ch; }
.hero .lede { margin-top: 1.4rem; max-width: 52ch; color: #C7CBD1; }
.hero-price { margin-top: 1.6rem; font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.hero-price b { color: var(--cream); font-size: 1.05rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.7rem; }
.badges { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.2rem; font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.badges span::before { content: "★ "; color: var(--blue-lt); }

/* Stat bar */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--carbon); }
.stats-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-in > div { padding: 1.55rem var(--gutter); border-right: 1px solid var(--line); }
.stats-in > div:last-child { border-right: 0; }
.stats-in .k { font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); display: block; margin-bottom: .35rem; }
.stats-in .v { font-family: var(--display); font-weight: 700; font-size: 1.25rem; text-transform: uppercase; }
@media (max-width: 760px) {
  .stats-in { grid-template-columns: 1fr 1fr; }
  .stats-in > div:nth-child(2n) { border-right: 0; }
  .stats-in > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

.shead { max-width: 60ch; margin-bottom: 2.75rem; }
.shead p { color: var(--dim); margin-top: 1rem; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: border-color .18s, transform .18s; }
.card:hover { border-color: var(--blue); transform: translateY(-3px); }
.card-img { aspect-ratio: 16/10; background: var(--raised); position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-img .ph { width: 100%; height: 100%; display: grid; place-items: center; background: repeating-linear-gradient(115deg, #16181C 0 3px, #121316 3px 6px); font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); text-align: center; padding: 1rem; line-height: 2; }
.card-tag { position: absolute; top: .8rem; left: .8rem; z-index: 2; font-family: var(--mono); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; background: var(--blue); color: #fff; padding: .35rem .6rem; border-radius: 2px; }
.card-tag.cream { background: var(--cream); color: #000; }
.card-body { padding: 1.5rem; display: flex; flex-direction: column; gap: .85rem; flex: 1; }
.card-body h3 { font-size: 1.5rem; }
.card-body > p { color: var(--dim); font-size: .92rem; }
.pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill { font-family: var(--mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .6rem; color: var(--dim); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line); }
.price { font-family: var(--mono); font-size: 1.15rem; font-weight: 600; color: var(--cream); }
.price small { font-size: .66rem; color: var(--faint); letter-spacing: .06em; }
.price.tbd { color: var(--faint); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.card-foot .btn { padding: .68rem 1.05rem; }

/* Reviews */
.revs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.rev { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.6rem; display: flex; flex-direction: column; gap: .8rem; }
.rev .cat { font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-lt); }
.rev .stars { color: var(--cream); letter-spacing: .18em; font-size: .78rem; }
.rev blockquote { color: var(--cream); font-size: .95rem; line-height: 1.65; }
.rev cite { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; color: var(--faint); font-style: normal; margin-top: auto; }

/* Partner module */
.pmod { background: linear-gradient(135deg, rgba(0,108,181,.15), rgba(0,0,0,0)), var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(2rem, 4vw, 3rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.pmod h3 { font-size: var(--s-2); max-width: 18ch; }
.pmod p { color: var(--dim); margin-top: .75rem; max-width: 46ch; font-size: .94rem; }

/* Locations */
.locs { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; }
.loc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1.6rem, 3vw, 2.25rem); display: flex; flex-direction: column; gap: 1.05rem; transition: border-color .18s, transform .18s; }
.loc:hover { border-color: var(--blue); transform: translateY(-3px); }
.loc.soon { border-style: dashed; }
.loc .tag { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-lt); }
.loc.soon .tag { color: var(--cream); }
.loc h3 { font-size: var(--s-2); }
.loc address { font-style: normal; color: var(--dim); font-size: .92rem; line-height: 1.75; }
.loc .btn { margin-top: auto; justify-content: center; }

/* Ladder */
.ladder { border-top: 1px solid var(--line); }
.rung { display: grid; grid-template-columns: 88px 1fr auto; gap: clamp(1rem, 3vw, 2.5rem); align-items: center; padding: clamp(1.5rem, 3vw, 2.2rem) 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .18s, padding-inline .18s; }
.rung:hover { background: var(--panel); padding-inline: 1.25rem; }
.rung .step { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; color: var(--faint); border-left: 2px solid var(--blue); padding-left: .8rem; line-height: 1.45; }
.rung .step b { display: block; color: var(--blue-lt); font-size: 1.05rem; font-weight: 600; }
.rung h3 { margin-bottom: .3rem; }
.rung p { color: var(--dim); font-size: .92rem; max-width: 60ch; }
.rung .go { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-lt); white-space: nowrap; }
@media (max-width: 780px) { .rung { grid-template-columns: 1fr; gap: .85rem; } .rung .go { justify-self: start; } }

/* Spec */
.spec { border-top: 1px solid var(--line); }
.spec > div { display: flex; justify-content: space-between; gap: 1.5rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .8rem; }
.spec .k { color: var(--faint); letter-spacing: .1em; text-transform: uppercase; font-size: .66rem; }
.spec .v { color: var(--cream); text-align: right; }

/* FAQ */
.faq { border-top: 1px solid var(--line); max-width: 880px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.3rem 2.5rem 1.3rem 0; position: relative; font-family: var(--display); font-size: 1.2rem; font-weight: 700; text-transform: uppercase; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 1rem; font-family: var(--mono); font-size: 1.4rem; color: var(--blue-lt); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--dim); padding-bottom: 1.3rem; font-size: .95rem; }

/* CTA band */
.band { position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 125%, rgba(0,108,181,.32), transparent 60%), repeating-linear-gradient(115deg, #0B0C0F 0 4px, #08090B 4px 8px); }
.band > .wrap { position: relative; text-align: center; padding-block: clamp(4rem, 8vw, 6.5rem); }
.band h2 { font-size: var(--s-3); }
.band p { color: var(--dim); margin: 1rem auto 2rem; }
.band .row { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

/* Forms */
.form { display: grid; gap: 1.05rem; max-width: 560px; }
.field { display: grid; gap: .4rem; }
.field label { font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.field input, .field select, .field textarea { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--cream); padding: .9rem 1rem; font: inherit; font-size: .95rem; transition: border-color .15s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: none; }
.field textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; }

/* Page head */
.phead { padding-block: clamp(3rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.phead::before { content: ""; position: absolute; top: -60%; left: 58%; width: 55vw; height: 55vw; max-width: 700px; max-height: 700px; background: radial-gradient(circle, rgba(0,108,181,.16), transparent 66%); pointer-events: none; }
.phead > .wrap { position: relative; }
.phead h1 { font-size: var(--s-3); max-width: 20ch; }
.phead .lede { margin-top: 1.25rem; max-width: 60ch; }
.crumbs { font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 1.2rem; }
.crumbs a { color: var(--faint); text-decoration: none; }
.crumbs a:hover { color: var(--blue-lt); }
.crumbs span { color: var(--line); margin-inline: .5rem; }

/* Two col */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 880px) { .two { grid-template-columns: 1fr; } }
.frame { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; aspect-ratio: 4/3; display: grid; place-items: center; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame .ph { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); text-align: center; padding: 2rem; line-height: 2.1; }

/* Prose */
.prose { max-width: 70ch; }
.prose h2 { font-size: var(--s-2); margin-top: 2.75rem; margin-bottom: 1rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2rem; margin-bottom: .6rem; }
.prose p { margin-bottom: 1.05rem; color: var(--dim); }
.prose ul { display: grid; gap: .6rem; margin-bottom: 1.5rem; color: var(--dim); }
.prose ul li { display: flex; gap: .7rem; }
.prose ul li::before { content: "—"; color: var(--blue-lt); flex: none; }
.prose strong { color: var(--cream); font-weight: 600; }
.prose a { color: var(--blue-lt); }

/* Gallery */
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.gal .frame { aspect-ratio: 3/2; }

.note { border-left: 2px solid var(--blue); padding-left: 1rem; font-family: var(--mono); font-size: .8rem; color: var(--dim); line-height: 1.85; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 4rem 2rem; background: var(--carbon); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 880px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.foot h4 { font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; color: var(--faint); font-weight: 500; text-transform: uppercase; margin-bottom: 1.1rem; }
.foot ul { display: grid; gap: .6rem; }
.foot a { color: var(--dim); text-decoration: none; font-size: .9rem; transition: color .15s; }
.foot a:hover { color: var(--blue-lt); }
.foot address { font-style: normal; color: var(--dim); font-size: .9rem; line-height: 1.85; }
.foot-blurb { color: var(--dim); font-size: .92rem; max-width: 36ch; margin-top: 1rem; }
.foot-partner { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 1.25rem; line-height: 2; }
.foot-partner a { color: var(--blue-lt); }
.foot-bot { margin-top: 3.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; color: var(--faint); text-transform: uppercase; }

/* Mobile sticky bar */
.mbar { display: none; }
@media (max-width: 720px) {
  .mbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; background: rgba(0,0,0,.94); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: .7rem var(--gutter); gap: .7rem; align-items: center; }
  .mbar .btn { flex: 1; }
  .head-tel { display: none; }
  .mbar .btn { flex: 1; justify-content: center; }
  body { padding-bottom: 76px; }
}

.rv { opacity: 0; transform: translateY(16px); }
.rv.in { opacity: 1; transform: none; transition: opacity .55s ease, transform .55s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .rv { opacity: 1 !important; transform: none !important; }
}

/* -------- Rate rows (inside cards) -------- */
.rates { display: grid; gap: 0; border-top: 1px solid var(--line); }
.rates > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .6rem 0; border-bottom: 1px solid var(--line);
}
.rates .d {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint);
}
.rates .p {
  font-family: var(--mono); font-size: 1.05rem; font-weight: 600; color: var(--cream);
}

a.pill { transition: border-color .15s, color .15s; }
a.pill:hover { border-color: var(--blue); color: var(--cream); }

/* ============================================================
   SMALL-PHONE FIXES (iPhone SE / 320px and other narrow devices)
   Audit found horizontal overflow at 320px. Root causes:
   header controls too wide, contact grid not collapsing,
   and fixed-width form elements.
   ============================================================ */

/* 1. Never allow sideways scroll, whatever happens */
html, body { max-width: 100%; overflow-x: hidden; }

/* 2. Media and embeds can never exceed their container */
img, svg, video, iframe, table { max-width: 100%; }

/* 3. Grids and flex children must be allowed to shrink below content size.
      Without min-width:0 a long word or wide child forces overflow. */
.two > *, .grid > *, .locs > *, .revs > *, .gal > *,
.card, .loc, .rev, .prose, .form { min-width: 0; }

/* 4. Long words / URLs wrap instead of pushing the layout wide */
h1, h2, h3, h4, p, li, address, blockquote, .lede { overflow-wrap: break-word; }

/* 5. Forms: inputs default to a browser size ~170px+ and ignore the container */
.form, .field, .field input, .field select, .field textarea {
  max-width: 100%;
  width: 100%;
}

@media (max-width: 400px) {
  /* Header: at 320px the phone button + Book now + burger don't fit.
     Drop the header phone (the sticky bottom bar already has Call). */
  .head-tel { display: none; }
  .head-in { gap: .5rem; }
  .head-r { gap: .45rem; }
  .head-cta { padding: .65rem .8rem; font-size: .7rem; letter-spacing: .08em; }
  .logo-t { font-size: 1.1rem; }

  /* Tighter gutters buy back ~1rem each side */
  :root { --gutter: 1rem; }

  /* Cards and frames must fit inside the gutter */
  .grid, .locs, .revs, .gal { grid-template-columns: 1fr; }

  /* Buttons stack full-width rather than overflowing side by side */
  .hero-cta, .band .row { flex-direction: column; align-items: stretch; }
  .hero-cta .btn, .band .row .btn { justify-content: center; width: 100%; }

  /* Stat bar: 2 across is still cramped at 320 - go single column */
  .stats-in { grid-template-columns: 1fr; }
  .stats-in > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .stats-in > div:last-child { border-bottom: 0; }

  /* Rate rows and spec rows keep their labels readable */
  .spec > div, .rates > div { gap: .75rem; }
}

/* 6. Tap targets: make sure primary actions clear 44px on touch devices */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .nav a { min-height: 44px; display: flex; align-items: center; }
  .mbar .tel, .mbar .btn { min-height: 46px; }
  .faq summary { min-height: 44px; }
}

@media (max-width: 400px) {
  /* Buttons with long labels (e.g. "Read all reviews on Google") were still
     forcing 8px of overflow via white-space:nowrap. Let them wrap. */
  .btn { white-space: normal; text-align: center; }
  /* .wrap padding-inline was still pushing past the viewport on some sections */
  .wrap { padding-inline: .875rem; }
}

/* ============================================================
   TOUCH & LEGIBILITY REFINEMENTS
   Audit findings that were genuine:
   - .pill links in the service-area strip were 27px tall (real tap targets)
   - the burger was 38px (just under the 40px threshold)
   - mono labels/pills at 9.3-10.2px are small on a phone
   Note: the .logo and inline footer links flagged by the audit are
   text links, not buttons - normal, and left as-is.
   ============================================================ */
@media (pointer: coarse) {
  /* Service-area pills ARE navigation on mobile - make them tappable */
  a.pill { min-height: 40px; display: inline-flex; align-items: center; padding: .5rem .85rem; }
  .burger { min-height: 42px; min-width: 42px; }
}

@media (max-width: 720px) {
  /* Nudge the smallest mono text up for phone legibility */
  .pill { font-size: .68rem; }
  .card-tag { font-size: .64rem; }
  .stats-in .k { font-size: .7rem; }
  .spec .k, .rates .d { font-size: .72rem; }
  .eyebrow { font-size: .72rem; }
  .foot-bot { font-size: .72rem; }
}

/* ============================================================
   DESKTOP TYPE SCALE — the system capped out at laptop size,
   leaving body copy and mono labels small on large monitors.
   Headlines were fine; everything below them was not.
   ============================================================ */

/* Body copy: 17px -> 18px, longer measure */
:root { --s-0: clamp(1rem, .95rem + .25vw, 1.125rem); }
.prose { max-width: 72ch; }
p { max-width: 72ch; }

/* Secondary text was too faint on black */
:root { --dim: #969CA6; }

/* Mono labels were 10-11px - a big share of the interface */
.eyebrow      { font-size: .78rem; letter-spacing: .2em; }
.pill         { font-size: .72rem; }
.card-tag     { font-size: .66rem; }
.stats-in .k  { font-size: .72rem; }
.spec .k      { font-size: .74rem; }
.rates .d     { font-size: .74rem; }
.nav a        { font-size: .8rem; }
.btn          { font-size: .82rem; }
.rung .step   { font-size: .74rem; }
.rung p       { font-size: 1rem; }
.card-body > p{ font-size: 1rem; }
.rev blockquote { font-size: 1.02rem; }
.rev .cat     { font-size: .68rem; }
.loc address  { font-size: 1rem; }
.foot a       { font-size: .95rem; }
.foot address { font-size: .95rem; }
.faq details p{ font-size: 1.02rem; }
.hero-price   { font-size: .88rem; }
.badges       { font-size: .78rem; }

/* Large monitors: step the whole system up rather than capping at laptop */
@media (min-width: 1440px) {
  :root {
    --s-0: 1.19rem;
    --s-1: 1.6rem;
    --s-2: 2.8rem;
    --max: 1360px;
  }
  .lede         { font-size: 1.5rem; }
  .card-body h3 { font-size: 1.65rem; }
  .card-body > p{ font-size: 1.06rem; }
  .rung h3      { font-size: 1.6rem; }
  .rung p       { font-size: 1.06rem; }
  .rev blockquote { font-size: 1.08rem; }
  .faq summary  { font-size: 1.35rem; }
  .faq details p{ font-size: 1.08rem; }
  .btn          { font-size: .86rem; padding: 1.05rem 1.7rem; }
  .nav a        { font-size: .84rem; }
  .eyebrow      { font-size: .82rem; }
  .pill         { font-size: .75rem; }
  .spec > div   { font-size: .9rem; padding: .95rem 0; }
  .rates > div  { padding: .75rem 0; }
  .stats-in .v  { font-size: 1.45rem; }
  .price        { font-size: 1.3rem; }
}

/* Very large / 4K: don't let the line length collapse into a ribbon */
@media (min-width: 1800px) {
  :root { --s-0: 1.25rem; --max: 1480px; }
  .lede { font-size: 1.62rem; }
}

/* ============================================================
   PARTNER CARD — Academy Sim Racing, in their brand gold (#F0D68A).
   Equal visual weight to the Stuart card: same solid border,
   same filled button. Different colour, not lesser status.
   ============================================================ */
.loc.partner {
  border-color: rgba(240,214,138,.35);
  border-style: solid;
  position: relative;
  background: linear-gradient(160deg, rgba(240,214,138,.06), rgba(0,0,0,0) 60%), var(--panel);
}
.loc.partner::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--gold);
}
.loc.partner .tag { color: var(--gold); }
.loc.partner:hover { border-color: var(--gold); }
.loc.partner .pill { border-color: rgba(240,214,138,.3); }

/* Gold button = Academy Sim action, mirrors btn-primary weight */
.btn-gold { background: var(--gold); color: #14110A; }
.btn-gold:hover { background: #F7E4AB; }

/* ============================================================
   DESKTOP READABILITY — FINAL PASS
   Diagnosis: body scaled to 20px at 1920px, but the actual
   readable content (card text, FAQ answers, ladder copy,
   reviews) was pinned at ~17px by hardcoded rem values that
   ignored the breakpoint. Those are what the eye reads, so
   the page felt small regardless of the body size.
   Fix: scale content text off the body, not fixed rems.
   ============================================================ */
@media (min-width: 1280px) {
  .card-body > p,
  .rung p,
  .faq details p,
  .rev blockquote,
  .loc p,
  .shead p,
  .prose p,
  .prose ul {
    font-size: 1.06rem;
    line-height: 1.7;
  }
  .nav a   { font-size: .84rem; }
  .btn     { font-size: .85rem; }
  .eyebrow { font-size: .8rem; }
  .pill    { font-size: .74rem; }
}

@media (min-width: 1600px) {
  .card-body > p,
  .rung p,
  .faq details p,
  .rev blockquote,
  .loc p,
  .shead p,
  .prose p,
  .prose ul {
    font-size: 1.14rem;
  }
  .card-body h3 { font-size: 1.75rem; }
  .rung h3      { font-size: 1.7rem; }
  .faq summary  { font-size: 1.4rem; }
  .nav a        { font-size: .88rem; }
  .btn          { font-size: .88rem; padding: 1.1rem 1.8rem; }
  .eyebrow      { font-size: .84rem; }
  .pill         { font-size: .78rem; }
  .spec > div, .rates > div { font-size: .95rem; }
  .stats-in .v  { font-size: 1.6rem; }
  .stats-in .k  { font-size: .78rem; }
  .loc address  { font-size: 1.08rem; }
  .foot a, .foot address { font-size: 1rem; }
}

@media (max-width: 400px) {
  /* long-label buttons (e.g. "builds.academysim.com") must wrap, not overflow */
  .btn { white-space: normal; max-width: 100%; word-break: break-word; }
  .pmod .btn { font-size: .72rem; }
}
