/* ==========================================================================
   umai.media — Redesigned neobrutalist system
   Maximalist · Playful · Spanish warmth
   ========================================================================== */

/* ---------- Fonts --------------------------------------------------------- */
@font-face {
  font-family: 'Satoshi';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Satoshi-Regular.woff2") format("woff2");
}
@font-face {
  font-family: 'Satoshi';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/Satoshi-Medium.woff2") format("woff2");
}
@font-face {
  font-family: 'Satoshi';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/Satoshi-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: 'Satoshi';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/Satoshi-Bold.woff2") format("woff2");
}
@font-face {
  font-family: 'Satoshi';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/fonts/Satoshi-Black.woff2") format("woff2");
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/SpaceGrotesk-Bold.woff2") format("woff2");
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/Fredoka-SemiBold.woff2") format("woff2");
}

/* ---------- Reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* The header is sticky, so an anchor would otherwise land its target
   underneath it. Offsetting here rather than per-section keeps every #link on
   the site honest, including the ones added later. */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h, 64px) + 24px); }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- Tokens -------------------------------------------------------- */
:root {
  /* Palette — keep current */
  --ink: #0b0b0b;
  --paper: #faf7f0;      /* warm cream */
  --paper-deep: #f4eedb; /* deeper cream */
  --white: #ffffff;

  --red: #e63946;
  --red-deep: #c81d2c;
  --orange: #f64b29;     /* logo orange */
  --tangerine: #ff8c42;
  --yellow: #ffd23f;
  --butter: #ffe98a;
  --blue: #2454ff;
  --sky: #b8e1ff;
  --mint: #00d4a8;
  --plum: #6b2cb8;
  --rose: #ffc1c1;

  /* Semantic */
  --bg: var(--paper);
  --bg-alt: var(--paper-deep);
  --panel: var(--white);
  --text: var(--ink);
  --text-muted: #5a5246;
  --line: var(--ink);
  --accent: var(--orange);

  /* Brutal */
  --border-w: 2.5px;
  --shadow-x: 6px;
  --shadow-y: 6px;
  --shadow: var(--shadow-x) var(--shadow-y) 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-lg: 10px 10px 0 var(--ink);
  --radius: 18px;
  --radius-sm: 10px;
  --radius-btn: 999px;

  /* Type */
  --font: 'Satoshi', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Satoshi', system-ui, sans-serif;
  --font-display-serif: 'Satoshi', serif; /* swapped by tweaks */

  /* Layout */
  --container: 1280px;
  --nav-h: 76px;
  --section-pad-y: clamp(72px, 9vw, 128px);
}

/* Dark mode override */
[data-theme="dark"] {
  --bg: #0c0b08;
  --bg-alt: #18160f;
  --panel: #17150e;
  --text: #faf7f0;
  --text-muted: #a89e88;
  --line: #faf7f0;
  --shadow: var(--shadow-x) var(--shadow-y) 0 #faf7f0;
  --shadow-sm: 3px 3px 0 #faf7f0;
  --shadow-lg: 10px 10px 0 #faf7f0;
}
[data-theme="dark"] .invert-dark { filter: invert(1) hue-rotate(180deg); }

/* Density: dense */
[data-density="dense"] {
  --section-pad-y: clamp(48px, 6vw, 88px);
  --radius: 12px;
}

/* Type pairing: display serif for headlines */
[data-type="serif"] {
  --font-display: 'Fraunces', 'Space Grotesk', Georgia, serif;
}

/* ---------- Base ---------------------------------------------------------- */
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(rgba(11,11,11,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(rgba(250,247,240,0.05) 1px, transparent 1px);
}

::selection { background: var(--orange); color: var(--white); }

/* ---------- Type scale ---------------------------------------------------- */
.t-xs { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 700; }
.t-sm { font-size: 14px; }
.t-md { font-size: 17px; line-height: 1.65; }
.t-lg { font-size: clamp(1.2rem, 1.6vw, 1.4rem); font-weight: 600; line-height: 1.4; }

.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.display-xl { font-size: clamp(3rem, 8vw, 7.5rem); }
.display-lg { font-size: clamp(2.5rem, 6vw, 5rem); }
.display-md { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.02; }
.display-sm { font-size: clamp(1.5rem, 2.5vw, 2.25rem); line-height: 1.1; }

.muted { color: var(--text-muted); }
.lead { font-size: clamp(1.05rem, 1.3vw, 1.3rem); line-height: 1.6; color: var(--text-muted); }

/* ---------- Layout helpers ----------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding-block: var(--section-pad-y); }

.grid { display: grid; gap: 24px; }
.flex { display: flex; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Responsive grid utilities ------------------------------------
   These exist because several grids were declaring their columns inline,
   where no media query can reach them: a two- or three-column layout stayed
   two or three columns at 375px wide. .auto-grid needs no breakpoint at all
   -- each use states the narrowest a column may be and the browser drops to
   fewer columns when that no longer fits. */
.auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--min, 200px), 1fr));
}

/* Text beside a wide visual. Asymmetric on purpose, so it gets a breakpoint
   rather than an auto-fit: the two halves are not interchangeable. */
.cols-2-software {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.cols-2-services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* KPI strip beside the product preview. */
.cols-2-product-hero {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  align-items: start;
}

/* A dated row inside the newsroom mock: date, headline, status. */
.mock-timeline-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
}

@media (max-width: 900px) {
  .cols-2-software { grid-template-columns: 1fr; gap: 32px; }
  .cols-2-product-hero { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .cols-2-services,
  .module-grid { grid-template-columns: 1fr; }
  .mock-timeline-row { grid-template-columns: 54px minmax(0, 1fr) auto; gap: 8px !important; }
}

/* ---------- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-btn);
  border: var(--border-w) solid var(--ink);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn .arrow { width: 18px; height: 18px; transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* Primary CTA (orange) — arrow bounces back-and-forth while hovering */
.btn--primary:hover .arrow {
  animation: arrowBounce 0.9s ease-in-out infinite;
  transition: none;
  transform: none;
}
@keyframes arrowBounce {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(6px); }
}
[data-theme="dark"] .btn { background: #2a2519; color: var(--white); border-color: var(--white); box-shadow: 3px 3px 0 var(--white); }
[data-theme="dark"] .btn:hover { box-shadow: 5px 5px 0 var(--white); }

.btn--primary { background: var(--orange); color: var(--white); }
.btn--primary:hover { background: var(--red-deep); }
[data-theme="dark"] .btn--primary { background: var(--orange); color: var(--white); border-color: var(--white); }

.btn--dark { background: var(--ink); color: var(--white); }
[data-theme="dark"] .btn--dark { background: var(--white); color: var(--ink); }

.btn--ghost { background: transparent; box-shadow: none; border-color: transparent; padding-inline: 14px; }
.btn--ghost:hover { background: var(--bg-alt); transform: none; box-shadow: none; }

.btn--sm { padding: 9px 16px; font-size: 0.85rem; }
.btn--lg { padding: 18px 32px; font-size: 1.05rem; }

/* ---------- Pills, badges, tape ------------------------------------------ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: var(--border-w) solid var(--ink);
  background: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
[data-theme="dark"] .pill { background: #2a2519; border-color: var(--white); }
.pill .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--orange); display: inline-block; }
.pill--filled { background: var(--orange); color: var(--white); border-color: var(--ink); }

/* LIVE badge: a dot that breathes, with a ring pushing out from under it, so
   the word is doing something rather than just claiming it. */
.pill--live .dot {
  position: relative;
  background: var(--white);
  animation: livePulse 1.8s ease-in-out infinite;
}

.pill--live .dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--white);
  animation: liveRing 1.8s ease-out infinite;
}

@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.78); opacity: 0.7; }
}

@keyframes liveRing {
  0%   { transform: scale(1); opacity: 0.5; }
  70%  { transform: scale(2.8); opacity: 0; }
  100% { transform: scale(2.8); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pill--live .dot { animation: none; }
  .pill--live .dot::after { animation: none; opacity: 0; }
}
.pill--yellow { background: var(--yellow); }
.pill--mint { background: var(--mint); color: var(--ink); }
.pill--blue { background: var(--blue); color: var(--white); }

.tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  background: var(--yellow);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transform: rotate(-2deg);
}

.sticker {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  border: var(--border-w) solid var(--ink);
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.1;
  transform: rotate(-8deg);
  z-index: 3;
  box-shadow: var(--shadow-sm);
  padding: 8px;
}

/* ---------- Card ---------------------------------------------------------- */
.card {
  background: var(--panel);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card--hover:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.card--flat { box-shadow: none; }
.card--filled-orange { background: var(--orange); color: var(--white); }
.card--filled-yellow { background: var(--yellow); }
.card--filled-blue { background: var(--blue); color: var(--white); }
.card--filled-mint { background: var(--mint); }
.card--filled-ink { background: var(--ink); color: var(--paper); }
.card--filled-paper { background: var(--paper-deep); }

[data-theme="dark"] .card { background: var(--panel); }
[data-theme="dark"] .card--filled-ink { background: var(--white); color: var(--ink); }
[data-theme="dark"] .card--filled-paper { background: #1f1c14; }

/* ---------- Marquee ------------------------------------------------------- */
.marquee {
  overflow: hidden;
  border-top: var(--border-w) solid var(--line);
  border-bottom: var(--border-w) solid var(--line);
  background: var(--ink);
  color: var(--paper);
  padding: 14px 0;
  white-space: nowrap;
}
.marquee--orange { background: var(--orange); color: var(--white); }
.marquee--yellow { background: var(--yellow); color: var(--ink); }
.marquee__track {
  display: inline-flex;
  gap: 48px;
  animation: marquee 30s linear infinite;
  padding-left: 48px;
}
.marquee--fast .marquee__track { animation-duration: 18s; }
.marquee__track > span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 24px;
}
.marquee__track > span::after {
  content: "★";
  font-size: 0.9em;
  display: inline-block;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---------- Rich Marquee (icons + slow) --------------------------------- */
.rich-marquee {
  overflow: hidden;
  border-top: var(--border-w) solid var(--ink);
  border-bottom: var(--border-w) solid var(--ink);
  background: var(--orange);
  color: var(--white);
  padding: 22px 0;
  white-space: nowrap;
  position: relative;
}
.rich-marquee--ink   { background: var(--ink); color: var(--paper); }
.rich-marquee--yellow { background: var(--yellow); color: var(--ink); }
.rich-marquee--mint  { background: var(--mint); color: var(--ink); }
.rich-marquee--paper { background: var(--paper-deep); color: var(--ink); }

.rich-marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  animation: marquee 60s linear infinite;
  padding-right: 40px;
  will-change: transform;
}
.rich-marquee:hover .rich-marquee__track { animation-play-state: paused; }

.rich-marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.rich-marquee__icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  flex-shrink: 0;
  background: rgba(255,255,255,0.12);
}
.rich-marquee__icon svg {
  width: 26px !important;
  height: 26px !important;
  stroke-width: 2.2;
  overflow: visible;
}

/* ---------- SVG icon animations =====================================
   Architecture: every animated icon is wrapped in .nav-icon-anim. The actual
   keyframe animations are declared INSIDE context selectors so they don't run
   anywhere else. Two contexts trigger them:
     1) Inside a .rich-marquee (top ticker) — always running.
     2) Inside a .mega__item that is currently hovered — runs on hover only.
   Anywhere else (loose icon, ungated dropdown item), the icon is static. */

.nav-icon-anim > * {
  transform-box: fill-box;
  transform-origin: center;
}

/* Animation declarations live inside :is(...) so they only apply in the two
   contexts above. Each rule pairs a context-prefix with a specific icon. */

/* === ANALYTICS — bars rise & fall (staggered) =========================== */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--analytics .bar {
  transform-origin: 50% 100%;
  animation: barPulse 1.6s ease-in-out infinite;
}
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--analytics .bar:nth-of-type(2) { animation-delay: -0.35s; }
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--analytics .bar:nth-of-type(3) { animation-delay: -0.7s; }
@keyframes barPulse {
  0%, 100% { transform: scaleY(0.55); }
  50%      { transform: scaleY(1); }
}

/* === AI — eyes blink ==================================================== */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--ai .eye {
  transform-origin: center;
  animation: blink 2.4s ease-in-out infinite;
}
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--ai .eye:nth-of-type(2) { animation-delay: -1.2s; }
@keyframes blink {
  0%, 90%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(0.15); }
}

/* === SENDS — paper plane glides ========================================= */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--sends {
  animation: glide 1.8s ease-in-out infinite;
}
@keyframes glide {
  0%, 100% { transform: translate(-1px, 1px) rotate(-2deg); }
  50%      { transform: translate(2px, -2px) rotate(4deg); }
}

/* === PR — megaphone shake =============================================== */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--pr {
  transform-origin: 20% 50%;
  animation: shake 1.4s ease-in-out infinite;
}
@keyframes shake {
  0%, 100% { transform: rotate(-6deg); }
  50%      { transform: rotate(8deg); }
}

/* === INFLUENCERS — broadcast arcs pulse ================================ */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--influencers .twinkle {
  transform-origin: 6px 12px;
  animation: arcPulse 1.6s ease-in-out infinite;
}
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--influencers .twinkle:nth-of-type(2) { animation-delay: -0.4s; }
@keyframes arcPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.55; }
  50%      { transform: scale(1.1);  opacity: 1; }
}

/* === NEWSROOM — pulse ==================================================== */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--newsroom {
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* === CONTACTS — avatar pulse ============================================ */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--contacts .avatar {
  transform-origin: center;
  animation: pulseSoft 1.8s ease-in-out infinite;
}
@keyframes pulseSoft {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.18); }
}

/* === DELIVERABILITY — check pop ========================================= */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--deliverability .check {
  transform-origin: center;
  animation: checkPop 1.6s ease-in-out infinite;
}
@keyframes checkPop {
  0%, 80%, 100% { transform: scale(1); }
  90%           { transform: scale(1.4); }
}

/* === EDITOR — pen wiggle ================================================ */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--editor {
  transform-origin: 80% 80%;
  animation: wiggle 2s ease-in-out infinite;
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(6deg); }
}

/* === AUDITS — magnifier scans =========================================== */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--audits {
  animation: lookAround 2.4s ease-in-out infinite;
}
@keyframes lookAround {
  0%, 100% { transform: translate(0,0); }
  25%      { transform: translate(-1.5px, 1px); }
  75%      { transform: translate(1.5px, -1px); }
}

/* === ROADMAPS — gentle drift ============================================ */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--roadmaps {
  animation: drift 3s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translateX(-1px); }
  50%      { transform: translateX(2px); }
}

/* === EVENTS — calendar dot pulse ======================================== */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--events .dot-pulse {
  transform-origin: center;
  animation: dotPulse 1.4s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { transform: scale(0.6); opacity: 0.7; }
  50%      { transform: scale(1.3); opacity: 1; }
}

/* === CREATIVE — sparkles ================================================ */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--creative .spark {
  transform-origin: center;
  animation: sparkle 1.6s ease-in-out infinite;
}
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--creative .spark:nth-of-type(2) { animation-delay: -0.5s; }
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--creative .spark:nth-of-type(3) { animation-delay: -1s; }
@keyframes sparkle {
  0%, 100% { transform: scale(0.7); opacity: 0.6; }
  50%      { transform: scale(1.4); opacity: 1; }
}

/* === TRAINING — graduation cap bob ====================================== */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--training {
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

/* === ADMIN — grid cells light sequentially ============================== */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--admin .cell {
  transform-origin: center;
  animation: cellLight 2.4s ease-in-out infinite;
}
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--admin .cell:nth-of-type(2) { animation-delay: -0.6s; }
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--admin .cell:nth-of-type(3) { animation-delay: -1.2s; }
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--admin .cell:nth-of-type(4) { animation-delay: -1.8s; }
@keyframes cellLight {
  0%, 60%, 100% { opacity: 1; }
  30%           { opacity: 0.35; }
}

/* === WEB — globe rotation ==============================================
   Three identical meridian arcs, each cycling through scaleX(-1 → 1) while
   fading in at left and out at right. Staggered by 1/3 of the cycle so at
   any moment two are visible: one is fully bulged on one side as another
   appears from the opposite side. */
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--web .meridian {
  transform-box: view-box;
  transform-origin: 12px 12px;
  animation: meridianSweep 3.6s linear infinite;
}
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--web .m2 { animation-delay: -1.2s; }
:is(.rich-marquee, .mega__item:hover) .nav-icon-anim--web .m3 { animation-delay: -2.4s; }
@keyframes meridianSweep {
  0%   { transform: scaleX(-1); opacity: 0; }   /* hidden, just entering left */
  18%  { transform: scaleX(-0.7); opacity: 1; } /* visible, bulged left */
  50%  { transform: scaleX(0); opacity: 1; }    /* edge-on, vertical line */
  82%  { transform: scaleX(0.7); opacity: 1; }  /* visible, bulged right */
  100% { transform: scaleX(1); opacity: 0; }    /* fading, exiting right */
}

/* === LOGIN — arrow slides into door on hover ============================ */
.login-arrow-head,
.login-arrow-shaft {
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.login-wrapper:hover .login-arrow-head,
.login-wrapper:focus-within .login-arrow-head { transform: translateX(2px); }
.login-wrapper:hover .login-arrow-shaft,
.login-wrapper:focus-within .login-arrow-shaft { transform: translateX(2px); }


/* ---------- Scroll-reveal animations ------------------------------------- */
/* Elements start hidden + offset and animate in when intersection observer
   adds .is-visible. Variants for direction (up/left/right) and effect (scale).
   Children inside a staggered container use --rd to delay sequentially. */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.34, 1.32, 0.64, 1);
  transition-delay: calc(var(--rd, 0) * 70ms);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-36px); }
[data-reveal="right"] { transform: translateX(36px); }
[data-reveal="scale"] { transform: scale(0.92); }
[data-reveal="rotate"]{ transform: translateY(28px) rotate(-2deg); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Reduced-motion: disable to respect user preference */
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal="left"], [data-reveal="right"], [data-reveal="scale"], [data-reveal="rotate"] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
.rich-marquee__star {
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
  display: inline-block;
  flex-shrink: 0;
  animation: spinStar 6s linear infinite;
}
.rich-marquee__star--alt {
  animation: spinStar 4s linear infinite reverse;
}

.rich-marquee__num {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  padding: 2px 10px;
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 8px;
  display: inline-block;
  transform: rotate(-2deg);
}
.rich-marquee--ink .rich-marquee__num,
.rich-marquee--mint .rich-marquee__num,
.rich-marquee--yellow .rich-marquee__num,
.rich-marquee--paper .rich-marquee__num { background: var(--orange); color: var(--white); }

.rich-marquee__pill {
  display: inline-block;
  padding: 6px 14px;
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.rich-marquee__bounce {
  animation: bounceY 1.6s ease-in-out infinite;
  /* No display override — let the parent's display: grid stay so SVGs center. */
}
.rich-marquee__item:nth-child(2n) .rich-marquee__bounce { animation-delay: -0.4s; }
.rich-marquee__item:nth-child(3n) .rich-marquee__bounce { animation-delay: -0.8s; }
.rich-marquee__item:nth-child(4n) .rich-marquee__bounce { animation-delay: -1.2s; }

@keyframes spinStar {
  to { transform: rotate(360deg); }
}
@keyframes bounceY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Fade edges */
.rich-marquee::before,
.rich-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 2;
}
.rich-marquee::before { left: 0; background: linear-gradient(90deg, currentColor, transparent); opacity: 0.0; }
.rich-marquee::after { right: 0; background: linear-gradient(-90deg, currentColor, transparent); opacity: 0.0; }

/* ---------- Dual ticker (2 rows, opposite directions) ------------------- */
.dual-ticker {
  background: var(--ink);
  color: var(--paper);
  border-top: var(--border-w) solid var(--line);
  border-bottom: var(--border-w) solid var(--line);
  padding: 18px 0;
  overflow: hidden;
}
.dual-ticker__row {
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  min-height: 36px;
}
.dual-ticker__row + .dual-ticker__row { margin-top: 10px; padding-top: 10px; border-top: 1.5px dashed rgba(250,247,240,0.2); }
.dual-ticker__track {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  padding-right: 32px;
  animation: marquee 50s linear infinite;
  will-change: transform;
}
.dual-ticker__track--reverse { animation: marqueeReverse 55s linear infinite; }
.dual-ticker:hover .dual-ticker__track { animation-play-state: paused; }
@keyframes marqueeReverse {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.dual-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.dual-ticker__item .arrow-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1.5px solid var(--paper);
  flex-shrink: 0;
}
.dual-ticker__item .arrow-mark--down { background: transparent; color: var(--paper); }
.dual-ticker__item .arrow-mark--star { background: var(--yellow); color: var(--ink); border-color: var(--ink); }

.dual-ticker__divider {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--orange);
  opacity: 0.6;
  flex-shrink: 0;
}

/* ---------- Poster marquee — huge words in colored blocks --------------- */
.poster-marquee {
  background: var(--paper);
  border-top: var(--border-w) solid var(--ink);
  border-bottom: var(--border-w) solid var(--ink);
  overflow: hidden;
  padding: 0;
  position: relative;
}
.poster-marquee__track {
  display: inline-flex;
  align-items: stretch;
  animation: marquee 70s linear infinite;
  will-change: transform;
}
.poster-marquee:hover .poster-marquee__track { animation-play-state: paused; }

.poster-marquee__word {
  display: inline-flex;
  align-items: center;
  padding: 22px 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.035em;
  line-height: 1;
  white-space: nowrap;
  border-right: 2px solid var(--ink);
  flex-shrink: 0;
  text-transform: lowercase;
}
.poster-marquee__word--orange { background: var(--orange); color: var(--white); }
.poster-marquee__word--yellow { background: var(--yellow); color: var(--ink); }
.poster-marquee__word--mint   { background: var(--mint); color: var(--ink); }
.poster-marquee__word--ink    { background: var(--ink); color: var(--paper); }
.poster-marquee__word--paper  { background: var(--paper-deep); color: var(--ink); }
.poster-marquee__word--blue   { background: var(--blue); color: var(--white); }

/* Animated decorations on poster words */
.poster-marquee__word .deco {
  display: inline-block;
  margin-left: 14px;
  font-size: 0.7em;
  animation: spinStar 5s linear infinite;
}
.poster-marquee__word:nth-child(2n) .deco { animation-direction: reverse; animation-duration: 7s; }

/* Tape strip — angled */
.tape {
  background: var(--orange);
  color: var(--white);
  padding: 8px 0;
  transform: rotate(-1.5deg);
  border-top: var(--border-w) solid var(--ink);
  border-bottom: var(--border-w) solid var(--ink);
  overflow: hidden;
  margin-block: -10px;
  position: relative;
  z-index: 5;
  white-space: nowrap;
}
.tape .marquee__track { flex-wrap: nowrap; }
.tape .marquee__track > span { white-space: nowrap; flex-shrink: 0; }
.tape .marquee__track > span::after { content: "·"; }

/* ---------- Header -------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--bg);
  border-bottom: var(--border-w) solid var(--ink);
}
.site-header__row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--nav-h);
}
.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.logo__icon { width: 34px; height: 34px; display: block; }
.logo__text { height: 30px; width: auto; display: block; }
[data-theme="dark"] .logo__text { filter: invert(1); }

.site-nav { display: flex; gap: 4px; align-items: center; }
.site-nav .nav-item { position: relative; }
/* Top-level nav triggers only — child combinator (>) keeps these styles off
   the .mega__item links nested inside the dropdown panel. */
.site-nav > .nav-item > a,
.site-nav > .nav-item > button.nav-trigger {
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  white-space: nowrap;
}

/* A two-word label ("Log in", "How it works") is an anonymous flex item
   between the icon and the caret, and was free to break in half when the bar
   got tight. The login trigger sits outside .site-nav, so it needs saying
   twice. */
.login-wrapper > .nav-trigger {
  white-space: nowrap;
}
.site-nav > .nav-item > a:hover,
.site-nav > .nav-item > button.nav-trigger:hover { background: var(--bg-alt); }
/* Keep the trigger hover-styled while ANY descendant of the nav-item is hovered
   — including the mega-menu panel — so the top-menu button doesn't lose its
   hover state when the cursor moves into the dropdown. */
.site-nav .nav-item:hover > button.nav-trigger,
.site-nav .nav-item:hover > a { background: var(--bg-alt); }
.login-wrapper:hover > .nav-trigger { background: var(--bg-alt); }
.site-nav > .nav-item > a.is-active,
.site-nav > .nav-item > button.nav-trigger.is-active {
  background: var(--ink);
  color: var(--paper);
}
.site-nav .nav-trigger .caret {
  width: 12px; height: 12px;
  transition: transform 0.22s ease, color 0.22s ease;
  color: var(--orange);
  opacity: 0.9;
}
.site-nav .nav-trigger:hover .caret { color: var(--orange); }
.site-nav .nav-trigger[aria-expanded="true"] .caret { transform: rotate(180deg); }
[data-theme="dark"] .site-nav > .nav-item > a.is-active,
[data-theme="dark"] .site-nav > .nav-item > button.nav-trigger.is-active { background: var(--white); color: var(--ink); }

/* Mega-menu panel */
.mega {
  position: absolute;
  top: 100%;
  left: 50%;
  /* Closed: lifted up, slightly smaller and rotated for character. */
  transform: translateX(-50%) translateY(-8px) scale(0.96) rotate(-1deg);
  transform-origin: top center;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
  /* The padding-top forms an INVISIBLE BRIDGE between the trigger and the
     visible panel — so the cursor never leaves the hoverable area when moving
     from the trigger button down into the panel. Fixes the close/reopen flicker. */
  padding-top: 12px;
  min-width: 540px;
  z-index: 200;
}
.mega[data-open="true"] {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1) rotate(0deg);
  pointer-events: auto;
}
.mega--right { left: auto; right: 0; transform: translateY(-8px) scale(0.96) rotate(1.5deg); transform-origin: top right; min-width: 320px; }
.mega--right[data-open="true"] { transform: translateY(0) scale(1) rotate(0deg); }

.mega__inner {
  background: var(--panel);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.mega__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--line);
}
.mega__kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.mega__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.mega__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.mega--login .mega__grid { grid-template-columns: 1fr; }

.mega__item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  transition: background 0.12s, transform 0.12s;
  border: 1.5px solid transparent;
  text-align: left;
}
.mega__item:hover { background: var(--bg-alt); border-color: var(--line); transform: translate(-1px, -1px); }
.mega__item__icon {
  width: 40px;
  height: 40px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  box-sizing: border-box;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  background: var(--white);
  align-self: center;
  justify-self: start;
}
.mega__item__icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.mega__item__icon--orange { background: var(--orange); color: var(--white); }
.mega__item__icon--yellow { background: var(--yellow); }
.mega__item__icon--mint { background: var(--mint); }
.mega__item__icon--blue { background: var(--blue); color: var(--white); }
.mega__item__icon--paper { background: var(--paper-deep); }
.mega__item__icon--ink { background: var(--ink); color: var(--paper); }
.mega__item__lbl { font-weight: 700; font-size: 0.92rem; line-height: 1.2; margin-bottom: 4px; }
.mega__item__desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }

.mega__footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1.5px solid var(--line);
  display: flex;
  justify-content: flex-end;
}
.mega__footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--orange);
}
.mega__footer a:hover { text-decoration: underline; }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.toggle-group {
  display: inline-flex;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
  height: 36px;
}
[data-theme="dark"] .toggle-group { background: #2a2519; border-color: var(--white); }
.toggle-group button {
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.toggle-group button.is-on { background: var(--ink); color: var(--paper); }
[data-theme="dark"] .toggle-group button.is-on { background: var(--white); color: var(--ink); }

.icon-btn {
  width: 36px; height: 36px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--white);
  display: grid; place-items: center;
  position: relative;
  color: var(--ink);
}
.icon-btn:hover { background: var(--bg-alt); }
[data-theme="dark"] .icon-btn { background: #2a2519; border-color: var(--white); color: var(--white); }

/* Theme toggle: show the icon representing the mode you'll switch TO. */
#themeToggle .sun-icon { display: none; }
#themeToggle .moon-icon { display: block; }
[data-theme="dark"] #themeToggle .sun-icon { display: block; }
[data-theme="dark"] #themeToggle .moon-icon { display: none; }

/* Mobile menu */
.burger { display: none; }
@media (max-width: 980px) {
  .site-nav { display: none; }
  .burger { display: grid; }
  .header-right .demo-btn-text { display: none; }
}
.mobile-drawer {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--bg);
  z-index: 70;
  padding: 32px 24px;
  display: none;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.mobile-drawer.is-open { display: flex; }
.mobile-drawer a {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  padding: 12px 0;
  border-bottom: 1.5px solid var(--line);
}

/* ---------- Hero ---------------------------------------------------------- */
.hero { padding-block: clamp(64px, 8vw, 120px) clamp(48px, 6vw, 96px); position: relative; overflow: hidden; }
.hero__eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.hero__title { margin-bottom: 24px; max-width: 1000px; }
.hero__title em {
  font-style: normal;
  color: var(--orange);
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.hero__title em::after {
  content: '';
  position: absolute;
  inset: auto -8px -4px -8px;
  height: 18px;
  background: var(--yellow);
  z-index: -1;
  transform: skew(-8deg);
}
.hero__sub { max-width: 640px; font-size: clamp(1.1rem, 1.4vw, 1.35rem); line-height: 1.55; color: var(--text-muted); margin-bottom: 32px; }
.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

/* Hero globe (dotted, large, behind content) */
.hero__globe {
  position: absolute;
  top: 50%;
  left: 66%;
  transform: translate(-50%, -50%);
  width: 760px;
  height: 760px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 78%);
  mask-image: radial-gradient(circle, #000 55%, transparent 78%);
}
/* The canvas fills the box the media queries below size, instead of holding
   the intrinsic size of its width attribute. Without this it stayed 760px
   wide inside a 500px box on a phone, so the radial mask cropped it square
   and its centre sat off from the centre of the fade. */
.hero__globe canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 1100px) {
  .hero__globe { left: 70%; opacity: 0.35; width: 640px; height: 640px; }
}
@media (max-width: 700px) {
  .hero__globe { left: 80%; top: 30%; width: 500px; height: 500px; opacity: 0.22; }
}
[data-theme="dark"] .hero__globe { opacity: 0.65; }

/* ===========================================================================
   HOMEPAGE INTRO CHOREOGRAPHY
   First-load animation timeline. Elements with [data-intro] start hidden and
   animate in based on their --intro-d delay. The .intro flag on the home
   wrapper gates these so they only run on first paint.
   =========================================================================== */
.intro [data-intro] {
  opacity: 0;
  animation: introFadeUp 0.65s cubic-bezier(0.22, 0.95, 0.36, 1) both;
  animation-delay: var(--intro-d, 0s);
}
/* Pop-in variant for the hero subtitle. */
.intro [data-intro="pop"] {
  opacity: 0;
  display: inline-block;
  animation: introPop 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  animation-delay: var(--intro-d, 0s);
  transform-origin: left center;
}
@keyframes introPop {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

/* === Header build-up choreography (runs after subtitle pop) ============== */
/* The bar reveals empty from left to right. Children sit at opacity:0 from
   the start so the bar appears empty during the reveal. */
body.intro-active .site-header {
  clip-path: inset(0 100% 0 0);
  animation: introBarReveal 0.6s cubic-bezier(0.22, 0.95, 0.36, 1) 4.6s both;
}
@keyframes introBarReveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
/* Logo scales from big to actual size */
body.intro-active .logo {
  opacity: 0;
  transform-origin: left center;
  animation: introLogoShrink 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) 5.25s both;
}
@keyframes introLogoShrink {
  from { opacity: 0; transform: scale(1.85); }
  to   { opacity: 1; transform: scale(1); }
}
/* Solicitar demo button — fade up */
body.intro-active .site-header .btn--primary {
  opacity: 0;
  animation: introFadeUp 0.4s cubic-bezier(0.22, 0.95, 0.36, 1) 5.7s both;
}
/* Nav items drop one by one */
body.intro-active .site-nav > .nav-item {
  opacity: 0;
  animation: introDrop 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
body.intro-active .site-nav > .nav-item:nth-child(1) { animation-delay: 6.05s; }
body.intro-active .site-nav > .nav-item:nth-child(2) { animation-delay: 6.20s; }
body.intro-active .site-nav > .nav-item:nth-child(3) { animation-delay: 6.35s; }
body.intro-active .site-nav > .nav-item:nth-child(n+4) { animation-delay: 6.50s; }
@keyframes introDrop {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Rest of buttons — Acceder, ES/EN, theme, burger */
body.intro-active .login-wrapper,
body.intro-active .toggle-group,
body.intro-active #themeToggle,
body.intro-active .burger {
  opacity: 0;
  animation: introFadeUp 0.4s cubic-bezier(0.22, 0.95, 0.36, 1) both;
}
body.intro-active .login-wrapper { animation-delay: 6.55s; }
body.intro-active .toggle-group  { animation-delay: 6.65s; }
body.intro-active #themeToggle   { animation-delay: 6.70s; }
body.intro-active .burger        { animation-delay: 6.75s; }

/* While the intro is running on the home page, hide every below-the-fold
   element so only the hero (and the items with [data-intro] choreography)
   is visible. Targets: any direct child of the intro main that isn't the
   hero or a data-intro wrapper (software section, dual ticker, stack,
   results, poster marquee, final CTA), the wobble sticker, the site
   footer, and the floating "Solicitar demo" button. */
.intro > *:not(.hero):not([data-intro]),
.intro .sticker,
body.intro-active .site-footer,
body.intro-active .floating-cta {
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
}
/* Title line slides up as a single block — letters never animate individually. */
.intro [data-intro="line"] {
  display: inline-block;
  animation: introLineUp 0.7s cubic-bezier(0.22, 0.95, 0.36, 1) both;
  animation-delay: var(--intro-d, 0s);
}
/* The accent dot (period) grows from oversized down to its real size. */
.intro [data-intro="dot"] {
  display: inline-block;
  animation: introDotShrink 0.9s cubic-bezier(0.34, 1.55, 0.64, 1) both;
  animation-delay: var(--intro-d, 0s);
  transform-origin: 50% 100%;
}

@keyframes introFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes introLineUp {
  from { opacity: 0; transform: translateY(0.35em); }
  to   { opacity: 1; transform: none; }
}
@keyframes introDotShrink {
  from { opacity: 0; transform: scale(2.4); }
  55%  { opacity: 1; }
  to   { opacity: 1; transform: scale(1); }
}

/* The big colored period — same styling/animation for both title dots. */
.hero__dot {
  color: var(--orange);
  display: inline-block;
  transform-origin: 50% 100%;
}

/* During intro the rotator underline is hidden until the second red dot
   has dropped in (~2.9s); then we DRAW the bar from left to right by
   scaling along the X axis from a left origin.
   Extra .hero--editorial in the selector raises specificity above the
   general .hero--editorial .hero__rotator::after rule that sets
   opacity: 0.18 — otherwise the static rule wins the cascade and the
   animation has no opacity to animate. (We can't use !important here
   because animation keyframes can't override !important declarations.) */
.intro.hero--editorial .hero__rotator::after,
.intro .hero--editorial .hero__rotator::after,
.hero--editorial .intro .hero__rotator::after {
  transform-origin: left center;
  animation: introUnderlineDraw 0.75s cubic-bezier(0.22, 0.95, 0.36, 1) 3s both;
}
@keyframes introUnderlineDraw {
  from { opacity: 0;    transform: scaleX(0); }
  60%  { opacity: 0.18; }
  to   { opacity: 0.18; transform: scaleX(1); }
}

/* The hero globe fades in and stays visible/rotating. */
.intro .hero__globe { animation: introGlobeReveal 0.8s ease-out both; }
@keyframes introGlobeReveal {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  to   { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
}
[data-theme="dark"] .intro .hero__globe { animation: introGlobeRevealDark 0.8s ease-out both; }
@keyframes introGlobeRevealDark {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  to   { opacity: 0.65; transform: translate(-50%, -50%) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .intro [data-intro], .intro [data-intro="line"], .intro [data-intro="dot"] {
    animation: none; opacity: 1; transform: none;
  }
  .intro .hero__globe { animation: none; }
}

/* hero variant: editorial */
.hero--editorial .hero__rotator-slot {
  display: inline-grid;
  vertical-align: baseline;
  position: relative;
}
.hero--editorial .hero__rotator-slot > * {
  grid-area: 1 / 1;
}
.hero--editorial .hero__rotator-sizer {
  visibility: hidden;
  white-space: nowrap;
  pointer-events: none;
}
.hero--editorial .hero__rotator {
  color: var(--orange);
  white-space: nowrap;
  position: relative;
  justify-self: start;
  align-self: start;
  animation: rotatorIn 0.5s ease;
}
.hero--editorial .hero__rotator::after {
  content: '';
  position: absolute;
  inset: auto -6px 0.05em -6px;
  height: 0.22em;
  background: currentColor;
  opacity: 0.18;
  z-index: -1;
}
@keyframes rotatorIn {
  from { opacity: 0; transform: translateY(0.12em); }
  to   { opacity: 1; transform: translateY(0); }
}

/* hero variant: newspaper */
.hero--news { padding-block: 32px 48px; }
.hero--news .news-masthead {
  border-block: 4px double var(--ink);
  padding-block: 12px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 13px;
  font-weight: 700;
}
.hero--news .news-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 0;
  border: var(--border-w) solid var(--line);
}
.hero--news .news-cell {
  padding: 28px;
  border-right: 1.5px solid var(--line);
  border-bottom: 1.5px solid var(--line);
}
.hero--news .news-cell:last-child { border-right: none; }
.hero--news .news-cell--lead { background: var(--orange); color: var(--white); grid-row: span 2; }
.hero--news .news-cell--yellow { background: var(--yellow); }
.hero--news .news-cell--mint { background: var(--mint); }
.hero--news .news-headline {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-size: clamp(2.5rem, 5vw, 4rem);
}
@media (max-width: 900px) {
  .hero--news .news-grid { grid-template-columns: 1fr; }
  .hero--news .news-cell--lead { grid-row: auto; }
}

/* hero variant: three doors */
.hero--doors { padding-block: 48px; }
.hero--doors .doors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.hero--doors .door {
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
  min-height: 380px;
  display: flex;
  flex-direction: column;
}
.hero--doors .door:hover { transform: translate(-4px, -4px); box-shadow: var(--shadow-lg); }
.hero--doors .door--orange { background: var(--orange); color: var(--white); }
.hero--doors .door--yellow { background: var(--yellow); }
.hero--doors .door--ink { background: var(--ink); color: var(--paper); }
.hero--doors .door__num {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: auto;
  opacity: 0.85;
}
.hero--doors .door__title { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1; margin-bottom: 8px; }
@media (max-width: 900px) {
  .hero--doors .doors { grid-template-columns: 1fr; }
  .hero--doors .door { min-height: 260px; }
}

/* hero variant: manifesto */
.hero--manifesto { padding-block: clamp(80px, 12vw, 200px); position: relative; }
.hero--manifesto .manifesto {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 9vw, 9rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  max-width: 1100px;
}
.hero--manifesto .manifesto em { font-style: normal; color: var(--orange); }
.hero--manifesto .manifesto .underline {
  position: relative; display: inline-block;
}
.hero--manifesto .manifesto .underline::after {
  content: '';
  position: absolute;
  left: -6px; right: -6px; bottom: 6%;
  height: 0.18em;
  background: var(--yellow);
  z-index: -1;
}

/* Hero KPI strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
  max-width: 720px;
}
[data-theme="dark"] .kpi-strip { background: var(--panel); }
.kpi-cell {
  padding: 20px 22px;
  border-right: 1.5px solid var(--line);
  position: relative;
}
.kpi-cell:last-child { border-right: none; }
.kpi-cell__val { font-family: var(--font-display); font-size: clamp(1.6rem, 2.5vw, 2.2rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.kpi-cell__lbl { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
@media (max-width: 640px) {
  .kpi-strip { grid-template-columns: 1fr; }
  .kpi-cell { border-right: none; border-bottom: 1.5px solid var(--line); }
  .kpi-cell:last-child { border-bottom: none; }
}

/* Hero product mock */
.hero-mock {
  position: relative;
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(-1.5deg);
}
[data-theme="dark"] .hero-mock { background: var(--panel); }
.hero-mock__chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--paper-deep);
  border-bottom: 1.5px solid var(--line);
}
[data-theme="dark"] .hero-mock__chrome { background: #1f1c14; }
.hero-mock__chrome .dot { width: 12px; height: 12px; border-radius: 999px; border: 1.5px solid var(--line); }
.hero-mock__chrome .dot--r { background: #ff5f57; }
.hero-mock__chrome .dot--y { background: #febc2e; }
.hero-mock__chrome .dot--g { background: #28c840; }
.hero-mock__chrome .url {
  margin-left: auto;
  background: var(--white);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
}
[data-theme="dark"] .hero-mock__chrome .url { background: var(--panel); }
.hero-mock__body { padding: 20px; }

/* ---------- Sections / dividers ------------------------------------------ */
.section-head { text-align: left; margin-bottom: 48px; max-width: 820px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: var(--paper);
  padding: 5px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
  transform: rotate(-1deg);
}
[data-theme="dark"] .section-eyebrow { background: var(--white); color: var(--ink); }

.section-title { font-family: var(--font-display); font-weight: 700; line-height: 0.98; letter-spacing: -0.03em; font-size: clamp(2rem, 4vw, 3.25rem); margin-bottom: 16px; }
.section-title .accent { color: var(--orange); }
.section-title .scribble {
  position: relative;
  display: inline-block;
}
.section-title .scribble::after {
  content: '';
  position: absolute;
  left: -4px; right: -4px; bottom: 0.04em;
  height: 0.22em;
  background: var(--yellow);
  z-index: -1;
  /* Drawn is the resting state, so a highlight in a block that never reveals
     (a hero, a page with the observer unavailable) still looks finished. */
  transform: skew(-6deg) scaleX(1);
  transform-origin: left center;
  transition: transform 0.6s cubic-bezier(0.22, 0.95, 0.36, 1) 0.3s;
}

/* Collapsed while the block it belongs to is still waiting to reveal. When
   the block lands this rule stops matching and the bar draws itself left to
   right, reading as a stroke under the phrase rather than a fade. */
[data-reveal]:not(.is-visible) .section-title .scribble::after {
  transform: skew(-6deg) scaleX(0);
}

@media (prefers-reduced-motion: reduce) {
  .section-title .scribble::after { transition: none; }
  /* The reveal itself is disabled here, so the bar must not sit and wait for
     an .is-visible that carries no meaning any more. */
  [data-reveal]:not(.is-visible) .section-title .scribble::after {
    transform: skew(-6deg) scaleX(1);
  }
}

/* ---------- 3-in-1 feature blocks (homepage) ----------------------------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .stack-grid { grid-template-columns: 1fr; } }

/* The three pillars arrive one at a time. The shared 70ms step reads as "all
   at once" on cards this size, and the grid no longer reveals as a block of
   its own (see tagScrollReveal), so the cards own the entrance outright. */
.stack-grid > [data-reveal] {
  transform: translateY(34px) scale(0.97);
  transition-delay: calc(var(--rd, 0) * 150ms);
}

.stack-grid > [data-reveal].is-visible {
  transform: none;
}

.feature-card {
  position: relative;
  padding: 32px;
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 360px;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.feature-card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.feature-card__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.6;
}
.feature-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2vw, 2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.feature-card__body { font-size: 1rem; line-height: 1.6; color: var(--text-muted); margin-bottom: auto; }
.feature-card__cta {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}
.feature-card--orange { background: var(--orange); color: var(--white); }
.feature-card--orange .feature-card__body { color: rgba(255,255,255,0.85); }
.feature-card--orange .feature-card__num { opacity: 0.85; }
.feature-card--yellow { background: var(--yellow); }
.feature-card--yellow .feature-card__body { color: rgba(0,0,0,0.7); }
.feature-card--blue { background: var(--blue); color: var(--white); }
.feature-card--blue .feature-card__body { color: rgba(255,255,255,0.85); }
.feature-card--mint { background: var(--mint); color: var(--ink); }
.feature-card--mint .feature-card__body { color: rgba(0,0,0,0.7); }
.feature-card--ink { background: var(--ink); color: var(--paper); }
.feature-card--ink .feature-card__body { color: rgba(250,247,240,0.78); }

/* Optional doodle on cards */
.feature-card__doodle {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 140px;
  height: 140px;
  opacity: 0.15;
  pointer-events: none;
}

/* ---------- Pillars / Check lists ---------------------------------------- */
.check-list { display: grid; gap: 12px; margin-top: 16px; }
.check-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  line-height: 1.55;
  font-size: 0.98rem;
}
.check-list li::before {
  content: '';
  width: 22px; height: 22px;
  margin-top: 3px;
  background: var(--orange);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

/* ---------- Stat cards --------------------------------------------------- */
.stat-card {
  background: var(--panel);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-card__val { font-family: var(--font-display); font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.stat-card__lbl { font-size: 0.9rem; color: var(--text-muted); line-height: 1.4; }
.stat-card--filled-orange { background: var(--orange); color: var(--white); }
.stat-card--filled-orange .stat-card__lbl { color: rgba(255,255,255,0.85); }
.stat-card--filled-yellow { background: var(--yellow); }
.stat-card--filled-yellow .stat-card__lbl { color: rgba(0,0,0,0.7); }

/* ---------- Footer ------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 64px 0 32px;
  border-top: var(--border-w) solid var(--line);
}
.site-footer .logo__text { color: var(--paper); }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 40px;
}
.site-footer__col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--yellow);
}
.site-footer__col ul { display: grid; gap: 10px; }
.site-footer__col a { color: rgba(250,247,240,0.75); transition: color 0.15s; font-size: 0.95rem; }
.site-footer__col a:hover { color: var(--white); }
.site-footer__bottom {
  border-top: 1.5px solid rgba(250,247,240,0.18);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: rgba(250,247,240,0.6);
  flex-wrap: wrap;
}
.site-footer__bottom a { color: inherit; }
.site-footer__bottom a:hover { color: var(--paper); }
.footer-huge-wrap {
  container-type: inline-size;
  margin-block: 32px;
}
.footer-huge {
  /* Fredoka SemiBold — rounded cut matching the umai logo. "umai.media"
     advances sum to 5.085em at letter-spacing 0, so 19.62cqi spans the
     container. */
  font-family: 'Fredoka', 'Satoshi', var(--font-display);
  font-size: clamp(5rem, 16vw, 14rem); /* fallback: no container-query units */
  font-size: 19.62cqi;
  font-weight: 600;
  line-height: 0.85;
  letter-spacing: 0;
  color: var(--orange); /* fallback when background-clip: text is unsupported */
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}
/* Barely-there by default; a cursor-tracking red light (initFooterLight)
   shows through the glyph interiors only. --light-x/y are set in px by JS;
   the off-screen default keeps the light out until the pointer arrives. */
/* Registered so the touch-device sweep below can interpolate it. */
@property --light-x {
  syntax: '<length-percentage>';
  inherits: false;
  initial-value: -9999px;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .footer-huge {
    color: transparent;
    background-image:
      radial-gradient(circle 0.8em at var(--light-x, -9em) var(--light-y, -9em),
        #ff7a52 0%, var(--red) 38%, rgba(230, 57, 70, 0.35) 65%, transparent 82%),
      linear-gradient(#181410, #181410);
    -webkit-background-clip: text;
    background-clip: text;
  }
  /* No hover on touch devices: a slow ambient light sweeps the wordmark
     instead of following a pointer. */
  @media (hover: none) and (prefers-reduced-motion: no-preference) {
    .footer-huge {
      --light-y: 0.45em;
      animation: footer-light-sweep 7s ease-in-out infinite alternate;
    }
  }
}
@keyframes footer-light-sweep {
  from { --light-x: -0.5em; }
  to   { --light-x: calc(100% + 0.5em); }
}
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------- Product preview (interactive widget) ------------------------- */
.preview {
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}
[data-theme="dark"] .preview { background: var(--panel); }
.preview__tabs {
  display: flex;
  border-bottom: 1.5px solid var(--line);
  overflow-x: auto;
  background: var(--paper-deep);
}
[data-theme="dark"] .preview__tabs { background: #1f1c14; }
.preview__tab {
  padding: 14px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  border-right: 1.5px solid var(--line);
  transition: background 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.preview__tab:hover { background: var(--bg-alt); }
.preview__tab.is-active { background: var(--orange); color: var(--white); }
.preview__body { padding: 28px; min-height: 460px; }

/* Mock UI cells inside preview */
.mock-row {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  margin-bottom: 8px;
}
[data-theme="dark"] .mock-row { background: var(--panel); }
.mock-row .avatar {
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--orange); color: var(--white);
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.85rem;
  border: 1.5px solid var(--ink);
}
.mock-row .avatar.--blue { background: var(--blue); }
.mock-row .avatar.--mint { background: var(--mint); color: var(--ink); }
.mock-row .avatar.--yellow { background: var(--yellow); color: var(--ink); }
.mock-row .name { font-weight: 700; font-size: 0.9rem; }
.mock-row .meta { font-size: 0.78rem; color: var(--text-muted); }
/* Not scoped to .mock-row. It was, and four of its five uses are in the
   newsroom timeline, where that selector never matched: those badges were
   rendering as bare rectangles of inline background colour at body size,
   with no border, radius or padding of their own. */
.pill-mini {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px;
  background: var(--yellow); color: var(--ink);
  border: 1px solid var(--ink);
  white-space: nowrap;
  line-height: 1.5;
}

/* ---------- Editor assistants inside the preview mock ---------------------
   The three buttons swap a slot for its next variant after a short pause, so
   the panel behaves like the assistants it is describing. */
.mock-editor__variant[hidden] {
  display: none;
}

/* Marks whatever the assistant just changed, and fades out from under it. */
.mock-editor__changed {
  animation: mockEditorFlash 1s ease-out;
}

@keyframes mockEditorFlash {
  from { background-color: var(--butter); }
  to   { background-color: transparent; }
}

/* Three dots that fill in while the assistant "thinks". Written in ::after so
   the button's own label stays put and the width does not jump. */
.btn.is-thinking {
  pointer-events: none;
  opacity: 0.75;
}

/* The dots are a static string revealed by a stepped width, not an animated
   content property: Firefox does not animate content, and there the label
   would simply lose its dots. */
.btn.is-thinking::after {
  content: '...';
  display: inline-block;
  width: 1.1em;
  overflow: hidden;
  vertical-align: bottom;
  text-align: left;
  animation: mockEditorDots 1s steps(4, end) infinite;
}

@keyframes mockEditorDots {
  from { width: 0; }
  to   { width: 1.1em; }
}

.mock-editor__block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.mock-editor__block[hidden] {
  display: none;
}

.mock-editor__block p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.mock-editor__block-kicker {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.mock-editor__block-meta {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ---------- Newsroom entries inside the preview mock ----------------------
   Native <details>, so the keyboard and a screen reader get this for free and
   it still opens with the script disabled. */
.mock-post {
  border-bottom: 1px solid var(--line);
}

.mock-post:last-child {
  border-bottom: 0;
}

.mock-post__head {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  /* The default marker sits outside the grid and shoves every column across. */
  list-style: none;
  transition: background 0.15s ease;
}

.mock-post__head::-webkit-details-marker {
  display: none;
}

/* Hover is tested on the row, not on the summary inside it. The summary is
   inset by the row's 1px border and its own rounded corners, so moving the
   pointer from one row to the next crossed a hairline that belonged to
   neither summary: the background dropped and faded back in, which reads as
   a flicker. The row has no such gap between itself and its neighbour. */
.mock-post:hover > .mock-post__head,
.mock-post[open] > .mock-post__head {
  background: var(--bg-alt);
}

.mock-post__head:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.mock-post__date {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.mock-post__title {
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
}

.mock-post__chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.mock-post[open] .mock-post__chevron {
  transform: rotate(180deg);
}

.mock-post__body {
  padding: 2px 12px 16px;
  animation: mockPostIn 0.22s ease-out;
}

.mock-post__body p {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  max-width: 62ch;
}

.mock-post__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.mock-post__meta {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.mock-post__actions {
  display: flex;
  gap: 8px;
}

@keyframes mockPostIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 620px) {
  .mock-post__head { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 8px; }
  /* The chevron is the first thing to go: the open state is already obvious
     from the text appearing underneath it. */
  .mock-post__chevron { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mock-post__body { animation: none; }
  .mock-post__chevron { transition: none; }
}

/* ---------- Mentions chart inside the preview mock ------------------------
   Driven by a class rather than an inline height, for the same reason the A/B
   bars are: initBars() writes style.height at page load, and an inline style
   beats any rule, so a replay written the same way could never take. */
.bar-chart {
  display: flex;
  gap: 4px;
  height: 140px;
}

.bar-chart__slot {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* The bar's height is a percentage, and a percentage needs something definite
   to be a percentage OF. The chart used to lay its columns out with
   align-items: flex-end, which sizes each one to its content: the bars were
   asking for 32% of nothing and getting nothing, at every trigger. This track
   fills the chart's own 140px and positions the bar against it. */
.bar-chart__track {
  flex: 1;
  min-height: 0;
  position: relative;
}

.bar-chart__col {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 4px 4px 0 0;
  transition: height 0.8s cubic-bezier(0.34, 1.32, 0.64, 1);
  transition-delay: var(--d, 0ms);
}

.bar-chart__col--accent {
  background: var(--orange);
}

.bar-chart.is-playing .bar-chart__col {
  height: var(--h, 0);
}

.bar-chart__label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .bar-chart__col { transition: none; height: var(--h, 0); }
}

/* ---------- A/B bars inside the preview mock ------------------------------ */
.mock-bar {
  position: relative;
  padding: 12px;
  overflow: hidden;
}

.mock-bar__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  opacity: 0.6;
  transition: width 1.1s cubic-bezier(0.22, 0.95, 0.36, 1);
}

.mock-bar.is-playing .mock-bar__fill {
  width: var(--w, 0);
}

.mock-bar__content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .mock-editor__changed,
  .btn.is-thinking::after { animation: none; }
  /* The result still has to be readable, so the bars simply arrive filled. */
  .mock-bar__fill { transition: none; width: var(--w, 0); }
}

/* ---------- Row menu inside the preview mock ------------------------------
   A picture of the product's row actions. Every item closes and does nothing
   else, but it is built from real buttons so it answers to the keyboard and
   to a screen reader like the thing it is imitating. */
.mock-menu {
  position: relative;
}

.mock-menu__trigger {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 6px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mock-menu__trigger:hover,
.mock-menu.is-open .mock-menu__trigger {
  background: var(--bg-alt);
  color: var(--text);
}

.mock-menu__trigger:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.mock-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  min-width: 200px;
  padding: 6px;
  display: grid;
  gap: 2px;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  animation: mockMenuIn 0.14s ease-out;
}

/* display: grid above would otherwise beat the hidden attribute's own
   display: none, and every menu would render open. */
.mock-menu__panel[hidden] {
  display: none;
}

/* The preview clips its overflow, so a row near the bottom opens upward
   rather than being cut off by the panel edge. The class is set in JS, which
   is the only place that knows how much room is left. */
.mock-menu--up .mock-menu__panel {
  top: auto;
  bottom: calc(100% + 6px);
}

.mock-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.mock-menu__item:hover {
  background: var(--bg-alt);
}

.mock-menu__item:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.mock-menu__item--danger {
  color: var(--orange);
}

.mock-menu__sep {
  height: 1px;
  background: var(--line);
  opacity: 0.2;
  margin: 4px 2px;
}

@keyframes mockMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.mock-menu--up .mock-menu__panel {
  animation-name: mockMenuInUp;
}

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

@media (prefers-reduced-motion: reduce) {
  .mock-menu__panel { animation: none; }
}

/* Panels inside the preview mock. These were inline background: var(--paper)
   with an --ink border, and inline styles are beyond the reach of a theme
   rule, so in dark mode the demo stayed a cream sheet in a dark frame while
   the contact rows beside it turned. */
.mock-fill {
  background: var(--paper);
}

.mock-surface {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
}

[data-theme="dark"] .mock-fill,
[data-theme="dark"] .mock-surface {
  background: var(--panel);
}

/* A grid column defaults to a min-width of its content, so a long outlet name
   pushed the row wider than the panel. The panel is overflow: hidden, so that
   came out as a clipped row rather than a scrollbar. */
.mock-row > :nth-child(2) {
  min-width: 0;
}

.mock-row .name,
.mock-row .meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The preview had no mobile rules at all: 28px of padding, a 460px floor and
   a four-column row that never collapsed, inside a phone-width panel. */
@media (max-width: 620px) {
  .preview__body {
    padding: 18px 14px;
    min-height: 0;
  }

  .preview__tab {
    padding: 12px 14px;
    font-size: 0.78rem;
  }

  .mock-row {
    /* The overflow dots carry no information and are the first thing to go
       when the width runs out. */
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 12px;
  }

  .mock-row > :last-child {
    display: none;
  }

  .mock-row .avatar {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
  }
}

/* ---------- CTA block ---------------------------------------------------- */
.cta-block {
  background: var(--ink);
  color: var(--paper);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
@media (max-width: 800px) { .cta-block { grid-template-columns: 1fr; padding: 32px; } }
.cta-block__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; letter-spacing: -0.03em; }
.cta-block__sub { color: rgba(250,247,240,0.75); margin-top: 14px; line-height: 1.55; }
.cta-block__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
/* The wordmark is decoration, so it sits behind the content rather than
   between it and the reader. Absolutely positioned elements paint above
   in-flow siblings by default, which is how an 18rem "umai" ended up washing
   across the two buttons. */
.cta-block > * {
  position: relative;
  z-index: 1;
}

.cta-block__deco {
  position: absolute;
  /* Offsets in em, so the bleed stays proportional to the type at any width
     instead of being a fixed 40px against a size that changes. */
  right: -0.06em;
  bottom: -0.3em;
  font-family: var(--font-display);
  /* Was a flat 18rem, which on a wide screen ran the full height of the block
     and straight under the actions. Now it scales with the viewport and stops
     before it can take the whole panel. */
  font-size: clamp(5rem, 13vw, 13rem);
  line-height: 0.8;
  color: var(--orange);
  opacity: 0.14;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* Below the two-column breakpoint the actions drop under the text and take
   the bottom-right corner for themselves, so the wordmark gets out of the way
   entirely rather than sitting under the buttons. */
@media (max-width: 800px) {
  .cta-block__deco {
    font-size: clamp(4rem, 22vw, 8rem);
    right: auto;
    left: -0.06em;
    bottom: -0.32em;
    opacity: 0.1;
  }
}

/* ---------- Legal page content ------------------------------------------- */
.legal-content { max-width: 760px; }
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  padding-left: 12px;
  border-left: 4px solid var(--orange);
}
.legal-content h3 {
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 24px;
  margin-bottom: 8px;
}
.legal-content p { margin-bottom: 12px; line-height: 1.7; color: var(--text-muted); }
.legal-content ul {
  list-style: none;
  margin-bottom: 16px;
  display: grid;
  gap: 8px;
}
.legal-content ul li {
  padding-left: 24px;
  position: relative;
  line-height: 1.6;
  color: var(--text-muted);
}
.legal-content ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 700;
}
.legal-content a { color: var(--orange); border-bottom: 1.5px solid var(--orange); font-weight: 600; }
.legal-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-block: 16px;
  border: 2px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.9rem;
}
.legal-content table thead { background: var(--ink); color: var(--paper); }
.legal-content table th, .legal-content table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--ink);
}
.legal-content table tbody tr:last-child td { border-bottom: none; }
.legal-content strong { color: var(--text); font-weight: 700; }

/* ---------- Contact form ------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.field input,
.field textarea,
.field select {
  border: 2px solid var(--ink);
  background: var(--white);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  width: 100%;
  font-family: var(--font);
  transition: box-shadow 0.15s;
}
[data-theme="dark"] .field input,
[data-theme="dark"] .field textarea,
[data-theme="dark"] .field select { background: #2a2519; border-color: var(--white); }
.field input:focus,
.field textarea:focus,
.field select:focus { outline: none; box-shadow: 4px 4px 0 var(--orange); border-color: var(--orange); }
.field--check { flex-direction: row; align-items: flex-start; gap: 10px; }
.field--check input { width: 22px; height: 22px; flex-shrink: 0; }
.field--check label { font-size: 0.85rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-muted); }

/* ---------- Floating CTA ------------------------------------------------- */
.floating-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  background: var(--orange);
  color: var(--white);
  border: var(--border-w) solid var(--ink);
  border-radius: 999px;
  padding: 16px 24px;
  font-weight: 700;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.floating-cta:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
@media (max-width: 600px) { .floating-cta { padding: 14px 18px; font-size: 0.88rem; } }

/* ---------- Misc utilities ---------------------------------------------- */
/* The angle is exposed as a variable so a hover can add a lift on top of it
   instead of replacing it and flattening the card. */
.rotate-l { --rot: -1.5deg; transform: rotate(var(--rot)); }
.rotate-r { --rot: 1.5deg; transform: rotate(var(--rot)); }
.rotate-2l { transform: rotate(-3deg); }
.rotate-2r { transform: rotate(3deg); }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.center { text-align: center; }
.hide-md { }
@media (max-width: 800px) {
  .hide-md { display: none !important; }
}
.full { width: 100%; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }
@media (min-width: 901px) and (max-width: 1100px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Anim --------------------------------------------------------- */
@keyframes wobble {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
.wobble { animation: wobble 4s ease-in-out infinite; }

@keyframes blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(60px, -40px) scale(1.08); }
}
@keyframes blobAlt {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-80px, 30px) scale(1.12); }
  66%      { transform: translate(40px, 60px) scale(0.95); }
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.bg-blob--orange { background: var(--orange); width: 520px; height: 520px; animation: blob 22s ease-in-out infinite; }
.bg-blob--yellow { background: var(--yellow); width: 460px; height: 460px; animation: blobAlt 28s ease-in-out infinite; }

/* ---------- Tabs (product) ----------------------------------------------- */
.tab-row {
  display: flex;
  gap: 0;
  border: var(--border-w) solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
  width: max-content;
  max-width: 100%;
  flex-wrap: wrap;
}
[data-theme="dark"] .tab-row { background: var(--panel); }
.tab-row button {
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.92rem;
  border-right: 1.5px solid var(--line);
  white-space: nowrap;
  transition: background 0.15s;
}
.tab-row button:last-child { border-right: none; }
.tab-row button.is-on { background: var(--orange); color: var(--white); }

/* ---------- Logo wall ---------------------------------------------------- */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
[data-theme="dark"] .logo-wall { background: var(--panel); }
.logo-wall__cell {
  padding: 24px;
  border-right: 1.5px solid var(--line);
  border-bottom: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}
.logo-wall__cell:hover { background: var(--orange); color: var(--white); }
@media (max-width: 900px) { .logo-wall { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 500px) { .logo-wall { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Quote / testimonial ------------------------------------------ */
.quote-card {
  background: var(--paper-deep);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  position: relative;
}
[data-theme="dark"] .quote-card { background: #1f1c14; }
/* The opening mark sat at top: -8px, which put it through the card's own
   border and made it read as a glyph stuck to the edge. It now hangs inside
   the padding, where it belongs to the quote. */
.quote-card::before {
  content: '"';
  font-family: var(--font-display);
  position: absolute;
  top: 14px;
  left: 30px;
  font-size: 4.2rem;
  line-height: 1;
  color: var(--orange);
  pointer-events: none;
}

/* A second, much larger mark closes the quote from the far corner. It fills
   the emptiness a short testimonial leaves in a full-width card, and sits far
   enough back to stay decoration rather than content. */
.quote-card::after {
  content: '"';
  font-family: var(--font-display);
  position: absolute;
  right: 24px;
  bottom: -0.42em;
  font-size: 11rem;
  line-height: 1;
  color: var(--orange);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

.quote-card > * {
  position: relative;
  z-index: 1;
}

.quote-card__body {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  padding-top: 46px;
  /* A readable measure. Across the full width of the card the line ran long
     enough that the eye lost its place returning to the left edge. */
  max-width: 58ch;
}

.quote-card__author {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 18px;
  border-top: 1.5px solid var(--line);
}

.quote-card__avatar {
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--orange); color: var(--white);
  display: grid; place-items: center;
  font-weight: 700;
  border: 1.5px solid var(--line);
  flex-shrink: 0;
}

/* The same lift the buttons and cards use, so the testimonial feels like part
   of the same surface family rather than a flat panel. */
.quote-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quote-card:hover {
  transform: rotate(var(--rot, 0deg)) translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}

@media (prefers-reduced-motion: reduce) {
  .quote-card { transition: none; }
  .quote-card:hover { transform: rotate(var(--rot, 0deg)); }
}

/* ---------- Method / Steps timeline -------------------------------------- */
.timeline { display: grid; gap: 16px; }
.timeline__row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 24px;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.timeline__row:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow); }
.timeline__num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--orange);
  letter-spacing: -0.04em;
}
.timeline__title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.timeline__desc { color: var(--text-muted); line-height: 1.55; }
@media (max-width: 600px) {
  .timeline__row { grid-template-columns: 1fr; }
  .timeline__num { font-size: 2.5rem; }
}

/* ---------- Modal overlay ----------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(11, 11, 11, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.modal-overlay[data-open="true"] {
  display: flex;
  opacity: 1;
}
.modal-overlay > .card {
  transform: scale(0.96);
  transition: transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.modal-overlay[data-open="true"] > .card {
  transform: scale(1);
}
/* Was an inline style attribute, which cannot express a hover state and so
   never had one. Same look, now with the press language the buttons use. */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.modal-close > span {
  display: block;
  transition: transform 0.2s ease;
}

.modal-close:hover {
  background: var(--ink);
  color: var(--white);
}

.modal-close:hover > span {
  transform: rotate(90deg);
}

.modal-close:active {
  transform: scale(0.92);
}

/* Keyboard focus lands here first when the dialog opens, so it has to be
   visible on its own rather than relying on the browser's default ring
   against a same-coloured border. */
.modal-close:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* --ink and --white do not flip in dark mode, which is why .btn carries its
   own override too. */
[data-theme="dark"] .modal-close {
  background: #2a2519;
  color: var(--white);
  border-color: var(--white);
}

[data-theme="dark"] .modal-close:hover {
  background: var(--white);
  color: var(--ink);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.modal-error {
  color: var(--red, #c00);
  font-weight: 600;
}
