/* Ezipep design tokens
 *
 * Palette is the 4 November 2026 draft brand pack (docs/sources/2026-11-04/brand-guidelines/), awaiting client approval.
 * Imported by `features/style/tailwind.css`; Tailwind names them in `features/style/colors.css`.
 */

:root {
  /* Core brand. Brand navy is PANTONE 7687 C: the wordmark on white, headings, key actions. */
  --ez-navy: #1d428a;
  --ez-slate: #526171; /* screen-only secondary text, the value Apta gave for web */
  --ez-ice: #eff8fa; /* soft section backgrounds; the brand pack's own ground */
  --ez-white: #ffffff; /* primary canvas */

  /* Front colours, one per category, as on the label and cartridge. Fills and identification only:
     turquoise takes navy text, the other three white (docs/BRAND-REFRESH-PLAN.md). */
  --ez-colour-turquoise: #68d2df; /* Repair & Regeneration, PANTONE 3105 C */
  --ez-colour-blue: #0072ce; /* Dermal, PANTONE 285 C */
  --ez-colour-grey: #5b6770; /* Endocrine & Receptor Signalling, PANTONE 431 C */
  --ez-colour-indigo: #485cc7; /* Cellular & Mitochondrial, PANTONE 2726 C */

  /* Storefront surfaces: the deep band is box blue (the outer box), its tiles brand navy, a cool canvas
     with sunk panels, and one pastel accent for badges and the bar. */
  --ez-deep: #13285e;
  --ez-deep-tile: var(--ez-navy);
  --ez-canvas: #f7f9fa;
  --ez-panel: #ecf1f4;
  --ez-glow: #c4eff4; /* screen-only accent, on box blue only */

  /* Neutrals, derived with a slight blue bias so they read as chosen. */
  --ez-ink: #141a2b;
  --ez-ink-mid: #4a5468;
  --ez-ink-faint: #8a93a6;
  --ez-rule: #dde2ea;
  --ez-rule-soft: #ebeef3;
  --ez-surface: #ffffff;
  --ez-surface-sunk: #f6f8fa;

  /* Semantic. Separate from brand accent. */
  --ez-ok: #1c6647;
  --ez-warn: #8a6412;
  --ez-stop: #a8382a;

  /* Type. The face names live in next/font (`features/fonts`), which sets these variables on <html>.
     The brand pack sets Inter Tight for all text and IBM Plex Mono for data only. */
  --ez-font-display: var(--font-inter-tight), system-ui, sans-serif;
  --ez-font-body: var(--font-inter-tight), system-ui, -apple-system, sans-serif;
  --ez-font-mono: var(--font-ibm-plex-mono), ui-monospace, Menlo, monospace;

  /* Scale. 1.25 ratio from 16px. */
  --ez-text-xs: 0.75rem;
  --ez-text-sm: 0.875rem;
  --ez-text-base: 1rem;
  --ez-text-lg: 1.25rem;
  --ez-text-xl: 1.563rem;
  --ez-text-2xl: 1.953rem;
  --ez-text-3xl: 2.441rem;
  --ez-text-4xl: 3.052rem;

  /* Spacing. 4px base. */
  --ez-space-1: 0.25rem;
  --ez-space-2: 0.5rem;
  --ez-space-3: 0.75rem;
  --ez-space-4: 1rem;
  --ez-space-6: 1.5rem;
  --ez-space-8: 2rem;
  --ez-space-12: 3rem;
  --ez-space-16: 4rem;
  --ez-space-24: 6rem;

  --ez-radius-sm: 3px;
  --ez-radius: 6px;
  --ez-radius-lg: 12px;

  --ez-measure: 65ch;
}

:root {
  --reveal: cubic-bezier(0.23, 1, 0.32, 1);
}

/* The holding page. build.ts prepends design/tokens.css and the site's reveal curve. */

@font-face {
  font-family: "Inter Tight";
  src: url("assets/fonts/inter-tight-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --font-inter-tight: "Inter Tight";
  --font-ibm-plex-mono: "IBM Plex Mono";
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --edge: clamp(1.5rem, 3.6vw, 2.75rem);
  --mark-w: clamp(6.5rem, 8vw, 8.25rem);
  --soft: color-mix(in oklab, var(--ez-white) 76%, transparent);
  --faint: color-mix(in oklab, var(--ez-white) 60%, transparent);
  --hair: color-mix(in oklab, var(--ez-white) 14%, transparent);
  --error: color-mix(in oklab, var(--ez-stop) 28%, var(--ez-white));
  color-scheme: dark;
}

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

html {
  background: var(--ez-deep);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ez-deep);
  color: var(--ez-white);
  font-family: var(--ez-font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

p,
h1 {
  margin: 0;
}

::selection {
  background: var(--ez-glow);
  color: var(--ez-deep);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:where(a, button):focus-visible {
  outline: 2px solid var(--ez-white);
  outline-offset: 3px;
}

/* Layout: masthead, the hero filling the rest, and the footer; the orb sits right of the copy from 60rem. */

.page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding: var(--edge) var(--gutter) max(var(--edge), env(safe-area-inset-bottom));
  overflow-x: clip;
}

.masthead__wordmark {
  display: block;
  width: var(--mark-w);
  height: auto;
  overflow: visible;
  color: var(--ez-white);
}

.masthead__home {
  display: inline-block;
  border-radius: 2px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(3rem, 10vw, 4.5rem);
  align-content: center;
  padding-block: clamp(3.5rem, 12vw, 5rem);
}

/* A fixed track: an auto one grows to its longest line of text and pushes the form off narrow screens. */
.hero__copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  min-width: 0;
  max-width: 32rem;
}

.hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ez-glow);
}

.hero__headline {
  margin-top: 1.125rem;
  font-size: clamp(2.5rem, 1.75rem + 3.2vw, 3.5rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero__headline--small {
  margin-top: 0;
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3rem);
}

/* Each word's mask keeps the descender of the g inside it. */
.hero__word {
  display: inline-block;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
  overflow: clip;
  vertical-align: top;
}

.hero__word > span {
  display: inline-block;
}

.hero__lede {
  margin-top: 1.25rem;
  max-width: 31ch;
  font-size: clamp(1rem, 0.94rem + 0.28vw, 1.1875rem);
  line-height: 1.5;
  color: var(--soft);
  text-wrap: pretty;
}

.hero__link {
  color: var(--ez-white);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* The launch-list form: one field and its button on a single pill. */

/* The form and its confirmation share one cell, so the copy above does not move when one replaces the other. */
.notify {
  display: grid;
  width: 100%;
  max-width: 27rem;
  margin-top: clamp(2.25rem, 6vw, 3rem);
}

.notify > * {
  grid-area: 1 / 1;
}

.notify[hidden],
.notify__done[hidden] {
  display: none;
}

.notify__form[hidden] {
  display: block;
  visibility: hidden;
}

.notify__prompt {
  margin-bottom: 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

.notify__field {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3125rem;
  border: 1px solid color-mix(in oklab, var(--ez-white) 24%, transparent);
  border-radius: 999px;
  background: color-mix(in oklab, var(--ez-white) 6%, transparent);
  transition: border-color 0.25s ease;
}

.notify__field:hover {
  border-color: color-mix(in oklab, var(--ez-white) 40%, transparent);
}

.notify__field:has(.notify__input:focus-visible) {
  border-color: var(--ez-white);
  outline: 2px solid var(--ez-white);
  outline-offset: 3px;
}

.notify__field:has(.notify__input[aria-invalid="true"]) {
  border-color: var(--error);
}

.notify__input {
  flex: 1;
  min-width: 0;
  height: 2.75rem;
  padding: 0 0.5rem 0 1rem;
  border: 0;
  background: transparent;
  color: var(--ez-white);
  font: inherit;
  font-size: 1rem;
  outline: none;
}

.notify__input::placeholder {
  color: var(--faint);
  opacity: 1;
}

.notify__button {
  flex: none;
  height: 2.75rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--ez-white);
  color: var(--ez-deep);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    opacity 0.25s ease;
}

.notify__button:hover {
  background: var(--ez-glow);
}

.notify__button[aria-disabled="true"] {
  opacity: 0.72;
  cursor: progress;
}

.notify__trap {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notify__error {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--error);
}

.notify__error:empty {
  margin-top: 0;
}

.notify__consent {
  margin-top: 0.875rem;
  max-width: 44ch;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--faint);
}

.notify__done {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  align-self: center;
  max-width: 34ch;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ez-white);
  outline: none;
}

.notify__done::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ez-glow);
  translate: 0 -0.0625rem;
}

/* The orb: a dial ring with fine ticks round a painted ball. Its size is the one measure. */

.orb {
  --orb: 20rem;
  display: grid;
  place-items: center;
  min-width: 0;
  container-type: inline-size;
}

.orb__ring {
  position: relative;
  width: min(100cqi, var(--orb));
  aspect-ratio: 1;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

[data-orb-ready] .orb__ring {
  cursor: grab;
}

.orb.is-dragging .orb__ring {
  cursor: grabbing;
}

.orb__dial {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.orb__line,
.orb__ticks {
  fill: none;
}

.orb__line {
  stroke: color-mix(in oklab, var(--ez-white) 26%, transparent);
  stroke-width: 0.2;
  stroke-dasharray: 1;
  transform-box: view-box;
  transform-origin: 50% 50%;
  rotate: -90deg;
}

/* 72 hairline ticks: a tiny dash on a wide stroke reads as radial; half a step off, so the seam falls in a gap. */
.orb__ticks {
  stroke: color-mix(in oklab, var(--ez-white) 22%, transparent);
  stroke-width: 1.1;
  stroke-dasharray: 0.14 4.86;
  stroke-dashoffset: 2.5;
}

.orb__marker {
  fill: var(--ez-white);
  transform-box: view-box;
  transform-origin: 50% 50%;
  rotate: var(--spin, 0deg);
}

.orb__slot {
  position: absolute;
  inset: 16%;
}

.orb__ball {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

/* The CSS orb: the designed fallback without a GPU or without script, in the same paint. */
.orb__ball::before {
  content: "";
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ez-colour-blue) 0%, transparent 62%);
  filter: blur(30px);
  opacity: 0.45;
}

.orb__paint {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 50%;
  background: var(--ez-colour-blue);
}

.orb__swirl {
  position: absolute;
  inset: 0;
  rotate: var(--turn, 0rad);
}

.orb__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
}

.orb__blob--1 {
  top: 34%;
  left: -8%;
  width: 78%;
  height: 70%;
  background: var(--ez-navy);
}

.orb__blob--2 {
  top: -6%;
  left: 40%;
  width: 62%;
  height: 58%;
  background: var(--ez-ice);
}

.orb__blob--3 {
  top: 52%;
  left: 52%;
  width: 40%;
  height: 40%;
  background: var(--ez-colour-turquoise);
}

.orb__ball.is-gl::before,
.orb__ball.is-gl .orb__paint {
  display: none;
}

.orb__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Footer: the notices, then the company, above a hairline. */

.footer {
  display: grid;
  gap: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hair);
}

.footer__notice {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer__notice > span:not(.footer__dot) {
  white-space: nowrap;
}

.footer__company {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--faint);
}

@media (min-width: 40rem) {
  .orb {
    --orb: 26rem;
  }
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 30rem) minmax(0, 1fr);
    align-items: center;
    gap: clamp(3rem, 6vw, 6rem);
    padding-block: 3rem;
  }

  .orb {
    --orb: min(calc(100svh - 16rem), 46rem);
  }

  .footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem 2rem;
  }

  .footer__company {
    text-align: end;
  }
}

/* The intro, with motion allowed only: the wordmark wipes in at the centre, glides home, then the page rises. */

@media (prefers-reduced-motion: no-preference) {
  .page--home {
    --intro-scale: 2.4;
  }

  .page--home .masthead__wordmark {
    transform-origin: 0 0;
    animation: mark-home 0.8s var(--reveal) 0.95s both;
  }

  .page--home .wordmark__word {
    animation: mark-wipe 0.8s cubic-bezier(0.65, 0, 0.35, 1) 0.1s both;
  }

  .page--home .wordmark__tm {
    animation: fade 0.4s ease 0.75s both;
  }

  .page--home .hero__eyebrow {
    animation: rise 0.8s var(--reveal) 1.2s both;
  }

  .page--home .hero__word > span {
    animation: word 0.95s var(--reveal) 1.25s both;
  }

  .page--home .hero__word:nth-child(2) > span {
    animation-delay: 1.33s;
  }

  .page--home .hero__lede {
    animation: rise 0.8s var(--reveal) 1.45s both;
  }

  .page--home .notify {
    animation: rise 0.8s var(--reveal) 1.55s both;
  }

  .page--home .notify__done:not([hidden]) {
    animation: rise 0.6s var(--reveal) both;
  }

  .page--home .orb__line {
    animation: draw 1.6s var(--reveal) 1.05s both;
  }

  .page--home .orb__ticks {
    animation: fade 1s ease 1.35s both;
  }

  .page--home .orb__slot {
    animation: orb-in 1.4s var(--reveal) 1.1s both;
  }

  .page--home .orb__marker > circle {
    animation: fade 0.6s ease 2.1s both;
  }

  .page--home .footer {
    animation: fade 0.8s ease 1.7s both;
  }
}

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

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

/* From the viewport's centre at the intro scale to its own place; transform-origin is its top left. */
@keyframes mark-home {
  from {
    translate: calc(50vw - var(--gutter) - var(--mark-w) * var(--intro-scale) / 2)
      calc(50svh - var(--edge) - var(--mark-w) * var(--intro-scale) * 0.113);
    scale: var(--intro-scale);
  }

  to {
    translate: 0 0;
    scale: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 0.75rem;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes word {
  from {
    translate: 0 108%;
  }

  to {
    translate: 0 0;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes orb-in {
  from {
    opacity: 0;
    scale: 0.82;
  }

  to {
    opacity: 1;
    scale: 1;
  }
}
