/* =========================================================
   Homepage prototype — two identity routes (Weeld / CTS)
   Colours from Figma "Final" (29:183), layout from the sketch
   ========================================================= */

/* Brand type (prezentace, slide Typography): Subjectivity Serif primary, Inter secondary. OFL. */
@font-face { font-family: "Subjectivity Serif"; src: url("assets/fonts/SubjectivitySerif-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Subjectivity Serif"; src: url("assets/fonts/SubjectivitySerif-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
/* SemiBold is not in the family: interpolated 50/50 from Medium and Bold with fontTools (OFL allows modified versions). */
@font-face { font-family: "Subjectivity Serif"; src: url("assets/fonts/SubjectivitySerif-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Subjectivity Serif"; src: url("assets/fonts/SubjectivitySerif-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #070b10;
  --bg-hero-top: #0a0f15;
  --bg-hero-bottom: #0c151d;
  --surface: #0d141b;
  --surface-2: #111a22;
  --ink: #eef2f4;
  --ink-2: #c4ccd3;
  --muted: #8794a0;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Brand colours (Figma 95:1767) */
  --lime: #83ee00;
  --green: #69e32c;
  --teal: #41cbe1;
  --cyan: #00b8d9;

  /* Weeld route: the sketch runs green → teal, left to right */
  --grad: linear-gradient(90deg, var(--green) 0%, var(--teal) 100%);
  --grad-loop: linear-gradient(90deg, var(--green) 0%, var(--teal) 50%, var(--green) 100%);
  --glow: rgba(105, 227, 44, 0.38);
  --glow-2: rgba(65, 203, 225, 0.22);
  --btn-ink: #04140a;
  --header-bg: rgba(8, 12, 17, 0.72);
  --mm-bg: rgba(9, 14, 19, 0.94);
  --switch-bg: rgba(14, 20, 27, 0.86);
  --hover-bg: rgba(255, 255, 255, 0.04);
  --ghost-bg: rgba(7, 11, 16, 0.2);
  --hero-ink: #eef1f4;
  --hint-line: rgba(255, 255, 255, 0.25);
  --shadow: rgba(0, 0, 0, 0.6);
  /* dark: a faint brand-coloured glow under the megamenu so it lifts off the page */
  --mm-shadow: 0 22px 60px -26px var(--glow), 0 40px 80px -20px var(--shadow);
  --eyebrow: var(--teal);
  --grad-ink: var(--grad);
  --grad-ink-loop: var(--grad-loop);
  --glow-blend: screen;
  /* Buttons (designer spec, Figma 129:1849) – shared by both identities */
  --btn-grad: linear-gradient(90deg, #00b8d9 0%, #83ee00 100%);
  --btn-grad-loop: linear-gradient(90deg, #00b8d9 0%, #83ee00 50%, #00b8d9 100%);
  --btn-stroke: linear-gradient(90deg, #01b9d6 0%, #4a9e2a 100%);
  --btn-ghost-ink: #82ed00;
  --btn-on: #83ee00;
  --btn-on-ink: #0b1219;

  --f-display: "Subjectivity Serif", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1320px;
  --pad: clamp(20px, 5vw, 72px);
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* CTS route: the logo symbol runs cyan → lime */
html[data-brand="cts"] {
  --grad: linear-gradient(90deg, var(--cyan) 0%, var(--lime) 100%);
  --grad-loop: linear-gradient(90deg, var(--cyan) 0%, var(--lime) 50%, var(--cyan) 100%);
  --glow: rgba(0, 184, 217, 0.38);
  --glow-2: rgba(131, 238, 0, 0.2);
  --btn-ink: #03121a;
}

/* Light theme (Figma palette: Moonlight #F0EEEB, Neverthing grey #13181B, Black logos) */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f0eeeb;
  --bg-hero-top: #f0eeeb;
  --bg-hero-bottom: #e8e5e0;
  --surface: #ffffff;
  --surface-2: #f7f6f3;
  --ink: #13181b;
  --ink-2: #3a4247;
  --muted: #687178;
  --line: rgba(19, 24, 27, 0.1);
  --line-strong: rgba(19, 24, 27, 0.18);
  --header-bg: rgba(240, 238, 235, 0.82);
  --mm-bg: rgba(244, 242, 239, 0.97);
  --switch-bg: rgba(255, 255, 255, 0.88);
  --hover-bg: rgba(19, 24, 27, 0.04);
  --ghost-bg: rgba(255, 255, 255, 0.45);
  --hero-ink: #13181b;
  --hint-line: rgba(19, 24, 27, 0.25);
  --shadow: rgba(19, 24, 27, 0.18);
  --mm-shadow: 0 40px 80px -20px var(--shadow);
  --glow: rgba(105, 227, 44, 0.32);
  --glow-2: rgba(65, 203, 225, 0.16);
  --glow-blend: multiply;
  --btn-ghost-ink: #2e7a00;
  /* Sky Aqua is too light for small text on Moonlight, so the eyebrow uses a deeper shade of it */
  --eyebrow: #0a8297;
  --grad-ink: linear-gradient(90deg, #3fb514 0%, #0e9fbb 100%);
  --grad-ink-loop: linear-gradient(90deg, #3fb514 0%, #0e9fbb 50%, #3fb514 100%);
}
html[data-theme="light"][data-brand="cts"] {
  --glow: rgba(0, 184, 217, 0.3);
  --glow-2: rgba(131, 238, 0, 0.14);
  --eyebrow: #007f97;
  --grad-ink: linear-gradient(90deg, #0a9cbc 0%, #4fae00 100%);
  --grad-ink-loop: linear-gradient(90deg, #0a9cbc 0%, #4fae00 50%, #0a9cbc 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #000; padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

.eyebrow {
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eyebrow);
}
html[data-brand="cts"] { --eyebrow: var(--cyan); }

.grad-text {
  background: var(--grad-ink-loop);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 9s var(--ease-in-out) infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Arrow glyph used in links and buttons */
.arr {
  display: inline-block;
  width: 14px; height: 10px;
  position: relative;
  flex: none;
  transition: transform 0.35s var(--ease);
}
.arr::before, .arr::after { content: ""; position: absolute; background: currentColor; }
.arr::before { left: 0; right: 1px; top: 4.25px; height: 1.5px; border-radius: 1px; }
.arr::after {
  right: 0; top: 1px; width: 7px; height: 7px; background: none;
  border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor;
  transform: rotate(45deg); transform-origin: center;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: box-shadow 0.4s var(--ease), color 0.3s, border-color 0.3s;
}
.btn .btn-label { position: relative; z-index: 2; display: inline-block; }
.btn .arr { position: relative; z-index: 2; }

.btn-primary {
  color: #000;
  background: var(--btn-grad-loop);
  background-size: 200% 100%;
  background-position: 0% 50%;
  box-shadow: 0 0 0 0 var(--glow), 0 8px 30px -6px var(--glow);
  transition: box-shadow 0.4s var(--ease), background-position 0.9s var(--ease);
}
/* light sweep */
.btn-primary::after {
  content: "";
  position: absolute; inset: -2px;
  z-index: 1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.55) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease);
  pointer-events: none;
}
.btn-primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04), 0 10px 44px -4px var(--glow);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover .arr { transform: translateX(4px); }

.btn-ghost {
  --stroke-w: 1.5px;
  color: var(--btn-ghost-ink);
  background: transparent;
}
/* gradient border */
.btn-ghost::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: var(--stroke-w);
  background: var(--btn-stroke);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 1;
  transition: filter 0.4s var(--ease);
}
/* soft fill that follows the cursor */
.btn-ghost::after {
  content: "";
  position: absolute;
  left: var(--px, 50%); top: var(--py, 50%);
  width: 220px; height: 220px;
  margin: -110px 0 0 -110px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-2) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  z-index: 0;
  pointer-events: none;
}
.btn-ghost:hover::before { filter: brightness(1.25) saturate(1.1); }
.btn-ghost:hover::after { opacity: 1; }

.btn-sm {
  height: 36px;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 6px 22px -8px var(--glow);
}

/* =========================================================
   Header + megamenu
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
}
.site-header::before {
  content: "";
  position: absolute; inset: 0;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.site-header.is-scrolled::before,
.site-header.is-open::before { opacity: 1; }

.header-bar {
  position: relative;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo { display: block; position: relative; flex: none; }
.logo-img { height: 30px; width: auto; transition: opacity 0.4s var(--ease), transform 0.5s var(--ease); }
.logo-cts { height: 52px; }
.logo-weeld { height: 46px; }
/* Both sketches: the logo hangs from the menu line. Its top edge lines up with the top of the menu link text. */
@media (min-width: 1081px) {
  :root { --header-h: 92px; }
  .header-bar { align-items: flex-start; padding-top: 14px; }
  .header-actions { height: 40px; }
  /* 40px link box: (40 - 17) / 2 line-box offset + 3.3px from line top to ascender top of 14px Inter */
  .logo { margin-top: 14.8px; }
}
html:not([data-theme="light"]) .logo-img.on-light,
html[data-theme="light"] .logo-img.on-dark { display: none; }
html[data-brand="weeld"] .logo-cts,
html[data-brand="cts"] .logo-weeld { display: none; }

.main-nav { position: relative; margin: 0 auto; }
.nav-list { display: flex; gap: 2px; }
.nav-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-2);
  border-radius: 8px;
  transition: color 0.25s;
}
.nav-trigger::after {
  content: "";
  width: 6px; height: 6px;
  margin-left: 7px;
  margin-top: -3px;
  border-right: 1.3px solid currentColor;
  border-bottom: 1.3px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  transition: transform 0.35s var(--ease), opacity 0.25s;
}
.nav-trigger:hover, .nav-trigger[aria-expanded="true"] { color: var(--ink); }
.nav-trigger[aria-expanded="true"]::after { transform: translateY(3px) rotate(-135deg); opacity: 1; }

.nav-indicator {
  position: absolute;
  left: 0; bottom: -18px;
  height: 2px;
  width: var(--ind-w, 0px);
  transform: translateX(var(--ind-x, 0px));
  background: var(--grad);
  border-radius: 2px;
  opacity: 0;
  transition: transform 0.45s var(--ease), width 0.45s var(--ease), opacity 0.3s;
}
.site-header.is-open .nav-indicator { opacity: 1; }

.header-actions { display: flex; align-items: center; gap: 22px; flex: none; }

.burger { display: none; width: 44px; height: 44px; position: relative; border-radius: 10px; }
.burger span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); border-radius: 2px;
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}
.burger span:first-child { top: 18px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21.5px; transform: rotate(-45deg); }

/* Megamenu */
.megamenu {
  position: absolute;
  left: 0; right: 0;
  top: var(--header-h);
  pointer-events: none;
}
.site-header.is-open .megamenu { pointer-events: auto; }
.mm-bg {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: var(--mm-h, 0px);
  background: var(--mm-bg);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--mm-shadow);
  transition: height 0.5s var(--ease), opacity 0.3s;
  opacity: 0;
}
.site-header.is-open .mm-bg { opacity: 1; }

.mm-panel {
  position: absolute;
  left: 0; right: 0; top: 0;
  padding: 40px 0 48px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.45s var(--ease), visibility 0s 0.25s;
}
.mm-panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.35s 0.08s, transform 0.5s 0.05s var(--ease), visibility 0s;
}
.mm-panel.from-left { transform: translateX(-18px); }
.mm-panel.from-right { transform: translateX(18px); }
.mm-panel.is-active.from-left, .mm-panel.is-active.from-right { transform: none; }

.mm-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr) minmax(260px, 1.15fr);
  gap: 48px;
  align-items: start;
}
.mm-title {
  margin-top: 12px;
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.mm-text { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.mm-more {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 20px;
  font-size: 14px; font-weight: 500;
  color: var(--ink);
}
.mm-more:hover .arr, .mm-feature:hover .arr { transform: translateX(4px); }

.mm-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
}
.mm-links a {
  display: block;
  position: relative;
  padding: 14px 16px 14px 18px;
  border-radius: 12px;
  transition: background 0.3s;
}
.mm-links a::before {
  content: "";
  position: absolute; left: 0; top: 16px; bottom: 16px; width: 2px;
  background: var(--grad); border-radius: 2px;
  transform: scaleY(0); transition: transform 0.35s var(--ease);
}
.mm-links a:hover { background: var(--hover-bg); }
.mm-links a:hover::before { transform: scaleY(1); }
.mm-links strong { display: block; font-size: 15px; font-weight: 500; color: var(--ink); }
.mm-links span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.mm-links strong span { display: inline; margin: 0; font-size: inherit; color: inherit; }

/* Staggered entrance of menu links */
.mm-panel .mm-links li { opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.4s var(--ease); }
.mm-panel.is-active .mm-links li { opacity: 1; transform: none; }
.mm-panel.is-active .mm-links li:nth-child(1) { transition-delay: 0.08s; }
.mm-panel.is-active .mm-links li:nth-child(2) { transition-delay: 0.11s; }
.mm-panel.is-active .mm-links li:nth-child(3) { transition-delay: 0.14s; }
.mm-panel.is-active .mm-links li:nth-child(4) { transition-delay: 0.17s; }
.mm-panel.is-active .mm-links li:nth-child(5) { transition-delay: 0.2s; }
.mm-panel.is-active .mm-links li:nth-child(6) { transition-delay: 0.23s; }

/* Feature card = poster-style gradient field */
.mm-feature {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 22px 22px 20px;
  border-radius: 18px;
  overflow: hidden;
  color: #05100a;
  background: var(--grad-loop);
  background-size: 200% 100%;
  animation: gradShift 12s var(--ease-in-out) infinite;
  isolation: isolate;
}
html[data-brand="cts"] .mm-feature { color: #03121a; }
.mm-feature-motif {
  position: absolute; inset: 0; z-index: -1;
  transition: transform 0.8s var(--ease);
}
/* Weeld: large slash shapes, same geometry as the identity's slash */
html[data-brand="weeld"] .mm-feature-motif {
  background:
    url("assets/slash.svg") no-repeat right -14px bottom -40px / auto 150%,
    url("assets/slash.svg") no-repeat right 70px bottom -40px / auto 150%;
  opacity: 0.12;
}
/* CTS: thick white rings, as on the CTS posters */
html[data-brand="cts"] .mm-feature-motif {
  background:
    radial-gradient(circle at 108% 118%, transparent 0 34%, rgba(255,255,255,0.95) 34.3% 44%, transparent 44.3%),
    radial-gradient(circle at 108% 118%, transparent 0 54%, rgba(255,255,255,0.55) 54.3% 60%, transparent 60.3%);
  opacity: 0.6;
}
.mm-feature:hover .mm-feature-motif { transform: translate(-10px, -6px) scale(1.04); }
.mm-feature-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75;
}
.mm-feature-title {
  margin-top: 10px;
  font-family: var(--f-display);
  font-size: 22px; font-weight: 600; line-height: 1.12; letter-spacing: -0.02em;
  max-width: 15em;
}
.mm-feature .mm-more { margin-top: auto; padding-top: 18px; color: inherit; }

/* Mobile navigation */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg);
  overflow-y: auto;
  padding: 12px 0 40px;
}
.mobile-nav[hidden] { display: none; }
.m-list > li { border-bottom: 1px solid var(--line); }
.m-toggle {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0;
  font-family: var(--f-display);
  font-size: 22px; font-weight: 500; letter-spacing: -0.01em;
  text-align: left;
}
.m-toggle::after {
  content: ""; width: 9px; height: 9px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.35s var(--ease);
}
.m-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); }
.m-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.m-sub > ul { overflow: hidden; }
.m-toggle[aria-expanded="true"] + .m-sub { grid-template-rows: 1fr; }
.m-sub a { display: block; padding: 8px 0; color: var(--ink-2); font-size: 16px; }
.m-sub li:last-child a { padding-bottom: 20px; }
.m-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 64% 108%, rgba(65, 203, 225, 0.2) 0%, rgba(65, 203, 225, 0.05) 45%, transparent 70%),
    radial-gradient(40% 40% at 28% 110%, rgba(105, 227, 44, 0.1) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-hero-top) 0%, var(--bg-hero-bottom) 100%);
}
html[data-brand="cts"] .hero {
  background:
    radial-gradient(60% 55% at 64% 108%, rgba(0, 184, 217, 0.22) 0%, rgba(0, 184, 217, 0.05) 45%, transparent 70%),
    radial-gradient(40% 40% at 86% 110%, rgba(131, 238, 0, 0.1) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-hero-top) 0%, var(--bg-hero-bottom) 100%);
}
.hero-field {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  /* the shapes fade in on load; the text is there from the start */
  opacity: 0;
  animation: fieldIn 1.6s 0.1s cubic-bezier(0.33, 0, 0.2, 1) forwards;
}
@keyframes fieldIn { to { opacity: 1; } }
/* light that follows the cursor */
.hero-glow {
  position: absolute;
  left: 0; top: 0;
  width: 720px; height: 720px;
  margin: -360px 0 0 -360px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-2) 0%, transparent 60%);
  transform: translate3d(var(--gx, 60vw), var(--gy, 90vh), 0);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.6s;
  mix-blend-mode: var(--glow-blend);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--header-h) + clamp(72px, 17vh, 190px));
  padding-bottom: 38vh;
}
.hero-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(42px, 6.4vw, 100px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--hero-ink);
  max-width: 14.5em;
}
.hero-title .line { display: block; }
/* Both sketches: three lines, gradient on the last line */
.hero-title {
  font-weight: 600; /* between Medium (too thin) and Bold (too heavy) vs. the sketches */
  font-size: clamp(42px, 6vw, 92px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  max-width: 11em;
}

.hero-sub {
  margin-top: 28px;
  max-width: 35em;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.6;
  color: var(--ink-2);
}
.hero-cta {
  /* scales with the headline; full designer size (83px / 20px) once the title hits 92px */
  --cta-h: clamp(54px, 5.4vw, 83px);
  display: flex; flex-wrap: wrap; gap: calc(var(--cta-h) * 0.36);
  margin-top: 36px;
}
.hero-cta .btn {
  height: var(--cta-h);
  padding: 0 calc(var(--cta-h) * 0.65);
  gap: calc(var(--cta-h) * 0.19);
  font-family: var(--f-display);
  font-size: clamp(16px, 1.3vw, 20px);
  font-weight: 500;
  letter-spacing: 0;
}
.hero-cta .btn-ghost { --stroke-w: clamp(2px, 0.26vw, 4px); }
.hero-cta .arr { width: clamp(18px, 1.57vw, 24px); height: 14px; }
.hero-cta .arr::before { top: 6px; height: 2px; }
.hero-cta .arr::after { top: 2px; width: 10px; height: 10px; border-width: 2px; }

.scroll-hint {
  position: absolute;
  left: 50%; bottom: 28px;
  z-index: 2;
  width: 22px; height: 36px;
  margin-left: -11px;
  border: 1.5px solid var(--hint-line);
  border-radius: 12px;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 7px;
  width: 2px; height: 7px; margin-left: -1px;
  border-radius: 2px;
  background: var(--grad);
  animation: scrollDot 2.2s var(--ease-in-out) infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  80% { transform: translateY(12px); opacity: 0; }
  100% { opacity: 0; }
}

/* =========================================================
   Ticker
   ========================================================= */
.ticker {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-list { display: flex; flex: none; }
.ticker-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 32px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.ticker-list li::after {
  content: "";
  width: 9px; height: 16px;
  margin-left: 52px;
  background: var(--grad);
  clip-path: polygon(62% 0, 100% 0, 38% 100%, 0 100%);
  opacity: 0.8;
}
html[data-brand="cts"] .ticker-list li::after {
  width: 18px; height: 18px;
  margin-top: -10px;
  background: none;
  clip-path: none;
  border: 3.5px solid transparent;
  border-bottom-color: var(--cyan);
  border-radius: 50%;
}
.ticker-list b {
  font-family: var(--f-display);
  font-size: 20px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink);
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* =========================================================
   Second floor — proof
   ========================================================= */
.proof { padding: clamp(88px, 12vw, 160px) 0 clamp(80px, 10vw, 140px); background: var(--bg); position: relative; }
.proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.proof-title {
  margin-top: 18px;
  font-family: var(--f-display);
  font-size: clamp(32px, 3.8vw, 56px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.proof-text { margin-top: 24px; max-width: 38em; color: var(--ink-2); font-size: 17px; }
.proof-text + .proof-text { margin-top: 16px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 32px;
  font-weight: 500;
  padding-bottom: 6px;
  background: var(--grad) no-repeat left bottom / 100% 1px;
  transition: background-size 0.45s var(--ease);
}
.link-arrow:hover { background-size: 0% 1px; background-position: right bottom; }
.link-arrow:hover .arr { transform: translateX(4px); }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.stat {
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--line);
}
.stat:nth-child(odd) { padding-right: 24px; border-right: 1px solid var(--line); }
.stat:nth-child(even) { padding-left: 28px; }
.stat-num {
  font-family: var(--f-display);
  font-size: clamp(44px, 5vw, 76px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  background: var(--grad-ink);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat dd { margin-top: 12px; font-size: 14px; color: var(--muted); max-width: 16em; }

.modules { margin-top: clamp(80px, 10vw, 140px); }
.modules-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.modules-title {
  font-family: var(--f-display);
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.modules-head .link-arrow { margin-top: 0; }
.module-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.module a {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 210px;
  padding: 24px 22px 22px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.4s, transform 0.5s var(--ease), background 0.4s;
}
/* gradient that follows the cursor inside a card */
.module a::before {
  content: "";
  position: absolute;
  left: var(--px, 50%); top: var(--py, 50%);
  width: 340px; height: 340px; margin: -170px 0 0 -170px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-2), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
}
.module a::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.module a:hover { border-color: var(--line-strong); transform: translateY(-4px); background: var(--surface-2); }
.module a:hover::before { opacity: 1; }
.module a:hover::after { transform: scaleX(1); }
.module-mark {
  position: relative;
  width: 36px; height: 28px;
  display: block;
}
/* Weeld: a double slash, the brand's "//" */
html[data-brand="weeld"] .module-mark::before,
html[data-brand="weeld"] .module-mark::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 7px;
  background: var(--grad);
  clip-path: polygon(55% 0, 100% 0, 45% 100%, 0 100%);
  transition: transform 0.5s var(--ease);
}
html[data-brand="weeld"] .module-mark::before { left: 0; }
html[data-brand="weeld"] .module-mark::after { left: 11px; }
.module a:hover .module-mark::after { transform: translateX(6px); }
/* CTS: a thick smile with a wink, as in the CTS sketch */
html[data-brand="cts"] .module-mark::before {
  content: "";
  position: absolute; left: 0; top: -6px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 5px solid transparent;
  border-bottom-color: var(--cyan);
  transition: transform 0.5s var(--ease), border-color 0.4s;
}
html[data-brand="cts"] .module-mark::after {
  content: "";
  position: absolute; left: 17px; top: 4px;
  width: 9px; height: 4px;
  background: var(--lime);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
html[data-brand="cts"] .module a:hover .module-mark::before { border-bottom-color: var(--lime); transform: scaleX(1.12); }
html[data-brand="cts"] .module a:hover .module-mark::after { opacity: 1; transform: none; }

.module-name {
  margin-top: auto;
  padding-top: 40px;
  font-family: var(--f-display);
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1;
}
.module-desc { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.module .arr {
  position: absolute; right: 22px; top: 30px;
  color: var(--muted);
  transition: transform 0.4s var(--ease), color 0.3s;
}
.module a:hover .arr { transform: translateX(4px); color: var(--ink); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.module-list .reveal:nth-child(2) { transition-delay: 0.06s; }
.module-list .reveal:nth-child(3) { transition-delay: 0.12s; }
.module-list .reveal:nth-child(4) { transition-delay: 0.18s; }
.module-list .reveal:nth-child(5) { transition-delay: 0.24s; }
.stats .reveal:nth-child(2) { transition-delay: 0.08s; }
.stats .reveal:nth-child(3) { transition-delay: 0.16s; }
.stats .reveal:nth-child(4) { transition-delay: 0.24s; }

/* =========================================================
   Prototype identity switch
   ========================================================= */
.site-header.is-open ~ .proto-switch, body:has(.burger[aria-expanded="true"]) .proto-switch { opacity: 0; pointer-events: none; }
.proto-switch {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 80;
  display: flex; align-items: center; gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--switch-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 40px -10px var(--shadow);
  font-size: 12px;
}
.proto-group { display: flex; align-items: center; gap: 4px; }
.proto-group + .proto-group { padding-left: 6px; margin-left: 2px; border-left: 1px solid var(--line); }
.proto-label { padding: 0 8px 0 10px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }
.proto-switch button {
  height: 30px; padding: 0 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
  transition: background 0.3s, color 0.3s;
}
.proto-switch button[aria-pressed="true"] { background: var(--btn-on); color: var(--btn-on-ink); }

/* Brand change crossfade */
html.is-switching body { animation: brandFade 0.6s var(--ease); }
@keyframes brandFade { 0% { opacity: 1; } 35% { opacity: 0.35; } 100% { opacity: 1; } }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1240px) {
  .nav-trigger { padding: 0 9px; font-size: 13.5px; }
  .header-bar { gap: 20px; }
  .mm-grid { grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr); }
  .mm-feature { display: none; }
  .module-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .header-actions { margin-left: auto; }
  .burger { display: block; }
  .megamenu { display: none; }
}
@media (max-width: 860px) {
  .proof-grid { grid-template-columns: 1fr; }
  .module-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { padding-bottom: 34vh; }
}
@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .logo-img { height: 24px; }
  .logo-weeld { height: 32px; }
  .logo-cts { height: 38px; }
  .header-actions .btn-sm { display: none; }
  .hero-title { letter-spacing: -0.03em; }
  .hero-title .line { display: inline; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .module-list { grid-template-columns: 1fr; }
  .module a { min-height: 0; }
  .module-name { padding-top: 28px; }
  .stat:nth-child(odd) { padding-right: 14px; }
  .stat:nth-child(even) { padding-left: 16px; }
  .ticker-list li { padding: 18px 22px; }
  .ticker-list li::after { margin-left: 36px; }
  .proto-switch { left: 16px; right: 16px; justify-content: center; }
  .proto-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .hero-title .line > span, .hero-sub, .hero-cta { transform: none; opacity: 1; }
  .reveal { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
  html { scroll-behavior: auto; }
}
