/* Design tokens: Eldbjørg Hemsing site.
   Every colour, font, type size and spacing value on the site comes from here;
   no hex values in markup. Documented in DESIGN-TOKENS.md. */

:root {
  color-scheme: light;

  /* Colour: page (.base) */
  --bg:  #FAF9F7;              /* page background */
  --fg:  #000228;              /* text, outlined + solid buttons, rules: the one navy in light mode */
  --mu:  #4E5174;              /* muted text: captions, labels, dates */
  --ru:  rgba(0, 2, 40, .2);   /* hairline rules on the page */

  /* Colour: featured bands (.feat: next-performance strip, Recordings, Featured video, footer) */
  --fbg: #000228;              /* band background */
  --ffg: #FAF9F7;              /* band text */
  --fmu: #A9ACC8;              /* band muted text */
  --fru: rgba(250, 249, 247, .24); /* band hairline rules */
  --acc: #4783D7;              /* small caps labels on bands ("Next performance", "Recent release") */
  --fbg-muted: #121749;        /* About › The instrument: a softer navy, so that band and the footer read as two */
  --fmu-muted: #B4B7D0;        /* muted text on that band */

  /* Colour: one-off */
  --release-red: #E3030F;      /* "BRUCH" title: taken from the album cover; used only for that title */

  /* Colour: fixed, both themes. Type and controls that sit on photos, and the white Colors of Bach panel */
  --on-photo: #FAF9F7;         /* light text and buttons on dark photos */
  --on-photo-muted: #A9ACC8;   /* small captions on dark photos */
  --on-light: #000228;         /* dark text on light photos, play and arrow icons */
  --on-light-muted: #4E5174;
  --on-light-rule: rgba(0, 2, 40, .2);
  --paper: #FFFFFF;            /* Colors of Bach section background (matches its photo) */
  --photo-bg: #000228;         /* shown behind a photo while it loads */
  --player-bg: #161010;        /* Bruch player card on Home: matches the photo behind it */
  --menu-bg: #000228;          /* phone menu panel */
  --menu-fg: #FAF9F7;
  --menu-ru: rgba(250, 249, 247, .2);
  --scrim: rgba(12, 13, 20, .55);
  --hero-shade: rgba(12, 13, 20, .38);  /* darkens the Concerts, Home, News and Projects photos so titles read */
  --focus-ring: var(--fg);

  /* Type */
  --font-serif: 'Libre Baskerville', Georgia, serif;   /* titles, quotes · weight 400 */
  --font-sans:  Almarai, system-ui, sans-serif;        /* body, labels, buttons · 300–800 */
  --text-body: 17px;           /* desktop body; phone 16px */
  --lh-body: 1.6;
  --text-cap: 13px;            /* CAPS LABEL; phone 12px */
  --tracking-cap: .14em;       /* CAPS LABEL letter spacing, Almarai 700 */
  --tracking-display: -.02em;  /* large serif titles */
  --text-btn: 15px;            /* buttons, Almarai 700 */

  /* Title sizes: fluid between the phone and desktop design sizes (SPEC A1.5) */
  --title-section:      clamp(2.5rem, 1.5rem + 3.75vw, 4.5rem);   /* "On stage", "Photos"… 40 → 72 px */
  --title-sub:          clamp(2rem, 1.5rem + 1.5vw, 2.5rem);      /* "Recent singles" 32 → 40 px */
  --title-page:         clamp(3.25rem, 1.6rem + 6.7vw, 7.5rem);   /* Concerts, Watch, Projects, News, Contact → 120 px */
  --title-hero-name:    clamp(3.75rem, 9.2vw - 1.3rem, 6.5rem);   /* home name → 104 px; stays clear of her */
  --title-about:        clamp(3rem, 9.5vw - 1.5rem, 7rem);        /* "Biography" → 112 px; stays in its column */
  --title-release:      clamp(6rem, 11.4vw, 10.5rem);             /* "BRUCH" on Home → 168 px */
  --title-release-hero: clamp(6rem, 14vw, 12.5rem);               /* "BRUCH" on Music → 200 px */
  --title-cob:          clamp(3.25rem, 2rem + 4vw, 5.5rem);       /* "Colors of Bach" → 88 px */
  --title-latest:       clamp(2rem, 1rem + 2.8vw, 3.5rem);        /* latest album heading → 56 px */
  --title-instrument:   clamp(1.625rem, 1rem + 1.7vw, 2.5rem);    /* "The instrument" 26 → 40 px */
  --title-project:      clamp(2rem, 1rem + 4.5vw, 4.5rem);          /* project page titles; long names fit at 320 px */

  /* Layout and spacing */
  --page-max: 1280px;          /* .in content width */
  --gutter: 80px;              /* .wrap side padding; phone 20px */
  --section-pad: 112px;        /* vertical padding of main sections; phone 64px */
  --section-top: 64px;         /* space above every section heading (1 Dec: one shorter value everywhere); phone 40px */
  --btn-height: 48px;
  --btn-pad: 26px;             /* phone 20px */
  --btn-border: 2px;
  --breakpoint-phone: 760px;   /* reference only: media queries can't read custom properties */
}

@media (max-width: 760px) {
  :root {
    --text-body: 16px;
    --text-cap: 12px;
    --gutter: 20px;
    --section-pad: 64px;
    --section-top: 40px;
    --btn-pad: 20px;
    --title-page: clamp(2.75rem, 13.3vw, 3.25rem);
    --title-hero-name: clamp(2.75rem, 13.3vw, 3.25rem);
    --title-about: clamp(2.75rem, 12.3vw, 3rem);
    --title-release: clamp(3.75rem, 18.5vw, 6rem);
    --title-release-hero: clamp(3.75rem, 19.5vw, 6rem);
  }
}

/* Dark theme. The inline <head> script sets data-theme from the device setting
   (prefers-color-scheme), or from a saved footer-toggle choice once there is one (SPEC A1.6). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:  #000228;
  --fg:  #FAF9F7;
  --mu:  #A9ACC8;
  --ru:  rgba(250, 249, 247, .22);
  --fbg: #121749;              /* featured bands, dark mode only */
  --ffg: #FAF9F7;
  --fmu: #B4B7D0;
  --fru: rgba(250, 249, 247, .26);
  --acc: #588EDB;              /* lighter blue so labels pass contrast on #121749 */
  --fbg-muted: #090C38;        /* between the dark page and the dark-mode bands, so The instrument and the footer still read as two */
  --fmu-muted: #B4B7D0;
}
