/* OPAX.SCIENCE — one typeface, its width axis is the voice. Black, paper, one sphere. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --black: #000;
  --paper: #f4f4f2;
  --ink: #f2f2ef;
  --ink-soft: #a3a39e;
  --rule: rgba(242, 242, 239, 0.16);
  --accent: #e6e6e2;
  --accent-ink: #000;
  --glow: 255, 255, 255;
  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --col: minmax(0, 1fr);
}

body[data-accent="orange"] {
  --accent: #f6821f;
  --glow: 246, 130, 31;
}

body[data-accent="blue"] {
  --accent: #3b7be0;
  --glow: 59, 123, 224;
}

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

html {
  background: var(--black);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  line-height: 1.5;
  font-weight: 400;
  font-stretch: 100%;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -100vw;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--paper);
  color: var(--black);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
}

/* ---- nav ---- */

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  transition: background-color 200ms;
}

.site-nav.scrolled {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
}

.nav-inner {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  padding: 1.25rem var(--gutter);
}

.wordmark {
  font-weight: 700;
  font-stretch: 118%;
  letter-spacing: 0.02em;
  font-size: 1rem;
}

.wordmark .dot {
  color: var(--accent);
}

.nav-links {
  display: none;
  gap: 1.5rem;
  margin-left: auto;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.nav-links a:hover {
  color: var(--ink);
}

.lang-switch {
  display: flex;
  gap: 0.9rem;
  font-size: 0.85rem;
  font-stretch: 90%;
  color: var(--ink-soft);
  margin-left: auto;
}

.lang-switch a[aria-current] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

@media (min-width: 60rem) {
  .nav-links {
    display: flex;
  }

  .lang-switch {
    margin-left: 0;
  }
}

/* ---- hero ---- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: end;
  padding: 7rem var(--gutter) 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* The sphere lives in a square box (1.3 × diameter) so the shader only runs where it is seen. */
.hero-bg {
  --d: min(66svh, 46vw);
}

#sphere-canvas,
.sphere-fallback {
  position: absolute;
  width: calc(var(--d) * 1.3);
  height: calc(var(--d) * 1.3);
  left: calc(77% - var(--d) * 0.65);
  top: calc(40% - var(--d) * 0.65);
  will-change: transform, opacity;
}

.sphere-fallback {
  display: none;
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(var(--glow), 0.55) 0,
      rgba(var(--glow), 0.12) 30%,
      transparent 46%
    ),
    radial-gradient(
      circle at 46% 44%,
      rgba(255, 255, 255, 0.92) 0,
      rgba(255, 255, 255, 0.3) 24%,
      transparent 38%
    );
}

@media (max-width: 720px) {
  .hero-bg {
    --d: min(58vw, 33svh);
  }

  /* top right under the nav, bleeding off the edge; the headline meets only the shadow side */
  #sphere-canvas,
  .sphere-fallback {
    left: calc(80% - var(--d) * 0.65);
    top: calc(22% - var(--d) * 0.65);
  }
}

.no-webgl #sphere-canvas {
  display: none;
}

.no-webgl .sphere-fallback {
  display: block;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 62rem;
}

.eyebrow {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 8.2vw, 7.4rem);
  line-height: 0.96;
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero h1 .h1-b {
  display: block;
  font-weight: 300;
  font-stretch: 100%;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
}

.lead {
  max-width: var(--measure);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.45;
  margin-top: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.btn {
  display: inline-block;
  padding: 0.9rem 1.4rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1;
  transition:
    background-color 160ms,
    color 160ms,
    border-color 160ms;
}

.btn-primary {
  background: var(--ink);
  color: var(--black);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

body[data-accent="neutral"] .btn-primary:hover {
  background: var(--paper);
  border-color: var(--paper);
}

.btn-secondary {
  color: var(--ink);
  border-color: var(--rule);
}

.btn-secondary:hover {
  border-color: var(--ink);
}

.facts {
  list-style: none;
  padding: 0;
  margin-top: 3.5rem;
  display: grid;
  gap: 0.6rem 2.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-stretch: 88%;
  max-width: 62rem;
}

.facts li {
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
}

@media (min-width: 48rem) {
  .facts {
    grid-template-columns: repeat(3, var(--col));
  }
}

/* ---- ticker ---- */

.ticker-wrap {
  overflow: hidden;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.85rem 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-stretch: 92%;
}

.ticker {
  display: flex;
  width: max-content;
  animation: ticker 70s linear infinite;
}

.ticker-wrap.paused .ticker {
  animation-play-state: paused;
}

.ticker-row {
  display: flex;
}

.ticker-row span {
  padding: 0 1.75rem;
  white-space: nowrap;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker {
    animation: none;
    width: auto;
  }

  .ticker-row + .ticker-row {
    display: none;
  }

  .ticker-row {
    flex-wrap: wrap;
    row-gap: 0.5rem;
    padding: 0 var(--gutter);
  }
}

/* ---- sections ---- */

section {
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  max-width: 40rem;
  text-wrap: balance;
}

/* ---- services: a list, not cards; price set condensed like a meter reading ---- */

.service-list {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.service {
  display: grid;
  grid-template-columns: var(--col);
  gap: 0.5rem 2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.service-title {
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 600;
  font-stretch: 108%;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.service-text {
  color: var(--ink-soft);
  max-width: var(--measure);
}

.service-price {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 500;
  font-stretch: 62%;
  letter-spacing: 0.01em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

@media (min-width: 56rem) {
  .service {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 3fr);
    align-items: start;
  }

  .service-price {
    text-align: right;
  }
}

/* ---- proof: inverted paper block, the numbers are the picture ---- */

.proof {
  background: var(--paper);
  color: var(--black);
  border-top: 3px solid var(--accent);
}

body[data-accent="neutral"] .proof {
  border-top-color: var(--black);
}

.proof .section-title,
.proof h2 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.proof-table-wrap {
  overflow-x: auto;
}

.proof-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
  min-width: 40rem;
}

.proof-table th {
  text-align: left;
  font-weight: 500;
  color: #55554f;
  padding: 0 1rem 0.7rem 0;
  border-bottom: 1px solid var(--black);
}

.proof-table td {
  padding: 0.9rem 1rem 0.9rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.proof-table td:nth-child(3),
.proof-table td:nth-child(4) {
  font-stretch: 75%;
  font-size: 1.15rem;
  white-space: nowrap;
}

.score {
  position: relative;
  min-width: 12rem;
}

.score .bar {
  display: block;
  height: 0.55rem;
  width: calc(var(--score) * 1%);
  background: var(--black);
  max-width: 100%;
}

.score .num {
  display: block;
  margin-top: 0.3rem;
  font-stretch: 75%;
  font-size: 1.15rem;
}

.highlight td {
  border-bottom: 2px solid var(--black);
  font-weight: 600;
}

.highlight .score .bar {
  background: var(--accent);
}

body[data-accent="neutral"] .highlight .score .bar {
  background: var(--black);
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

.proof-footnote {
  margin-top: 1.5rem;
  max-width: 44rem;
  color: #3a3a36;
  font-size: 0.95rem;
}

/* ---- process: a sequence, so numbered ---- */

.timeline {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2rem;
  counter-reset: step;
}

.timeline-step {
  display: grid;
  grid-template-columns: 3rem var(--col);
  gap: 0 1rem;
  align-content: start;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.step-num {
  font-size: 2.4rem;
  line-height: 1;
  font-weight: 300;
  font-stretch: 70%;
  color: var(--accent);
}

body[data-accent="neutral"] .step-num {
  color: var(--ink);
}

.step-body strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.step-body span {
  color: var(--ink-soft);
}

@media (min-width: 56rem) {
  .timeline {
    grid-template-columns: repeat(4, var(--col));
  }

  .timeline-step {
    grid-template-columns: var(--col);
  }

  .step-num {
    margin-bottom: 1rem;
  }
}

/* ---- audience ---- */

.audience-grid {
  display: grid;
  gap: 2rem;
}

.audience-col h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.audience-col p {
  color: var(--ink-soft);
}

@media (min-width: 56rem) {
  .audience-grid {
    grid-template-columns: repeat(3, var(--col));
    gap: 0;
  }

  .audience-col {
    padding: 0 2rem;
    border-left: 1px solid var(--rule);
  }

  .audience-col:first-child {
    padding-left: 0;
    border-left: 0;
  }
}

/* ---- founder ---- */

.founder-text {
  max-width: 46rem;
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  line-height: 1.4;
  font-weight: 300;
}

.founder-text a {
  box-shadow: inset 0 -1px 0 var(--accent);
}

/* ---- contact ---- */

.contact {
  border-top: 1px solid var(--rule);
}

.contact-form {
  display: grid;
  gap: 1.4rem;
  max-width: 44rem;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 0;
  border-radius: 0;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

body[data-accent="neutral"] .contact-form input:focus,
body[data-accent="neutral"] .contact-form textarea:focus {
  border-bottom-color: var(--ink);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  cursor: pointer;
  justify-self: start;
  font-family: inherit;
}

.form-status {
  min-height: 1.5em;
  color: var(--ink-soft);
}

.turnstile-container[hidden] {
  display: none;
}

.contact-details {
  display: grid;
  gap: 0.35rem;
  margin-top: 3rem;
  color: var(--ink-soft);
  font-stretch: 90%;
}

.contact-details span:empty {
  display: none;
}

.contact-details a,
.legal-main a {
  color: inherit;
  box-shadow: inset 0 -1px 0 var(--accent);
}

@media (min-width: 56rem) {
  .contact-form {
    grid-template-columns: repeat(2, var(--col));
  }

  .contact-form label:nth-child(4),
  .contact-form .turnstile-container,
  .contact-form button,
  .contact-form .form-status {
    grid-column: 1 / -1;
  }
}

/* ---- footer ---- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem var(--gutter) 3.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-stretch: 92%;
}

.footer-inner {
  display: grid;
  gap: 1rem;
}

.footer-inner nav {
  display: flex;
  gap: 1.5rem;
}

.footer-inner a:hover {
  color: var(--ink);
}

@media (min-width: 56rem) {
  .footer-inner {
    grid-template-columns: auto 1fr auto auto;
    align-items: baseline;
    gap: 2.5rem;
  }
}

/* ---- legal + 404 ---- */

.legal-main,
.error-page {
  padding: 8rem var(--gutter) 4rem;
  max-width: 44rem;
}

.legal-main h1,
.error-page h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
}

.legal-main section {
  padding: 0;
  margin-top: 2.25rem;
}

.legal-main h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.legal-main p {
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
  max-width: 38rem;
  line-height: 1.55;
}

.error-page h1 {
  font-size: clamp(5rem, 22vw, 14rem);
  font-weight: 200;
  font-stretch: 62%;
  line-height: 1;
}
