/* ==========================================================================
   StreamCraft Digital — site styles
   Plain CSS, no build step. Colours live in the tokens below: change them
   there and the whole site follows.
   ========================================================================== */

/* ---------- Tokens: light ---------- */
:root {
  color-scheme: light;

  --bg: #f6f7f9;
  --bg-alt: #eef0f4;
  --surface: #ffffff;
  --hover: rgba(11, 18, 32, 0.05);
  --border: rgba(11, 18, 32, 0.1);
  --border-strong: rgba(11, 18, 32, 0.18);

  --text: #0b1220;
  --muted: #525e72;
  --faint: #677286;

  --accent: #0a7c74;        /* small labels, links */
  --grad-a: #0a7c74;        /* gradient text */
  --grad-b: #2456db;
  --stream-a: #10a99c;      /* hero lines */
  --stream-b: #3d6bf0;
  --stream-alpha: 0.5;

  --btn-bg: #0b1220;
  --btn-text: #ffffff;
  --header-bg: rgba(246, 247, 249, 0.8);
  --glow: rgba(61, 107, 240, 0.1);
  --shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 18px 40px -18px rgba(11, 18, 32, 0.16);

  --mark-bg: #0b1220;
  --mark-stroke: transparent;
  --sun-display: none;
  --moon-display: block;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Tokens: dark (system setting, unless the visitor chose light) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #070b12;
    --bg-alt: #0a1019;
    --surface: #0e1520;
    --hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.17);

    --text: #edf1f7;
    --muted: #98a4b7;
    --faint: #7c879b;

    --accent: #6fe0d2;
    --grad-a: #6fe0d2;
    --grad-b: #8fb0ff;
    --stream-a: #5ee6d4;
    --stream-b: #7fa2ff;
    --stream-alpha: 0.6;

    --btn-bg: #f1f4f9;
    --btn-text: #0b1220;
    --header-bg: rgba(7, 11, 18, 0.74);
    --glow: rgba(127, 162, 255, 0.13);
    --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 28px 56px -28px rgba(0, 0, 0, 0.7);

    --mark-bg: #131c2b;
    --mark-stroke: rgba(255, 255, 255, 0.12);
    --sun-display: block;
    --moon-display: none;
  }
}

/* ---------- Tokens: dark (chosen with the toggle) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #070b12;
  --bg-alt: #0a1019;
  --surface: #0e1520;
  --hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);

  --text: #edf1f7;
  --muted: #98a4b7;
  --faint: #7c879b;

  --accent: #6fe0d2;
  --grad-a: #6fe0d2;
  --grad-b: #8fb0ff;
  --stream-a: #5ee6d4;
  --stream-b: #7fa2ff;
  --stream-alpha: 0.6;

  --btn-bg: #f1f4f9;
  --btn-text: #0b1220;
  --header-bg: rgba(7, 11, 18, 0.74);
  --glow: rgba(127, 162, 255, 0.13);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 28px 56px -28px rgba(0, 0, 0, 0.7);

  --mark-bg: #131c2b;
  --mark-stroke: rgba(255, 255, 255, 0.12);
  --sun-display: block;
  --moon-display: none;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  text-wrap: balance;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

p {
  text-wrap: pretty;
}

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

a {
  color: inherit;
}

::selection {
  background: var(--grad-b);
  color: #fff;
}

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.975rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.2s var(--ease);
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px var(--btn-bg);
}

.btn-primary:hover .icon {
  transform: translateX(3px);
}

.btn-ghost {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--hover);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  background: var(--hover);
  border-color: var(--border-strong);
}

.icon-sun {
  display: var(--sun-display);
}

.icon-moon {
  display: var(--moon-display);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

.site-header.is-scrolled,
.site-header[data-open] {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-weight: 650;
  font-size: 1.04rem;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand-mark .tile {
  fill: var(--mark-bg);
  stroke: var(--mark-stroke);
}

.brand-name span {
  color: var(--muted);
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.nav a:hover {
  color: var(--text);
  background: var(--hover);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.menu-btn {
  display: none;
}

.menu-btn .icon-close,
.site-header[data-open] .menu-btn .icon-menu {
  display: none;
}

.site-header[data-open] .menu-btn .icon-close {
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: -30%;
  right: -12%;
  width: min(78vw, 980px);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 78% 92% at 82% 60%, #000 22%, transparent 74%);
  mask-image: radial-gradient(ellipse 78% 92% at 82% 60%, #000 22%, transparent 74%);
}

.hero-inner {
  padding-block: clamp(84px, 15vh, 164px) clamp(88px, 15vh, 156px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.4;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--stream-a), var(--stream-b));
}

.hero h1 {
  margin-top: 1.6rem;
  font-size: clamp(2.75rem, 8.4vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.grad {
  background: linear-gradient(95deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  /* keep descenders inside the clipped box */
  padding-bottom: 0.08em;
}

.hero-lede {
  max-width: 44ch;
  margin-top: 1.6rem;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.55;
}

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-inner > * {
  animation: rise 0.9s var(--ease) both;
}

.hero-inner > :nth-child(2) {
  animation-delay: 0.08s;
}

.hero-inner > :nth-child(3) {
  animation-delay: 0.16s;
}

.hero-inner > :nth-child(4) {
  animation-delay: 0.24s;
}

/* ---------- What we make ---------- */
.caps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.cap {
  padding: 30px 32px 34px 0;
}

.cap + .cap {
  padding-left: 32px;
  border-left: 1px solid var(--border);
}

.cap .icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
  stroke-width: 1.5;
}

.cap h2 {
  margin-top: 1rem;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.cap p {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.975rem;
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(76px, 10vw, 132px);
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

.section h2 {
  font-size: clamp(1.95rem, 4.4vw, 3.1rem);
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.section-lede {
  max-width: 52ch;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ---------- Products ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.product-body {
  padding: clamp(28px, 4.4vw, 54px);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.75rem 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: ping 2.4s ease-out infinite;
}

@keyframes ping {
  from {
    opacity: 0.7;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(3.4);
  }
}

.product h3 {
  margin-top: 1.25rem;
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  font-weight: 680;
  letter-spacing: -0.035em;
}

.product-desc {
  max-width: 40ch;
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.features li {
  display: flex;
  gap: 0.8rem;
}

.features .icon {
  margin-top: 2px;
  color: var(--accent);
}

.features strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 620;
  line-height: 1.35;
}

.features span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.45;
}

.product-meta {
  margin-top: 2rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* The picture side is always night-blue so the app icon sits in its own colour. */
.product-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 400px;
  background: radial-gradient(120% 120% at 72% 18%, #17284c 0%, #0c1626 52%, #080f1b 100%);
  overflow: hidden;
}

.ring {
  position: absolute;
  top: 50%;
  left: 50%;
  aspect-ratio: 1;
  border: 1px solid rgba(127, 162, 255, 0.17);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-1 {
  width: 240px;
}

.ring-2 {
  width: 390px;
  border-color: rgba(127, 162, 255, 0.12);
}

.ring-3 {
  width: 560px;
  border-color: rgba(127, 162, 255, 0.08);
}

.ring-sweep {
  width: 560px;
  border-color: rgba(127, 162, 255, 0.5);
  animation: sweep 4.8s var(--ease) infinite;
}

@keyframes sweep {
  from {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.26);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

.node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7fa2ff;
  box-shadow: 0 0 0 5px rgba(127, 162, 255, 0.14);
}

.node-white {
  background: #fff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.1);
}

.product-icon {
  position: relative;
  width: 136px;
  height: 136px;
  border-radius: 31px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 28px 60px -16px rgba(0, 0, 0, 0.7), 0 0 90px rgba(127, 162, 255, 0.28);
}

/* A second product sits under the first, with its picture on the other side. */
.product + .product {
  margin-top: 20px;
}

.product-flip {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.product-flip .product-visual {
  order: -1;
  background: radial-gradient(120% 120% at 28% 18%, #17284c 0%, #0c1626 52%, #080f1b 100%);
}

/* Shift Balance: three cards fanned out behind the icon, each marked in one of the icon's colours. */
.play-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 168px;
  height: 232px;
  border: 1px solid rgba(127, 162, 255, 0.24);
  border-radius: 18px;
  background: #101c32;
  transform: translate(-50%, -50%) rotate(var(--turn, 0deg));
  transform-origin: 50% 120%;
}

.play-card::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 18px;
  width: 46%;
  height: 9px;
  border-radius: 999px;
  background: var(--mark);
  opacity: 0.8;
}

.play-card-1 {
  --turn: -18deg;
  --mark: #f5b63e;
}

.play-card-2 {
  --mark: #7dc4ff;
  background: #13213b;
}

.play-card-3 {
  --turn: 18deg;
  --mark: #ff7093;
}

/* The right-hand card's mark sits on its outer side, where the middle card doesn't cover it. */
.play-card-3::before {
  right: 18px;
  left: auto;
}

.next-up {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-top: 20px;
  padding: 26px clamp(22px, 3.4vw, 34px);
  border: 1px dashed var(--border-strong);
  border-radius: 22px;
}

.next-up-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--accent);
}

.next-up h3 {
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.next-up p {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.975rem;
}

/* ---------- Approach ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 32px;
}

.principle {
  padding-top: 26px;
  border-top: 1px solid var(--border-strong);
}

.principle-num {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.principle h3 {
  margin-top: 2.6rem;
  font-size: 1.28rem;
  font-weight: 660;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.principle p {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.99rem;
}

/* ---------- Studio ---------- */
.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 104px);
  align-items: start;
}

.studio-copy p {
  color: var(--muted);
  font-size: 1.14rem;
  line-height: 1.65;
}

.studio-copy p + p {
  margin-top: 1.2rem;
}

.studio-copy strong {
  color: var(--text);
  font-weight: 620;
}

/* ---------- Contact ---------- */
.contact-card {
  position: relative;
  isolation: isolate;
  padding: clamp(44px, 8vw, 96px) clamp(20px, 5vw, 64px);
  border: 1px solid var(--border);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -62%;
  left: 50%;
  width: min(120%, 900px);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--glow), transparent);
  transform: translateX(-50%);
  pointer-events: none;
}

.contact-card .eyebrow::after {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

.contact-card p {
  max-width: 44ch;
  margin: 1.1rem auto 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.email-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--text);
  font-size: clamp(1.1rem, 5.1vw, 2.2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.2s;
}

.email-link:hover {
  text-decoration-color: var(--grad-b);
}

.contact-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.6rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
  padding-block: 30px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
}

.footer-nav a {
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--text);
}

/* ---------- Text pages (privacy, 404) ---------- */
.page {
  padding-block: clamp(56px, 9vw, 112px) clamp(72px, 10vw, 128px);
}

.prose {
  max-width: 44rem;
}

.prose h1 {
  font-size: clamp(2.3rem, 5.6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.prose .updated {
  margin-top: 1rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.prose h2 {
  margin-top: 2.8rem;
  font-size: 1.4rem;
  font-weight: 660;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.prose p,
.prose ul {
  margin-top: 1rem;
  color: var(--muted);
}

.prose .lead {
  margin-top: 1.6rem;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.55;
}

.prose ul {
  padding-left: 1.2rem;
  list-style: disc;
}

.prose li + li {
  margin-top: 0.6rem;
}

.prose li::marker {
  color: var(--faint);
}

.prose strong {
  color: var(--text);
  font-weight: 620;
}

.prose a {
  color: var(--text);
  text-decoration-color: var(--border-strong);
  text-underline-offset: 0.2em;
}

.prose a:hover {
  text-decoration-color: var(--grad-b);
}

/* Long texts (LinkScout support, privacy policy and terms) */
.prose h3 {
  margin-top: 2.2rem;
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.prose h2 + h3 {
  margin-top: 1.4rem;
}

.prose code {
  padding: 0.08em 0.36em;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.legal-text {
  overflow-wrap: break-word;
}

.legal-text li + li {
  margin-top: 0.85rem;
}

.doc-nav {
  margin-top: 3.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}

.prose .doc-nav-title {
  margin: 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.prose .doc-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0.9rem;
  padding: 0;
  list-style: none;
}

.prose .doc-nav li + li {
  margin-top: 0;
}

.prose .doc-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s;
}

.prose .doc-nav a:hover {
  background: var(--hover);
}

.prose .doc-nav a[aria-current="page"] {
  border-color: transparent;
  background: var(--btn-bg);
  color: var(--btn-text);
}

/* Links under a product on the home page */
.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 0.9rem;
  font-size: 0.93rem;
}

.product-links a {
  color: var(--text);
  text-decoration-color: var(--border-strong);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s;
}

.product-links a:hover {
  text-decoration-color: var(--grad-b);
}

/* Store buttons: under a product on the home page, and on the product's own page */
.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.prose .store-links {
  margin-top: 1.6rem;
}

.prose .store-links .btn {
  text-decoration: none;
}

.prose .store-links .btn-primary {
  color: var(--btn-text);
}

.not-found {
  display: grid;
  place-items: center;
  min-height: 62vh;
  text-align: center;
}

.not-found .code {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
}

.not-found h1 {
  margin-top: 1rem;
  font-size: clamp(2.3rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.not-found p {
  margin: 1rem auto 2rem;
  color: var(--muted);
}

/* ---------- Scroll reveal ----------
   main.js adds "reveal-on" once it is running. Without it nothing is hidden,
   so the page still shows in full if the script is missing or fails. */
.reveal-on .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0s);
}

.reveal-on .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px 32px;
  }

  .principle h3 {
    margin-top: 1.6rem;
  }
}

@media (max-width: 860px) {
  .product {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-visual {
    order: -1;
    min-height: 280px;
  }

  .product-icon {
    width: 112px;
    height: 112px;
    border-radius: 26px;
  }

  .ring-1 {
    width: 190px;
  }

  .ring-2 {
    width: 320px;
  }

  .play-card {
    width: 132px;
    height: 182px;
    border-radius: 15px;
  }

  .play-card::before {
    top: 14px;
    left: 14px;
    height: 7px;
  }

  .play-card-3::before {
    right: 14px;
    left: auto;
  }

  .studio {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .menu-btn {
    display: grid;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--gutter) 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.35);
  }

  .site-header[data-open] {
    background: var(--bg);
  }

  .site-header[data-open] .nav {
    display: flex;
  }

  .nav a {
    padding: 0.95rem 0;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 1.06rem;
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .nav a:hover {
    background: transparent;
  }

  /* The stream moves below the text on small screens. */
  .hero-canvas {
    -webkit-mask-image: linear-gradient(to bottom, transparent 46%, #000 72%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 46%, #000 72%, #000 88%, transparent 100%);
  }

  .hero-inner {
    padding-block: 60px 190px;
  }

  .caps {
    grid-template-columns: minmax(0, 1fr);
  }

  .cap,
  .cap + .cap {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 16px;
    padding: 22px 0;
    border-left: 0;
  }

  .cap + .cap {
    border-top: 1px solid var(--border);
  }

  .cap .icon {
    grid-row: span 2;
    margin-top: 2px;
  }

  .cap h2 {
    margin-top: 0;
  }
}

@media (max-width: 560px) {
  .features {
    grid-template-columns: minmax(0, 1fr);
  }

  .principles {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .hero-actions .btn,
  .store-links .btn {
    flex: 1 1 auto;
  }

  /* Let the coloured words of the headline wrap on narrow phones. */
  .grad {
    white-space: normal;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal-on .reveal {
    opacity: 1;
    transform: none;
  }

  .ring-sweep {
    display: none;
  }
}
