/* ==========================================================================
   Base — fonts, design tokens, reset, element defaults, typography, keyframes
   ========================================================================== */

/* Self-hosted variable fonts (SIL Open Font License), Latin subset. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url("../fonts/archivo-variable-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Azeret Mono";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/azeret-mono-variable-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched local fallbacks, sized from the font files so text occupies
   nearly the same space before and after the web fonts arrive (no layout shift). */
@font-face {
  font-family: "Archivo Fallback";
  font-weight: 100 599;
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 99.2%;
  ascent-override: 88.5%;
  descent-override: 21.2%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Archivo Fallback";
  font-weight: 600 799;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold");
  size-adjust: 112.7%;
  ascent-override: 77.9%;
  descent-override: 18.6%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Archivo Fallback";
  font-weight: 800 1000;
  src: local("Arial Black"), local("Arial-Black");
  size-adjust: 110.5%;
  ascent-override: 79.5%;
  descent-override: 19%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Azeret Mono Fallback";
  src: local("Consolas"), local("Menlo");
  size-adjust: 118.2%;
  ascent-override: 79.3%;
  descent-override: 19.5%;
  line-gap-override: 0%;
}

:root {
  color-scheme: dark;
  accent-color: var(--color-accent);

  /* Colour */
  --color-bg: #07090a;
  --color-bg-raised: #0b0e10;
  --color-bg-deep: #05080a;
  --color-surface: #0e1214;
  --color-surface-hover: #0d1214;
  --color-light: #eef0ed;
  --color-light-muted: #dee1dc;

  --color-accent: #6bd117;
  --color-accent-soft: rgb(107 209 23 / 0.5);
  --color-secondary: #12b7c9;
  --color-secondary-on-light: #076570;
  --color-danger: #ff6b6b;

  --color-text: #fff;
  --color-text-lead: rgb(255 255 255 / 0.85);
  --color-text-soft: rgb(255 255 255 / 0.75);
  --color-text-muted: rgb(255 255 255 / 0.68);
  /* Subtle and faint carry 11-12px mono labels, so they sit well above the AA
     floor (measured about 7.3:1 and 6:1 on --color-bg) rather than scraping past it. */
  --color-text-subtle: rgb(255 255 255 / 0.6);
  --color-text-faint: rgb(255 255 255 / 0.54);
  --color-text-disabled: rgb(255 255 255 / 0.22);

  --color-ink: #07090a;
  --color-ink-muted: rgb(7 9 10 / 0.72);
  --color-ink-subtle: rgb(7 9 10 / 0.66);

  --color-border-subtle: rgb(255 255 255 / 0.08);
  --color-border: rgb(255 255 255 / 0.1);
  --color-border-strong: rgb(255 255 255 / 0.22);
  --color-border-control: rgb(255 255 255 / 0.34);
  --color-border-glass: rgb(255 255 255 / 0.4);
  /* Opaque equivalent of --color-border over --color-bg, so overlapping grid rules never double up. */
  --color-rule: #202223;
  --color-rule-on-light: #d3d5d2;
  --color-scrollbar: #34383a;

  --color-overlay: rgb(7 9 10 / 0.55);
  --color-overlay-strong: rgb(7 9 10 / 0.78);
  --color-void: #040607;
  --color-scrim: rgb(4 6 7 / 0.72);
  --color-scrim-strong: rgb(4 6 7 / 0.92);

  /* Typography */
  --font-display: "Archivo", "Archivo Fallback", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Azeret Mono", "Azeret Mono Fallback", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Mono micro-type ramp. 11px is the legibility floor for functional labels;
     sentence-length notes step up to 12px with tighter tracking. */
  --text-label: 0.6875rem;
  --text-meta: 0.75rem;
  --tracking-note: 0.05em;

  --tracking-display: -0.04em;
  --tracking-heading: -0.04em;
  --tracking-title: -0.02em;
  --tracking-label: 0.22em;
  --tracking-eyebrow: 0.28em;

  /* Layout */
  --container: 1560px;
  --container-narrow: 1400px;
  --gutter: clamp(18px, 4vw, 56px);
  --header-height: 74px;

  --section-pad: clamp(50px, 7vw, 110px);
  --section-pad-md: clamp(60px, 9vw, 140px);
  --section-pad-lg: clamp(72px, 11vw, 170px);

  --stack-sm: clamp(20px, 3vw, 36px);
  --stack-md: clamp(26px, 3.5vw, 48px);
  --stack-lg: clamp(30px, 4vw, 56px);
  --column-gap: clamp(28px, 4vw, 72px);

  --grid-min-sm: 200px;
  --grid-min-md: 260px;
  --grid-min-lg: 300px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --duration-exit: 0.22s;
  --duration-hover: 0.18s;
  --duration-fast: 0.25s;
  --duration-base: 0.3s;
  --duration-slow: 0.6s;

  /* Elevation */
  --shadow-float: 0 18px 40px rgb(0 0 0 / 0.5);
  --blur-glass: blur(6px);

  --z-sticky-cta: 100;
  --z-header: 110;
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-height);
  scrollbar-gutter: stable;
  scrollbar-color: var(--color-scrollbar) var(--color-bg);
}

html:has(dialog[open]) {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ol,
ul {
  margin: 0;
}

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

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

img {
  height: auto;
}

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

input,
textarea {
  caret-color: var(--color-accent);
}

button {
  cursor: pointer;
}

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

a:hover {
  color: var(--color-secondary);
}

address {
  font-style: normal;
}

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

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Components set their own display; the hidden attribute must still win. */
[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Page-to-page crossfade (browsers without cross-document view transitions
   simply navigate). The header keeps its own name so it holds still. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.display-1,
.display-2,
.display-3,
.heading-1,
.heading-2,
.heading-3 {
  font-family: var(--font-display);
  font-weight: 900;
  text-wrap: balance;
}

/* The second term keeps the longest hero word ("DIFFERENT.", about 7.2em wide
   at this stretch) inside the gutters at every width. */
.display-1 {
  font-size: clamp(2.375rem, min(13.5vw, (min(100vw, var(--container)) - 2 * var(--gutter)) / 7.2), 13.75rem);
  font-stretch: 118%;
  letter-spacing: var(--tracking-display);
  line-height: 0.84;
}

/* Landscape phones: size the headline by height so the hero clears the header. */
@media (max-height: 520px) {
  .display-1 {
    font-size: clamp(2.375rem, 19svh, 7.5rem);
  }
}

.display-2 {
  font-size: clamp(2.375rem, 7.4vw, 7.5rem);
  font-stretch: 118%;
  letter-spacing: var(--tracking-display);
  line-height: 0.86;
}

.display-2--large {
  font-size: clamp(2.5rem, 8.6vw, 8.75rem);
}

.display-3 {
  font-size: clamp(2rem, 6vw, 6.25rem);
  font-stretch: 118%;
  letter-spacing: var(--tracking-display);
  line-height: 0.86;
}

.heading-1 {
  font-size: clamp(2.125rem, 5.6vw, 5.375rem);
  font-stretch: 114%;
  letter-spacing: var(--tracking-heading);
  line-height: 0.9;
}

.heading-2 {
  font-size: clamp(1.875rem, 4.6vw, 4.25rem);
  font-stretch: 114%;
  letter-spacing: var(--tracking-heading);
  line-height: 0.92;
}

.heading-3 {
  font-size: clamp(1.5rem, 3.6vw, 3.25rem);
  font-stretch: 114%;
  letter-spacing: var(--tracking-heading);
  line-height: 1;
}

.title {
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: -0.035em;
  line-height: 1;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: var(--tracking-title);
  line-height: 1.15;
}

.lead {
  max-width: 46ch;
  font-size: clamp(0.9375rem, 1.35vw, 1.25rem);
  line-height: 1.45;
  color: var(--color-text-lead);
  text-wrap: pretty;
}

.statement {
  font-size: clamp(1.125rem, 1.8vw, 1.6875rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.statement--spaced {
  margin-bottom: 20px;
  font-size: clamp(1.125rem, 1.9vw, 1.75rem);
}

.body-text {
  max-width: 52ch;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.body-text + .body-text {
  margin-top: 14px;
}

.body-text--relaxed {
  max-width: 56ch;
  line-height: 1.7;
}

.body-text--relaxed + .body-text--relaxed {
  margin-top: 16px;
}

.title-spaced {
  margin-bottom: 22px;
}

.small-text {
  max-width: 36ch;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
  font: 400 var(--text-meta)/1.3 var(--font-mono);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-secondary);
}

.eyebrow__index {
  letter-spacing: 0.2em;
  color: var(--color-text-faint);
}

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

.eyebrow--rule {
  align-items: center;
  gap: 14px;
  font-size: clamp(0.6875rem, 1.05vw, 0.75rem);
  letter-spacing: 0.3em;
  color: var(--color-text);
}

.eyebrow--rule::before {
  content: "";
  flex: none;
  width: clamp(28px, 5vw, 64px);
  height: 1px;
  background: var(--color-accent);
}

.label {
  font: 400 var(--text-label)/1.4 var(--font-mono);
  letter-spacing: 0.24em;
  color: var(--color-text-subtle);
}

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

.label--secondary {
  color: var(--color-secondary);
}

.caption {
  font: 400 var(--text-label)/1.6 var(--font-mono);
  letter-spacing: 0.16em;
  color: var(--color-text-soft);
}

.note {
  max-width: 68ch;
  margin-top: 16px;
  font: 300 var(--text-meta)/1.7 var(--font-mono);
  letter-spacing: var(--tracking-note);
  color: var(--color-text-subtle);
}

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

/* --------------------------------------------------------------------------
   Keyframes — shared entrance motion
   -------------------------------------------------------------------------- */

@keyframes kv-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

@keyframes kv-lift {
  from {
    transform: translateY(110%);
  }
}

@keyframes kv-fade {
  from {
    opacity: 0;
  }
}

@keyframes kv-wipe {
  from {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
  }

  to {
    opacity: 1;
    clip-path: inset(0);
  }
}

@keyframes kv-scale-in {
  from {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes kv-drawer-in {
  from {
    transform: translateX(100%);
  }
}

@keyframes kv-drawer-out {
  to {
    transform: translateX(100%);
  }
}

@keyframes kv-fade-out {
  to {
    opacity: 0;
  }
}

@keyframes kv-unwipe {
  from {
    clip-path: inset(0);
  }

  to {
    clip-path: inset(0 0 100% 0);
  }
}

@keyframes kv-zoom-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}
