/* Sorova site: tokens, base and shared components.
   Brand: Ink #0B0B0C, Steel #8E8E93, Silver #C7C7CC, Paper #FFFFFF (logo concept, 29 Oct 2026).
   Signal (coral) is used only for what needs a person. Neon (purple) is Sorova's own voice:
   navigation, calls to action, machine connections and predictions, kept to about a tenth of the frame.
   Each is one hue in both themes, two lightnesses. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght.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: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-latin-500-normal.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: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-latin-ext-500-normal.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-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cormorant-latin-600-normal.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: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cormorant-latin-ext-600-normal.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-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-latin-500-italic.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;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  /* Light theme: paper ground */
  --canvas: #f4f4f5;
  --surface: #fbfbfb;
  --surface-2: #ececee;
  --ink: #0b0b0c;
  --ink-soft: #4f4f56;
  --ink-faint: #6d6d74;
  --line: rgba(11, 11, 12, 0.14);
  --line-strong: rgba(11, 11, 12, 0.32);
  --accent: #b4472a;
  --accent-ink: #ffffff;
  --accent-wash: rgba(180, 71, 42, 0.1);
  --neon: #8a2be2;
  --neon-hi: #7322c4;
  --neon-ink: #ffffff;
  --neon-wash: rgba(138, 43, 226, 0.1);
  --neon-glow: rgba(138, 43, 226, 0.3);
  --shadow-color: 240 4% 30%;
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --selection: rgba(138, 43, 226, 0.18);

  /* The 3D drawing reads these */
  --world-bg: #f4f4f5;
  --world-fill-top: #fbfbfb;
  --world-fill-side: #e8e8eb;
  --world-line: #26262a;
  --world-line-faint: #a9a9b0;
  --world-accent: #b4472a;
  --world-neon: #8a2be2;

  /* Type */
  --font-display: "Cormorant Garamond", "Cormorant", "Iowan Old Style", Georgia, serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-data: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --text-weight: 400;
  --text-leading: 1.6;
  --text-tracking: 0;

  --t-hero: clamp(2.6rem, 1.55rem + 3.4vw, 5rem);
  --t-h2: clamp(2rem, 1.35rem + 2.1vw, 3.25rem);
  --t-h3: clamp(1.25rem, 1.1rem + 0.45vw, 1.5rem);
  --t-body: 1.0625rem;
  --t-small: 0.875rem;
  --t-micro: 0.75rem;
  --measure: 62ch;

  /* Space: 4px base */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-7: 2rem;
  --s-8: 2.5rem;
  --s-9: 3rem;
  --s-10: 4rem;
  --s-11: 5rem;
  --s-12: 6rem;
  --gutter: clamp(1rem, 0.6rem + 1.8vw, 2.5rem);
  --chrome-h: 64px;

  /* One radius for everything: drawn, not rounded */
  --radius: 2px;

  /* Elevation, tinted to the canvas */
  --e1: 0 1px 2px hsl(var(--shadow-color) / 0.08), 0 1px 1px hsl(var(--shadow-color) / 0.05);
  --e2: 0 6px 16px -6px hsl(var(--shadow-color) / 0.18), 0 2px 4px hsl(var(--shadow-color) / 0.06);
  --e3: 0 24px 48px -16px hsl(var(--shadow-color) / 0.28), 0 4px 10px hsl(var(--shadow-color) / 0.08);

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --t-fast: 140ms;
  --t-ui: 220ms;
}

/* Dark theme: ink ground. Light type gets a touch more weight, leading and tracking. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0b0b0c;
  --surface: #121214;
  --surface-2: #1a1a1d;
  --ink: #ececee;
  --ink-soft: #a6a6ad;
  --ink-faint: #8a8a91;
  --line: rgba(199, 199, 204, 0.15);
  --line-strong: rgba(199, 199, 204, 0.34);
  --accent: #e8653f;
  --accent-ink: #0b0b0c;
  --accent-wash: rgba(232, 101, 63, 0.14);
  --neon: #b65cff;
  --neon-hi: #c27aff;
  --neon-ink: #0b0b0c;
  --neon-wash: rgba(182, 92, 255, 0.16);
  --neon-glow: rgba(182, 92, 255, 0.5);
  --shadow-color: 240 10% 2%;
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --selection: rgba(182, 92, 255, 0.32);

  --world-bg: #0b0b0c;
  --world-fill-top: #111113;
  --world-fill-side: #0d0d0f;
  --world-line: #c7c7cc;
  --world-line-faint: #3d3d43;
  --world-accent: #e8653f;
  --world-neon: #b65cff;

  --text-weight: 430;
  --text-leading: 1.65;
  --text-tracking: 0.005em;
}

/* ---------- Base ---------- */

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

/* `hidden` must win over any display a component sets */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--canvas);
  scrollbar-color: var(--line-strong) transparent;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--t-body);
  font-weight: var(--text-weight);
  line-height: var(--text-leading);
  letter-spacing: var(--text-tracking);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--selection);
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h3 {
  font-family: var(--font-text);
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color var(--t-fast) var(--ease-out);
}

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

:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.num,
.tabular {
  font-variant-numeric: tabular-nums;
}

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

.skip-link {
  position: fixed;
  left: var(--s-4);
  top: var(--s-4);
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  background: var(--ink);
  color: var(--canvas);
  font-size: var(--t-small);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-200%);
  transition: transform var(--t-ui) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* Small uppercase label. Used at most once per three waypoints. */
.label {
  display: block;
  font-family: var(--font-text);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neon);
}

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  color: var(--ink-soft);
  max-width: 34rem;
}

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

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 var(--s-5);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 560;
  letter-spacing: 0.005em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out),
    transform 120ms var(--ease-out);
}

.btn--primary {
  --btn-bg: var(--neon);
  --btn-fg: var(--neon-ink);
  --btn-border: var(--neon);
  box-shadow: 0 0 18px -6px var(--neon-glow);
}

.btn--quiet {
  --btn-border: transparent;
  --btn-fg: var(--ink-soft);
  padding: 0 var(--s-3);
}

.btn--small {
  min-height: 36px;
  padding: 0 var(--s-4);
  font-size: var(--t-small);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    --btn-border: var(--ink);
  }
  .btn--primary:hover {
    --btn-bg: var(--neon-hi);
    --btn-border: var(--neon-hi);
    box-shadow: 0 0 26px -4px var(--neon-glow);
  }
  .btn--quiet:hover {
    --btn-fg: var(--ink);
    --btn-border: transparent;
  }
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ---------- State chips: shape and word as well as colour ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.18em 0.6em 0.2em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--ink-soft);
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.chip--watch {
  color: var(--accent);
  border-color: currentColor;
}

.chip--watch::before {
  border-radius: 0;
  transform: rotate(45deg) scale(0.9);
}

.chip--act {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.chip--act::before {
  border: 0;
  border-radius: 0;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.chip--predict {
  color: var(--neon);
  border-style: dashed;
  border-color: currentColor;
}

.chip--predict::before {
  border-radius: 0;
  border: 0;
  background: currentColor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  width: 0.8em;
  height: 0.8em;
}

.chip--ok::before {
  background: currentColor;
}

.badge-sim {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--t-micro);
  font-weight: 560;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.badge-sim::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

/* ---------- Panels ---------- */

.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--e2), var(--edge);
}

/* ---------- Cookie choices: asked once, then out of the way ---------- */

/* Allow and Reject carry equal weight on purpose: refusing is as easy as agreeing.
   Bottom right, clear of the copy and calls to action, which sit on the left. */
.consent {
  position: fixed;
  z-index: 30;
  right: var(--gutter);
  bottom: max(var(--gutter), env(safe-area-inset-bottom));
  width: min(28rem, calc(100% - 2 * var(--gutter)));
  max-height: calc(100svh - var(--chrome-h) - 2 * var(--gutter));
  overflow-y: auto;
  display: grid;
  gap: var(--s-3);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--neon);
  border-radius: var(--radius);
  box-shadow: var(--e3), var(--edge);
  animation: consent-in var(--t-ui) var(--ease-out);
}

@media (max-width: 599.98px) {
  .consent {
    gap: var(--s-2);
    padding: var(--s-4);
  }
}

@keyframes consent-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.consent__title {
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

.consent__text {
  font-size: var(--t-small);
  line-height: 1.55;
  color: var(--ink-soft);
}

.consent__choices {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: var(--s-3) 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.consent__choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-3);
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--ink-soft);
  cursor: pointer;
}

.consent__choice input {
  width: 18px;
  height: 18px;
  margin: 0.1em 0 0;
  accent-color: var(--neon);
}

.consent__choice strong {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.consent__choices .btn {
  justify-self: start;
}

.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

/* The footer's Cookie settings link, revealed only when there is something to choose */
.consent-slot {
  display: contents;
}

/* A button that reads as a link, for actions inside footers and running text */
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--line-strong);
  cursor: pointer;
  transition: text-decoration-color var(--t-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .link-button:hover {
    text-decoration-color: var(--neon);
  }
}

@media print {
  .consent {
    display: none;
  }
}

/* ---------- Brand marks (mask: one file, colour follows the theme) ---------- */

.wordmark {
  display: block;
  width: 132px;
  height: 21px;
  background: var(--ink);
  -webkit-mask: url("../brand/sorova-wordmark-black.svg") no-repeat center / contain;
  mask: url("../brand/sorova-wordmark-black.svg") no-repeat center / contain;
}

/* ---------- Theme switch: light and shade, like the spark ---------- */

.theme-switch {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
}

.theme-switch::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  transition: transform var(--t-ui) var(--ease-out);
}

:root[data-theme="dark"] .theme-switch::before {
  transform: rotate(180deg);
}

.theme-switch:active::before {
  transform: scale(0.9);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
