/* ============================================================
   MARQUE BRAND SYSTEM
   Shared tokens, base reset, and reusable components.
   Every Marque page links this file BEFORE its page-specific CSS.
   Source of truth: brand/marque-brand-guide.pdf
   ============================================================ */

:root {
  /* ---------- Colour palette (verbatim from brand guide) ---------- */
  --c-blue:         #3654C2;   /* Primary brand */
  --c-charcoal:     #001220;   /* Primary text */
  --c-beige:        #F7EDED;   /* Primary soft background */
  --c-white:        #FFFFFF;
  --c-lime:         #EBEB3D;   /* Hot accent */
  --c-violet:       #FF9CF2;   /* Hot accent */
  --c-rose:         #F25996;   /* Hot accent */
  --c-peach:        #F5BF9E;   /* Soft accent / default key-word underline */
  --c-pastel-pink:  #F0D9E3;   /* Soft accent */
  --c-pastel-green: #D6E8C2;   /* Soft accent */

  /* ---------- Type ---------- */
  /* Labil Grotesk is the brand typeface for everything except the wordmark.
     The "Marque" wordmark itself is delivered via the real SVG logo file —
     not set in CSS — so there is no serif token here.
     Dev fallback: Inter. Pre-launch swap to Labil Grotesk via Adobe Fonts:
       --f-display: 'labil-grotesk', 'Inter', system-ui, sans-serif;
       --f-body:    'labil-grotesk', 'Inter', system-ui, sans-serif;
  */
  --f-display: 'Inter', system-ui, -apple-system, sans-serif;
  --f-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* ---------- Spacing scale ---------- */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-6: 24px;  --s-8: 32px;  --s-12: 48px; --s-16: 64px;
  --s-24: 96px; --s-32: 128px;

  /* ---------- Radii ---------- */
  --r-sm: 8px; --r-md: 16px; --r-lg: 24px; --r-xl: 40px;

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* ---------- Layout ---------- */
  --container: 1320px;
  --gutter: clamp(20px, 4vw, 56px);

  /* ---------- Type scale (fluid, clamp-based) ---------- */
  --t-display: clamp(56px, 10.5vw, 168px);  /* hero only */
  --t-h1:      clamp(40px, 6.4vw, 92px);    /* section H1 */
  --t-h2:      clamp(32px, 4.2vw, 60px);    /* section H2 */
  --t-h3:      clamp(20px, 1.6vw, 28px);    /* tile / card headings */
  --t-lede:    clamp(18px, 1.5vw, 22px);    /* lede paragraphs */
  --t-body:    17px;
  --t-eyebrow: 12px;
}

/* ============================================================
   RESET + BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--c-charcoal);
  background: var(--c-beige);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

::selection { background: var(--c-lime); color: var(--c-charcoal); }

/* ============================================================
   LAYOUT — Container
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ============================================================
   A11Y — Skip link
   ============================================================ */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--c-blue); color: var(--c-white);
  padding: 12px 16px; border-radius: 8px; z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */

/* Eyebrow — uppercase letter-spaced section label (signature brand device) */
.eyebrow {
  display: inline-block;
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-charcoal);
  margin-bottom: clamp(16px, 2vw, 32px);
}
.eyebrow-on-blue { color: var(--c-beige); opacity: 0.85; }

/* Headings */
.display-h {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: var(--t-h1);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--c-blue);
  margin-bottom: clamp(24px, 3vw, 40px);
}
.display-h-on-blue { color: var(--c-white); }

.section-h {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: var(--t-h2);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--c-blue);
  margin-bottom: clamp(24px, 3vw, 40px);
}

.lede {
  font-size: var(--t-lede);
  line-height: 1.5;
  color: var(--c-charcoal);
  max-width: 56ch;
}
.lede-on-blue { color: var(--c-beige); }

/* Key-word emphasis — the brand's signature underline-bar device.
   v1.1: switched from background-gradient to pseudo-element bar.
   The bar overlaps the lower ~30% of the letterforms (sits BEHIND the text
   via z-index) so it reads as an integrated highlight, not a smear underneath. */
.key-word {
  position: relative;
  display: inline-block;
  padding: 0 0.06em;
  isolation: isolate; /* establishes a stacking context so ::before stays under glyphs */
  --kw-color: var(--c-peach);
}
.key-word::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8%;
  height: 32%;
  background: var(--kw-color);
  z-index: -1;
  pointer-events: none;
}
.key-word-lime  { --kw-color: var(--c-lime); }
.key-word-rose  { --kw-color: var(--c-rose); }
.key-word-peach { --kw-color: var(--c-peach); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: transform 280ms var(--ease-out),
              background-color 200ms ease,
              color 200ms ease,
              box-shadow 280ms var(--ease-out);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--c-lime); outline-offset: 3px; }
.btn-lg { padding: 18px 28px; font-size: 16px; }
.btn-xl { padding: 22px 36px; font-size: 18px; }

.btn-primary {
  background: var(--c-blue);
  color: var(--c-white);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 8px 24px -12px rgba(54,84,194,0.5);
}
.btn-primary:hover {
  background: #2A45A8;
  box-shadow: 0 6px 30px -10px rgba(54,84,194,0.7);
}

.btn-light {
  background: var(--c-beige);
  color: var(--c-blue);
}
.btn-light:hover { background: var(--c-white); }

.btn-secondary {
  background: transparent;
  color: var(--c-charcoal);
  border: 1.5px solid rgba(0,18,32,0.18);
}
.btn-secondary:hover { background: var(--c-charcoal); color: var(--c-white); border-color: var(--c-charcoal); }

.btn-ghost {
  background: transparent;
  color: var(--c-blue);
  border: 1.5px solid var(--c-blue);
}
.btn-ghost:hover { background: var(--c-blue); color: var(--c-white); }

/* Ghost on blue — outlined white pill for use on Blue sections (final-cta etc.) */
.btn-ghost-light {
  background: transparent;
  color: var(--c-white);
  border: 1.5px solid rgba(255,255,255,0.55);
}
.btn-ghost-light:hover { background: var(--c-white); color: var(--c-blue); border-color: var(--c-white); }

.link-quiet {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-charcoal);
  padding: 8px 4px;
  transition: color 180ms;
}
.link-quiet:hover { color: var(--c-blue); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 15px;
  color: var(--c-blue);
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
  transition: gap 240ms var(--ease-out);
}
.link-arrow::after {
  content: '→';
  transition: transform 240ms var(--ease-out);
}
.link-arrow:hover { gap: 10px; }
.link-arrow:hover::after { transform: translateX(2px); }

/* ============================================================
   COMPONENT — Site nav (reusable across pages)
   Usage:
     <header class="site-nav">
       <div class="nav-inner">
         <a class="brand" href="/"><img class="brand-logo" src="/assets/marque-logo.svg" alt="Marque"></a>
         <nav class="nav-links">...</nav>
         <div class="nav-cta">...</div>
       </div>
     </header>
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-beige);
  border-bottom: 1px solid rgba(0, 18, 32, 0.06);
  transition: background-color 280ms var(--ease-out), color 280ms var(--ease-out), border-color 280ms var(--ease-out);
}
/* Dark theme — applied by JS when nav is over a .section-blue */
.site-nav.nav-on-blue {
  background: var(--c-blue);
  border-bottom-color: rgba(247, 237, 237, 0.18);
  color: var(--c-white);
}
.site-nav.nav-on-blue .nav-links a,
.site-nav.nav-on-blue .link-quiet,
.site-nav.nav-on-blue .icon-btn { color: var(--c-white); }
.site-nav.nav-on-blue .nav-links a::after { background: var(--c-lime); }
.site-nav.nav-on-blue .nav-links a:hover,
.site-nav.nav-on-blue .link-quiet:hover { color: var(--c-lime); }
.site-nav.nav-on-blue .icon-btn:hover { background: rgba(247, 237, 237, 0.12); }
.site-nav.nav-on-blue .btn-primary {
  background: var(--c-white);
  color: var(--c-blue);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08), 0 8px 24px -12px rgba(0,0,0,0.4);
}
.site-nav.nav-on-blue .btn-primary:hover { background: var(--c-beige); color: var(--c-blue); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--gutter);
}
.brand { display: inline-flex; align-items: center; position: relative; }
.brand-logo {
  height: 32px;
  width: auto;
  display: block;
  transition: opacity 280ms var(--ease-out, ease);
}
@media (min-width: 900px) {
  .brand-logo { height: 36px; }
}
/* Stack the two nav-logo variants and crossfade based on nav theme. */
.site-nav .brand-logo--light {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
}
.site-nav.nav-on-blue .brand-logo--dark { opacity: 0; }
.site-nav.nav-on-blue .brand-logo--light { opacity: 1; }

.nav-links {
  display: none;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  position: relative;
  padding: 6px 2px;
  color: var(--c-charcoal);
  transition: color 200ms;
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--c-blue);
  transform: scaleX(0); transform-origin: left;
  transition: transform 280ms var(--ease-out);
}
.nav-links a:hover { color: var(--c-blue); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta .link-quiet { display: none; }
.nav-cta .btn { padding: 10px 18px; font-size: 14px; display: none; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  color: var(--c-charcoal);
  transition: background 200ms, color 200ms;
  position: relative;
}
.icon-btn:hover { background: rgba(0,18,32,0.06); }
.cart-count {
  position: absolute; top: 4px; right: 4px;
  width: 16px; height: 16px; border-radius: 999px;
  background: var(--c-rose); color: var(--c-white);
  font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.menu-btn { display: inline-flex; }

@media (min-width: 900px) {
  .nav-links { display: inline-flex; }
  .nav-cta .link-quiet { display: inline-flex; }
  .nav-cta .btn { display: inline-flex; }
  .menu-btn { display: none; }
}
@media (max-width: 899px) {
  .nav-links {
    position: fixed;
    inset: 64px 0 auto 0;
    background: var(--c-beige);
    border-bottom: 1px solid rgba(0,18,32,0.08);
    padding: 24px var(--gutter) 32px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 22px;
    font-weight: 700;
    transform: translateY(-100%);
    transition: transform 360ms var(--ease-out);
    pointer-events: none;
  }
  .nav-links.is-open {
    display: flex;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid rgba(0,18,32,0.08); }
  .nav-links a:last-child { border-bottom: 0; }
}

/* ============================================================
   COMPONENT — Site footer (reusable across pages)
   ============================================================ */
.site-footer {
  background: var(--c-beige);
  padding: clamp(64px, 8vw, 112px) 0 32px;
  border-top: 1px solid rgba(0,18,32,0.06);
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 5vw, 80px);
  margin-bottom: 64px;
}
@media (min-width: 900px) { .footer-top { grid-template-columns: 1fr 2fr; } }

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.footer-brand .brand-logo { height: 44px; width: auto; margin-left: -2px; }
.footer-tagline {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--c-charcoal);
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (min-width: 700px) { .footer-cols { grid-template-columns: repeat(4, 1fr); } }

.footer-col h4 {
  font-family: var(--f-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-blue);
  margin-bottom: 18px;
}
.footer-col ul {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-col a {
  font-size: 14px;
  color: var(--c-charcoal);
  transition: color 180ms;
}
.footer-col a:hover { color: var(--c-blue); }

/* Massive logo band — homepage feature, but usable as a footer device on any page */
.footer-mega {
  margin: 24px 0;
  overflow: hidden;
  border-block: 1.5px solid var(--c-charcoal);
  padding-block: clamp(16px, 2vw, 32px);
}
.footer-mega-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(80px, 22vw, 320px);
  object-fit: contain;
  object-position: left center;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  font-size: 13px;
  color: var(--c-charcoal);
  opacity: 0.7;
}
.footer-bottom strong { font-weight: 600; }

/* ============================================================
   COMPONENT — Shape primitives (the brand's signature device)
   Three primitives on a 1×1 grid. Use generously across pages.

   Usage:
     <span class="shape shape-circle"   style="--shape-color: var(--c-rose);   width: 120px;"></span>
     <span class="shape shape-square"   style="--shape-color: var(--c-lime);   width: 120px;"></span>
     <span class="shape shape-qc-tl"    style="--shape-color: var(--c-peach);  width: 120px;"></span>  (arc top-left)
     <span class="shape shape-qc-tr"    style="--shape-color: var(--c-peach);  width: 120px;"></span>
     <span class="shape shape-qc-bl"    style="--shape-color: var(--c-peach);  width: 120px;"></span>
     <span class="shape shape-qc-br"    style="--shape-color: var(--c-peach);  width: 120px;"></span>

   Each must be sized via inline width OR a wrapper width; aspect is 1:1.
   Add class .shape-multiply for compositions where overlap should darken.
   ============================================================ */
.shape {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--shape-color, var(--c-peach));
}
.shape-circle  { border-radius: 999px; }
.shape-square  { border-radius: 0; }
/* Quarter-circles: arc corner names the location of the curved corner */
.shape-qc-tl   { border-radius: 100% 0 0 0; }
.shape-qc-tr   { border-radius: 0 100% 0 0; }
.shape-qc-br   { border-radius: 0 0 100% 0; }
.shape-qc-bl   { border-radius: 0 0 0 100%; }
.shape-multiply { mix-blend-mode: multiply; }

/* ============================================================
   REVEAL ANIMATIONS
   Default = visible (no-JS friendly).
   JS adds .js-reveal-ready to <html>, then hides reveal items
   until they enter the viewport.
   ============================================================ */
.js-reveal-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}
.js-reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
}
