/* ============================================================================
   DESIGN TOKENS — Υδραυλικός Ζουμπούλης Γιάννης
   Three layers, in order. Component CSS may reference SEMANTIC tokens only.
   Never write a raw hex value in style.css.
   ========================================================================= */

:root {
  /* ---------------------------------------------------------------------
     LAYER 1 — PRIMITIVES.  Raw material. No meaning attached.
     --------------------------------------------------------------------- */
  --c-ink-900:      #101316;
  --c-ink-800:      #14171a;
  --c-ink-700:      #22282d;
  --c-ink-500:      #3d4348;
  --c-ink-300:      #565c62;   /* measured 4.5:1+ on all three paper grounds */

  --c-paper-000:    #fffdf8;
  --c-paper-100:    #ece7da;   /* ground, pulled down so raised cards read as raised */
  --c-paper-200:    #e7e1d3;   /* sunken bands; kept light enough for 4.5:1 text */
  --c-paper-300:    #cdc4b1;   /* hairline */
  --c-paper-400:    #bfb49c;   /* card edge — a full step darker than the hairline */

  /* Copper, measured rather than picked: #b4622d (the value in the brief) read
     4.44:1 for white-on-copper and 3.98:1 for copper-on-paper — both under 4.5.
     #a1521f clears 4.5:1 in every direction it is used and is still copper. */
  --c-copper-600:   #7a3c13;
  --c-copper-500:   #954a19;   /* re-measured after the ground was darkened */
  --c-copper-400:   #d98a4f;
  --c-copper-100:   #f0dccc;

  --c-brass-500:    #c9a227;
  --c-water-600:    #2e6c7e;

  --c-white:        #ffffff;

  /* Type primitives */
  --f-display: 'Literata', Georgia, 'Times New Roman', serif;
  --f-body:    'Commissioner', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Spatial primitives — 8px base, doubling scale */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px;  --s-6: 32px;  --s-7: 48px;  --s-8: 64px;
  --s-9: 96px;  --s-10: 128px; --s-11: 160px;

  /* Elevation primitives — warm-toned, never neutral grey: a grey shadow on a
     warm paper ground reads as dirt rather than depth.
     Each level is layered: a tight CONTACT shadow that anchors the card to the
     page, a MID shadow that gives it thickness, and a broad AMBIENT one that
     makes it float. A single blurred shadow reads as blur; three read as height. */
  --e-1:
    0 1px 2px   rgba(38, 28, 16, .07),
    0 3px 8px  -3px rgba(38, 28, 16, .13);
  --e-2:
    0 1px 2px   rgba(38, 28, 16, .08),
    0 6px 12px -4px rgba(38, 28, 16, .14),
    0 18px 34px -12px rgba(38, 28, 16, .22);
  --e-3:
    0 2px 4px   rgba(38, 28, 16, .09),
    0 12px 22px -8px rgba(38, 28, 16, .18),
    0 34px 62px -22px rgba(38, 28, 16, .32);
  --e-4:
    0 3px 6px   rgba(38, 28, 16, .10),
    0 18px 32px -10px rgba(38, 28, 16, .22),
    0 48px 84px -28px rgba(38, 28, 16, .38);

  /* Motion primitives */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io:  cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur-base: 260ms;
  --dur-slow: 620ms;

  /* ---------------------------------------------------------------------
     LAYER 2 — SEMANTIC.  Per ground. Two grounds exist: paper and ink.
     --------------------------------------------------------------------- */
  --bg:              var(--c-paper-100);
  --bg-raised:       var(--c-paper-000);
  --bg-sunken:       var(--c-paper-200);
  --ink:             var(--c-ink-800);
  --ink-muted:       var(--c-ink-500);
  --ink-faint:       var(--c-ink-300);
  --line:            var(--c-paper-300);
  --accent:          var(--c-copper-500);
  --accent-hover:    var(--c-copper-600);
  --accent-bright:   var(--c-copper-400);
  --accent-wash:     var(--c-copper-100);
  --medal:           var(--c-brass-500);
  --cold:            var(--c-water-600);
  --on-accent:       var(--c-white);
  --card-edge:       var(--c-paper-400);
  --card-edge-hover: #b6926f;      /* copper-tinted, never lighter than resting */
  --elev-card:       var(--e-2);
  --elev-card-hi:    var(--e-3);
  --elev-card-lift:  var(--e-4);   /* the hover state */
  --lift-y:          -6px;

  /* Dark ground — applied by .ground-ink, which re-points the same names so
     component CSS never needs to know which ground it is sitting on. */

  /* ---------------------------------------------------------------------
     LAYER 3 — COMPONENT.
     --------------------------------------------------------------------- */
  --header-h:        92px;   /* desktop; drops to 68px at the touch breakpoint */
  --callbar-h:       0px;                 /* becomes 68px on touch widths */
  --shell-pad:       var(--s-8);
  --shell-max:       1360px;
  --section-pad-y:   var(--s-11);
  /* Left offset of the copper run. The jog now steps 22px sideways instead of
     16, so this moved in to keep the node (x + 22 + r) clear of the text
     column at the narrowest width the desktop layout reaches. */
  --pipe-x:          32px;
  --pipe-w:          2px;
  --node-r:          4.5px;
  /* Radii follow the same logic as the pipe run: copper is bent, not mitred,
     so nothing on the page has a true right-angled corner. --radius-card is
     roughly the bend radius of the run (8px) doubled, which is what reads as
     "radiused" at card scale rather than as a generic rounded box. */
  --radius-card:     16px;
  --radius-btn:      12px;
  --radius-chip:     10px;
  --btn-h:           58px;
  --focus-ring:      2px solid var(--accent);
}

.ground-ink {
  --bg:          var(--c-ink-800);
  --bg-raised:   var(--c-ink-700);
  --bg-sunken:   var(--c-ink-900);
  --ink:         var(--c-paper-100);
  --ink-muted:   #a7adb2;   /* 7.1:1 on --c-ink-800 */
  --ink-faint:   #959ba1;   /* 4.5:1+ on --c-ink-700, the raised dark card */
  /* Translucent light, not a near-black hairline: on the ink ground a dark rule
     is invisible, and this is what every ghost-button border and divider on a
     dark section draws with. */
  --line:        rgba(255, 253, 248, .20);
  --accent:      var(--c-copper-400);      /* lighter copper for dark ground */
  --accent-hover:#e8a069;
  --accent-wash: #2a1f17;
  --on-accent:   var(--c-ink-900);
  /* On a dark ground a warm shadow is invisible, so elevation is carried by a
     light top edge (the card catching the light) plus a black ambient shadow. */
  --card-edge:   #3a434a;
  --card-edge-hover: #5f4c39;
  --elev-card:
    inset 0 1px 0 rgba(255, 253, 248, .07),
    0 16px 30px -14px rgba(0, 0, 0, .75);
  --elev-card-hi:
    inset 0 1px 0 rgba(255, 253, 248, .10),
    0 26px 46px -18px rgba(0, 0, 0, .85);
  --elev-card-lift:
    inset 0 1px 0 rgba(255, 253, 248, .14),
    0 36px 64px -22px rgba(0, 0, 0, .9);
}
