/* Wheelhouse design tokens — the CMS Colours and Fonts tabs map onto these custom properties.
   Bold tyre-yellow + black retail look: slanted shapes, italic condensed headings,
   chevron bullets and a tread texture. Every component reads these variables. */
:root {
  /* brand colours — the CMS Colours tab gives every --color-* a picker */
  --color-primary: #f6b21b;          /* tyre yellow */
  --color-primary-dark: #d9920b;     /* the deep end of the yellow gradient */
  --color-primary-light: #ffd257;    /* the bright end of the yellow gradient */
  --color-on-primary: #141414;       /* text and icons on yellow */
  --color-secondary: #161616;        /* black */
  --color-charcoal: #232425;         /* dark panels and the tread texture */
  --color-surface: #efefec;
  --color-surface-soft: #f7f7f4;
  --color-default: #3b3b3b;
  --color-muted: #6f6f6c;
  --color-line: #e0e0db;
  --color-white: #ffffff;
  --color-dark: #0d0d0d;
  /* fonts — the CMS Fonts tab overrides these */
  --font-default: 'Open Sans', system-ui, sans-serif;
  --font-primary: var(--font-default);
  --font-heading: 'Barlow Semi Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-display: 'Orbitron', 'Barlow Semi Condensed', system-ui, sans-serif;
  /* the number-plate face (bold, upright, condensed) */
  --font-plate: 'Barlow Semi Condensed', 'Arial Black', Arial, sans-serif;
  /* meaning-carrying fixed colours (not brand): UK plate yellow + GB band blue,
     success / error, rating stars */
  --plate-yellow: #ffd307;
  --plate-blue: #003399;
  --plate-ink: #111111;
  --state-ok: #23854f;
  --state-bad: #b3261e;
  --star: #f5b400;
  --radius: 6px;
  --radius-sm: 4px;
  --slant: 14px;                     /* the cut on buttons, chips and fields */
  --section-max-width: 76rem;
  --header-h: 72px;
  --section-pad-y: 92px;
  --base-size: 16px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: var(--base-size); scroll-behavior: smooth; }
body { font-family: var(--font-default); color: var(--color-default); line-height: 1.7; background: var(--color-white); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); color: var(--color-secondary); font-weight: 800; font-style: italic; line-height: 1.05; letter-spacing: -.005em; }
h3, h4, h5 { font-weight: 700; }
a { color: inherit; text-decoration: none; transition: color .25s ease; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
::selection { background: var(--color-primary); color: var(--color-on-primary); }

.container { max-width: var(--section-max-width); margin: 0 auto; padding: 0 24px; }
section { padding: var(--section-pad-y) 0; position: relative; }
section, footer { overflow-x: clip; }
section.soft { background: var(--color-surface-soft); }
section.dark { background: var(--color-secondary); color: color-mix(in srgb, var(--color-white) 78%, transparent); }
section.dark h2, section.dark h3 { color: var(--color-white); }

/* the accent word in a headline: yellow capitals ("How it WORKS") */
.hl { color: var(--color-primary); text-transform: uppercase; }
/* the techy display face, for one big word and big numbers */
.display { font-family: var(--font-display); font-weight: 800; font-style: normal; letter-spacing: .02em; }

/* the dark tread texture (pure CSS): fine diagonal blocks over charcoal */
.tread {
  background-color: var(--color-charcoal);
  background-image:
    repeating-linear-gradient(115deg, color-mix(in srgb, var(--color-white) 4%, transparent) 0 14px, transparent 14px 34px),
    repeating-linear-gradient(65deg, color-mix(in srgb, var(--color-dark) 45%, transparent) 0 10px, transparent 10px 34px),
    radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--color-white) 7%, transparent), transparent 70%);
}
/* a zig-zag tread edge (sits at the top of a dark band) */
.tread-edge { height: 14px; background:
  linear-gradient(135deg, var(--color-line) 25%, transparent 25%) 0 0 / 14px 14px,
  linear-gradient(225deg, var(--color-line) 25%, transparent 25%) 0 0 / 14px 14px; }

/* ── Buttons: chamfered slabs with a round arrow knob ── */
.btn {
  --cut: var(--slant);
  display: inline-flex; align-items: center; gap: .85rem; padding: .55rem 1.2rem .55rem 1.5rem; border: 0; border-radius: 0; cursor: pointer;
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  background: var(--color-secondary); color: var(--color-white);
  font: italic 700 1.08rem var(--font-heading); text-transform: uppercase; letter-spacing: .03em; line-height: 1; white-space: nowrap;
  transition: background .3s ease, color .3s ease, transform .3s var(--ease), filter .3s ease;
}
.btn .knob { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--color-primary); color: var(--color-on-primary);
  transition: transform .35s var(--ease); }
.btn .knob svg { width: 17px; height: 17px; stroke-width: 2.2; }
.btn:hover { transform: translateY(-2px); }
.btn:hover .knob { transform: translateX(3px); }
.btn.light { background: var(--color-white); color: var(--color-secondary); }
.btn.light .knob { background: var(--color-secondary); color: var(--color-primary); }
.btn.accent { background: linear-gradient(180deg, var(--color-primary-light), var(--color-primary) 55%, var(--color-primary-dark)); color: var(--color-on-primary);
  padding: 1rem 2rem; justify-content: center; }
.btn.accent .knob { background: var(--color-on-primary); color: var(--color-primary); }
.btn.accent:hover { filter: brightness(1.06) saturate(1.05); }
.btn.plain { padding: 1rem 1.8rem; }
.btn.ghost { background: color-mix(in srgb, var(--color-secondary) 7%, transparent); color: var(--color-secondary); padding: 1rem 1.8rem; }
.btn.ghost:hover { background: color-mix(in srgb, var(--color-secondary) 14%, transparent); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.arrow-link { display: inline-flex; align-items: center; gap: .7rem; font: italic 700 1.05rem var(--font-heading); text-transform: uppercase; color: var(--color-secondary); }
.arrow-link svg { width: 30px; height: 18px; transition: transform .3s var(--ease); }
.arrow-link:hover svg { transform: translateX(5px); }
.arrow-link:hover { color: var(--color-primary-dark); }

/* ── Section heads: a slanted yellow tag, two-tone italic headline ── */
.chip { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem 1.1rem; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  font: italic 700 .82rem var(--font-heading); letter-spacing: .12em; text-transform: uppercase; color: var(--color-on-primary); background: var(--color-primary); }
section.dark .chip { background: var(--color-primary); color: var(--color-on-primary); }
.section-head { max-width: 780px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); margin-top: .9rem; }
.section-head p { margin-top: 1rem; font-size: 1.04rem; max-width: 60ch; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }
.section-head.split { max-width: none; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: end; }
.section-head.split p { margin-top: 0; }

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font: italic 700 .9rem var(--font-heading); text-transform: uppercase; letter-spacing: .04em; color: var(--color-secondary); margin-bottom: .35rem; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; background: var(--color-white); border: 2px solid var(--color-line); border-radius: var(--radius-sm); padding: .78rem 1rem; color: var(--color-secondary);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 22%, transparent); }
.form-grid ::placeholder { color: color-mix(in srgb, var(--color-muted) 75%, var(--color-white)); }
.field-err { color: var(--state-bad); font-size: .82rem; margin-top: .35rem; }
.form-note { font-size: .82rem; color: var(--color-muted); }
.form-ok { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--state-ok) 12%, var(--color-white)); color: var(--state-ok); }
.form-ok svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.form-bad { padding: 12px 16px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--state-bad) 10%, var(--color-white)); color: var(--state-bad); font-size: .9rem; }

/* a chevron list (»), drawn in CSS so it follows the theme colours */
.tick-list { --tick: var(--color-primary); list-style: none; display: grid; gap: .65rem; }
.tick-list li { position: relative; padding-left: 1.75rem; }
.tick-list li::before, .tick-list li::after { content: ''; position: absolute; top: .42em; width: .55rem; height: .8rem; background: var(--tick);
  clip-path: polygon(0 0, 45% 0, 100% 50%, 45% 100%, 0 100%, 55% 50%); }
.tick-list li::before { left: 0; }
.tick-list li::after { left: .48rem; }

/* rating stars */
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars svg { width: 15px; height: 15px; }

/* ── Logo ── */
.logo { display: inline-flex; align-items: center; gap: .6rem; font: italic 800 1.6rem var(--font-heading); text-transform: uppercase; color: var(--color-secondary); letter-spacing: .01em; }
.logo img { max-height: 46px; width: auto; }
.logo .mark { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--color-primary); background: var(--color-secondary);
  box-shadow: 0 0 0 3px var(--color-white), 0 0 0 5px var(--color-secondary); }
.logo .mark svg { width: 26px; height: 26px; color: var(--color-primary); stroke-width: 2; }
.logo .wordmark { display: inline-flex; flex-direction: column; justify-content: center; line-height: 1; min-width: 0; }
.logo .wl { display: block; }
.logo .sub { display: block; margin-top: .3em; font: italic 600 .5em var(--font-heading); letter-spacing: .08em; color: var(--color-muted); }
.logo { min-width: 0; }
.logo img { max-width: min(46vw, 240px); object-fit: contain; }

/* ══ Motion: section-enter animations (plugins/motion.client.ts) ══
   Hidden states apply only while html.hg-motion is set and the section has not
   entered the frame yet; --i staggers siblings, --d adds a fixed delay. */
.hg-motion [data-anim] {
  transition:
    opacity .8s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    transform 1s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    filter .9s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    clip-path 1.1s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms));
}
.hg-motion section:not(.hg-inview) [data-anim], .hg-motion footer:not(.hg-inview) [data-anim] { opacity: 0; }
.hg-motion section:not(.hg-inview) [data-anim="up"], .hg-motion footer:not(.hg-inview) [data-anim="up"] { transform: translateY(42px); }
.hg-motion section:not(.hg-inview) [data-anim="down"] { transform: translateY(-34px); }
.hg-motion section:not(.hg-inview) [data-anim="left"] { transform: translateX(60px); }
.hg-motion section:not(.hg-inview) [data-anim="right"] { transform: translateX(-60px); }
.hg-motion section:not(.hg-inview) [data-anim="zoom"] { transform: scale(.88); }
.hg-motion section:not(.hg-inview) [data-anim="blur"] { filter: blur(14px); transform: scale(1.04); }
.hg-motion section:not(.hg-inview) [data-anim="pop"] { transform: translateY(18px) scale(.8); }
/* the hero wheel rolls in */
.hg-motion section:not(.hg-inview) [data-anim="roll"] { transform: translateX(-40vw) rotate(-300deg); }
/* headings rise out of a mask */
.hg-motion section:not(.hg-inview) [data-anim="rise"] { clip-path: inset(0 0 100% 0); transform: translateY(40%); }
.hg-motion section.hg-inview [data-anim="rise"] { clip-path: inset(-10% -5% -20% -5%); }
/* photos unveil with a wipe while settling from a slight zoom */
.hg-motion section:not(.hg-inview) [data-anim="clip"] { opacity: 1; clip-path: inset(0 0 100% 0); }
.hg-motion section.hg-inview [data-anim="clip"] { clip-path: inset(0 0 0 0); }
.hg-motion [data-anim="clip"] img { transition: transform 1.6s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)); }
.hg-motion section:not(.hg-inview) [data-anim="clip"] img { transform: scale(1.18); }
/* lines draw from left to right */
.hg-motion section:not(.hg-inview) [data-anim="draw"] { opacity: 1; transform: scaleX(0); transform-origin: left; }
.hg-motion [data-anim="draw"] { transition-duration: 1.4s; }
.hg-motion [data-anim="roll"] { transition-duration: .9s, 1.5s; }

@keyframes tl-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.float { animation: tl-float 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float { animation: none; }
}
@media (max-width: 900px) {
  .section-head.split { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 640px) {
  :root { --section-pad-y: 68px; }
  .form-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 34px; }
  .container { padding: 0 16px; }
}

/* ── Shared bits used by several blocks ── */
.stars svg { fill: currentColor; }
.card-box { background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius); }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .8rem; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  font: italic 700 .82rem var(--font-heading); text-transform: uppercase; letter-spacing: .05em;
  background: color-mix(in srgb, var(--color-primary) 22%, var(--color-white)); color: var(--color-on-primary); }
.empty-note { color: var(--color-muted); }
