/*
  Design tokens for the Mobile Modernizer website, look B (glass on a gradient),
  whole page in direction C (the design reference of 18 November 2026).
  Every colour, size, font and duration used by site.css is defined here and
  nowhere else.

  Changed against the skeleton's tokens: the muted text colour (darker, so it
  passes on glass), the radii (10px surfaces, 6px controls), and the new groups
  "gradient", "glass" and "mark". The groups marked "reference" hold the values
  of the design reference of 18 November 2026.

  Breakpoints cannot be custom properties (CSS does not allow var() in media
  queries), so they are written in site.css and listed here for reference:
    40rem (640px)   the labels of the hero illustration stand on it
    56rem (896px)   header links inline, 12-column layout of the simple pages
*/

/* Fonts, self-hosted from fonts/ (no external request) */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour: the four given values */
  --color-bg: #F6F5F1;
  --color-text: #202725;
  --color-accent: #14665B;
  --color-surface: #E3E9E3;

  /* Colour: derived */
  --color-text-muted: #46504C;    /* 7.66:1 on bg, 6.18:1 on glass over the darkest gradient point */
  --color-hairline: #C9CEC8;      /* decorative rules only, never text */
  --color-accent-hover: #0E4F46;  /* 8.65:1 on bg */
  --color-on-accent: var(--color-bg); /* button text: 6.25:1 on accent */
  --color-rule: rgba(32, 39, 37, 0.18);      /* hairlines on the gradient, never text */
  --color-rule-soft: rgba(32, 39, 37, 0.12); /* the rule between sections */
  --color-rule-strong: rgba(32, 39, 37, 0.22); /* reference: the frame of "Not part of it" */
  --color-rule-timeline: rgba(32, 39, 37, 0.28); /* reference: the line of the example's timeline */
  --color-dot-before: #8A908D;    /* reference: the dot of the "before" label, decorative */

  /* Colour: the gradient behind the page, warm neutral to a petrol tint.
     Composited worst case (wash over the last stop): #86B1A7, text 6.43:1 on it. */
  --gradient-1: #F6F5F1;
  --gradient-2: #E3E9E3;
  --gradient-3: #C4D9D1;
  --gradient-4: #A6C6BC;
  --gradient-angle: 165deg;
  --gradient-wash: rgba(20, 102, 91, 0.22); /* the soft petrol wash, top right */
  --gradient-wash-position: 88% 6%;

  /* Colour: glass. 55% white over whatever lies behind; solid fallback where
     backdrop-filter is not supported.
     Text on it over the darkest gradient point: 10.67:1, muted 5.85:1, accent 4.77:1. */
  --glass: rgba(255, 255, 255, 0.55);
  --glass-edge: rgba(255, 255, 255, 0.75);
  --glass-fallback: var(--color-bg);
  --glass-blur: 18px;
  --glass-saturate: 1.15;
  --shadow-glass: 0 1px 2px rgba(32, 39, 37, 0.06), 0 12px 32px rgba(32, 39, 37, 0.08);
  --shadow-button: 0 6px 18px rgba(20, 102, 91, 0.22);
  --shadow-button-large: 0 8px 22px rgba(20, 102, 91, 0.28); /* reference: the large buttons */

  /* Colour: the two labels on the hero illustration (reference), lighter glass */
  --chip-blur: 16px;
  --chip-before: rgba(255, 255, 255, 0.62);
  --chip-before-edge: rgba(255, 255, 255, 0.85);
  --chip-before-shadow: 0 8px 24px rgba(32, 39, 37, 0.10);
  --chip-after: rgba(255, 255, 255, 0.78);
  --chip-after-edge: rgba(255, 255, 255, 0.95);
  --chip-after-shadow: 0 10px 28px rgba(32, 39, 37, 0.16);

  /* Colour: the logo mark, measured in Logo.png (direction 01) */
  --color-mark-light: #32685C;
  --color-mark-dark: #254F44;
  /* reference: the large faint mark behind the hero illustration, and its fade */
  --mark-hero-opacity-1: 0.14;
  --mark-hero-opacity-2: 0.20;
  --mark-hero-opacity-3: 0.24;
  --mask-hero-mark: linear-gradient(to bottom, #000 0%, #000 44%, transparent 66%);
  --mask-hero-image: linear-gradient(to bottom, #000 0%, #000 76%, transparent 99%);

  /* Colour: tints behind the small icons (reference) */
  --tint-icon: rgba(20, 102, 91, 0.10);       /* the tiles' icon squares, inline code */
  --tint-check: rgba(20, 102, 91, 0.12);      /* the round check marks */
  --tint-minus: rgba(32, 39, 37, 0.08);       /* the round minus marks */
  --tint-icon-on-accent: rgba(255, 255, 255, 0.14); /* the icon square on the petrol tile */
  --icon-stroke: 2;

  /* Colour: deep petrol (reference): the fifth tile and the closing panel */
  --gradient-tile: linear-gradient(150deg, #1A7566 0%, #14665B 45%, #0E4F46 100%);
  --tile-accent-edge: rgba(255, 255, 255, 0.16);
  --shadow-tile-accent: 0 12px 32px rgba(20, 102, 91, 0.24);
  --gradient-request: radial-gradient(120% 110% at 88% 0%, #1F7A6C 0%, #14665B 40%, #0B332E 100%);
  --request-edge: rgba(255, 255, 255, 0.14);
  --shadow-request: 0 28px 64px rgba(11, 51, 46, 0.30);
  --color-request-muted: #DDE5E0;             /* the label and the note on deep petrol */
  --color-request-mark-light: #FFFFFF;        /* the large mark on the closing panel */
  --color-request-mark-dark: #04201C;
  --request-mark-opacity-1: 0.05;
  --request-mark-opacity-2: 0.26;
  --request-mark-opacity-3: 0.07;
  --request-copy-edge: rgba(255, 255, 255, 0.55);  /* the thin edge of the Copy address button */
  --request-copy-tint: rgba(255, 255, 255, 0.10);  /* its ground on hover and focus */
  --request-copy-min-width: 8.5rem;                /* 136px: fits Copy address and Copied alike */
  --color-button-light-hover: #E6E5DF;        /* the light button, a little darker than its ground */
  --shadow-button-light: 0 8px 22px rgba(4, 32, 28, 0.30);

  /* Colour: the price panel (reference) */
  --gradient-price: linear-gradient(135deg, rgba(20, 102, 91, 0.14) 0%, rgba(255, 255, 255, 0.58) 70%);
  --price-edge: rgba(20, 102, 91, 0.30);
  --shadow-price: 0 12px 32px rgba(32, 39, 37, 0.08);

  /* Colour: the timeline dot's ring (reference) */
  --ring-timeline: 0 0 0 5px rgba(20, 102, 91, 0.16);

  /* Colour: the dark panel of the four lines (a deep tone of the text colour); stays solid */
  --color-dark-bg: #141A18;
  --color-dark-text: #EDEEE9;     /* 15.12:1 on dark bg */
  --color-dark-muted: #A3ADA8;    /* 7.64:1 on dark bg */
  --color-dark-hairline: #34403C; /* decorative rules only, never text */
  --tint-code-dark: rgba(255, 255, 255, 0.08); /* reference: the code chips on the dark panel */
  --shadow-dark: 0 12px 32px rgba(20, 26, 24, 0.22);

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

  --text-xs: 0.8125rem;                                     /* 13px: labels */
  --text-sm: 0.9375rem;                                     /* 15px: captions, notes, code */
  --text-table: 0.96875rem;                                 /* 15.5px: the claims table */
  --text-md: 1rem;                                          /* 16px: large buttons, version values, the four lines */
  --text-tile: 1.03125rem;                                  /* 16.5px: text of tiles and steps */
  --text-copy: 1.0625rem;                                   /* 17px: running text of the sections */
  --text-body: 1.125rem;                                    /* 18px */
  --text-lead: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);    /* 18 to 21px */
  --text-request: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);  /* 17 to 20px: the closing panel's text */
  --text-price: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);   /* 20 to 26px */
  --text-h3: 1.25rem;                                       /* 20px */
  --text-h3-large: 1.375rem;                                /* 22px: the role panel */
  --text-h2: clamp(1.75rem, 1.4rem + 1.2vw, 2.375rem);      /* 28 to 38px */
  --text-h2-request: clamp(2rem, 1.5rem + 1.9vw, 3rem);     /* 32 to 48px */
  --text-h1: clamp(2.25rem, 1.5rem + 2.3vw, 3.5rem);        /* 36 to 56px */
  --text-step-number: 2.5rem;                               /* 40px */
  --text-mono: 0.875rem;                                    /* 14px */

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  --leading-display: 1.1;  /* h1, the closing heading, step numbers */
  --leading-heading: 1.15;
  --leading-tight: 1.3;
  --leading-snug: 1.35;    /* notes, the price */
  --leading-table: 1.4;    /* the claims table, the figure caption */
  --leading-lead: 1.5;
  --leading-list: 1.55;    /* the check lists, the closing panel's text */
  --leading-body: 1.6;
  --tracking-h1: -0.022em;
  --tracking-display: -0.02em;
  --tracking-heading: -0.015em;
  --tracking-h3: -0.01em;
  --tracking-label: 0.08em;

  --measure: 68ch;        /* body line length on the simple pages */
  --measure-head: 46rem;  /* reference: a section's label and heading */
  --measure-request: 40rem;
  --measure-lead: 33em;   /* the hero lead */
  --measure-intro: 36em;  /* the example's intro */
  --measure-price: 34em;
  --measure-rule: 38em;   /* the text of the three rules */
  --measure-text: 40em;   /* other running text */
  --chip-before-width: 44%;
  --chip-after-width: 56%;

  /* Space */
  --space-1: 0.25rem;  /*  4px */
  --space-2: 0.5rem;   /*  8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.5rem;   /* 24px */
  --space-6: 2rem;     /* 32px */
  --space-7: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-section: clamp(4rem, 2.5rem + 6vw, 8rem); /* 64 to 128px: the simple pages */
  --space-home-section: clamp(3rem, 2.1rem + 3.6vw, 5rem); /* 48 to 80px: above and below each home section */
  --space-hero-top: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem); /* 40 to 72px: above the first screen */

  /* Space: the in-between values of the reference, named "r" and their pixel value
     (not part of the numbered scale above) */
  --space-r1: 0.0625rem;
  --space-r3: 0.1875rem;
  --space-r6: 0.375rem;
  --space-r9: 0.5625rem;
  --space-r10: 0.625rem;
  --space-r14: 0.875rem;
  --space-r15: 0.9375rem;
  --space-r18: 1.125rem;
  --space-r20: 1.25rem;
  --space-r22: 1.375rem;
  --space-r26: 1.625rem;
  --space-r28: 1.75rem;
  --space-r30: 1.875rem;
  --space-r34: 2.125rem;
  --space-r36: 2.25rem;
  --space-r40: 2.5rem;
  --space-r44: 2.75rem;
  --space-r56: 3.5rem;
  --space-r80: 5rem;
  --space-r88: 5.5rem;
  --space-r96: 6rem;
  --space-title-accent: 0.14em;  /* above the h1's second line */
  --space-request-block: clamp(2.25rem, 5vw, 4.5rem);   /* 36 to 72px */
  --space-request-inline: clamp(1.5rem, 4.4vw, 4rem);   /* 24 to 64px */

  /* Layout */
  --content-max: 75rem;                     /* 1200px */
  --gutter: clamp(1rem, 3.4vw, 3rem);       /* 16px up to 470px wide, 48px from 1412px */
  --grid-columns: 12;
  --grid-gap: var(--space-5);

  /* Layout: the flexible rows of the reference (grow, shrink, basis).
     A row wraps where its items' bases no longer fit. */
  --flex-hero-text: 1.1 1 28.75rem;     /* 460px */
  --flex-hero-figure: 1.15 1 27.5rem;   /* 440px */
  --flex-head: 1 1 18.75rem;            /* 300px */
  --flex-body: 1.7 1 30rem;             /* 480px */
  --flex-tile-wide: 2 1 26.25rem;       /* 420px */
  --flex-tile: 1 1 18.75rem;            /* 300px */
  --flex-step: 1 1 14.375rem;           /* 230px */
  --flex-panel: 1 1 23.75rem;           /* 380px: the four lines, the timer */
  --flex-timer-text: 1 1 15.625rem;     /* 250px */
  --flex-timer-image: 0 1 14.375rem;    /* 230px */
  --flex-included: 1.25 1 25rem;        /* 400px */
  --flex-excluded: 1 1 21.25rem;        /* 340px */
  --flex-move: 1 1 12.5rem;             /* 200px */

  /* Shape */
  --radius: 10px;         /* surfaces: glass panels, tiles, the table surface, slots */
  --radius-md: 8px;       /* the version cells */
  --radius-sm: 6px;       /* controls: buttons, placeholders, code chips */
  --radius-xs: 5px;       /* inline code */
  --radius-lg: 16px;      /* the closing panel */
  --hairline: 1px;
  --focus-width: 2px;
  --focus-offset: 3px;
  --slot-border: 1px;
  --mark-size: 2.5rem;    /* the mark is 338:292, so 40px wide and about 35px tall */
  --mark-size-small: 2rem; /* the footer: 32px wide */
  --underline-offset: 0.2em;
  --touch-target: 2.75rem;  /* 44px: the least height of a small button */
  --icon-box: 2.75rem;      /* 44px: the tiles' icon squares */
  --icon-box-small: 1.625rem; /* 26px: the round check and minus marks */
  --icon-size: 1.5rem;      /* 24px */
  --dot-size: 0.5rem;       /* 8px: the dots of the hero labels */
  --dot-offset: 0.375rem;   /* 6px */
  --rule-number-width: 2.125rem; /* 34px: 01, 02, 03 */
  --timeline-dot: 0.8125rem;     /* 13px */
  --timeline-indent: 0.4375rem;  /* 7px: half the dot, so the line runs through its middle */
  --table-min: 32.5rem;          /* 520px: the table scrolls inside its frame below this */
  --timer-width: 14.375rem;      /* 230px */
  --timer-offset-top: -1.5rem;   /* the timer bleeds out of its panel */
  --timer-offset-right: -2.75rem;
  --timer-offset-bottom: -4rem;
  --timer-opacity: 0.55;
  --timer-width-small: 11.25rem; /* 180px: under the text, whole and centred */
  --motif-left: -10%;
  --motif-top: 2%;
  --motif-width: 120%;
  --chip-before-top: 4%;
  --chip-after-bottom: 13%;
  --request-mark-right: -6%;
  --request-mark-top: -18%;
  --request-mark-width: 56%;

  /* Slot aspect ratios */
  --ratio-hero: 4 / 3;
  --ratio-step: 3 / 2;
  --ratio-screenshot: 16 / 10;
  --ratio-mark: 338 / 292;
  --ratio-phones: 700 / 680;

  /* Parallax: how far the two hero phones move while the page scrolls past them.
     Each value is reached when --parallax (set by js/parallax.js) is 1. */
  --parallax-before-shift: 1rem;    /* the phone behind drifts down */
  --parallax-before-turn: -1.5deg;  /* and turns a little to the left */
  --parallax-after-shift: -1.75rem; /* the phone in front drifts up */
  --parallax-after-turn: 2deg;      /* and turns a little to the right */

  /* Motion */
  --duration: 150ms;
  --easing: ease-out;
  /* the typing cursor: a thin bar one line tall */
  --caret-width: 0.12em;
  --caret-height: 1em;
  --caret-gap: 0.08em;
  --caret-shift: -0.15em;
  --caret-opacity: 0.85;
  --caret-blink: 0.55s;

  /* Hover on the glass panels of the home page (devices with a mouse only):
     the panel lifts, its glass brightens, its edge lightens, its shadow deepens,
     and a soft band of light crosses it once. The petrol tile keeps its ground
     and takes the quiet band. */
  --glass-hover: rgba(255, 255, 255, 0.76);
  --glass-hover-edge: rgba(255, 255, 255, 0.98);
  --shadow-glass-hover: 0 2px 4px rgba(32, 39, 37, 0.06), 0 22px 48px rgba(32, 39, 37, 0.15);
  --petrol-hover-edge: rgba(255, 255, 255, 0.32);
  --shadow-petrol-hover: 0 22px 48px rgba(20, 102, 91, 0.34);
  --hover-lift: -0.1875rem;  /* 3px up */
  --sheen: linear-gradient(115deg, rgba(255, 255, 255, 0) 36%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 64%);
  --sheen-quiet: linear-gradient(115deg, rgba(255, 255, 255, 0) 36%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0) 64%);
  --duration-hover: 250ms;
  --duration-sheen: 750ms;
}
