/* ============================================================
   IPELENG TAU / DESIGN SYSTEM
   "THE RIG"

   One world: a cream tolex combo amp, standing in a dark room.
   Fawn vinyl covering, a smooth cream control panel, gold piping
   and a dark stamped logo, oxblood grille cloth under a cream
   diamond lattice, cream corner caps and feet.

   This file is the single source of truth. Change a value here
   and it changes everywhere. Nothing below this file invents its
   own colour, size or spacing.
   ============================================================ */

/* The typeface is served from this site, never from a font CDN.
   A control lettered in the system sans is a defect, and a slow
   third party is not allowed to cause one. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('../fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
                 U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {

  /* --------------------------------------------------------
     1. MATERIALS
     Not "colours". Each token is a physical surface, and it is
     used only where that surface would actually be.
     -------------------------------------------------------- */

  /* The room. The amp is lit; the room around it is not. */
  --room:             #100E0C;
  --room-lift:        #1A1713;
  --room-deep:        #080706;

  /* Tolex: the fawn vinyl covering the cabinet. Pebbled grain. */
  --tolex:            #CDBC98;
  --tolex-hi:         #E0D2B2;
  --tolex-lo:         #A6947150;
  --tolex-shade:      #A39272;
  --tolex-edge:       #8A7A5C;

  /* Panel: the smooth cream vinyl strip the logo and the
     controls are mounted on. Lighter and flatter than tolex. */
  --panel:            #E7DEC6;
  --panel-hi:         #F4EEDD;
  --panel-deep:       #CFC4A8;

  /* Grille: oxblood cloth under a cream diamond lattice. */
  --grille:           #56201F;
  --grille-hi:        #732E2B;
  --grille-lo:        #2E100F;
  --lattice:          #CFC2A0;

  /* Gold: piping, switch caps, buttons. Hardware trim only,
     never a state, and never behind text. */
  --gold:             #B08A2C;
  --gold-hi:          #F0D98F;
  --gold-mid:         #D4B255;
  --gold-lo:          #6B5115;

  /* Cream hardware: corner caps, feet, handle. */
  --cap:              #DED3B6;
  --cap-hi:           #F0E8D2;
  --cap-lo:           #A99A78;

  /* Ink. On the panel and tolex, near black. On the room, cream. */
  --on-panel:         #241F17;   /* every size, clears 4.5:1 on --panel-deep */
  --on-panel-soft:    #4A4133;   /* large text only */
  /* The stamped logo. Solid, and dark enough to hold its own
     against the palest and the deepest part of the panel. */
  --badge-ink:        #241609;
  --ink:              #F0EADB;
  --ink-soft:         #B3AB99;
  --ink-faint:        #8E8674;
  --ink-dim:          #5C5648;   /* hairlines and hardware, never text */

  /* Jewel lamp: the pilot light. It means one thing, this is on. */
  --lamp:             #FF8A1F;
  --lamp-core:        #FFDDAE;
  --lamp-off:         #4A2E13;

  /* The one green lamp on the rig. A tuner has to say "in tune", and
     amber already means live, so this is built the same way as the
     amber lamp above and used nowhere else: the tuner's centre segment
     and string lamps, once locked. Flat and sharp stay amber. */
  --lamp-tuned:       #2AB556;
  --lamp-tuned-core:  #CDF3D8;

  /* Patch cable */
  --cable:            #B8382A;
  --cable-shade:      #6E1F17;

  /* Hardware */
  --screw:            #9A9080;
  --screw-slot:       #4A4438;
  --chassis:          #2A2620;
  --chassis-hi:       #464036;
  --chassis-lo:       #171410;


  /* --------------------------------------------------------
     2. ENAMEL
     Pedal enclosure colours, from real stompbox finishes, so
     the board reads as a collection of different boxes.
     Each is paired with the ink it is silkscreened in, light on
     the dark boxes and dark on the pale ones, which is both true
     to the object and what holds every label above 4.5:1.
     -------------------------------------------------------- */

  --enamel-1:  #B8452A;   --enamel-ink-1: #F8F1E2;   /* burnt orange */
  --enamel-2:  #1D5B57;   --enamel-ink-2: #F1EBDC;   /* deep teal    */
  --enamel-3:  #2A468C;   --enamel-ink-3: #F1EEE4;   /* cobalt       */
  --enamel-4:  #77202F;   --enamel-ink-4: #F8EDE1;   /* oxblood      */
  --enamel-5:  #C79B26;   --enamel-ink-5: #1F1A0B;   /* mustard      */
  --enamel-6:  #43603A;   --enamel-ink-6: #F1EFDF;   /* olive        */
  --enamel-7:  #5C3577;   --enamel-ink-7: #F2EAF3;   /* violet       */
  --enamel-8:  #C3BAA2;   --enamel-ink-8: #17140F;   /* cream        */


  /* --------------------------------------------------------
     3. TYPE
     Archivo only. A rig is built from one manufacturer's parts.
     Contrast comes from the width axis, not a second typeface.

     BADGE   = the stamped logo. One use: his name.
     PLATE   = engraved panel lettering. Section headings.
     LEGEND  = the silkscreened label beside a control.
     BODY    = prose, which exists in one place only.
     -------------------------------------------------------- */

  --f: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --w-cond:   88;
  --w-norm:   100;
  --w-exp:    118;
  --w-ultra:  125;

  --t-legend-xs:  clamp(0.5938rem, 0.55rem + 0.19vw, 0.7188rem);
  --t-legend:     clamp(0.6875rem, 0.64rem + 0.22vw, 0.8125rem);
  --t-body-sm:    clamp(0.8125rem, 0.78rem + 0.18vw, 0.9375rem);
  --t-body:       clamp(0.9375rem, 0.89rem + 0.26vw, 1.0625rem);
  --t-lead:       clamp(1.0625rem, 0.98rem + 0.42vw, 1.3125rem);
  --t-plate-sm:   clamp(1.375rem, 1.18rem + 0.95vw, 2rem);
  --t-plate:      clamp(1.625rem, 1.30rem + 1.60vw, 2.5rem);

  --lh-tight:   1.02;
  --lh-snug:    1.18;
  --lh-body:    1.62;

  --tr-legend:  0.18em;
  --tr-plate:  -0.015em;

  --measure:    64ch;


  /* --------------------------------------------------------
     4. SPACE
     -------------------------------------------------------- */

  --s1:  0.25rem;  --s2:  0.5rem;   --s3:  0.75rem;  --s4:  1rem;
  --s5:  1.5rem;   --s6:  2rem;     --s7:  3rem;     --s8:  4rem;
  --s9:  6rem;     --s10: 8rem;     --s11: 11rem;

  --gutter:  clamp(1.125rem, 4.2vw, 2.75rem);
  --maxw:    78rem;
  --maxw-nar: 42rem;


  /* --------------------------------------------------------
     5. GEOMETRY
     A combo cabinet has generous rounded corners; a control
     panel and a pedal enclosure do not.
     -------------------------------------------------------- */

  --r-cab:    14px;
  --r-panel:  3px;
  --r-pedal:  7px;
  --r-jack:   50%;

  --hair:     rgba(240, 234, 219, 0.10);
  --hair-str: rgba(240, 234, 219, 0.18);


  /* --------------------------------------------------------
     6. LIGHT
     One lamp above the rig. Every bevel below agrees about it:
     a light catch on the top edge, shadow underneath.
     -------------------------------------------------------- */

  --sh-sit:    0 1px 2px rgba(0,0,0,.45), 0 4px 12px rgba(0,0,0,.38);
  --sh-lift:   0 2px 4px rgba(0,0,0,.45), 0 14px 34px rgba(0,0,0,.48);
  --sh-deep:   0 4px 10px rgba(0,0,0,.5), 0 34px 80px rgba(0,0,0,.62);

  --bevel-up:   inset 0 1px 0 rgba(255,250,238,.55), inset 0 -1px 0 rgba(0,0,0,.28);
  --bevel-down: inset 0 2px 5px rgba(0,0,0,.42), inset 0 -1px 0 rgba(255,250,238,.30);
  --bevel-dark: inset 0 1px 0 rgba(255,246,230,.14), inset 0 -1px 0 rgba(0,0,0,.55);

  /* A bulb behind a domed lens: tight hot core, short falloff.
     Not a text glow, and never used on type. */
  --lamp-lit:  0 0 0 1px rgba(255,138,31,.5),
               0 0 7px 1px rgba(255,138,31,.7),
               0 0 22px 5px rgba(255,110,20,.30);

  /* The same bulb, green. Built the same way so it sits at the same
     depth behind its lens as the amber one. */
  --lamp-tuned-lit: 0 0 0 1px rgba(42,181,86,.5),
                    0 0 7px 1px rgba(42,181,86,.7),
                    0 0 22px 5px rgba(30,150,70,.30);

  /* Gold catches light along one edge, the way stamped brass does. */
  --gold-face: linear-gradient(168deg,
                 var(--gold-hi) 0%, var(--gold-mid) 26%,
                 var(--gold) 54%, var(--gold-lo) 100%);


  /* --------------------------------------------------------
     7. MOTION
     One authored moment: signal travelling down the chain when
     something is engaged. Everything else is mechanical and
     short, the way a switch and a knob actually move.
     -------------------------------------------------------- */

  --e-out:     cubic-bezier(.16, 1, .3, 1);
  --e-switch:  cubic-bezier(.2, .9, .25, 1.0);

  --d-click:   90ms;
  --d-lamp:    160ms;
  --d-move:    360ms;
  --d-travel:  900ms;

  --z-cable: 1;
  --z-body:  2;
  --z-strip: 60;
  --z-skip:  90;
}

/* Anyone who has asked their device to calm down gets no travel
   and no needle swing. The rig still lights up. */
@media (prefers-reduced-motion: reduce) {
  :root { --d-click: 1ms; --d-move: 1ms; --d-travel: 1ms; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
