/* ==========================================================================
   Eminent DigiTech — base.css
   Design tokens, reset, typography, layout primitives.
   No third-party font requests: self-hosting or a system stack keeps the site
   fast, CSP-strict and GDPR-clean (no IP handed to a font CDN).
   ========================================================================== */

:root {
  /* --- Colour ------------------------------------------------------------ */
  /* Slate backgrounds, a step lighter than the logo's #151c22 so the maroon
     reads as colour rather than disappearing into near-black. */
  --bg:            #1a232c;
  --bg-deep:       #151c22;   /* inputs, alternating sections */
  --bg-panel:      #202a34;
  --bg-panel-2:    #26313c;
  --bg-elevated:   #2c3844;

  --ink:           #eef1f4;   /* primary text */
  --ink-soft:      #b8c1ca;   /* secondary text */
  --ink-muted:     #919ca7;   /* labels, meta */

  /* Maroon accent. --primary is for fills (buttons, badges, the logo) with
     --on-primary text on top; it is too dark for text on the slate
     background (~2:1), so accent text and small icons use --primary-soft
     (≥4.5:1 on --bg). */
  --primary:        #9e1128;  /* brand maroon */
  --primary-bright: #b8172f;  /* fill hover */
  --primary-soft:   #ea6f81;  /* accent text, icons */
  --primary-deep:   #820816;  /* rules, decorative marks */
  --primary-wash:   rgba(158, 17, 40, 0.14);
  --on-primary:     #ffffff;

  --line:          rgba(238, 241, 244, 0.10);
  --line-strong:   rgba(238, 241, 244, 0.18);
  --line-primary:  rgba(234, 111, 129, 0.42);

  --danger:        #e2857a;
  --success:       #7fd1a8;

  /* --- Type -------------------------------------------------------------- */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
                Georgia, "Times New Roman", serif;
  --font-sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
                Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1:  clamp(1.13rem, 1.07rem + 0.3vw, 1.25rem);
  --step-2:  clamp(1.35rem, 1.24rem + 0.5vw, 1.6rem);
  --step-3:  clamp(1.7rem, 1.48rem + 1vw, 2.2rem);
  --step-4:  clamp(2.1rem, 1.7rem + 1.9vw, 3rem);
  --step-5:  clamp(2.6rem, 1.9rem + 3.3vw, 4.4rem);

  /* --- Space & shape ----------------------------------------------------- */
  --space-2xs: 0.375rem;
  --space-xs:  0.625rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  --radius:    3px;
  --radius-lg: 4px;

  --container: 1160px;
  --measure:   66ch;

  --header-h: 72px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
svg { fill: none; }

button, input, select, textarea { font: inherit; color: inherit; }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

dl, dd { margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--primary-soft); text-decoration: none; }
a:hover { color: var(--ink); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-soft);
  outline-offset: 3px;
  border-radius: 2px;
}

s { text-decoration-thickness: 1px; text-decoration-color: var(--ink-muted); }

::selection { background: var(--primary); color: var(--on-primary); }

/* --- Layout primitives ------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.section {
  padding-block: clamp(3.5rem, 8vw, var(--space-2xl));
  position: relative;
}

.section + .section { border-top: 1px solid var(--line); }

.section__head {
  max-width: 62ch;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section__title {
  font-size: var(--step-4);
  margin-bottom: 0.6rem;
}

.section__sub {
  color: var(--ink-soft);
  font-size: var(--step-1);
  max-width: 56ch;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-soft);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--primary);
  flex: none;
}

.lead {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* --- Accessibility ----------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 1000;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); color: var(--on-primary); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Scroll reveal (progressive enhancement) --------------------------- */
[data-reveal] {
  opacity: 1;
  transform: none;
}

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--reveal-delay, 0) * 90ms);
}

.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger steps — kept in CSS so no inline styles are needed (strict CSP). */
[data-reveal-delay="1"] { --reveal-delay: 1; }
[data-reveal-delay="2"] { --reveal-delay: 2; }
[data-reveal-delay="3"] { --reveal-delay: 3; }
[data-reveal-delay="4"] { --reveal-delay: 4; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
}
