/* Roadwise design tokens — the CMS Colours and Fonts tabs map onto these custom properties.
   A cinematic dark-navy look: ink and navy backgrounds, electric blue actions, a red
   call-to-action, glass panels (translucent fill + blur + thin light border). */
:root {
  /* brand colours — the CMS Colours tab gives every --color-* a picker */
  --color-primary: #1d7cf2;        /* electric blue: buttons, links, accents */
  --color-primary-dark: #1262d0;
  --color-primary-light: #6db3ff;  /* glows, highlighted words */
  --color-accent: #f0232d;         /* red: the header call-to-action, urgent call-outs */
  --color-accent-dark: #c8141d;
  --color-secondary: #f2f6fc;      /* headings and strong text (light on dark) */
  --color-default: #a9b5c8;        /* body text */
  --color-muted: #6f7c92;
  --color-line: #1d2a41;           /* borders and rules */
  --color-surface: #101b2e;        /* raised panels */
  --color-surface-soft: #0a1220;   /* alternate sections */
  --color-navy: #0d1626;           /* gradient partner of the ink */
  --color-deep: #0b2350;           /* the blue-tinted closing sections */
  --color-glass: #c9dcff;          /* tint of the glass panels (used at a few %) */
  --color-white: #ffffff;
  --color-dark: #070b14;           /* page background (ink) */
  /* fonts — the CMS Fonts tab overrides these */
  --font-default: 'Manrope', system-ui, sans-serif;
  --font-primary: var(--font-default);
  --font-heading: 'Sora', 'Manrope', system-ui, sans-serif;
  --font-display: 'Sora', 'Manrope', system-ui, sans-serif;
  /* the number-plate face (bold, condensed-ish; UK plates use Charles Wright) */
  --font-plate: 'Arial Black', 'Helvetica Neue', 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: #34c37a;
  --state-bad: #ff5a52;
  --star: #f5b400;
  --radius: 18px;
  --radius-sm: 12px;
  --section-max-width: 80rem;
  --header-h: 74px;
  --section-pad-y: 104px;
  --base-size: 16px;
  --ease: cubic-bezier(.2, .75, .25, 1);
  /* glass recipe (colour-mixed from the tokens above) */
  --glass-fill: color-mix(in srgb, var(--color-glass) 6%, transparent);
  --glass-line: color-mix(in srgb, var(--color-glass) 14%, transparent);
  --glow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 40%, transparent), 0 18px 50px -18px color-mix(in srgb, var(--color-primary) 65%, transparent);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: var(--base-size); scroll-behavior: smooth; background: var(--color-dark); }
body { font-family: var(--font-default); color: var(--color-default); line-height: 1.65; background: var(--color-dark); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); color: var(--color-secondary); font-weight: 600; line-height: 1.1; letter-spacing: -.025em; }
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-white); }
select option { background: var(--color-surface); color: var(--color-secondary); }

.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; }
/* alternate sections: ink → navy */
section.soft { background: linear-gradient(180deg, var(--color-dark) 0%, var(--color-navy) 100%); }
/* the blue-tinted band */
section.dark { background:
  radial-gradient(70% 90% at 50% 0%, color-mix(in srgb, var(--color-primary) 22%, transparent) 0%, transparent 70%),
  linear-gradient(180deg, var(--color-navy) 0%, var(--color-deep) 100%);
  color: color-mix(in srgb, var(--color-white) 76%, transparent); }
section.dark h2, section.dark h3 { color: var(--color-white); }

/* the accent word in a headline */
.hl { color: var(--color-primary-light); }
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -.035em; }

/* glass panel */
.glass { background: var(--glass-fill); border: 1px solid var(--glass-line); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }

/* ── Buttons: rounded rectangles, blue with a soft glow; knob = small glass square ── */
.btn {
  display: inline-flex; align-items: center; gap: .8rem; padding: .45rem .45rem .45rem 1.3rem; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--color-primary); color: var(--color-white); font-weight: 700; font-size: .93rem; line-height: 1; white-space: nowrap;
  box-shadow: 0 12px 30px -14px color-mix(in srgb, var(--color-primary) 80%, transparent);
  transition: background .3s ease, color .3s ease, transform .3s var(--ease), box-shadow .3s ease;
}
.btn .knob { width: 38px; height: 38px; flex: none; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--color-white) 16%, transparent); color: var(--color-white);
  transition: transform .35s var(--ease), background .3s ease; }
.btn .knob svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); background: var(--color-primary-dark); box-shadow: 0 18px 40px -14px color-mix(in srgb, var(--color-primary) 90%, transparent); }
.btn:hover .knob { transform: rotate(45deg); background: color-mix(in srgb, var(--color-white) 24%, transparent); }
.btn.light { background: var(--color-white); color: var(--color-dark); box-shadow: 0 12px 30px -16px color-mix(in srgb, var(--color-white) 40%, transparent); }
.btn.light .knob { background: var(--color-primary); }
.btn.light:hover { background: var(--color-secondary); }
.btn.accent { background: var(--color-primary); color: var(--color-white); padding: 1rem 1.6rem; justify-content: center; }
.btn.accent:hover { background: var(--color-primary-dark); }
.btn.plain { padding: 1rem 1.6rem; }
.btn.ghost { background: transparent; color: var(--color-secondary); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-glass) 30%, transparent); padding: .95rem 1.5rem; }
.btn.ghost:hover { background: color-mix(in srgb, var(--color-glass) 8%, transparent); box-shadow: inset 0 0 0 1px var(--color-primary-light); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.arrow-link { display: inline-flex; align-items: center; gap: .7rem; font-weight: 600; 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-light); }

/* ── Section heads: small glowing chip, big tight headline ── */
.chip { display: inline-flex; align-items: center; gap: .55rem; padding: .34rem .9rem; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass-fill);
  font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--color-primary-light); }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 10px 2px color-mix(in srgb, var(--color-primary) 70%, transparent); }
section.dark .chip { color: var(--color-white); }
.section-head { max-width: 760px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin-top: 1rem; text-wrap: balance; }
.section-head p { margin-top: 1rem; font-size: 1.02rem; max-width: 60ch; color: var(--color-default); }
.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-weight: 600; font-size: .8rem; color: var(--color-secondary); margin-bottom: .35rem; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; background: color-mix(in srgb, var(--color-dark) 55%, transparent); border: 1px solid var(--color-line); border-radius: 12px; padding: .8rem 1rem; color: var(--color-secondary);
  transition: border-color .25s ease, box-shadow .25s ease; color-scheme: dark;
}
.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: var(--color-muted); }
.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) 14%, transparent); color: var(--state-ok); }
.form-ok svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.form-bad { padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--state-bad) 14%, transparent); color: var(--state-bad); font-size: .9rem; }

/* a tick list, the tick drawn in CSS so it follows the theme colours */
.tick-list { list-style: none; display: grid; gap: .65rem; }
.tick-list li { position: relative; padding-left: 1.9rem; }
.tick-list li::before { content: ''; position: absolute; left: 0; top: .2em; width: 1.2rem; height: 1.2rem; border-radius: 6px; background: color-mix(in srgb, var(--color-primary) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 45%, transparent); }
.tick-list li::after { content: ''; position: absolute; left: .44rem; top: .45em; width: .3rem; height: .55rem; border: solid var(--color-primary-light); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* 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: 700 1.4rem var(--font-heading); color: var(--color-secondary); letter-spacing: -.035em; }
.logo img { max-height: 44px; width: auto; }
.logo .mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--color-white);
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary) 55%, var(--color-primary-dark)); box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--color-primary) 80%, transparent); }
.logo .mark svg { width: 22px; height: 22px; color: var(--color-white); }
.logo .wordmark { display: inline-flex; flex-direction: column; justify-content: center; line-height: 1.05; min-width: 0; }
.logo .wl { display: block; }
.logo .sub { display: block; margin-top: .3em; font-size: .5em; font-weight: 500; letter-spacing: .02em; 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); }
.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%); }
.hg-motion section:not(.hg-inview) [data-anim="clip"] { opacity: 1; clip-path: inset(0 0 100% 0 round var(--radius)); }
.hg-motion section.hg-inview [data-anim="clip"] { clip-path: inset(0 0 0 0 round var(--radius)); }
.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); }
.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; }

@keyframes rw-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes rw-spin { to { transform: rotate(360deg); } }
@keyframes rw-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.float { animation: rw-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: 76px; }
  .container { padding: 0 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 36px; }
}

/* ── Shared bits used by several blocks ── */
.stars svg { fill: currentColor; }
.card-box { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; font-size: .76rem; font-weight: 700;
  background: color-mix(in srgb, var(--color-primary) 18%, transparent); color: var(--color-primary-light); }
.empty-note { color: var(--color-muted); }
