/* Quantum Reach: site styles */

@font-face {
  font-family: "Archivo QR";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"),
       url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  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: "Archivo QR";
  src: url("fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations"),
       url("fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --field: #1b2be0;
  --field-deep: #1321b5;
  --ink: #0a1033;
  --ink-soft: #3b4468;
  --ink-mute: #5d6688;
  --paper: #f3f5fa;
  --white: #ffffff;
  --mist: #d9deec;
  --wave: #9eabff;
  --signal: #ffb21e;
  --focus: var(--ink);

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.45rem, 1.2rem + 0.9vw, 1.85rem);
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.9rem);
  --step-4: clamp(2.4rem, 1.4rem + 4.4vw, 4.75rem);

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1280px;
  --header-h: 72px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: "Archivo QR", "Helvetica Neue", Arial, system-ui, sans-serif;
  font-size: var(--step-0);
  font-stretch: 100%;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark { --focus: var(--signal); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--signal);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  color: var(--ink);
  background: rgba(243, 245, 250, 0.9);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--mist);
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.site-header[data-tone="dark"] {
  --focus: var(--signal);
  color: var(--white);
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 750;
  font-stretch: 120%;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand svg { width: 30px; height: 30px; flex: none; }
.brand .ring { stroke: currentColor; }
.brand .core { fill: currentColor; }
.brand .tail { fill: var(--signal); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
}
.nav a:not(.btn) {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 520;
  opacity: 0.88;
}
.nav a:not(.btn):hover { opacity: 1; text-decoration: underline; }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--field);
  --btn-fg: var(--white);
  --btn-bd: var(--field);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0.8em 1.45em;
  border-radius: 999px;
  border: 1.5px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 620;
  font-stretch: 108%;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { --btn-bg: var(--field-deep); --btn-bd: var(--field-deep); text-decoration: none; }
.btn-small { min-height: 40px; padding: 0.65em 1.15em; font-size: 0.9375rem; white-space: nowrap; }

.btn-light { --btn-bg: var(--white); --btn-fg: var(--field); --btn-bd: var(--white); }
.btn-light:hover { --btn-bg: var(--paper); --btn-bd: var(--paper); }
.btn-ghost { --btn-bg: transparent; --btn-fg: currentColor; --btn-bd: rgba(255, 255, 255, 0.55); }
.btn-ghost:hover { --btn-bg: rgba(255, 255, 255, 0.1); --btn-bd: var(--white); }

.site-header[data-tone="dark"] .btn { --btn-bg: var(--white); --btn-fg: var(--field); --btn-bd: var(--white); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: max(640px, 100svh);
  background: var(--field);
  color: var(--white);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.hero-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(27, 43, 224, 0.9) 0, rgba(27, 43, 224, 0) 150px),
    linear-gradient(0deg, rgba(27, 43, 224, 0.92) 0%, rgba(27, 43, 224, 0.55) 30%, rgba(27, 43, 224, 0) 62%);
}
.hero-inner {
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: clamp(40px, 7vh, 88px);
}
.hero h1 {
  font-size: clamp(2.5rem, 10.2vw, 10.25rem);
  font-weight: 820;
  font-stretch: 125%;
  line-height: 0.9;
  letter-spacing: -0.035em;
  margin-bottom: clamp(32px, 5vh, 56px);
}
.hero h1 .line { display: block; }

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px 48px;
}
.hero-foot p {
  max-width: 50ch;
  font-size: var(--step-1);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* The one orchestrated moment: the headline widens as the field reaches out */
@media (prefers-reduced-motion: no-preference) {
  .js .hero h1 .line {
    animation: reach 1.7s cubic-bezier(0.16, 0.8, 0.12, 1) both;
  }
  .js .hero h1 .line:nth-child(2) { animation-delay: 0.12s; }
  .js .hero h1 .line:nth-child(3) { animation-delay: 0.24s; }
  .js .hero-foot {
    animation: settle 0.9s ease 1.1s both;
  }
}
@keyframes reach {
  0%   { font-stretch: 62%; letter-spacing: 0.04em; opacity: 0; }
  12%  { opacity: 1; }
  100% { font-stretch: 125%; letter-spacing: -0.035em; opacity: 1; }
}
@keyframes settle {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(88px, 11vw, 168px); }

.section-title {
  font-size: var(--step-4);
  font-stretch: 122%;
  font-weight: 790;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.section-lead {
  margin-top: 24px;
  max-width: 44ch;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-soft);
}

/* Services */

.services-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px clamp(40px, 6vw, 96px);
}
.services-intro {
  position: sticky;
  top: calc(var(--header-h) + 40px);
  align-self: start;
}
.service-list { list-style: none; margin: 0; padding: 0; }
.service {
  display: grid;
  gap: 12px;
  padding-block: 32px 34px;
  border-top: 1px solid var(--mist);
}
.service:first-child { border-top-color: var(--ink); padding-top: 26px; }
.service:last-child { border-bottom: 1px solid var(--mist); }
.service h3 {
  font-size: var(--step-2);
  font-stretch: 116%;
  font-weight: 720;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.service p { max-width: 58ch; color: var(--ink-soft); }
.service .includes {
  font-size: var(--step--1);
  color: var(--ink-mute);
  font-weight: 500;
}

/* Audience */

.audience {
  background: var(--ink);
  color: var(--paper);
}
.audience .section-lead { color: #b7bedb; }
.audience-grid {
  list-style: none;
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
}
.audience-grid li {
  padding-block: 28px 32px;
  border-top: 1px solid rgba(243, 245, 250, 0.16);
}
.audience-grid h3 {
  font-size: var(--step-2);
  font-stretch: 120%;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.audience-grid p { color: #b7bedb; max-width: 36ch; }

/* Process: a real sequence, so it is numbered */

.process-head { max-width: 760px; }
.process-list {
  list-style: none;
  margin: clamp(56px, 7vw, 88px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px clamp(20px, 3vw, 40px);
  position: relative;
}
.process-list::before {
  content: "";
  position: absolute;
  left: 36px;
  right: 0;
  top: 36px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--field) 0%, var(--mist) 100%);
}
.step { position: relative; }
.step .rings {
  width: 72px;
  height: 72px;
  background: var(--paper);
  margin-bottom: 28px;
  position: relative;
}
.step .rings circle { fill: none; stroke: var(--field); stroke-width: 1.5; }
.step .rings .dot { fill: var(--field); stroke: none; }
.step-num {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--field);
  margin-bottom: 6px;
}
.step h3 {
  font-size: var(--step-2);
  font-stretch: 120%;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.step p { color: var(--ink-soft); max-width: 34ch; }

/* Company */

.company { border-top: 1px solid var(--mist); }
.company-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px clamp(40px, 6vw, 96px);
}
.facts { margin: 0; }
.facts div {
  display: grid;
  grid-template-columns: minmax(150px, 2fr) minmax(0, 5fr);
  gap: 6px 24px;
  padding-block: 18px;
  border-top: 1px solid var(--mist);
}
.facts div:first-child { border-top-color: var(--ink); }
.facts div:last-child { border-bottom: 1px solid var(--mist); }
.facts dt { color: var(--ink-mute); font-size: 0.9375rem; padding-top: 2px; }
.facts dd { margin: 0; font-weight: 520; }

/* Contact */

.contact {
  background: var(--field);
  color: var(--white);
}
.contact .section-lead { color: rgba(255, 255, 255, 0.86); }
.mail-big {
  display: inline-block;
  margin-top: clamp(40px, 6vw, 72px);
  font-size: clamp(1.15rem, 5.1vw, 4.1rem);
  font-weight: 760;
  font-stretch: 120%;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 3px solid rgba(255, 255, 255, 0.45);
  padding-bottom: 0.08em;
  transition: border-color 0.2s ease;
}
.mail-big:hover { border-bottom-color: var(--signal); text-decoration: none; }
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 36px;
}
.copy-status {
  font-size: 0.9375rem;
  font-weight: 560;
  color: var(--white);
  min-height: 1.5em;
}
.copy-status[data-state="ok"]::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--signal);
  margin-right: 8px;
  vertical-align: 0.1em;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #c4cae3;
  font-size: 0.9375rem;
  padding-block: 72px 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2.6fr));
  gap: 40px clamp(24px, 4vw, 56px);
}
.site-footer .brand { color: var(--white); margin-bottom: 16px; }
.footer-about { max-width: 34ch; }
.footer-col h2 {
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--white);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-col address { font-style: normal; line-height: 1.6; }
.footer-base {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(243, 245, 250, 0.14);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  font-size: 0.875rem;
  color: #9aa2c4;
}

/* ---------- Legal pages ---------- */

.legal-head {
  padding-top: calc(var(--header-h) + clamp(56px, 8vw, 104px));
  padding-bottom: clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--mist);
  background: var(--white);
}
.legal-head h1 {
  font-size: var(--step-4);
  font-stretch: 122%;
  font-weight: 790;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.legal-head .meta {
  margin-top: 18px;
  color: var(--ink-mute);
  font-size: 0.9375rem;
}
.legal-head .summary {
  margin-top: 20px;
  max-width: 62ch;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-soft);
}

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px clamp(40px, 6vw, 96px);
  padding-block: clamp(48px, 6vw, 80px) clamp(88px, 10vw, 140px);
}
.toc {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: start;
  font-size: 0.9rem;
}
.toc h2 {
  font-size: 0.9375rem;
  font-weight: 650;
  margin-bottom: 12px;
}
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.toc a { text-decoration: none; color: var(--ink-soft); display: block; line-height: 1.35; }
.toc a:hover { color: var(--field); text-decoration: underline; }
.toc .other {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--mist);
}

.prose { max-width: 70ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 {
  font-size: var(--step-2);
  font-stretch: 112%;
  font-weight: 720;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-top: 2.4em;
  padding-top: 0.2em;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: var(--step-1);
  font-weight: 650;
  margin-top: 1.6em;
}
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--field); }
.prose a { color: var(--field); font-weight: 520; }
.prose strong { font-weight: 650; }

.prose .facts { margin-top: 1.4em; }

.table-wrap { overflow-x: auto; margin-top: 1.4em; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
  line-height: 1.45;
}
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px 12px 0;
  border-top: 1px solid var(--mist);
}
.prose thead th {
  border-top: 1.5px solid var(--ink);
  font-weight: 650;
  font-size: 0.9375rem;
}
.prose tbody tr:last-child td { border-bottom: 1px solid var(--mist); }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-list::before { display: none; }
  .audience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .services-grid, .company-grid { grid-template-columns: minmax(0, 1fr); }
  .services-intro { position: static; }
  .legal-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; display: none; }
  .hero-foot { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .nav a:not(.btn) { display: none; }
  .brand { font-size: 1.02rem; }
  .brand svg { width: 26px; height: 26px; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@media (max-width: 620px) {
  .process-list, .audience-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(2.3rem, 12vw, 4.4rem); }
  .hero-actions .btn { flex: 1 1 auto; }
}

@media print {
  .site-header, .toc, .skip-link { display: none; }
  .legal-head { padding-top: 0; }
}

/* ---------- 404 ---------- */

.notfound { padding-block: clamp(48px, 6vw, 80px) clamp(88px, 10vw, 140px); }
.notfound .btn { margin-top: 32px; }
