/* ===========================================================================
   TOKENS — v5. Rootcamp's screen light, on Vyonio's glass.

   The palette is lifted from rootcamp.cz.www, where it is not a "cyberpunk"
   choice but a description: at eleven at night the only light in a room full
   of monitors is magenta and cyan out of near-black. Borrowed here it does a
   second job — magenta and violet are what a protected, premium object looks
   like lit from the side, where green read as a terminal prompt.

   Pink leads. Violet is the field between, and the second hue the glass
   refracts towards — without a second hue, transmissive glass reads as tinted
   plastic. Cyan appears exactly once, as the focus ring, which is what
   rootcamp does with it too.

   The near-black carries a violet cast on purpose. A neutral grey under this
   palette looks like a bug.
   =========================================================================== */
:root{
  /* ---- neutral ----------------------------------------------------------- */
  --bg:        #0B0A12;
  --bg-2:      #141120;
  --bg-3:      #1B1729;
  --ink:       #EFECF7;
  --soft:      #A9A2C4;
  --faint:     #6B6390;

  /* ---- accent — violet, with magenta still in it -------------------------
     Rootcamp leads on #FF2D87, which at neon saturation reads as hot pink.
     Rotated towards violet it keeps the screen-light character and loses the
     candy: still unmistakably neon, but it belongs beside the deep violet
     rather than fighting it. */
  --accent:      #D93DF0;
  --accent-deep: #8E169F;
  --accent-tint: rgba(217,61,240,.14);
  --accent-glow: rgba(217,61,240,.42);

  /* ---- violet — the field, and what the glass bends towards -------------- */
  --violet:      #9B5CFF;
  --violet-tint: rgba(155,92,255,.12);

  /* ---- cyan — focus, and nothing else ------------------------------------ */
  --cyan: #22D3EE;

  /* ---- glass -------------------------------------------------------------
     The scrim is warmer than v2's because it sits over a violet-black page;
     a blue-grey scrim on this ground reads as a hole rather than a pane. */
  --pane-scrim: rgba(13,11,22,.62);
  --pane-sheen: linear-gradient(158deg, rgba(255,255,255,.08), rgba(255,255,255,.015) 58%);

  --glass:       rgba(255,255,255,.05);
  --glass-hi:    rgba(255,255,255,.09);
  --glass-line:  rgba(239,236,247,.14);
  --glass-blur:  22px;
  --glass-edge:
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(255,255,255,.05),
    0 34px 80px -44px rgba(0,0,0,.95);

  --line:      rgba(239,236,247,.09);
  --line-firm: rgba(239,236,247,.19);

  /* ---- type -------------------------------------------------------------- */
  --font:  "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --t-eyebrow: .72rem;
  --t-body:    clamp(1rem, .93rem + .3vw, 1.12rem);
  --t-lede:    clamp(1.04rem, .96rem + .42vw, 1.24rem);
  --t-h2:      clamp(1.9rem, 1.35rem + 2.4vw, 3.3rem);
  --t-h1:      clamp(2.3rem, 1.55rem + 3.3vw, 4.2rem);

  /* ---- space — multiples of 8 -------------------------------------------- */
  --s1: .5rem;  --s2: 1rem;   --s3: 1.5rem;  --s4: 2rem;
  --s5: 3rem;   --s6: 4rem;   --s7: 6rem;

  --radius:    20px;
  --radius-sm: 10px;
  --radius-pill: 100px;
  --wrap: 1240px;

  /* ---- motion ------------------------------------------------------------ */
  --ease:   cubic-bezier(.25,.46,.45,.94);
  --settle: cubic-bezier(.23,1,.32,1);

  /* ---- the films ---------------------------------------------------------
     SPLIT is the column boundary, and the one number that has to agree
     between the CSS and the camera in scene.js.

     ACTS is only a floor. Each film writes its own act count onto itself from
     the number of panels it contains — see createFilm — because a film's
     length and its panel count are the same fact, and the version of it that
     lives in the stylesheet is the one that goes stale. */
  --acts: 2;
  /* Scroll spent per act. A full screen each made the page thirteen screens of
     film; the cross-fade reads just as well over a little over half of one. */
  --act-scroll: 60svh;
  --header-h: 68px;
  /* A fraction of the frame, not of the screen: the object's column is
     frame × SPLIT wide and the copy takes the rest. */
  --split: .52;

  /* The gutter the pane keeps from whichever screen edge it is against. It
     used to be written inline on `.pane`'s `right`; the zig-zag needs the same
     number on the other side, and a magic number typed twice is a magic number
     that ends up two different values. */
  --edge: clamp(1rem, 2.4vw, 2rem);

  /* The frame. Every film is laid out inside the same column the static
     bands' `.wrap` gives its content, so a wide monitor shows one page width
     instead of films running to the glass and bands stopping at 1240px.
     GUTTER is the distance from the screen edge to the frame's content edge;
     it is written with `%`, which resolves against whatever box uses it — the
     film pin, or the viewport for the fixed act index. */
  --wrap-pad: clamp(1.25rem, 4vw, 3rem);
  --gutter:   calc(max(0px, (100% - var(--wrap)) / 2) + var(--wrap-pad));
  --frame-w:  calc(100% - 2 * var(--gutter));

  /* How much run-up a section gets at a handover. A sticky pin leaves by
     getting shorter, not by sliding away, so where a film meets a static
     section there is a horizontal cut across the screen; this is the depth of
     the gradient that each side paints over the other to hide it. */
  --seam: 130px;
}
