/* Karting to Cars
   Colours and type follow the Zenico Racing logo: red, near-black, italic caps. */
:root {
  --red: #c8102e;
  --red-dark: #9c0c23;
  --ink: #161616;
  --body: #2b2b2b;
  --grey: #666;
  --line: #e2e2e2;
  --paper: #f4f2ee;
  --white: #fff;
  --max: 1120px;
  --read: 70ch;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.1; margin: 0 0 .5em; }
h1, h2 { font-family: "Exo 2", sans-serif; font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.3rem; font-weight: 800; }
p, ul, ol { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.read { max-width: var(--read); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.site-header::after { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--ink) 0 30%, var(--red) 30%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 1rem; }

.wordmark {
  text-decoration: none; font-family: "Exo 2", sans-serif; font-style: italic; font-weight: 800;
  text-transform: uppercase; font-size: 1.5rem; line-height: 1; color: var(--ink); white-space: nowrap;
}
.wordmark b { color: var(--red); font-weight: 800; }
.wordmark small { display: block; font-size: .5rem; letter-spacing: .28em; color: var(--grey); font-weight: 700; margin-top: .35rem; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; padding: .3rem 0; border-bottom: 3px solid transparent; }
.site-nav a:hover { color: var(--red); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--ink); transition: transform .2s, opacity .2s; }

@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 81px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); padding: 0 20px 1rem; border-bottom: 4px solid var(--red);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--line); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: .75em 1.4em; font-weight: 700; font-size: 1rem; text-decoration: none;
  background: var(--red); color: var(--white); border: 2px solid var(--red);
  transform: skewX(-10deg); transition: background .15s;
}
.btn > span { display: inline-block; transform: skewX(10deg); }
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ---------- Home hero ---------- */
.hero { background: var(--ink); color: #ddd; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 520px; }
.hero-text { padding: clamp(3rem, 7vw, 5.5rem) 2.5rem clamp(3rem, 7vw, 5.5rem) 0; align-self: center; }
.hero h1 { color: var(--white); }
.hero h1 em { color: var(--red); font-style: inherit; }
.hero p { font-size: 1.2rem; max-width: 34em; }
.hero .btn-line { color: var(--white); border-color: var(--white); }
.hero .btn-line:hover { background: var(--white); color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; margin-top: 1.8rem; }
.hero-photo { position: relative; margin-right: calc((100vw - min(100vw, var(--max))) / -2 - 20px); clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); }
.hero-photo .photo { height: 100%; min-height: 320px; border: 0; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-text { padding-right: 0; }
  .hero-photo { margin: 0 -20px; clip-path: none; }
  .hero-photo .photo { min-height: 220px; }
}

/* ---------- Page header (inner pages) ---------- */
.page-head { background: var(--paper); padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem); border-bottom: 1px solid var(--line); }
.page-head p { font-size: 1.2rem; max-width: 40em; margin: 0; }
.crumb { font-size: .9rem; color: var(--grey); margin-bottom: .6rem; }
.crumb a { color: var(--grey); }
.checked { display: inline-block; margin-top: 1.2rem; font-size: .9rem; color: var(--grey); }

/* ---------- Sections ---------- */
.band { padding: clamp(3rem, 7vw, 5rem) 0; }
.band-paper { background: var(--paper); }
.band-ink { background: var(--ink); color: #ccc; }
.band-ink h2, .band-ink h3 { color: var(--white); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.split.center { align-items: center; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* Kicker line above headings - a short red bar, not a label */
.kicker::before { content: ""; display: block; width: 48px; height: 5px; background: var(--red); transform: skewX(-20deg); margin-bottom: 1rem; }

/* ---------- Photo placeholders: replace with <img> when photos are ready ---------- */
.photo {
  background: #2a2a2a; color: #8a8a8a; border: 1px solid #333;
  display: flex; align-items: flex-end; padding: 1rem; font-size: .9rem; min-height: 260px;
}
.photo.light { background: #e7e4de; color: #8c877e; border-color: #dcd8d0; }
.photo-img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo .photo-img { position: absolute; inset: 0; object-position: 45% 50%; }
@media (max-width: 860px) { .hero-photo { height: 260px; } }
.pic { margin: 1.8rem 0; }
.pic img { width: 100%; }
.pic figcaption { font-size: .88rem; color: var(--grey); margin-top: .5rem; padding-left: .7rem; border-left: 3px solid var(--red); }

/* ---------- Guide layout: article + side notes ---------- */
.guide { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(2rem, 5vw, 4rem); padding: clamp(2.5rem, 6vw, 4rem) 0; }
@media (max-width: 900px) { .guide { grid-template-columns: 1fr; } }
.guide article { max-width: var(--read); }
.guide article h2 { margin-top: 2.2em; }
.guide article h2:first-child { margin-top: 0; }
.guide aside { font-size: 1rem; }
.guide aside .sticky { position: sticky; top: 110px; }

.toc { border-left: 3px solid var(--red); padding-left: 1.1rem; margin-bottom: 2rem; }
.toc h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--grey); margin-bottom: .6rem; }
.toc ol { padding-left: 1.1rem; margin: 0; }
.toc li { margin-bottom: .35rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--red); text-decoration: underline; }

/* Fact box */
.fact { background: var(--paper); border-top: 4px solid var(--ink); padding: 1.2rem 1.3rem; margin: 1.5rem 0; }
.fact h4 { font-size: 1rem; margin-bottom: .5rem; }
.fact p:last-child, .fact ul:last-child { margin-bottom: 0; }
.fact.red { border-top-color: var(--red); }
.source { font-size: .85rem; color: var(--grey); }

/* Parent tip - handwritten-style voice from us */
.tip { border-left: 5px solid var(--red); padding: .3rem 0 .3rem 1.2rem; margin: 1.8rem 0; font-size: 1.15rem; color: var(--ink); }
.tip strong { display: block; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--red); margin-bottom: .2rem; }

/* Numbered route */
.route { list-style: none; padding: 0; margin: 2rem 0 0; counter-reset: r; }
.route > li { counter-increment: r; display: grid; grid-template-columns: 72px 1fr; gap: 1.2rem; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.route > li::before {
  content: counter(r, decimal-leading-zero); font-family: "Exo 2", sans-serif; font-style: italic; font-weight: 800;
  font-size: 2.6rem; line-height: 1; color: var(--red);
}
.band-ink .route > li { border-top-color: #333; }
.route h3 { margin-bottom: .3rem; }
.route p { margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--ink); color: var(--white); font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:nth-child(even) { background: #faf9f7; }
td.num { font-weight: 700; color: var(--ink); white-space: nowrap; }

/* Link list (home) */
.guides { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
@media (max-width: 700px) { .guides { grid-template-columns: 1fr; } }
.guides a {
  display: block; padding: 1.6rem 1.5rem 1.6rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--body);
}
.guides a:nth-child(odd) { border-right: 1px solid var(--line); }
.guides a:nth-child(even) { padding-left: 1.5rem; }
@media (max-width: 700px) { .guides a:nth-child(odd) { border-right: 0; } .guides a:nth-child(even) { padding-left: 0; } }
.guides a:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.guides h3 { margin-bottom: .3rem; }
.guides a:hover h3 { color: var(--red); }
.guides span { color: var(--red); font-weight: 700; font-size: .95rem; }

/* Age strip */
.ages { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #333; margin-top: 2rem; }
@media (max-width: 760px) { .ages { grid-template-columns: repeat(2, 1fr); } }
.ages div { padding: 1.4rem 1.2rem; border-right: 1px solid #333; }
.ages div:last-child { border-right: 0; }
@media (max-width: 760px) { .ages div:nth-child(2) { border-right: 0; } .ages div:nth-child(-n+2) { border-bottom: 1px solid #333; } }
.ages b { display: block; font-family: "Exo 2", sans-serif; font-style: italic; font-weight: 800; font-size: 2.4rem; color: var(--white); line-height: 1; margin-bottom: .4rem; }
.ages span { font-size: .98rem; }

/* Series list */
.series { border-top: 1px solid var(--line); }
.series > div { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; padding: 1.8rem 0; border-bottom: 1px solid var(--line); }
@media (max-width: 700px) { .series > div { grid-template-columns: 1fr; gap: .5rem; } }
/* Group heading inside a guide (e.g. "Single-seaters"): a full section heading with the red kicker bar */
.guide article h2.series-group { margin: 3.5rem 0 1.2rem; font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.series-group::before { content: ""; display: block; width: 40px; height: 5px; background: var(--red); transform: skewX(-20deg); margin-bottom: .8rem; }
.series-group + .series, .series-group + p + .series { border-top: 3px solid var(--ink); }
.toc ul { list-style: none; padding-left: .9rem; margin: .35rem 0 .2rem; font-size: .92rem; }
.toc ul li { margin-bottom: .25rem; }
.toc ul a { color: var(--grey); }
.series dl { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; margin: 0 0 .8rem; font-size: 1rem; }
.series dt { font-weight: 700; color: var(--ink); }
.series dd { margin: 0; }

/* Checklist */
.ticks { list-style: none; padding: 0; }
.ticks li { padding-left: 1.8rem; position: relative; margin-bottom: .55rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; background: var(--red); transform: skewX(-15deg); }

/* Budget planner */
.planner { width: 100%; }
.planner td { padding: .5rem .9rem; }
.planner input {
  width: 8.5rem; font: inherit; font-weight: 700; padding: .35rem .6rem; border: 1px solid #ccc; text-align: right;
}
.planner input:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.planner tfoot td { font-weight: 800; font-size: 1.2rem; color: var(--ink); border-top: 3px solid var(--ink); border-bottom: 0; }

/* Directory */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.5rem; padding-bottom: 1.5rem; border-bottom: 3px solid var(--ink); }
.filters label { display: flex; flex-direction: column; font-weight: 700; font-size: .9rem; color: var(--ink); gap: .3rem; }
.filters select { font: inherit; font-weight: 400; font-size: 1rem; padding: .5rem 2rem .5rem .7rem; border: 1px solid #bbb; background: var(--white); min-width: 200px; }
.filters .search { flex: 1 1 260px; }
.filters input[type="search"] { font: inherit; font-size: 1rem; padding: .5rem .7rem; border: 1px solid #bbb; width: 100%; }
@media (max-width: 560px) { .filters label:not(.check) { flex: 1 1 100%; } .filters select { width: 100%; } }
.filters .check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 600; padding-bottom: .55rem; }
.filters .check input { width: 18px; height: 18px; accent-color: var(--red); }
.filters select:focus, .filters input:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.results-count { font-size: .95rem; color: var(--grey); margin: 1rem 0 0; }

.listing { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
@media (max-width: 700px) { .listing { grid-template-columns: 1fr; gap: .4rem; } }
.listing h3 { margin-bottom: .2rem; }
.listing h3 a { color: var(--ink); text-decoration: none; }
.listing h3 a:hover { color: var(--red); text-decoration: underline; }
.listing p { margin: 0 0 .4rem; font-size: 1.02rem; }
.listing-venues { color: var(--grey); font-size: .95rem !important; }
.listing-meta { display: flex; flex-direction: column; gap: .15rem; font-size: .9rem; color: var(--grey); }
.listing-type { font-weight: 700; color: var(--ink); }
@media (max-width: 700px) { .listing-meta { flex-direction: row; flex-wrap: wrap; gap: .2rem 1rem; } }
.listing-tier { align-self: flex-start; background: var(--red); color: var(--white); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; padding: .1rem .5rem; margin-top: .3rem; }
.listing.is-partner, .listing.is-featured { background: var(--paper); padding-left: 1.2rem; padding-right: 1.2rem; border-left: 5px solid var(--red); }
.badge { display: inline-block; font-weight: 700; font-size: .85rem !important; color: var(--red); }
.empty { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }

.tiers { font-size: .98rem; }
.tiers th:not(:first-child), .tiers td:not(:first-child) { text-align: center; }
.band-ink .tiers td { border-bottom-color: #333; color: #ddd; }
.band-ink .tiers tbody tr:nth-child(even) { background: #1d1d1d; }
.band-ink .tiers thead th { background: var(--red); }
.tiers tr.price td { font-weight: 700; color: var(--white); }
@media (max-width: 560px) {
  .tiers { font-size: .88rem; }
  .tiers th, .tiers td { padding: .6rem .4rem; }
  .tiers thead th { font-size: .72rem; letter-spacing: 0; }
}

/* Partners */
.partners { display: grid; gap: 0; border-top: 3px solid var(--ink); }
.partner { display: grid; grid-template-columns: 300px 1fr; gap: clamp(1.5rem, 4vw, 3rem); padding: 2.2rem 0; border-bottom: 1px solid var(--line); align-items: start; }
@media (max-width: 760px) { .partner { grid-template-columns: 1fr; } }
.partner-logo { display: flex; align-items: center; justify-content: center; background: var(--paper); padding: 1.6rem; min-height: 150px; text-decoration: none; }
.partner-logo img { max-height: 90px; width: auto; }
.partner-logo-dark { background: var(--ink); }
.partner-logo-black { background: #000; }
.partner-logo img.tall { max-height: 130px; }
.partner-logo-text span { font-family: "Exo 2", sans-serif; font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1.5rem; line-height: 1.05; color: var(--ink); text-align: center; }
.partner-logo-text b { color: var(--red); display: block; }
.partner h2 { margin-bottom: .1rem; }
.partner-what { font-weight: 700; color: var(--grey); font-size: .95rem; margin-bottom: .8rem; }
.partner-link { font-weight: 700; text-decoration: none; }
.offer { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; background: var(--ink); color: var(--white); padding: .9rem 1.1rem; margin: 1.2rem 0; border-left: 5px solid var(--red); }
.offer-label { font-family: "Exo 2", sans-serif; font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1.1rem; }
.offer-code { color: #ccc; }
.code {
  font: inherit; font-weight: 800; font-size: 1.1rem; letter-spacing: .06em; color: var(--ink); background: var(--white);
  border: 2px dashed var(--red); padding: .15rem .7rem; margin-left: .3rem; cursor: pointer;
}
.code:hover { background: #ffe9ec; }
.code.copied::after { content: " \2713 copied"; font-size: .8rem; color: var(--red); letter-spacing: 0; }

.partner-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.partner-strip a { display: flex; align-items: center; justify-content: center; height: 88px; padding: 0 1.4rem; background: var(--white); text-decoration: none; }
.partner-strip a.dark { background: var(--ink); }
.partner-strip a.black { background: #000; }
.partner-strip img { max-height: 48px; width: auto; }
.partner-strip img.tall { max-height: 72px; }
.partner-strip .text { font-family: "Exo 2", sans-serif; font-style: italic; font-weight: 800; text-transform: uppercase; color: var(--ink); font-size: 1.05rem; }
.partner-strip .text b { color: var(--red); }

/* Zenico block */
.zenico { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 800px) { .zenico { grid-template-columns: 1fr; } }
.zenico img { width: 100%; max-width: 440px; }

/* Contact */
.contact-list { list-style: none; padding: 0; font-size: 1.15rem; }
.contact-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contact-list b { display: inline-block; min-width: 7.5rem; color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); border-top: 4px solid var(--ink); padding: 3rem 0 2rem; font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--grey); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--red); text-decoration: underline; }
.footer-logo img { width: 230px; margin-bottom: .8rem; }
.footer-base { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid #d8d4cc; font-size: .88rem; color: var(--grey); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
