/*
 * Design tokens: the only file of the site that holds colour values.
 * Colours are named after the Figma variables of file RDh8EK9yEY19I1QOL7sxi1 (V12 pages).
 * Every other stylesheet, template and script uses these custom properties, never a literal.
 */

:root {
  /* Colour variables of the Figma file. */
  --color-petrol-900: rgb(3 51 59);
  --color-petrol-700: rgb(10 76 86);
  --color-petrol-500: rgb(18 100 112);
  --color-petrol-950: rgb(7 40 46); /* card 52: the Deployment's dark picture panel (#07282E) */
  --color-petrol-950-0: rgb(7 40 46 / 0%); /* card 52: its fade's transparent end */
  --color-teal-800: rgb(22 90 88);
  --color-teal-700: rgb(26 106 104);
  --color-teal-600: rgb(31 126 123);
  --color-teal-550: rgb(31 154 140);
  --color-teal-500: rgb(42 157 153);
  --color-teal-450: rgb(36 168 152);
  --color-teal-400: rgb(43 191 174);
  --color-teal-300: rgb(127 201 198);
  --color-teal-200: rgb(151 235 230);
  --color-teal-100: rgb(217 240 239);
  --color-navy-900: rgb(26 26 58);
  --color-navy-800: rgb(34 34 74);
  --color-ink-800: rgb(31 42 48);
  --color-slate-500: rgb(83 114 127);
  --color-slate-400: rgb(125 150 160);
  --color-slate-300: rgb(168 186 193);
  --color-grey-300: rgb(201 211 215);
  --color-grey-200: rgb(230 234 236);
  --color-grey-150: rgb(227 233 235);
  --color-grey-100: rgb(244 246 247);
  --color-white: rgb(255 255 255);
  --color-ice-100: rgb(228 244 249);
  --color-success-700: rgb(24 119 76);
  --color-success-500: rgb(28 140 89);
  --color-warning-700: rgb(144 97 11);
  --color-warning-500: rgb(180 121 14);
  --color-warning-100: rgb(255 247 224);
  --color-error-500: rgb(194 54 51);

  /* Landing page fills, as drawn (plain fills in Figma, not variables). */
  --color-hero-subtitle: rgb(26 26 58 / 75%);
  --color-glass: rgb(255 255 255 / 86%);
  --color-glass-border: rgb(255 255 255 / 90%);
  --color-render-ground: rgb(246 247 247);
  --color-dial-sweep: rgb(230 255 252);
  --gradient-hero-desktop: linear-gradient(
    90deg,
    rgb(255 255 255 / 87.3%) 0%,
    rgb(255 255 255 / 84.6%) 42%,
    rgb(255 255 255 / 55.8%) 56%,
    rgb(255 255 255 / 16.2%) 70%,
    rgb(255 255 255 / 0%) 82%
  );
  --gradient-hero-mobile: linear-gradient(
    180deg,
    rgb(255 255 255 / 97%) 0%,
    rgb(255 255 255 / 94%) 55.249%,
    rgb(255 255 255 / 74%) 61.878%,
    rgb(255 255 255 / 42%) 68.508%,
    rgb(255 255 255 / 14%) 75.138%,
    rgb(255 255 255 / 0%) 79.558%
  );
  --gradient-hero-soft: linear-gradient(
    180deg,
    rgb(255 255 255 / 0%) 0%,
    rgb(255 255 255 / 0%) 70%,
    rgb(255 255 255 / 33%) 100%
  );
  --gradient-hero-fade: linear-gradient(180deg, rgb(244 246 247 / 0%), rgb(244 246 247));
  --gradient-logos-left: linear-gradient(90deg, rgb(244 246 247), rgb(244 246 247 / 0%));
  --gradient-logos-right: linear-gradient(90deg, rgb(244 246 247 / 0%), rgb(244 246 247));
  --gradient-tile-photo: linear-gradient(
    180deg,
    rgb(26 26 58 / 0%) 0%,
    rgb(26 26 58 / 60%) 62.037%,
    rgb(26 26 58 / 92%) 100%
  );
  --gradient-render-seam: linear-gradient(
    90deg,
    rgb(246 247 247 / 0%),
    rgb(246 247 247) 50%,
    rgb(246 247 247 / 0%)
  );
  --shadow-chip: 0 16px 40px rgb(26 26 58 / 18%);
  --shadow-logo-tile: 0 2px 4px rgb(0 0 0 / 4%);
  --shadow-dial-value: 0 0 18px rgb(43 191 174 / 55%);
  --shadow-chip-dot: 0 0 6px rgb(43 191 174 / 70%);
  --blur-chip: 11px;

  /* Landing part 2 and the contact block (card 22): plain fills as drawn. */
  --color-navy-65: rgb(26 26 58 / 65%);
  --color-navy-scrim: rgb(26 26 58 / 35%);
  --color-white-80: rgb(255 255 255 / 80%);
  --color-white-85: rgb(255 255 255 / 85%);
  --color-white-90: rgb(255 255 255 / 90%);
  --color-white-16: rgb(255 255 255 / 16%);
  --color-white-12: rgb(255 255 255 / 12%);
  --color-white-10: rgb(255 255 255 / 10%);
  --color-teal-tint: rgb(43 191 174 / 14%);
  --color-slider-track: rgb(220 227 230);
  --color-error-tint: rgb(194 54 51 / 8%);
  --color-error-border: rgb(194 54 51 / 40%);
  --gradient-case-shade: linear-gradient(180deg, rgb(26 26 58 / 10%), rgb(26 26 58 / 50%));
  --gradient-case-top: linear-gradient(180deg, rgb(26 26 58 / 45%), rgb(26 26 58 / 40%) 55%, rgb(26 26 58 / 0%));
  --gradient-case-bottom: linear-gradient(180deg, rgb(26 26 58 / 0%), rgb(26 26 58 / 40%) 14%, rgb(26 26 58 / 40%));
  --shadow-calculator: 0 12px 40px rgb(26 26 59 / 10%);
  --shadow-form: 0 24px 60px rgb(3 51 59 / 8%);
  --shadow-bubble: 0 2px 6px rgb(3 51 59 / 8%);

  /* Solution page part 1 (card 23): plain fills as drawn (V12 3596:8507, 3596:8556, 3596:8689). */
  --color-navy-85: rgb(26 26 58 / 85%);
  --color-step-marker: rgb(201 211 215);
  --gradient-solution-hero-desktop: linear-gradient(
    90deg,
    rgb(255 255 255 / 97%) 0%,
    rgb(255 255 255 / 94%) 42%,
    rgb(255 255 255 / 62%) 56%,
    rgb(255 255 255 / 18%) 70%,
    rgb(255 255 255 / 0%) 82%
  );
  --gradient-solution-hero-mobile: linear-gradient(
    180deg,
    rgb(255 255 255 / 97%) 0%,
    rgb(255 255 255 / 94%) 81.887%,
    rgb(255 255 255 / 74%) 85.768%,
    rgb(255 255 255 / 42%) 89.65%,
    rgb(255 255 255 / 14%) 93.531%,
    rgb(255 255 255 / 0%) 96.119%
  );
  --gradient-solution-hero-soft-desktop: linear-gradient(
    180deg,
    rgb(255 255 255 / 0%) 0%,
    rgb(255 255 255 / 0%) 70%,
    rgb(255 255 255 / 55%) 100%
  );
  --gradient-solution-hero-soft-mobile: linear-gradient(
    180deg,
    rgb(255 255 255 / 0%) 0%,
    rgb(255 255 255 / 0%) 86.143%,
    rgb(255 255 255 / 55%) 100%
  );
  --gradient-white-fade: linear-gradient(180deg, rgb(255 255 255 / 0%), rgb(255 255 255));
  --gradient-white-left: linear-gradient(90deg, rgb(255 255 255), rgb(255 255 255 / 0%));
  --gradient-white-right: linear-gradient(90deg, rgb(255 255 255 / 0%), rgb(255 255 255));
  --shadow-float: 0 10px 30px rgb(3 51 59 / 18%);
  --shadow-float-small: 0 10px 15px rgb(3 51 59 / 18%);

  /*
   * Solution page part 2 (card 24): plain fills as drawn (V12 3596:8750, 3596:13302, 3596:13401),
   * each a token colour with an opacity. Three Figma fills are not token colours and use the
   * nearest token instead: the dial face #24244A to #14142E (navy-800 to navy-900), the chart's
   * Thermosphr line and legend #9FE3DF (teal-200), the IPMVP badge #1D334B (navy-800).
   */
  --color-white-4: rgb(255 255 255 / 4%);
  --color-white-8: rgb(255 255 255 / 8%);
  --color-white-40: rgb(255 255 255 / 40%);
  --color-teal-300-38: rgb(127 201 198 / 38%);
  --color-teal-300-45: rgb(127 201 198 / 45%);
  --color-teal-400-35: rgb(43 191 174 / 35%);
  --color-teal-500-28: rgb(42 157 153 / 28%);
  --color-petrol-900-35: rgb(3 51 59 / 35%);
  --color-petrol-900-80: rgb(3 51 59 / 80%);
  --color-grey-300-80: rgb(201 211 215 / 80%);
  --gradient-simulator-ground: linear-gradient(180deg, rgb(26 106 104), rgb(10 76 86));
  --gradient-simulator-glow: radial-gradient(closest-side, rgb(42 157 153 / 55%), rgb(42 157 153 / 0%));
  --shadow-simulator-card: 0 0 70px var(--color-teal-500-28);
  --shadow-simulator-dial: 0 28px 50px rgb(0 0 0 / 40%);
  --shadow-simulator-score: 0 0 10.725px rgb(43 191 174 / 55%);
  --shadow-report: 0 24px 60px rgb(3 51 59 / 10%);
  /*
   * About page (card 27): plain fills as drawn (V12 3596:13983), token colours with an opacity.
   * The third number card's #2C2C4A is not a token colour and uses navy-800 instead.
   */
  --color-teal-500-82: rgb(42 157 153 / 82%);
  --gradient-team-tile: radial-gradient(
    50% 50% at 50% 50%,
    rgb(127 201 198),
    rgb(42 157 153 / 82%)
  );
  --gradient-team-join: linear-gradient(
    90deg,
    rgb(26 26 58 / 92%) 0%,
    rgb(26 26 58 / 60%) 40%,
    rgb(26 26 58 / 0%) 80%
  );
  /*
   * Cybersecurity and error pages (card 28): plain fills as drawn (V12 3596:18678, 3596:18543,
   * 3596:33584), token colours with an opacity.
   */
  --color-navy-900-8: rgb(26 26 58 / 8%);
  --gradient-not-found-desktop: linear-gradient(
    90deg,
    rgb(255 255 255) 0%,
    rgb(255 255 255 / 95%) 44%,
    rgb(255 255 255 / 0%) 66%
  );
  --gradient-not-found-mobile: linear-gradient(
    180deg,
    rgb(255 255 255) 0%,
    rgb(255 255 255 / 95%) 56.635%,
    rgb(255 255 255 / 70%) 66.114%,
    rgb(255 255 255 / 30%) 75.592%,
    rgb(255 255 255 / 0%) 85.071%
  );
  /*
   * Header and footer only: a plain fill in Figma, not a variable (logo, "Save with us",
   * the current page's link, footer column titles). Everywhere else the green is teal-400.
   */
  --color-accent: rgb(118 255 230);

  /* Plain fills of the header, menu and footer on navy, as drawn (not Figma variables). */
  --color-on-navy-muted: rgb(197 210 216);
  --color-on-navy-text: rgb(255 255 255 / 70%);
  --color-on-navy-language: rgb(255 255 255 / 80%);
  --color-on-navy-border: rgb(255 255 255 / 35%);
  --color-on-navy-rule: rgb(255 255 255 / 14%);

  /* Text on the accent fill ("Save with us"): Figma's --color-text-on-action. */
  --color-text-on-action: var(--color-navy-900);
  --color-text: var(--color-petrol-900);
  --color-page: var(--color-white);
  --color-focus: var(--color-teal-400);

  /*
   * Hover and pressed states (card 46), named after the Figma variables and effect styles of
   * "02 Foundations", frame "· States" (2527:98): "Hover: light glow, the fill does not change.
   * Pressed: one colour step. Transitions: 150 ms, ease." The mint pressed fill is the only new
   * colour; the others are colours of the file already.
   */
  --color-action-primary-pressed: var(--color-teal-550);
  --color-action-secondary-pressed: var(--color-grey-200);
  --color-action-accent-pressed: rgb(85 226 201);
  --color-action-outline-on-inverse-pressed: var(--color-navy-800);
  --color-action-secondary-hover: var(--color-grey-100);
  --color-action-selected-hover: var(--color-petrol-700);
  --color-border-strong: var(--color-petrol-900);
  --color-border-input-hover: var(--color-slate-500);
  --color-text-accent-on-inverse: var(--color-teal-400);
  --color-text-accent-pressed: var(--color-teal-800);
  --color-text-accent-on-inverse-pressed: var(--color-teal-200);
  --glow-hover-teal: 0 0 24px rgb(43 191 174 / 35%);
  --glow-hover-mint: 0 0 24px rgb(118 255 230 / 35%);
  --glow-hover-white: 0 0 24px rgb(255 255 255 / 25%);
  --state-duration: 150ms;
  --state-easing: ease;

  /* Effects. */
  --shadow-header: 0 10px 30px rgb(3 51 59 / 18%);
  --blur-header: 8px; /* Figma "background blur 16" is a CSS blur of 8px */

  /* Radius. */
  --radius-bar: 18px;
  --radius-card: 24px;
  --radius-pill: 24px; /* Figma --radius-pill */
  --radius-round: 999px;
  --radius-list: 12px;

  /* Spacing (Figma --space-8 and --space-24, and the steps the drawn parts use). */
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-14: 14px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-36: 36px;
  --space-40: 40px;
  --space-64: 64px;
  --space-80: 80px;

  /* Sizes. */
  --touch-target: 44px;
  --content-max: 1200px;
  --header-bar-height: 56px;
  --header-pill-height: 64px;
  --button-height: 48px;
  --logo-width: 118.421px;
  --logo-height: 29.904px;
  --footer-logo-width: 134.211px;
  --footer-logo-height: 33.892px;

  /* Font. */
  --font-sans: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --weight-thin: 100; /* the hero dial's readout only (digits and % subset) */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Layout, mobile first (under 768 px). */
  --page-margin: 20px;
  --section-padding: 64px;
  --card-gap: 16px;
  --header-top: 12px;
  --header-clearance: 80px;

  /* Text sizes that change with the width (mobile values first). */
  --text-hero-size: 32px;
  --text-hero-line: 40px;
  --text-display-size: 32px;
  --text-display-line: 40px;
  --text-h1-size: 30px;
  --text-h1-line: 38px;
  --text-h2-size: 26px;
  --text-h2-line: 34px;
  --text-h3-size: 20px;
  --text-h3-line: 28px;
  --text-quote-size: 22px;
  --text-quote-line: 30px;
  --text-metric-hero-size: 72px;
  --text-metric-hero-line: 72px;
  --text-metric-xl-size: 48px;
  --text-metric-xl-line: 52px;
  --text-metric-size: 32px;
  --text-metric-line: 38px;

  /* Text sizes that never change with the width. */
  --text-body-lg-size: 17px;
  --text-body-lg-line: 27px;
  --text-body-size: 15px;
  --text-body-line: 24px;
  --text-body-sm-size: 13px;
  --text-body-sm-line: 20px;
  --text-eyebrow-size: 11px;
  --text-eyebrow-line: 16px;
  --text-eyebrow-tracking: 1.6px;
  --text-button-size: 13px;
  --text-button-line: 16px;
  --text-nav-size: 15px;
  --text-nav-line: 18px;
  --text-input-size: 16px;
  --text-input-line: 24px;
  --text-label-size: 13px;
  --text-label-line: 20px;
  --text-menu-size: 20px; /* the open menu's rows, drawn SemiBold 20/28 */
  --text-menu-line: 28px;
  /* Landing sizes drawn outside the scale (Figma V12): hero subtitle, dial, hero chips. */
  --text-lead-size: 18px;
  --text-lead-line: 28px;
  --text-dial-value-size: 96px;
  --text-dial-unit-size: 36px;
  --text-dial-caption-size: 14px;
  --text-dial-caption-tracking: 2.2px;
  --text-chip-size: 36px;
  /* Solution sizes drawn outside the scale (card 24, Figma V12): the simulator and the report. */
  --text-simulator-title-size: 32px;
  --text-simulator-title-line: 40px;
  --text-simulator-subtitle-size: 20px;
  --text-simulator-subtitle-line: 30px;
  --text-simulator-energy-size: 72px;
  --text-simulator-energy-line: 72px;
  --text-simulator-value-size: 44px;
  --text-simulator-value-line: 52px;
  --text-simulator-score-size: 57.2px;
  --text-simulator-score-unit-size: 21.45px;
  --text-simulator-score-tracking: -1.7875px;
  --text-simulator-unit-size: 26px;
  --text-simulator-small-size: 12px;
  --text-simulator-small-tracking: 1.8px;
  --text-simulator-eyebrow-size: 13px;
  --text-simulator-eyebrow-tracking: 2px;
  --text-report-kpi-size: 30px;
  --text-report-kpi-line: 33px;
  /* Legal pages (card 33, Figma V12 3596:17712, 3596:17775): the page switch and the entity tabs. */
  --text-pill-size: 14px;
  --text-pill-line: 20px;
  --text-tab-size: 18px;
  --text-tab-line: 24px;
}

/* Tablet: 768 to 1279 px. */
@media (min-width: 768px) {
  :root {
    --page-margin: 40px;
    --section-padding: 80px;
    --card-gap: 24px;

    --text-hero-size: 48px;
    --text-hero-line: 56px;
    --text-display-size: 40px;
    --text-display-line: 48px;
    --text-h1-size: 36px;
    --text-h1-line: 44px;
    --text-h2-size: 28px;
    --text-h2-line: 36px;
    --text-h3-size: 22px;
    --text-h3-line: 30px;
    --text-quote-size: 24px;
    --text-quote-line: 34px;
    --text-metric-hero-size: 96px;
    --text-metric-hero-line: 96px;
    --text-metric-xl-size: 56px;
    --text-metric-xl-line: 60px;
    --text-metric-size: 36px;
    --text-metric-line: 42px;
    --text-simulator-title-size: 48px;
    --text-simulator-title-line: 56px;
  }
}

/* Desktop: from 1280 px. Content 1200 centred; section padding is set by each section as drawn. */
@media (min-width: 1280px) {
  :root {
    --section-padding: 120px;
    --header-top: 16px;
    --header-clearance: 96px;

    --text-hero-size: 64px;
    --text-hero-line: 70px;
    --text-display-size: 48px;
    --text-display-line: 56px;
    --text-h1-size: 40px;
    --text-h1-line: 50px;
    --text-h2-size: 30px;
    --text-h2-line: 40px;
    --text-h3-size: 22px;
    --text-h3-line: 30px;
    --text-quote-size: 28px;
    --text-quote-line: 38px;
    --text-metric-hero-size: 120px;
    --text-metric-hero-line: 120px;
    --text-metric-xl-size: 68px;
    --text-metric-xl-line: 72px;
    --text-metric-size: 42px;
    --text-metric-line: 48px;
    --text-simulator-title-size: 56px;
    --text-simulator-title-line: 64px;
    --text-simulator-energy-size: 104px;
    --text-simulator-energy-line: 110px;
  }
}
