/* NUWIVO: the oval of the emblem is the page's geometry.
   Quiet ground, one hairline oval, oval portraits, pill controls,
   a single deep blue for what is live. */

/* ---------- Font (self-hosted variable font) ---------- */
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/hanken-grotesk-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: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/hanken-grotesk-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --ink: #0b0b0c;
  --muted: #5f5f66;
  --line: rgba(11, 11, 12, 0.12);
  --line-strong: rgba(11, 11, 12, 0.28);
  --accent: #2d4bff;
  --danger: #b3261e;

  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1200px;
  --pill: 999px;
  --r: 16px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  /* data-scheme="light" (screenshots only, via ?light) keeps the light tokens */
  :root:not([data-scheme="light"]) {
    --bg: #0b0b0c;
    --surface: #141416;
    --ink: #f4f4f2;
    --muted: #a1a1a8;
    --line: rgba(244, 244, 242, 0.12);
    --line-strong: rgba(244, 244, 242, 0.3);
    --accent: #8c98ff;
    --danger: #ff8a80;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.24em; text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); transition: text-decoration-color 160ms ease, color 160ms ease; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
[hidden] { display: none !important; }

html { scrollbar-color: var(--line-strong) var(--bg); }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-color: currentColor; }
}

.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.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 {
  position: absolute; left: var(--gutter); top: 12px; z-index: 100;
  padding: 10px 18px; border-radius: var(--pill);
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 500;
  transform: translateY(-160%);
  transition: transform 160ms var(--ease-out);
}
.skip:focus-visible { transform: none; }

/* ---------- Emblem and wordmark (one asset each, tinted by currentColor) ---------- */
.emblem {
  display: block;
  aspect-ratio: 1006 / 570;
  background: currentColor;
  -webkit-mask: url("../img/emblem.svg") center / contain no-repeat;
          mask: url("../img/emblem.svg") center / contain no-repeat;
}
.wordmark {
  display: block;
  width: 118px; height: 12px;
  background: currentColor;
  -webkit-mask: url("../img/wordmark.webp") center / contain no-repeat;
          mask: url("../img/wordmark.webp") center / contain no-repeat;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header[data-scrolled] { border-bottom-color: var(--line); }
.site-header .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; text-decoration: none; color: var(--ink); }
.brand .emblem { width: 40px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-grid; place-items: center;
  min-height: 44px; padding: 0 14px;
  border-radius: var(--pill);
  color: var(--muted); text-decoration: none; font-size: 15px;
  transition: color 160ms ease, background-color 160ms ease;
}

/* Language switch: a small pill with the current language filled */
.lang {
  position: relative;
  display: inline-flex; margin-left: 8px; padding: 3px;
  border-radius: var(--pill);
  box-shadow: inset 0 0 0 1px var(--line);
}
.lang a {
  display: grid; place-items: center;
  min-width: 44px; height: 38px; padding: 0 10px;
  border-radius: var(--pill);
  color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: 0.06em;
  transition: color 160ms ease, background-color 200ms var(--ease-out), transform 160ms var(--ease-out);
}
.lang a[aria-current="true"] { background: var(--ink); color: var(--bg); }
.lang a:active { transform: scale(0.96); }

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover { color: var(--ink); background: var(--line); }
  .lang a:not([aria-current="true"]):hover { color: var(--ink); }
}

/* ---------- Buttons: full pills ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 26px;
  border: 0; border-radius: var(--pill);
  background: var(--ink); color: var(--bg);
  font: inherit; font-size: 16px; font-weight: 500; letter-spacing: 0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease, background-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-label { display: inline-block; height: 1.5em; line-height: 1.5em; overflow: hidden; }
.btn-label > span { display: block; transition: transform 380ms var(--ease-out); }
.btn-arrow { width: 16px; height: 16px; flex: none; transition: transform 380ms var(--ease-out); }

.btn--quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; gap: 10px; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover .btn-label > span { transform: translateY(-100%); }
  .btn:hover .btn-arrow { transform: translateX(3px); }
  .btn--quiet:hover { box-shadow: inset 0 0 0 1px var(--ink); }
}

/* ---------- Hero: the drawn oval ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 73px);
  display: grid; place-items: center;
  padding: clamp(40px, 7vh, 80px) 0 clamp(56px, 9vh, 96px);
  overflow: hidden;
}
.hero-oval {
  position: absolute;
  left: 50%; top: 50%;
  width: min(92vw, 1240px);
  aspect-ratio: 1006 / 570;
  transform: translate(-50%, -50%) translate3d(var(--ox, 0px), var(--oy, 0px), 0);
  max-width: none;
  color: var(--line-strong);
  pointer-events: none;
}
.hero-oval ellipse { fill: none; stroke: currentColor; stroke-width: 1.1; }
.hero-oval .inner { stroke: var(--line); }

.hero-copy {
  position: relative;
  display: grid; justify-items: center; gap: 40px;
  max-width: 900px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.75rem, 7.4vw, 6rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- Sections ---------- */
.section { padding: clamp(88px, 14vh, 152px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(48px, 8vh, 80px); }
.section-head h2 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); font-weight: 300; line-height: 1.05; letter-spacing: -0.035em; text-wrap: balance; }
.section-head p { color: var(--muted); max-width: 46ch; text-wrap: pretty; }

/* Founders: oval portraits */
.founders { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.founder { display: grid; justify-items: center; gap: 22px; text-align: center; }
.portrait {
  position: relative;
  width: min(100%, 260px);
  aspect-ratio: 4 / 5;
}
.portrait::before {
  /* the ring around the oval frame */
  content: "";
  position: absolute; inset: -12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: inset 420ms var(--ease-out), box-shadow 300ms ease;
}
.portrait img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  transition: transform 600ms var(--ease-out);
}
.founder h3 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); font-weight: 300; letter-spacing: -0.025em; line-height: 1.1; }
.founder-role { margin-top: 6px; color: var(--muted); font-size: 15px; }
.founder-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

@media (hover: hover) and (pointer: fine) {
  .founder:hover .portrait::before { inset: -20px; box-shadow: inset 0 0 0 1px var(--ink); }
  .founder:hover .portrait img { transform: scale(1.02); }
}

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 32px clamp(32px, 6vw, 96px); }
.contact-aside { display: grid; align-content: start; gap: 18px; color: var(--muted); position: sticky; top: 112px; align-self: start; }
.contact-aside h2 { color: var(--ink); font-size: clamp(2.25rem, 4.6vw, 3.75rem); font-weight: 300; line-height: 1.05; letter-spacing: -0.035em; text-wrap: balance; margin-bottom: 4px; }
.contact-aside a { color: var(--ink); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 20px; }
.field { display: grid; gap: 4px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 15px; color: var(--muted); }
.field .hint { color: var(--muted); }
.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit; font-size: 17px;
  transition: border-color 200ms ease;
}
textarea.input { min-height: 132px; resize: vertical; line-height: 1.55; }
.input:focus-visible { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 0 var(--accent); }
.input[aria-invalid="true"] { border-bottom-color: var(--danger); box-shadow: 0 1px 0 0 var(--danger); }
.field__error { color: var(--danger); font-size: 15px; margin-top: 4px; }
.field__error:empty { display: none; }

.consent { grid-column: 1 / -1; display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.consent input {
  appearance: none; -webkit-appearance: none;
  display: grid; place-items: center;
  width: 20px; height: 20px; margin: 3px 0 0;
  border-radius: 6px; background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}
.consent input::after { content: ""; width: 10px; height: 6px; border: solid var(--bg); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg) scale(0.6); opacity: 0; transition: transform 160ms var(--ease-out), opacity 120ms ease; }
.consent input:checked { background: var(--ink); box-shadow: none; }
.consent input:checked::after { opacity: 1; transform: translateY(-1px) rotate(-45deg) scale(1); }
.consent input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--danger); }
.consent-text { font-size: 15px; color: var(--muted); }
.consent-text a { color: var(--ink); }
.consent .field__error { grid-column: 2; }

.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.form__status { color: var(--muted); font-size: 15px; }
.form__status[data-state="sent"] { color: var(--ink); }
.form__status[data-state="error"] { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 40px; color: var(--muted); font-size: 15px; }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.footer-brand { display: flex; align-items: center; gap: 16px; color: var(--ink); }
.footer-brand .emblem { width: 44px; }
.footer-brand small { color: var(--muted); font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 2px; }
.footer-links a, .footer-links button {
  display: inline-grid; place-items: center;
  min-height: 44px; padding: 0 12px;
  border: 0; border-radius: var(--pill); background: none;
  color: var(--muted); font: inherit; text-decoration: none; cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}
.footer-links a[aria-current="page"] { color: var(--ink); }
.socials { display: flex; gap: 4px; }
.social {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: var(--ink);
  transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}
.social svg { width: 19px; height: 19px; }
.social:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover, .footer-links button:hover { color: var(--ink); background: var(--line); }
  .social:hover { background: var(--ink); color: var(--bg); }
}

/* ---------- Document pages (legal) ---------- */
.doc { padding: clamp(56px, 10vh, 112px) 0 clamp(80px, 14vh, 136px); }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 32px clamp(32px, 6vw, 96px); }
.doc-title { align-self: start; position: sticky; top: 104px; }
.doc-title h1 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); font-weight: 300; line-height: 1.04; letter-spacing: -0.035em; }
.doc-meta { margin-top: 14px; color: var(--muted); font-size: 15px; }
.doc-body { max-width: 68ch; }
.doc-body h2 { margin: 44px 0 10px; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p, .doc-body li { color: var(--muted); }
.doc-body p + p { margin-top: 12px; }
.doc-body ul { margin: 8px 0 0; padding-left: 20px; }
.doc-body a { color: var(--ink); }
.doc-body strong { color: var(--ink); font-weight: 500; }

/* ---------- Small pages (404, thank you) ---------- */
.note { position: relative; min-height: calc(100svh - 73px - 132px); display: grid; place-items: center; padding: 72px 0; overflow: hidden; text-align: center; }
.note .hero-oval { width: min(86vw, 900px); }
.note-copy { position: relative; display: grid; justify-items: center; gap: 22px; max-width: 640px; }
.note h1 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); font-weight: 300; line-height: 1.04; letter-spacing: -0.04em; text-wrap: balance; }
.note p { color: var(--muted); max-width: 44ch; }

/* ---------- Cookie banner ---------- */
.consent-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 0 var(--gutter) 18px; pointer-events: none; }
.consent-card {
  pointer-events: auto;
  max-width: 760px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: center;
  padding: 18px 18px 18px 24px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 48px -18px rgba(0, 0, 0, 0.35);
  transition: transform 320ms var(--ease-out), opacity 320ms var(--ease-out);
}
.consent-card h2 { font-size: 16px; font-weight: 500; }
.consent-card p { margin-top: 2px; color: var(--muted); font-size: 15px; }
.consent-actions { display: flex; gap: 8px; }
@starting-style { .consent-card { transform: translateY(24px); opacity: 0; } }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* The hero oval draws itself once */
  .hero-oval .outer { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2200ms var(--ease-in-out) 200ms forwards; }
  .hero-oval .inner { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2400ms var(--ease-in-out) 520ms forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }


}

/* Screenshots and the share image: everything at rest */
[data-still] .hero-oval ellipse { animation: none !important; opacity: 1; transform: none; filter: none; stroke-dashoffset: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .contact-grid, .doc-grid { grid-template-columns: 1fr; }
  .contact-aside { position: static; }
  .doc-title { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .wrap { height: 64px; }
  .nav-link { display: none; }
  .brand .wordmark { width: 96px; }
  .hero { min-height: calc(100svh - 65px); }
  /* On a phone the oval stands upright around the copy */
  .hero-oval { width: 196vw; transform: translate(-50%, -50%) rotate(90deg); }
  .hero-oval ellipse { stroke-width: 2; }
  .note .hero-oval { width: 160vw; }
  .actions { width: 100%; flex-direction: column; }
  .actions .btn { width: 100%; }
  .founders { grid-template-columns: 1fr; gap: 64px; }
  .portrait { width: min(64vw, 260px); }
  .form { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; }
  .consent-card { grid-template-columns: 1fr; border-radius: 24px; }
  .consent-actions .btn { flex: 1; }
  .footer-links { margin-left: -12px; }
  .socials { margin-left: -12px; }
}
