/* ==========================================================================
   Aidan O'Driscoll Music — Direction C "the lamp-lit diorama"
   --------------------------------------------------------------------------
   Mockup token file. Names follow the project's theme.json-compatible
   convention (--color-*, --space-*, --font-*, --duration-*, --easing-*,
   --motion-*) so the chosen direction ports into the WordPress block theme
   as custom settings plus a tokens.css file.

   The scene: a pub corner at night, lit by one warm lamp. Every surface is
   a material — night ink, lamp amber, ledger paper, kraft, poster red.
   One light source (top, slightly left of the standee): every shadow and
   highlight in the page agrees with it.

   Dark palette is the direction's natural home (the room at night).
   Light palette is the same materials in daylight.

   WCAG evidence (recomputed in the review pass — numbers there):
     dark   text        #f2ead8 on #161b21        ~12.6:1
     dark   secondary   #c9c4b4 on #161b21         ~8.9:1
     dark   tertiary    #9a9483 on #161b21         ~5.5:1
     dark   ink on paper #22262e on #f7f1e2       ~13.8:1
     dark   link (paper) #8c2a1e on #f7f1e2        ~7.4:1
     light  ink         #2b2e26 on #ddd6c6        ~10.2:1
     light  secondary   #565142 on #ddd6c6         ~5.6:1
     light  link        #8c2a1e on #f8f3e7         ~7.3:1
   Text never sits on photography; it sits on paper, which is the treatment.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* ---- the room ---- */
  --color-bg-primary: #161b21;         /* night ink */
  --color-bg-secondary: #1a212a;       /* upper room */
  --color-bg-tertiary: #10151b;       /* floor shadow side */
  --color-bg-inverse: #f7f1e2;

  /* ---- materials ---- */
  --color-surface-paper: #f7f1e2;      /* ledger sheets, the mount */
  --color-surface-paper-dim: #efe7d2;
  --color-surface-kraft: #c8a06a;      /* cutout faces */
  --color-surface-kraft-deep: #a37b48;
  --color-accent-primary: #c22f21;     /* poster red — marks, gig chips, stamps */
  --color-accent-night: #e8b04b;       /* lamp amber — glow, warm accents on night */

  /* ---- text ---- */
  --color-text-primary: #f2ead8;       /* on the night */
  --color-text-secondary: #c9c4b4;
  --color-text-tertiary: #9a9483;
  --color-text-on-paper: #22262e;      /* ink on the sheets */
  --color-text-on-paper-secondary: #55503f;
  --color-text-link: #8c2a1e;          /* links on paper */
  --color-text-link-night: #e9b55c;    /* links on the night */
  --color-text-on-accent: #f9f2e3;    /* on poster red */
  --color-border-primary: #8a6b45;
  --color-border-secondary: #3a4450;  /* night hairlines */
  --color-border-paper: #d8cdb4;       /* paper hairlines (rules on sheets) */
  --color-border-focus: #e9b55c;
  --color-surface-overlay: rgba(8, 11, 15, 0.6);

  /* ---- props ---- */
  --prop-silhouette: #20242c;         /* the cut-paper figure */
  --prop-shadow: rgba(5, 8, 12, 0.55);
  --prop-shadow-soft: rgba(5, 8, 12, 0.34);
  --prop-glow: rgba(232, 176, 75, 0.20);

  /* ---- spacing (4px base) ---- */
  --space-base: 4px;
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 8px;
  --space-4: 12px;
  --space-5: 16px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;
  --space-9: 64px;
  --space-10: 96px;

  /* ---- type ---- */
  --font-family-display: "Alfa Slab One", "Rockwell", Georgia, serif;
  --font-family-body: "Karla", "Segoe UI", system-ui, sans-serif;
  --font-family-hand: "Caveat", "Segoe Script", cursive;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.3rem;
  --font-size-xl: 1.6rem;
  --font-size-2xl: clamp(1.9rem, 1.4rem + 2vw, 2.9rem);
  --font-size-3xl: clamp(2.4rem, 1.6rem + 4vw, 4.4rem);
  --font-weight-normal: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.08;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.74;

  /* ---- layout ---- */
  --max-width-content: 64ch;
  --max-width-wide: 74rem;
  --layout-gutter: clamp(1rem, 3.2vw, 2.4rem);
  --layout-radius-sm: 6px;
  --layout-radius-md: 12px;
  --layout-radius-lg: 16px;
  --layout-radius-sheet: 14px;
  --layout-shadow-hard: 9px 11px 0 var(--prop-shadow);
  --layout-shadow-soft: 5px 6px 0 var(--prop-shadow-soft);

  /* ---- motion ---- */
  --duration-fast: 150ms;
  --duration-normal: 240ms;
  --duration-slow: 420ms;
  --duration-sheet: 500ms;
  --duration-entrance: 750ms;
  --easing-default: cubic-bezier(0.22, 0.8, 0.2, 1);
  --easing-out: cubic-bezier(0.05, 0.6, 0.2, 1);
  --easing-settle: cubic-bezier(0.18, 0.89, 0.32, 1.12);   /* paper lands with a tiny overshoot */
  --easing-spring: cubic-bezier(0.3, 1.45, 0.42, 1);
  --motion-breeze-duration: 9s;
  --motion-breeze-lift: 3px;
  --motion-hover-lift: 8px;
  --motion-panel-offset: 20px;

  /* ---- breakpoints (documented; media queries cannot read custom props) ---- */
  --breakpoint-sm: 375px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1080px;
}

/* ---- daylight paper-box: the same materials with the lamp off ---- */
:root[data-theme="light"] {
  color-scheme: light;
  --color-bg-primary: #ddd6c6;
  --color-bg-secondary: #e6e0d1;
  --color-bg-tertiary: #ccc3ae;
  --color-bg-inverse: #22262e;
  --color-surface-paper: #f8f3e7;
  --color-surface-paper-dim: #efe8d8;
  --color-surface-kraft: #c8a06a;
  --color-surface-kraft-deep: #a37b48;
  --color-accent-primary: #b32b1e;
  --color-accent-night: #8a6a1f;
  --color-text-primary: #2b2e26;
  --color-text-secondary: #565142;
  --color-text-tertiary: #6e6753;
  --color-text-on-paper: #22262e;
  --color-text-on-paper-secondary: #55503f;
  --color-text-link: #8c2a1e;
  --color-text-link-night: #8c2a1e;
  --color-text-on-accent: #f9f2e3;
  --color-border-primary: #8a6b45;
  --color-border-secondary: #c9bfa8;
  --color-border-paper: #d9d0ba;
  --color-border-focus: #8c2a1e;
  --color-surface-overlay: rgba(58, 50, 34, 0.4);
  --prop-silhouette: #22262e;
  --prop-shadow: rgba(88, 74, 46, 0.30);
  --prop-shadow-soft: rgba(88, 74, 46, 0.18);
  --prop-glow: rgba(176, 148, 84, 0.14);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --color-bg-primary: #ddd6c6;
    --color-bg-secondary: #e6e0d1;
    --color-bg-tertiary: #ccc3ae;
    --color-bg-inverse: #22262e;
    --color-surface-paper: #f8f3e7;
    --color-surface-paper-dim: #efe8d8;
    --color-surface-kraft: #c8a06a;
    --color-surface-kraft-deep: #a37b48;
    --color-accent-primary: #b32b1e;
    --color-accent-night: #8a6a1f;
    --color-text-primary: #2b2e26;
    --color-text-secondary: #565142;
    --color-text-tertiary: #6e6753;
    --color-text-on-paper: #22262e;
    --color-text-on-paper-secondary: #55503f;
    --color-text-link: #8c2a1e;
    --color-text-link-night: #8c2a1e;
    --color-text-on-accent: #f9f2e3;
    --color-border-primary: #8a6b45;
    --color-border-secondary: #c9bfa8;
    --color-border-paper: #d9d0ba;
    --color-border-focus: #8c2a1e;
    --color-surface-overlay: rgba(58, 50, 34, 0.4);
    --prop-silhouette: #22262e;
    --prop-shadow: rgba(88, 74, 46, 0.30);
    --prop-shadow-soft: rgba(88, 74, 46, 0.18);
    --prop-glow: rgba(176, 148, 84, 0.14);
  }
}

/* manual dark override for screenshots: ?theme=dark */
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg-primary: #161b21;
  --color-bg-secondary: #1a212a;
  --color-bg-tertiary: #10151b;
  --color-bg-inverse: #f7f1e2;
  --color-surface-paper: #f7f1e2;
  --color-surface-paper-dim: #efe7d2;
  --color-surface-kraft: #c8a06a;
  --color-surface-kraft-deep: #a37b48;
  --color-accent-primary: #c22f21;
  --color-accent-night: #e8b04b;
  --color-text-primary: #f2ead8;
  --color-text-secondary: #c9c4b4;
  --color-text-tertiary: #9a9483;
  --color-text-on-paper: #22262e;
  --color-text-on-paper-secondary: #55503f;
  --color-text-link: #8c2a1e;
  --color-text-link-night: #e9b55c;
  --color-text-on-accent: #f9f2e3;
  --color-border-primary: #8a6b45;
  --color-border-secondary: #3a4450;
  --color-border-paper: #d8cdb4;
  --color-border-focus: #e9b55c;
  --color-surface-overlay: rgba(8, 11, 15, 0.6);
  --prop-silhouette: #20242c;
  --prop-shadow: rgba(5, 8, 12, 0.55);
  --prop-shadow-soft: rgba(5, 8, 12, 0.34);
  --prop-glow: rgba(232, 176, 75, 0.20);
}
