/* ==========================================================================
   BASE — design tokens, reset, typography, layout, buttons.
   Loaded on every page, first.
   --------------------------------------------------------------------------
   TO REBRAND THE WHOLE SITE: change the values in :root below. Nothing else
   in the project hard-codes a colour, font or radius.
   ========================================================================== */

:root {
  /* ---- 1. BRAND COLOURS ----
     Sampled straight out of the Slush Candy logo: the wordmark red, and the
     four rainbow bands off the cup. Change these first for a new client.    */
  --brand:        #C0352A;   /* wordmark red — buttons, links, accents      */
  --brand-dark:   #93251C;   /* hover state — a bit darker than --brand      */
  --accent:       #F0712D;   /* rainbow orange: badges, gradients            */
  --accent-2:     #3D8FD6;   /* rainbow blue: blobs, highlights              */
  --accent-3:     #34A544;   /* rainbow green: ticks, success                */
  --highlight:    #FBC02D;   /* rainbow yellow: stickers, marker underline   */

  /* ---- 2. NEUTRALS ---- */
  --ink:          #241F1E;   /* main text colour, and the footer background  */
  --ink-soft:     #6B605C;   /* muted paragraphs                             */
  --cream:        #FFF8F3;   /* page background                              */
  --surface:      #FFFFFF;   /* cards                                        */
  --line:         #F1E3DC;   /* borders                                      */

  /* ---- 3. FONTS ---- */
  --font-display: "Fraunces", Georgia, serif;        /* headings             */
  --font-body:    "Outfit", system-ui, sans-serif;   /* everything else      */

  /* ---- 4. SHAPE & DEPTH ---- */
  --radius:      22px;
  --radius-lg:   34px;
  --radius-pill: 999px;
  --shadow:      0 10px 30px -12px rgba(43, 27, 46, .18);
  --shadow-lg:   0 30px 60px -24px rgba(43, 27, 46, .30);
  --ring:        0 0 0 4px rgba(255, 61, 119, .22);

  /* ---- 5. SPACING & WIDTHS ----
     Four widths, not one. Alternating them down a page is what stops a site
     looking like a template — see the .container modifiers further down.   */
  --gap:       24px;
  --section-y: clamp(64px, 9vw, 128px);
  --container:        1200px;   /* default                                  */
  --container-narrow:  760px;   /* long text, FAQs, a lead quote            */
  --container-mid:     980px;   /* editorial lists, forms                   */
  --container-wide:   1360px;   /* galleries, product grids, big imagery    */
  --header-h:  96px;   /* starting guess — base.js replaces it with the measured height */
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Set while the mobile menu or lightbox is open */
body.is-locked { overflow: hidden; }

img, svg, iframe { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

button { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 .4em;
  color: var(--ink);
}

h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

/* ── Widths ───────────────────────────────────────────────────────────────
   Mix these down a page. A good rhythm is wide → narrow → default → bleed,
   rather than the same box eight times.

     <div class="container">                 1200px — the default
     <div class="container container--narrow">  760px — text you want read
     <div class="container container--mid">     980px
     <div class="container container--wide">   1420px — imagery, grids
     <div class="container container--flush">  no max width, edge padding only
   ────────────────────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.container--narrow { max-width: var(--container-narrow); }
.container--mid    { max-width: var(--container-mid); }
.container--wide   { max-width: var(--container-wide); }
.container--flush  { max-width: none; padding-inline: clamp(24px, 4vw, 64px); }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(40px, 5vw, 72px); }
.section--flush { padding-block: 0; }               /* when a bleed image handles the spacing */
.section--top   { padding-bottom: 0; }
.section--bottom{ padding-top: 0; }

/* A hairline rule instead of a box — used to separate de-carded sections */
.section--ruled { border-top: 1px solid var(--line); }
.section--white { background: #fff; }
.section--cream { background: var(--cream); }
.section--ink   { background: var(--ink); color: #fff; }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink p { color: rgba(255,255,255,.72); }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.center { text-align: center; }
.narrow { max-width: 680px; margin-inline: auto; }
.stack > * + * { margin-top: 18px; }

/* Section intro block. Default is centred; --left reads more editorial and
   is worth using on at least half the sections so the page isn't all one axis. */
.section-head { max-width: 720px; margin: 0 auto clamp(36px, 5vw, 64px); text-align: center; }
.section-head p { font-size: 1.06rem; }
.section-head--left { margin-inline: 0; text-align: left; max-width: 620px; }

/* Heading on the left, intro paragraph on the right — a wide, magazine-ish
   alternative to the centred block. Stacks on narrow screens. */
.section-head--spread {
  max-width: none; text-align: left;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 64px);
  align-items: end;
}
.section-head--spread > div:last-child { padding-bottom: .4em; }
@media (max-width: 860px) {
  .section-head--spread { grid-template-columns: 1fr; gap: 8px; }
  .section-head--spread > div:last-child { padding-bottom: 0; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  padding: 8px 16px; border-radius: var(--radius-pill);
  margin-bottom: 18px;
}
.section--ink .eyebrow { color: var(--highlight); background: rgba(255,255,255,.1); }

/* Text effects: <span class="mark">word</span> / <span class="grad">word</span> */
.mark {
  background: linear-gradient(transparent 58%, var(--highlight) 58%, var(--highlight) 92%, transparent 92%);
  padding-inline: 2px;
}
.grad {
  background: linear-gradient(100deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 700;
  padding: 15px 30px; border-radius: var(--radius-pill);
  border: 2px solid transparent; cursor: pointer; white-space: nowrap;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn:hover  { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }
.btn[disabled] { opacity: .6; pointer-events: none; }

.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 12px 24px -10px var(--brand); }
.btn--primary:hover { background: var(--brand-dark); color: #fff; box-shadow: 0 18px 30px -10px var(--brand); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

.btn--light { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.btn--light:hover { color: var(--brand); }

.btn--wa { background: #25D366; color: #fff; box-shadow: 0 12px 24px -10px #25D366; }
.btn--wa:hover { background: #1EB855; color: #fff; }

.btn--sm { padding: 11px 22px; font-size: .92rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-row--center { justify-content: center; }

/* ==========================================================================
   SCROLL REVEAL
   --------------------------------------------------------------------------
   Note the `.js` prefix. That class is added to <html> by a one-line inline
   script in the <head> of every page. It means elements are only hidden once
   we know JavaScript is actually running — if a script ever fails, the page
   stays readable instead of going blank.
   ========================================================================== */

.js [data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
}

/* ==========================================================================
   MOTION & PRINT
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .header, .marquee, .float-wa, .lightbox, .btn { display: none !important; }
  body { background: #fff; }
}
