/* =========================================================
   A2B Web Studio — design tokens (v0.3)
   The ONE place for colours, fonts, sizes and spacing.
   Change a value here and the whole site updates.
   Rule: pages use the ROLE tokens (section 2), never the
   raw colours (section 1) directly.
   ========================================================= */


/* ---------- 0. Fonts (self-hosted, SIL Open Font License) ----------
   Font files live in /assets/fonts/ on our own server (not loaded from Google).
   font-display: swap = show a fallback font instantly, then
   swap in the real font when it has loaded (keeps pages fast). */

@font-face {
  font-family: "DM Serif Display";
  src: url("/assets/fonts/dm-serif-display-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Serif Display";
  src: url("/assets/fonts/dm-serif-display-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans-variable.woff2") format("woff2");
  font-weight: 100 1000; /* variable font: one file, every weight */
  font-style: normal;
  font-display: swap;
}


:root {

  /* ---------- 1. Raw palette ("Ocean and bush") ---------- */
  --palette-mist:        #F4F6F3;  /* page background */
  --palette-white:       #FFFFFF;
  --palette-ink:         #14232B;  /* main text */
  --palette-slate:       #46535A;  /* secondary text */
  --palette-teal:        #0D6A74;  /* action */
  --palette-teal-dark:   #0A5961;  /* action on hover/press */
  --palette-ochre:       #8A6A3B;  /* accent */
  --palette-sand:        #E8DCC4;  /* soft accent fill */
  --palette-bark:        #5E4726;  /* text on sand */
  --palette-sage:        #CFD8D2;  /* borders, dividers */
  --palette-stone:       #75827D;  /* form field borders (4:1 on white) */
  --palette-clay:        #A33A2B;  /* errors (6.6:1 on white) */
  --palette-whatsapp:    #25D366;  /* WhatsApp's own green — do not change */


  /* ---------- 2. Colour roles (what pages actually use) ---------- */
  --colour-background:       var(--palette-mist);
  --colour-surface:          var(--palette-white);   /* cards, forms */
  --colour-text:             var(--palette-ink);
  --colour-text-muted:       var(--palette-slate);
  --colour-action:           var(--palette-teal);    /* main buttons */
  --colour-action-hover:     var(--palette-teal-dark);
  --colour-on-action:        var(--palette-white);   /* text on buttons */
  --colour-link:             var(--palette-teal);
  --colour-accent:           var(--palette-ochre);   /* small details only */
  --colour-tag:              var(--palette-sand);
  --colour-on-tag:           var(--palette-bark);
  --colour-border:           var(--palette-sage);
  --colour-focus:            var(--palette-teal);    /* keyboard focus ring */
  --colour-whatsapp:         var(--palette-whatsapp);
  --colour-on-whatsapp:      var(--palette-ink);     /* white text fails contrast on this green */
  --colour-on-image:         var(--palette-white);   /* text placed over photos */
  --colour-image-shade:      20 35 43;               /* ink as R G B, for the dark fade over photos */
  --colour-input-border:     var(--palette-stone);   /* form fields: must stay 3:1+ against white */
  --colour-error:            var(--palette-clay);    /* error messages and borders */


  /* ---------- 3. Typography ---------- */
  --font-heading: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body:    "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* Sizes grow smoothly from phone to desktop.
     clamp(smallest, preferred, largest) */
  --text-small:  0.875rem;                          /* 14px */
  --text-body:   1rem;                              /* 16px */
  --text-lead:   clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --text-h3:     clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --text-h2:     clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --text-h1:     clamp(2.25rem, 1.6rem + 3vw, 4rem);

  --line-height-body:    1.6;
  --line-height-heading: 1.1;
  --weight-body:   400;
  --weight-strong: 500;
  --reading-width: 68ch;   /* max line length for comfortable reading */


  /* ---------- 4. Spacing (one scale, used everywhere) ---------- */
  --space-1: 0.25rem;  /*  4px */
  --space-2: 0.5rem;   /*  8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.5rem;   /* 24px */
  --space-6: 2rem;     /* 32px */
  --space-7: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-9: 6rem;     /* 96px */


  /* ---------- 5. Shape and layout ---------- */
  --radius-small:  8px;    /* buttons, inputs */
  --radius-large:  12px;   /* cards, images */
  --radius-pill:   999px;  /* tags */
  --page-max-width: 1200px;
  --tap-target-min: 44px;  /* minimum button height for fingers */


  /* ---------- 6. Images ---------- */
  --ratio-hero: 16 / 9;
  --ratio-card: 4 / 3;


  /* ---------- 7. Motion (Design settings: still / gentle / lively) ----------
     These lines are WRITTEN by builder/apply_design.py from the approved Motion
     level - change the level in the console, not here. Visitors whose device
     asks for reduced motion always get none (base.css). */
  --motion-level:      lively;  /* which level is live (read by the console) */
  --motion-fade-from:  0;       /* sections fade in from this opacity as you scroll (1 = no fade) */
  --motion-rise:       32px;    /* ...and rise this far */
  --motion-hero-zoom:  1.14;    /* slow zoom of the top photo (1 = still) */
  --motion-item-from:  0;       /* cards arriving one after another: start opacity (1 = off) */
  --motion-item-rise:  24px;     /* ...and how far each card rises */
  --motion-lift:       -4px;     /* card photo lifts on hover */
  --motion-photo-zoom: 1.07;    /* card photo zooms on hover (1 = still) */
}
