/* ══════════════════════════════════════════════════════
   ROLLTEER — DESIGN TOKENS
   Single source of truth for every rollteer.com page and the /tools app.
   Components read only the semantic tokens (--bg, --surface, --text, --accent…);
   .night / .day switch them, so one component works on both grounds.
══════════════════════════════════════════════════════ */
:root {
  /* ── Primitives ── */
  /* Graphite (a whisper of blue, so the amber reads warmer by contrast), clean paper, one signal amber. */
  --ink-0: #0C0D0F;  --ink-1: #131417;  --ink-2: #1A1B1F;  --ink-3: #23252A;  --ink-4: #36393F;
  --paper-0: #F4F4F2; --paper-1: #FBFBFA; --paper-2: #E9E9E6; --paper-3: #DADAD6;
  --amber-1: #FFF1D6; --amber-2: #FFC766; --amber-3: #F2A12E; --amber-4: #C97A07;
  --amber-5: #875723;   /* the amber in its own shadow: only the far side of a sphere (below) */
  /* The amber sphere: process steps and map cities (site.css, and build-maps.mjs and dotmap.js read these). Lit from
     the upper left; each tone where a physically rendered ball has it (Blender, Cycles: a lacquered amber ball under
     one soft key light and a dim room, 2026-11-08), as a share of the gradient's radius. --amber-5 is the edge in shadow
     measured on that render (design/orb/reference.py renders and measures it again). A flatter spread
     (0 / 30 / 72 / 100 %) read as a coloured disc. */
  --orb-s1: .06; --orb-s2: .22; --orb-s3: .5; --orb-s4: .8;
  --orb-amber: radial-gradient(9% 9% at 34% 27%, rgba(255,255,255,.75), rgba(255,255,255,0)),   /* where the light falls (as the 3D maps' spheres) */
    radial-gradient(75% 75% at 36% 30%, var(--amber-1) calc(var(--orb-s1) * 100%), var(--amber-2) calc(var(--orb-s2) * 100%),
    var(--amber-3) calc(var(--orb-s3) * 100%), var(--amber-4) calc(var(--orb-s4) * 100%), var(--amber-5));
  --jade-3:  #2BD4A8;  --jade-ink: #04241B;   /* text on a jade button */
  --whatsapp: #25D366;   /* WhatsApp's own green: only on its mark (a third-party logo keeps its colour), never as text */

  /* ── Type ── */
  --type-display: 'neue-haas-grotesk-display', 'Helvetica Neue', Arial, sans-serif;
  --type-body:    'neue-haas-grotesk-text', 'Helvetica Neue', Arial, sans-serif;
  --type-mono:    ui-monospace, 'SF Mono', Consolas, monospace;
  /* One scale for every page, smallest to largest; a page that needs another size needs a token. The miniature
     product UI drawn in the Hub panel (.dash-*, .dm-*, .bk-*, .dsb-*) and the map labels (.map-label) keep their own tiny sizes: a picture of an app, labels drawn to the map's scale. */
  --fs-label:   11px;                        /* mono eyebrows, labels, table heads, small mono links */
  --fs-micro:   12px;                        /* mono links and dates that are read, not scanned */
  --fs-caption: 13px;                        /* notes under a form or a card */
  --fs-small:   14px;                        /* navigation, footer, secondary copy, compact buttons */
  --fs-body:    15px;                        /* card copy, buttons, form fields */
  --fs-reading: 16px;                        /* running text (legal pages, notes), phone body copy, fields on a phone */
  --fs-lead:    clamp(16px, 1.3vw, 18px);    /* section intros, hero and page subtitles */
  --fs-h4:      18px;                        /* card titles, the wordmark */
  --fs-figure:  clamp(24px, 1.5vw + 12px, 34px);   /* the big figures: the home's stats, About's numbers */
  --fs-h3:    clamp(20px, 2vw, 24px);
  --fs-h2:    clamp(34px, 4.6vw, 60px);
  --fs-h1:    clamp(44px, 6.5vw, 88px);
  --lh-tight: 1.04;
  --lh-body:  1.6;
  --track-tight: -0.02em;
  --track-label: 0.12em;

  /* ── Space ── one scale for every page. Inside a component the steps are fixed; between blocks and around sections
     they grow with the screen, so a phone keeps the same proportions with less air. Pages never set their own
     spacing inline: a page that needs another step needs a token. */
  --s-4: 16px; --s-5: 24px;
  --gap-tag:     20px;                        /* a section's tag to its heading */
  --gap-head:    20px;                        /* a heading to its text */
  --gap-para:    20px;                        /* between paragraphs of running copy */
  --gap-actions: 32px;                        /* text to the buttons that follow it */
  --gap-block:   clamp(36px, 4.4vw, 56px);    /* a section's opening text to its content */
  --card-pad:    clamp(24px, 2.6vw, 36px);
  --card-pad-lg: clamp(28px, 3.4vw, 44px);    /* the single large cards: a form, a profile */
  --section-y:   clamp(72px, 10vw, 128px);
  --page-hero-end: clamp(48px, 6vw, 80px);    /* below a page's title block */
  --max-w: 1180px;
  --pad-x: clamp(20px, 5vw, 64px);

  /* ── Texture ── */
  --fog-tile: url("../images/hero/fog.webp?v=20261116d");   /* the night's smoke: one seamless 2:1 tile (the home's fog, the banners) */

  /* ── Shape ── */
  --r-1: 8px; --r-2: 12px; --r-3: 16px; --r-4: 22px; --r-pill: 999px;

  /* ── Motion ── */
  --ease:     cubic-bezier(0.16, 1, 0.3, 1);   /* settle: everything that arrives */
  --ease-io:  cubic-bezier(.45, .05, .25, 1);   /* travel: a light that crosses or runs round something, eased in and out */
  --t-1: .15s; --t-2: .3s; --t-3: .6s;
}

/* ── Night: the default ground (nav, hero, product, footer) ── */
:root, .night {
  --bg: var(--ink-0);        --bg-rgb: 12,13,15;
  --surface: var(--ink-1);   --surface-rgb: 19,20,23;
  --surface-2: var(--ink-2);
  --surface-3: var(--ink-3);
  --surface-4: var(--ink-4);
  --text: #F2F2F0; --text-2: #BCBEC2; --text-3: #8D9096; --text-4: #3A3C40;   /* contrast ratios: media/brand/rollteer/guia/colores.json */
  --tint-rgb: 236,240,246;                     /* light laid over the ground */
  --line: rgba(var(--tint-rgb), .08);
  --line-2: rgba(var(--tint-rgb), .14);
  --accent: var(--amber-3);  --accent-2: var(--amber-2); --accent-rgb: 242,161,46;
  --accent-text: var(--accent);                 /* accent as small text: amber at night (9:1), ink on paper */
  --accent-ink: #1A1206;                        /* text on amber */
  --jade: var(--jade-3);     --jade-rgb: 43,212,168;
  --danger: #FF6B5E;         --danger-rgb: 255,107,94;
  --amber-lit:  linear-gradient(180deg, #F9B44E 0%, #F2A12E 55%, #EA971F 100%);   /* lit from above: buttons, active steps */
  --amber-text: linear-gradient(180deg, #FFD891 8%, #F5A63A 62%, #E39020 100%);   /* large type and numbers */
  /* Buttons: two glasses with one build (site.css, BUTTONS). Real glass shows its edge where light catches it: two
     opposite corners of the rim, bright at the top left and softer at the bottom right, the sides nearly gone
     (--btn-rim-*: the stops of a conic rim; it is also the bottom edge, so no dark line under it). A highlight pools at the top (--btn-sheen), light gathers inside the
     bottom edge (the inset in the shadow); on hover a reflection crosses the amber face (--btn-band) and the clear one
     tilts a little under the pointer and its light moves on it (--btn-glass-glint). The amber one is
     amber glass; the other clear glass, a thin body that frosts what is behind it (--btn-glass). */
  --btn-sheen: radial-gradient(130% 95% at 50% -12%, rgba(255,255,255,.36), rgba(255,255,255,.08) 46%, rgba(255,255,255,0) 72%);
  --btn-band: linear-gradient(105deg, rgba(255,255,255,0) 40%, rgba(255,255,255,.2) 49%, rgba(255,255,255,.06) 54%, rgba(255,255,255,0) 62%);
  --btn-rim-hi: rgba(255,248,230,.95); --btn-rim-mid: rgba(255,226,175,.4); --btn-rim-lo: rgba(255,255,255,.1);
  /* Under a button only diffuse light, never a 1px contact shadow: on paper that read as a grey line along its foot. */
  --btn-shadow: inset 0 -8px 14px -10px rgba(255,236,196,.42), 0 8px 18px -12px rgba(242,161,46,.45);
  --btn-shadow-hover: inset 0 -8px 14px -10px rgba(255,236,196,.5), 0 12px 24px -14px rgba(242,161,46,.5);
  --btn-glass: rgba(255,255,255,.13), rgba(255,255,255,.025) 52%, rgba(255,255,255,0) 74%;   /* its top highlight's stops (where: site.css) */
  --btn-glass-tint: rgba(var(--surface-rgb), .5);   /* its body: a colour, under the highlight */
  --btn-glass-rim-hi: rgba(255,255,255,.5); --btn-glass-rim-mid: rgba(255,255,255,.22); --btn-glass-rim-lo: rgba(255,255,255,.05);
  --btn-glass-shine: inset 0 0 0 1px rgba(0,0,0,.3), inset 0 2px 4px -2px rgba(255,255,255,.14), inset 0 -10px 18px -14px rgba(255,255,255,.16), var(--shadow-sm);   /* first two: its thickness, a dark band inside the rim and light caught under its top edge */
  --btn-glass-lit: rgba(255,255,255,.04);   /* hover: the body gathers a little light */
  /* A step not yet reached: the same ball as the amber one (--orb-amber: its geometry and stops), in graphite, as a
     rendered graphite ball under that light measures (design/orb/reference.py -- 1A1B1F dark): a soft highlight, the
     body near --ink-4, the edge in shadow at --ink-2. */
  --orb-rest: radial-gradient(75% 75% at 36% 30%, color-mix(in srgb, var(--ink-4), #FFFFFF 55%) calc(var(--orb-s1) * 100%),
    var(--ink-4) calc(var(--orb-s2) * 100%), color-mix(in srgb, var(--ink-4), var(--ink-3)) calc(var(--orb-s3) * 100%),
    var(--ink-3) calc(var(--orb-s4) * 100%), var(--ink-2));
  --orb-lit: 0 8px 16px -9px rgba(var(--accent-rgb), .32);   /* a lit step's light under it (on black, a step quieter) */
  --orb-ring: color-mix(in srgb, var(--amber-2) 55%, transparent);   /* hover: a fine ring round the step (on black the
                                                                       light amber: the deeper one read brown) */
  --btn-glass-glint: .1;                     /* hover: the light it catches as it tilts (white's alpha) */
  /* Glass: a translucent body that frosts what is behind it, a rim lit from the top-left that fades out,
     a soft inner glow and a fine grain. The same for every panel, the forms included (an amber corner on the
     forms' rim ran along their bottom edge and read as dirt). */
  --glass: linear-gradient(155deg, rgba(var(--tint-rgb), .10), rgba(var(--tint-rgb), .03) 48%, rgba(var(--tint-rgb), .05)), linear-gradient(rgba(var(--surface-rgb), .42), rgba(var(--surface-rgb), .42));
  --glass-edge: linear-gradient(155deg, rgba(var(--tint-rgb), .42), rgba(var(--tint-rgb), .08) 30%, rgba(var(--tint-rgb), .02) 62%, rgba(var(--tint-rgb), .12));
  --glass-blur: blur(22px) saturate(1.5) brightness(1.06);
  --glass-shine: inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 36px rgba(var(--tint-rgb), .035);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* What the glass sits on: pools of warm light — the brand's own world. The pools' colours:
     the main pool, the second, the glint (where they lie: .glass-field in site.css); Hub's main pool is jade. */
  --pool-1: rgba(242,161,46,.22); --pool-2: rgba(242,161,46,.13); --pool-3: rgba(255,241,214,.07);
  --pool-jade-1: rgba(43,212,168,.17); --pool-jade-2: rgba(242,161,46,.10); --pool-jade-3: rgba(255,241,214,.06);
  --groove: inset 0 1px 1px rgba(0,0,0,.45), 0 1px 0 rgba(255,255,255,.05);   /* a thin channel cut in the ground (process tracks) */
  /* Shadows: one scale of three heights, the only drop shadows on the site (site.css uses these names, never its own).
       --shadow-sm  a small surface lifted off the one it sits on (the Hub panel's tiles, a toolbar, a jade button)
       --shadow-md  a card or panel on the page (the glass material, notes, photographs)
       --shadow-lg  what floats over the page (the Hub dashboard, the photo viewer)
     Soft and wide only: no 1px contact shadow (on paper it read as a grey line along an edge). At night they stay short
     and light, because there depth comes from light: a large black shadow over a light or a pattern read as a dark
     smear. What is not a shadow stays apart: light under a lit thing (buttons, steps, status dots), edge light (insets),
     the grooves, focus rings. */
  --shadow-sm: 0 2px 8px -3px rgba(0,0,0,.4);
  --shadow-md: 0 14px 28px -18px rgba(0,0,0,.45);
  --shadow-lg: 0 30px 64px -30px rgba(0,0,0,.6);
  color-scheme: dark;
}
/* Phones: dark screens outdoors wash out hairlines. */
@media (hover: none) and (pointer: coarse) {
  :root, .night { --line: rgba(var(--tint-rgb), .11); --line-2: rgba(var(--tint-rgb), .18); }
}

/* ── Day: clean paper, same brand (company, services, process) ── */
.day {
  --bg: var(--paper-0);      --bg-rgb: 244,244,242;
  --surface: var(--paper-1); --surface-rgb: 251,251,250;
  --surface-2: #FFFFFF;
  --surface-3: var(--paper-2);
  --surface-4: var(--paper-3);
  --text: #111214; --text-2: #43464B; --text-3: #61646A; --text-4: #C9CBCF;   /* contrast ratios: colores.json */
  --tint-rgb: 17,18,20;
  --line: rgba(var(--tint-rgb), .10);
  --line-2: rgba(var(--tint-rgb), .18);
  --danger: #B42318;         --danger-rgb: 180,35,24;
  /* Amber stays amber: deep for large type and marks (3:1, the large-text bar); small text is ink, never a
     darkened orange, which is what read as mud. */
  --accent: var(--amber-4);  --accent-2: #E39A1F; --accent-rgb: 201,122,7;
  --accent-text: var(--text);
  --jade: #0A7458;           --jade-rgb: 10,116,88;      /* passes AA on paper (colores.json) */
  --amber-text: linear-gradient(180deg, #EBA43C 0%, #C97A07 72%);
  --glass: linear-gradient(155deg, rgba(255,255,255,.70), rgba(255,255,255,.34) 52%, rgba(255,255,255,.52));
  --glass-edge: linear-gradient(155deg, #FFFFFF, rgba(255,255,255,.55) 32%, rgba(var(--tint-rgb), .08) 64%, rgba(var(--tint-rgb), .12));
  --glass-blur: blur(24px) saturate(1.7) brightness(1.04);
  --glass-shine: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 42px rgba(255,255,255,.4);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --pool-1: rgba(242,161,46,.38); --pool-2: rgba(242,161,46,.22); --pool-3: #FFFFFF;
  --pool-jade-1: var(--pool-1); --pool-jade-2: var(--pool-2); --pool-jade-3: var(--pool-3);
  --groove: inset 0 1px 1px rgba(var(--tint-rgb), .12), 0 1px 0 #FFFFFF;
  --shadow-sm: 0 2px 6px -3px rgba(var(--tint-rgb), .14);
  --shadow-md: 0 10px 22px -14px rgba(var(--tint-rgb), .12), 0 30px 60px -30px rgba(var(--tint-rgb), .14);
  --shadow-lg: 0 24px 50px -26px rgba(var(--tint-rgb), .22), 0 60px 110px -60px rgba(var(--tint-rgb), .2);
  --btn-shadow: inset 0 -8px 14px -10px rgba(255,236,196,.42), 0 9px 18px -11px rgba(242,161,46,.42);   /* its own warm light */
  --btn-shadow-hover: inset 0 -8px 14px -10px rgba(255,236,196,.5), 0 13px 24px -13px rgba(242,161,46,.48);
  --btn-glass: #FFFFFF, rgba(255,255,255,.7) 60%;
  --btn-glass-tint: rgba(255,255,255,.5);
  --btn-glass-rim-hi: #FFFFFF; --btn-glass-rim-mid: rgba(255,255,255,.85); --btn-glass-rim-lo: rgba(255,255,255,.7);   /* light only: its shadow gives the shape */
  --btn-glass-shine: inset 0 2px 4px -2px #FFFFFF, inset 0 -10px 18px -14px rgba(var(--tint-rgb), .06), var(--shadow-sm);   /* by day its thickness is light only: a dark band read as a grey outline */
  --btn-glass-lit: rgba(255,255,255,.55);
  --btn-glass-glint: .7;
  /* by day a paper-white ball (design/orb/reference.py -- FBFBFA light): white where the light falls, the paper's
     greys across the body, its edge in shadow a step deeper (the day text mixed in) */
  --orb-rest: radial-gradient(75% 75% at 36% 30%, #FFFFFF calc(var(--orb-s1) * 100%), var(--paper-2) calc(var(--orb-s2) * 100%),
    var(--paper-3) calc(var(--orb-s3) * 100%), color-mix(in srgb, var(--paper-3), var(--text) 14%) calc(var(--orb-s4) * 100%),
    color-mix(in srgb, var(--paper-3), var(--text) 26%));
  --orb-lit: 0 8px 16px -6px rgba(var(--accent-rgb), .5);
  --orb-ring: rgba(var(--accent-rgb), .5);
  color-scheme: light;
  background: var(--bg);
  color: var(--text);
}
