/* ==========================================================================
   RGBSPOT — base.css
   Tokens, reset, typography, buttons, header, footer, motion primitives
   ========================================================================== */

/* Metric-matched fallbacks: text occupies the same space before and after the
   webfont loads, which keeps CLS at effectively zero during font swap. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans"), local("Roboto"), local("DejaVu Sans");
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Display Fallback";
  src: local("Arial Bold"), local("Helvetica Neue Bold"), local("Liberation Sans Bold"), local("Roboto Bold"), local("DejaVu Sans Bold");
  size-adjust: 104%;
  ascent-override: 96%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  /* Colour */
  --ink:        #0A0A0A;   /* jet black */
  --ink-soft:   #1A1A1A;
  --ink-line:   #22201D;
  --paper:      #FAF7F2;   /* warm light base */
  --paper-2:    #FFFFFF;
  --paper-3:    #F1ECE3;
  --orange:     #FF5A1F;
  --orange-dk:  #E3430C;
  --orange-tint:#FFE9DF;
  --muted:      #5F5B54;
  --muted-2:    #8A857C;
  --hair:       #E2DBCF;
  --hair-dark:  #2E2B27;
  --green:      #1F7A4D;

  /* Type */
  --display: "Bricolage Grotesque", "Display Fallback", system-ui, sans-serif;
  --body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Space */
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(64px, 9vw, 128px);
  --maxw: 1240px;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 0 rgba(10,10,10,.06), 0 18px 40px -28px rgba(10,10,10,.45);
  --shadow-lift: 0 2px 0 rgba(10,10,10,.08), 0 34px 60px -34px rgba(10,10,10,.55);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.025em; line-height: 1.06; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.band-dark { background: var(--ink); color: #F3EFE8; }
.band-dark h1, .band-dark h2, .band-dark h3 { color: #fff; }
.band-alt { background: var(--paper-3); }

.grid { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Type scale ---------- */
.h-xl { font-size: clamp(2.6rem, 6.4vw, 4.6rem); }
.h-lg { font-size: clamp(2.1rem, 4.4vw, 3.3rem); }
.h-md { font-size: clamp(1.5rem, 2.5vw, 2.05rem); }
.h-sm { font-size: clamp(1.15rem, 1.7vw, 1.35rem); }
.lede { font-size: clamp(1.02rem, 1.35vw, 1.18rem); color: var(--muted); max-width: 62ch; }
.band-dark .lede { color: #BDB6AA; }
.small { font-size: .93rem; }
.mark { color: var(--orange); }
.underline-brush {
  background-image: linear-gradient(transparent 62%, var(--orange-tint) 62%);
  padding-inline: 2px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--orange);
}
.band-dark .eyebrow { color: #FF8A55; }
.band-dark .eyebrow::before { background: #FF8A55; }

.sec-head { max-width: 780px; margin-bottom: clamp(34px, 4vw, 56px); }
.sec-head .lede { margin-top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1.5px solid var(--btn-bg);
  border-radius: 999px;
  font-weight: 600;
  font-size: .97rem;
  letter-spacing: -.01em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn span { position: relative; z-index: 1; }
.btn svg { width: 15px; height: 15px; position: relative; z-index: 1; transition: transform .3s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -14px rgba(10,10,10,.6); }
.btn:hover svg { transform: translateX(4px); }
.btn--orange { --btn-bg: var(--orange); --btn-fg: #fff; }
.btn--orange:hover { --btn-bg: var(--orange-dk); box-shadow: 0 14px 26px -12px rgba(255,90,31,.65); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { --btn-bg: var(--ink); --btn-fg: #fff; }
.band-dark .btn--ghost { --btn-fg: #fff; border-color: rgba(255,255,255,.42); }
.band-dark .btn--ghost:hover { --btn-bg: #fff; --btn-fg: var(--ink); border-color: #fff; }
.btn--sm { padding: 11px 20px; font-size: .88rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.link-arrow {
  font-weight: 600;
  font-size: .95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1.5px solid var(--orange);
  padding-bottom: 3px;
  transition: gap .25s var(--ease);
}
.link-arrow:hover { gap: 13px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250,247,242,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.site-header.is-stuck {
  border-bottom-color: var(--hair);
  box-shadow: 0 10px 30px -26px rgba(10,10,10,.7);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 78px;
  transition: height .3s var(--ease);
}
.site-header.is-stuck .nav { height: 66px; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; font-size: 1.28rem; letter-spacing: -.04em; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__dot { color: var(--orange); }

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-size: .95rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  padding-block: 4px;
  transition: color .2s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width .3s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 12px; }
.nav__mail { font-size: .9rem; color: var(--muted); font-family: var(--mono); }
.nav__mail:hover { color: var(--orange); }

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 1.5px solid var(--hair);
  background: var(--paper-2);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.burger i { display: block; width: 18px; height: 1.8px; background: var(--ink); position: relative; transition: background .2s; }
.burger i::before, .burger i::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 1.8px; background: var(--ink);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.burger i::before { top: -6px; }
.burger i::after { top: 6px; }
.burger[aria-expanded="true"] i { background: transparent; }
.burger[aria-expanded="true"] i::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] i::after { top: 0; transform: rotate(-45deg); }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--hair);
  background: var(--paper);
  padding: 18px var(--gutter) 30px;
}
.mobile-menu.is-open { display: block; }
.mobile-menu a { display: block; padding: 13px 0; font-size: 1.05rem; font-weight: 600; border-bottom: 1px solid var(--hair); }
.mobile-menu .btn { margin-top: 20px; }

/* ---------- Ticker ---------- */
.ticker {
  background: var(--ink);
  color: #EDE8E0;
  overflow: hidden;
  border-block: 1px solid var(--hair-dark);
  padding-block: 11px;
}
.ticker__track { display: flex; gap: 46px; width: max-content; animation: slide 34s linear infinite; }
.ticker__track span { font-family: var(--mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; opacity: .8; }
.ticker__track span b { color: var(--orange); font-weight: 500; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #B7B0A5; padding-block: clamp(56px, 7vw, 92px) 34px; }
.site-footer .brand { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-col h4 { color: #fff; font-size: .82rem; font-family: var(--mono); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px; font-weight: 500; }
.footer-col a { display: block; padding: 6px 0; font-size: .95rem; transition: color .2s, transform .2s; }
.footer-col a:hover { color: var(--orange); transform: translateX(3px); }
.footer-about { max-width: 34ch; font-size: .95rem; margin: 18px 0 22px; line-height: 1.7; }
.footer-mail { font-family: var(--mono); font-size: .95rem; color: #fff; border-bottom: 1px solid var(--orange); padding-bottom: 2px; }
.footer-base {
  margin-top: 52px; padding-top: 24px;
  border-top: 1px solid var(--hair-dark);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: .85rem;
}
.footer-base a:hover { color: var(--orange); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .09s; }
.reveal[data-d="2"] { transition-delay: .18s; }
.reveal[data-d="3"] { transition-delay: .27s; }
.reveal[data-d="4"] { transition-delay: .36s; }
.reveal[data-d="5"] { transition-delay: .45s; }

@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.hero-anim > * { opacity: 0; animation: rise .9s var(--ease) forwards; }
.hero-anim > *:nth-child(1) { animation-delay: .05s; }
.hero-anim > *:nth-child(2) { animation-delay: .16s; }
.hero-anim > *:nth-child(3) { animation-delay: .27s; }
.hero-anim > *:nth-child(4) { animation-delay: .38s; }
.hero-anim > *:nth-child(5) { animation-delay: .49s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-anim > * { opacity: 1; }
}

/* Offset anchored sections so the sticky header does not cover them */
[id] { scroll-margin-top: 96px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 0 0 12px 12px;
  font-size: .9rem;
  font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* Display face has no 400 weight loaded — pin the elements that relied on it
   so the browser never synthesises a faux-bold. */
.chip b, .step__n, .stat b, .tier__da, .pack__price, .quote,
.proof-item strong, table.compare thead th { font-weight: 700; }
.proof-item strong { font-weight: 800; }
