/* =========================================================================
   base.css - design tokens, fonts, reset and typography
   Seemarke corporate design: Roboto, grey #757575, blue #2e8db7
   ========================================================================= */

/* ---------- Webfonts (Roboto, Apache 2.0 - see fonts/LICENSE-Roboto.txt) -- */
@font-face {
  font-family: "Roboto";
  src: local("Roboto Thin"), local("Roboto-Thin"),
    url("../fonts/Roboto-Thin.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: local("Roboto Light"), local("Roboto-Light"),
    url("../fonts/Roboto-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: local("Roboto"), local("Roboto-Regular"),
    url("../fonts/Roboto-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: local("Roboto Medium"), local("Roboto-Medium"),
    url("../fonts/Roboto-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: local("Roboto Bold"), local("Roboto-Bold"),
    url("../fonts/Roboto-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ------------------------------------------------ */
:root {
  /* Brand */
  --brand-blue: #2e8db7;
  --brand-blue-deep: #1f6b8e;
  --brand-green: #57b559;
  --brand-red: #e52e29;
  --brand-grey: #757575;
  --brand-grey-light: #bababa;

  /* Semantic colours (light theme) */
  --bg: #ffffff;
  --bg-alt: #f3f7f9;
  --surface: #ffffff;
  --surface-sunken: #eef4f7;
  --border: #e1e9ee;
  --border-strong: #c9d7df;
  --text: #1e262b;
  --text-soft: #4c5a63;
  --text-muted: #77878f;
  --accent: var(--brand-blue);
  --accent-deep: var(--brand-blue-deep);
  --accent-soft: rgba(46, 141, 183, 0.1);
  --accent-contrast: #ffffff;
  --shadow-sm: 0 1px 2px rgba(20, 40, 55, 0.05), 0 2px 8px rgba(20, 40, 55, 0.04);
  --shadow-md: 0 4px 12px rgba(20, 40, 55, 0.07), 0 16px 40px rgba(20, 40, 55, 0.07);
  --shadow-lg: 0 8px 24px rgba(20, 40, 55, 0.1), 0 32px 64px rgba(20, 40, 55, 0.1);

  /* Theme-dependent effects, so no rule outside this block needs to know
     which theme is active. */
  --aurora-opacity: 0.26;
  --art-opacity: 1;
  --logo-filter: none;

  /* Spacing scale. The upper half is deliberately generous: the layout is
     meant to breathe, so sections and cards get their air from here. */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2.25rem;
  --sp-7: 4rem;
  --sp-8: 6rem;
  --sp-9: 8.5rem;
  --sp-10: 11rem;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Layout */
  --container: 1180px;
  --measure: 62ch;
  --header-h: 80px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.35s;

  color-scheme: light;
}

/* Dark theme.
   Two selectors, one value set: the media query covers "follow the system",
   the attribute covers the manual choice from the header toggle. Keep both
   blocks in sync when changing a value. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1519;
    --bg-alt: #121b21;
    --surface: #16212a;
    --surface-sunken: #101a20;
    --border: #22323d;
    --border-strong: #314756;
    --text: #e8eef2;
    --text-soft: #b6c4cd;
    --text-muted: #8698a3;
    --accent: #52b2dc;
    --accent-deep: #7ec8e8;
    --accent-soft: rgba(82, 178, 220, 0.14);
    --accent-contrast: #06161e;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45), 0 16px 40px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5), 0 32px 64px rgba(0, 0, 0, 0.45);
    --aurora-opacity: 0.32;
    --art-opacity: 0.92;
    --logo-filter: brightness(1.55);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0e1519;
  --bg-alt: #121b21;
  --surface: #16212a;
  --surface-sunken: #101a20;
  --border: #22323d;
  --border-strong: #314756;
  --text: #e8eef2;
  --text-soft: #b6c4cd;
  --text-muted: #8698a3;
  --accent: #52b2dc;
  --accent-deep: #7ec8e8;
  --accent-soft: rgba(82, 178, 220, 0.14);
  --accent-contrast: #06161e;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45), 0 16px 40px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5), 0 32px 64px rgba(0, 0, 0, 0.45);
  --aurora-opacity: 0.32;
  --art-opacity: 0.92;
  --logo-filter: brightness(1.55);

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  font-weight: 300;
  color: var(--text);
}

p {
  margin: 0 0 var(--sp-4);
}

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

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--accent-deep);
}

img,
svg {
  max-width: 100%;
  display: block;
}

figure {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.92em;
}

strong {
  font-weight: 500;
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--accent);
  color: var(--accent-contrast);
}

/* ---------- Typographic helpers ------------------------------------------ */
.eyebrow {
  display: inline-block;
  margin: 0 0 var(--sp-4);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section__title {
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.1rem);
  font-weight: 100;
  letter-spacing: 0.02em;
}

.section__lead {
  max-width: var(--measure);
  margin-top: var(--sp-5);
  color: var(--text-soft);
  font-weight: 300;
}

.text-accent {
  color: var(--accent);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  z-index: 200;
  padding: var(--sp-2) var(--sp-4);
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 0;
  color: var(--accent-contrast);
}

/* ---------- Reduced motion ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
