/* ============================================================
   Solaisoft Cafe Templates - base.css
   ------------------------------------------------------------
   The shared FOUNDATION for every template. Loads first.

   It defines:
     1. The TOKEN CONTRACT  - every variable a theme may set,
        with sensible neutral defaults so a theme only has to
        override what makes it distinct.
     2. Element resets / typographic defaults.
     3. Identity primitives (.eyebrow, .rule, .skip-link).

   Load order in every page:
     base.css  ->  themes/<name>.css  ->  shared/sections.css

   A theme is JUST a :root override of the tokens below plus a
   handful of .theme-<name> structural tweaks. Nothing in here
   or in sections.css references a brand-specific variable, so
   one fix propagates to every client on every template.
   ============================================================ */

:root {
  /* -------- Colour: surfaces ------------------------------- */
  --bg:        #F7F2E7;   /* page background                   */
  --bg-2:      #EFE6D6;   /* alternating section background     */
  --surface:   #FBF8F0;   /* cards / elevated panels            */

  /* -------- Colour: text ----------------------------------- */
  --fg:            #20262E;            /* primary body text     */
  --fg-muted:      #586471;            /* secondary / captions  */
  --heading-color: var(--fg);         /* headings (themes tune)*/

  /* -------- Colour: accent --------------------------------- */
  --accent:        #1C3D5A;   /* brand primary - fills, rules   */
  --accent-bright: #2E5E86;   /* links, accents on light/dark   */
  --accent-hover:  #14304A;   /* active / hover                 */
  --accent-2:      #E8B23A;   /* secondary pop - badges, dots   */
  --on-accent:     #F7F2E7;   /* text/icons sitting on accent   */

  /* -------- Colour: lines ---------------------------------- */
  --hairline:   rgba(28, 61, 90, 0.14);
  --hairline-2: rgba(28, 61, 90, 0.26);

  /* -------- Hero ------------------------------------------- */
  --hero-ink:     var(--on-accent);   /* text colour in hero    */
  --hero-min-h:   94vh;
  --hero-overlay:
    radial-gradient(120% 95% at 50% 40%, rgba(20,38,46,0.30) 0%, rgba(18,30,42,0.62) 68%, rgba(16,28,40,0.86) 100%),
    linear-gradient(180deg, rgba(20,42,60,0.50) 0%, rgba(20,42,60,0.40) 40%, rgba(16,28,40,0.88) 100%);

  /* -------- Footer ----------------------------------------- */
  --footer-bg:     var(--accent-hover);
  --footer-fg:     rgba(247, 242, 231, 0.82);  /* body text       */
  --footer-strong: var(--on-accent);           /* wordmark/strong */
  --footer-head:   #9DC0DD;                     /* small labels    */

  /* -------- Type: families --------------------------------- */
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body:    system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* -------- Type: scale ------------------------------------ */
  --fs-hero:    clamp(2.6rem, 6vw + 1rem, 5rem);
  --fs-h1:      clamp(2.25rem, 3vw + 1rem, 3.5rem);
  --fs-h2:      clamp(1.75rem, 1.8vw + 1rem, 2.5rem);
  --fs-h3:      1.3rem;
  --fs-lede:    clamp(1.15rem, 0.6vw + 1rem, 1.45rem);
  --fs-body:    1.0625rem;
  --fs-small:   0.9375rem;
  --fs-micro:   0.8125rem;
  --fs-tagline: 0.75rem;

  --lh-tight:   1.1;
  --lh-snug:    1.25;
  --lh-normal:  1.6;
  --lh-relaxed: 1.75;

  /* -------- Type: personality knobs (themes tune) ---------- */
  --heading-weight:    600;
  --heading-tracking: -0.01em;
  --eyebrow-tracking:  0.28em;
  --eyebrow-transform: uppercase;

  /* -------- Spacing ---------------------------------------- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  3rem;
  --space-8:  4rem;
  --space-9:  6rem;
  --space-10: 8rem;

  --section-pad: var(--space-9);   /* vertical section rhythm  */

  /* -------- Layout ----------------------------------------- */
  --container-max:    72rem;
  --container-narrow: 54rem;
  --gutter:           clamp(1.25rem, 4vw, 2.5rem);

  --radius-0:    0;
  --radius-1:    4px;
  --radius-2:    10px;
  --radius-3:    18px;
  --radius-pill: 999px;
  --radius-btn:  var(--radius-pill);   /* button corners - themes tune to their own corner language */

  --shadow-1: 0 1px 2px rgba(20, 48, 74, 0.06), 0 4px 14px rgba(20, 48, 74, 0.07);
  --shadow-2: 0 10px 36px rgba(20, 48, 74, 0.13);

  /* -------- Motion ----------------------------------------- */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:    150ms;
  --dur-base:    300ms;
  --dur-slow:    560ms;

  /* -------- Identity --------------------------------------- */
  --rule-width:  52px;
  --rule-height: 2px;
  --rule-color:  var(--accent-2);
}

/* ============================================================
   Element defaults
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  font-weight: 400;
  color: var(--fg);
  background: var(--bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--heading-weight);
  color: var(--heading-color);
  margin: 0;
  line-height: var(--lh-tight);
  letter-spacing: var(--heading-tracking);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: var(--heading-weight); }

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}

img { display: block; max-width: 100%; height: auto; }

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* ============================================================
   Identity primitives (theme-agnostic)
   ============================================================ */

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-tagline);
  letter-spacing: var(--eyebrow-tracking);
  text-transform: var(--eyebrow-transform);
  color: var(--accent-bright);
}

.rule {
  display: block;
  width: var(--rule-width);
  height: var(--rule-height);
  background: var(--rule-color);
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: var(--space-3) var(--space-4);
  font-weight: 700;
  z-index: 100;
  border-radius: 0 0 var(--radius-1) 0;
}
.skip-link:focus { left: var(--space-3); top: var(--space-3); }
