/* Rimforge design tokens — the CMS Colours and Fonts tabs map onto these custom properties.
   Monochrome industrial: off-white page, mid-grey product tiles, charcoal bars and pills,
   black type, and one restrained steel accent. Every component reads these variables. */
:root {
  /* brand colours — the CMS Colours tab gives every --color-* a picker */
  --color-primary: #2b2b2d;        /* charcoal: bars, pills, buttons, panel rules */
  --color-primary-dark: #18181a;   /* charcoal hover */
  --color-secondary: #111113;      /* black type and headings */
  --color-accent: #5d6c78;         /* muted steel — used sparingly on light grounds */
  --color-accent-light: #aab6c0;   /* the steel accent on charcoal grounds */
  --color-page: #efefeb;           /* the off-white page */
  --color-surface: #c9c9c9;        /* product / category tiles */
  --color-surface-soft: #e2e2dd;   /* soft section bands, quiet boxes */
  --color-default: #2e2e30;        /* body text */
  --color-muted: #66666a;
  --color-line: #d3d3cd;
  --color-white: #ffffff;
  --color-dark: #1f1f21;           /* top bar, footer, dark panels */
  /* fonts — the CMS Fonts tab overrides these */
  --font-default: 'Manrope', system-ui, sans-serif;
  --font-primary: var(--font-default);
  --font-heading: 'Russo One', 'Arial Black', system-ui, sans-serif;
  --font-display: 'Russo One', 'Arial Black', 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: #23854f;
  --state-bad: #b3261e;
  --star: #f5b400;
  --radius: 6px;
  --radius-sm: 4px;
  --radius-pill: 12px;
  --rule: 6px;                      /* the thick charcoal rule under each panel */
  --section-max-width: 82rem;
  --header-h: 64px;
  --section-pad-y: 88px;
  --base-size: 16px;
  --ease: cubic-bezier(.2, .75, .25, 1);
  --shadow-soft: 0 18px 34px -18px color-mix(in srgb, var(--color-dark) 45%, transparent);
  --shadow-cut: drop-shadow(0 22px 22px color-mix(in srgb, var(--color-dark) 35%, transparent));
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: var(--base-size); scroll-behavior: smooth; background: var(--color-page); }
body { font-family: var(--font-default); color: var(--color-default); line-height: 1.65; background: var(--color-page); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); color: var(--color-secondary); font-weight: 400; line-height: 1.08; letter-spacing: .01em; text-transform: uppercase; }
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); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.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-dark); color: color-mix(in srgb, var(--color-white) 76%, transparent); }
section.dark h2, section.dark h3 { color: var(--color-white); }

/* the accent words in a headline: steel, set a step quieter */
.hl { color: var(--color-accent); }
section.dark .hl, .on-dark .hl { color: var(--color-accent-light); }
/* the wide display face, for the hero headline and big numbers */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; text-transform: uppercase; }
/* the thick charcoal rule that closes each panel */
.ruled { box-shadow: inset 0 calc(-1 * var(--rule)) 0 var(--color-primary); }

/* ── Buttons: rounded charcoal pill with a round icon knob ── */
.btn {
  display: inline-flex; align-items: center; gap: .8rem; padding: .45rem .45rem .45rem 1.25rem; border-radius: var(--radius-pill); border: 0; cursor: pointer;
  background: var(--color-primary); color: var(--color-white); font: 400 .8rem/1.15 var(--font-heading); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  box-shadow: var(--shadow-soft);
  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: 50%; display: grid; place-items: center; background: var(--color-white); color: var(--color-primary);
  transition: transform .35s var(--ease); }
.btn .knob svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); background: var(--color-primary-dark); }
.btn:hover .knob { transform: rotate(45deg); }
.btn.light { background: var(--color-white); color: var(--color-secondary); }
.btn.light .knob { background: var(--color-surface); color: var(--color-secondary); }
.btn.light:hover { background: var(--color-white); }
.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 1.5px var(--color-primary); padding: .95rem 1.5rem; }
.btn.ghost:hover { background: var(--color-primary); color: var(--color-white); }
.btn[disabled] { opacity: .6; pointer-events: none; }
/* on charcoal grounds the solid button turns white */
.on-dark .btn.accent, section.dark .btn.accent { background: var(--color-white); color: var(--color-secondary); }
.on-dark .btn.accent:hover, section.dark .btn.accent:hover { background: var(--color-surface); }
.on-dark .btn.ghost, section.dark .btn.ghost { color: var(--color-white); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--color-white) 45%, transparent); }
/* text link with a long arrow */
.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-accent); }

/* ── Section heads: small charcoal label pill, wide uppercase headline ── */
.chip { display: inline-flex; align-items: center; gap: .55rem; padding: .38rem .8rem; border-radius: var(--radius-sm);
  font: 400 .68rem/1 var(--font-heading); letter-spacing: .16em; text-transform: uppercase; color: var(--color-white); background: var(--color-primary); }
.chip::before { content: ''; width: 6px; height: 6px; background: var(--color-accent-light); }
section.dark .chip { background: color-mix(in srgb, var(--color-white) 12%, transparent); }
.section-head { max-width: 820px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); margin-top: 1rem; }
.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.15fr 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: 400 .7rem var(--font-heading); letter-spacing: .1em; text-transform: uppercase; color: var(--color-secondary); margin-bottom: .4rem; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; background: var(--color-white); border: 1.5px solid var(--color-line); border-radius: var(--radius-sm); padding: .8rem 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 3px color-mix(in srgb, var(--color-accent) 25%, 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 tick list: a small charcoal square with a white tick, drawn in CSS */
.tick-list { list-style: none; display: grid; gap: .6rem; }
.tick-list li { position: relative; padding-left: 1.85rem; }
.tick-list li::before { content: ''; position: absolute; left: 0; top: .22em; width: 1.15rem; height: 1.15rem; border-radius: 3px; background: var(--color-primary); }
.tick-list li::after { content: ''; position: absolute; left: .4rem; top: .42em; width: .3rem; height: .55rem; border: solid var(--color-white); 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: wide display wordmark ── */
.logo { display: inline-flex; align-items: center; gap: .6rem; font: 400 1.45rem var(--font-display); text-transform: uppercase; letter-spacing: .04em; color: var(--color-secondary); }
.logo img { max-height: 44px; width: auto; }
.logo .mark { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--color-primary); background: var(--color-white); }
.logo .mark svg { width: 22px; height: 22px; color: var(--color-primary); }
.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: .35em; font: 600 .42em var(--font-default); letter-spacing: .14em; 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); }
/* 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; }

@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: 64px; }
  .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-white); border: 1px solid var(--color-line); border-radius: var(--radius); }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border-radius: var(--radius-pill); font: 400 .68rem/1.2 var(--font-heading); letter-spacing: .08em; text-transform: uppercase;
  background: var(--color-primary); color: var(--color-white); }
.empty-note { color: var(--color-muted); }
