/* ==========================================================================
   Aquavirya Web v1 — Official Brand Tokens (Abismo / Dark Primary Theme)
   Source: Aquavirya Marca/tokens.json & MARCA - Aquavirya (guia).md
   ========================================================================== */

:root {
  /* Color tokens — Dark (Abismo) */
  --surface: #08161E;
  --surface-raised: #10242F;
  --ink: #E9F2F1;
  --muted: #9DB3BC;
  --line: #22404C;
  --abyss: #12384A;
  --tide: #19C3B1;
  --tide-ink: #2CD3C1;
  --ember: #F2B65A;
  --ember-ink: #F2B65A;
  --on-tide: #0B1F2A;
  --signal-error: #F07B76;

  /* Typography */
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  /* Spacing tokens */
  --space-1: 4px;
  --space-2: 8px;
  --space-4: 16px;
  --space-6: 24px;
  --space-10: 40px;
  --space-16: 64px;

  /* Radius tokens */
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --max-w: 1120px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--surface);
  color: var(--ink);
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a {
  color: var(--tide-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: max(var(--space-4), env(safe-area-inset-left, 0px));
}

@media (min-width: 768px) {
  .wrap {
    padding-inline: var(--space-6);
  }
}

/* Typography helpers */
.label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tide-ink);
}

.label-muted {
  color: var(--muted);
}

.label-ember {
  color: var(--ember-ink);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.15;
}

.h3 {
  font-size: 20px;
  line-height: 26px;
}

p {
  margin: 0;
}

.lead {
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.65;
  max-width: 58ch;
}

/* ==========================================================================
   Header & Wordmark (§4: symbol + lowercase "aquavirya" in Sora 600, gap = 0.5w)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 22, 30, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 68px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 14px; /* exactly half of 28px symbol width */
  color: var(--ink);
  text-decoration: none;
  padding-block: 6px;
}

.wordmark:hover {
  text-decoration: none;
}

.wordmark img {
  width: 28px;
  height: 28px;
  flex: none;
  /* §4: No shadows, gradients or rotation on logo */
}

.wordmark span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-transform: lowercase;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-6);
}

@media (min-width: 820px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  border: 1px solid var(--line);
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.lang-switch button:hover {
  color: var(--ink);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--tide);
  color: var(--on-tide);
  font-weight: 600;
}

/* ==========================================================================
   Buttons (§5: ember = 1 CTA per viewport; text on ember/tide = on-tide)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-ember {
  background: var(--ember);
  color: var(--on-tide);
}

.btn-ember:hover {
  filter: brightness(1.06);
}

.btn-tide {
  background: var(--tide);
  color: var(--on-tide);
}

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

.btn-ghost {
  background: rgba(16, 36, 47, 0.72);
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--tide);
  color: var(--tide-ink);
}

/* ==========================================================================
   Hero with Interactive Ripples (§7)
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 11vw, 128px) clamp(56px, 9vw, 104px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 55% at 76% 24%, rgba(25, 195, 177, 0.12), transparent 72%),
    radial-gradient(45% 45% at 18% 82%, rgba(18, 56, 74, 0.55), transparent 72%),
    var(--surface);
}

#ripple-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-static-arcs {
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 520px;
  height: 520px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.36;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--space-10);
  }
}

.hero-inner {
  display: grid;
  gap: var(--space-6);
}

.hero-inner > * {
  max-width: 640px;
}

/* Studio Showreel Monitor in Hero (Etapa 1c) */
.reel-frame {
  background: rgba(16, 36, 47, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 28px 70px -24px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(25, 195, 177, 0.14);
  backdrop-filter: blur(10px);
}

.reel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 4px 6px 10px;
}

.reel-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tide);
  box-shadow: 0 0 10px var(--tide);
}

.reel-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(8, 22, 30, 0.8);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.reel-toggle:hover {
  border-color: var(--tide);
  color: var(--tide-ink);
}

.reel-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius-md) + 2px);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(34, 64, 76, 0.8);
}

.reel-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reel-chapters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 6px 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.reel-chapters span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.reel-chapters i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tide);
  opacity: 0.65;
}

/* ==========================================================================
   Real-Data Proof Counters Band (Etapa 1a)
   ========================================================================== */
.metrics-band {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-block: var(--space-10);
}

.metrics-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

@media (min-width: 860px) {
  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-6);
  }
}

.metric-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: grid;
  gap: var(--space-2);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--tide), transparent 80%);
}

.metric-num {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.05;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.metric-num.is-tide {
  color: var(--tide-ink);
}

.metric-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
}

@media (max-width: 440px) {
  .wordmark { gap: 10px; }
  .wordmark img { width: 24px; height: 24px; }
  .wordmark span { font-size: 19px; }
  .lang-switch button { padding: 5px 8px; font-size: 11px; }
  .header-inner { min-height: 60px; }
  .metric-card { padding: var(--space-4); }
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(16, 36, 47, 0.78);
  border: 1px solid var(--line);
}

.hero-kicker .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  flex: none;
}

.hero-title {
  font-size: clamp(40px, 7.2vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.hero-title .accent {
  color: var(--tide-ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(34, 64, 76, 0.75);
}

.ripple-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ripple-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--tide);
  position: relative;
  flex: none;
}

.ripple-icon::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--tide);
}

/* ==========================================================================
   Sections & Brand Soul Band (abyss)
   ========================================================================== */
.section {
  padding-block: var(--space-10);
}

@media (min-width: 820px) {
  .section {
    padding-block: var(--space-16);
  }
}

.section-head {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

@media (min-width: 820px) {
  .section-head {
    margin-bottom: var(--space-10);
  }
}

.soul-band {
  position: relative;
  overflow: hidden;
  background: var(--abyss);
  border-bottom: 1px solid var(--line);
}

.soul-arcs {
  position: absolute;
  left: -96px;
  top: -96px;
  width: 440px;
  height: 440px;
  pointer-events: none;
  opacity: 0.28;
}

.soul-grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 820px) {
  .soul-grid {
    grid-template-columns: 1fr 1fr 1.25fr;
    align-items: start;
    gap: var(--space-10);
  }
}

.etym-card {
  padding-left: var(--space-4);
  border-left: 2px solid var(--tide);
}

.etym-card.ember-border {
  border-left-color: var(--ember);
}

.etym-word {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin-top: var(--space-1);
}

.etym-desc {
  color: var(--muted);
  margin-top: var(--space-2);
  font-size: 15px;
  line-height: 1.6;
}

.soul-promise {
  background: rgba(8, 22, 30, 0.56);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.soul-promise p {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink);
}

.soul-promise small {
  display: block;
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: 14px;
}

/* ==========================================================================
   Etapa 2: Virtual Office Simulation ("Mi equipo IA en vivo")
   ========================================================================== */
.office-panel {
  background:
    radial-gradient(65% 80% at 88% 12%, rgba(25, 195, 177, 0.10), transparent 68%),
    var(--abyss);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: grid;
  gap: var(--space-6);
  position: relative;
  overflow: hidden;
}

@media (min-width: 860px) {
  .office-panel {
    padding: var(--space-10);
  }
}

.office-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.office-disclaimer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(8, 22, 30, 0.72);
  border: 1px solid rgba(242, 182, 90, 0.48);
  color: var(--ember-ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.office-disclaimer::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  flex: none;
}

.agents-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .agents-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .agents-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }
}

.office-stack-line {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(8, 22, 30, 0.52);
  border: 1px solid rgba(34, 64, 76, 0.7);
}

.agent-card {
  position: relative;
  overflow: hidden;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-4) 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.3s ease, transform 0.25s ease, box-shadow 0.3s ease;
}

.agent-card.is-active {
  border-color: var(--tide);
  box-shadow: 0 0 0 1px rgba(25, 195, 177, 0.25), 0 16px 36px -20px rgba(25, 195, 177, 0.45);
  transform: translateY(-2px);
}

.agent-card.is-done {
  border-color: rgba(242, 182, 90, 0.55);
}

/* Concentric water ripple emitted when an agent changes state (§7) */
.agent-ripple {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--tide);
  opacity: 0;
  pointer-events: none;
}

.agent-card.pulse-ripple .agent-ripple {
  animation: agentRipple 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.agent-card.is-done.pulse-ripple .agent-ripple {
  border-color: var(--ember);
}

@keyframes agentRipple {
  0%   { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(15);  opacity: 0; }
}

.agent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agent-id {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.agent-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(8, 22, 30, 0.85);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--tide-ink);
  flex: none;
}

.agent-card.is-active .agent-icon {
  background: rgba(25, 195, 177, 0.16);
  border-color: var(--tide);
}

.agent-card.is-done .agent-icon {
  background: rgba(242, 182, 90, 0.16);
  border-color: var(--ember);
  color: var(--ember-ink);
}

.agent-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.agent-role {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.3;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(8, 22, 30, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}

.agent-card.is-active .status-badge {
  background: rgba(25, 195, 177, 0.16);
  border-color: rgba(25, 195, 177, 0.55);
  color: var(--tide-ink);
}

.agent-card.is-active .status-badge::before {
  background: var(--tide);
  box-shadow: 0 0 8px var(--tide);
}

.agent-card.is-done .status-badge {
  background: rgba(242, 182, 90, 0.16);
  border-color: rgba(242, 182, 90, 0.55);
  color: var(--ember-ink);
}

.agent-card.is-done .status-badge::before {
  background: var(--ember);
}

.agent-task {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  min-height: 42px;
}

.agent-card.is-active .agent-task,
.agent-card.is-done .agent-task {
  color: var(--ink);
}

.agent-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(34, 64, 76, 0.55);
  overflow: hidden;
}

.agent-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--tide);
  transition: width 0.55s ease, background 0.3s ease;
}

.agent-card.is-active .agent-bar span {
  width: 68%;
}

.agent-card.is-done .agent-bar span {
  width: 100%;
  background: var(--ember);
}

/* Advancing Activity Timeline + Controls */
.office-console {
  background: rgba(8, 22, 30, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: grid;
  gap: var(--space-4);
}

.office-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.step-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.step-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.step-pill:hover {
  color: var(--ink);
  border-color: var(--tide);
}

.step-pill[aria-current="step"] {
  background: var(--tide);
  color: var(--on-tide);
  border-color: var(--tide);
  font-weight: 600;
}

.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.activity-feed li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(16, 36, 47, 0.45);
  border-left: 2px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.activity-feed li.is-now {
  background: rgba(25, 195, 177, 0.10);
  border-left-color: var(--tide);
  color: var(--ink);
}

.activity-feed li.is-final {
  background: rgba(242, 182, 90, 0.10);
  border-left-color: var(--ember);
  color: var(--ink);
}

.activity-feed .af-step {
  color: var(--tide-ink);
  font-weight: 500;
}

.activity-feed li.is-final .af-step {
  color: var(--ember-ink);
}

.activity-feed .af-agent {
  color: var(--ink);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .agent-card.pulse-ripple .agent-ripple { animation: none; }
}

/* ==========================================================================
   Services Grid
   ========================================================================== */
.services-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 820px) {
  .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
  }
}

.card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--tide);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.icon-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(25, 195, 177, 0.12);
  border: 1px solid rgba(25, 195, 177, 0.28);
  display: grid;
  place-items: center;
  color: var(--tide-ink);
}

.card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.card-list {
  list-style: none;
  margin: auto 0 0;
  padding: var(--space-4) 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--space-2);
  font-size: 14px;
  color: var(--ink);
}

.card-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.card-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tide);
  margin-top: 9px;
  flex: none;
}

/* ==========================================================================
   Portfolio: Interactive Demo Feature Panel
   ========================================================================== */
.portfolio-stack {
  display: grid;
  gap: var(--space-10);
}

.demo-feature {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: grid;
  gap: var(--space-6);
  position: relative;
  overflow: hidden;
}

@media (min-width: 860px) {
  .demo-feature {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding: var(--space-10);
    gap: var(--space-10);
  }
}

.demo-copy {
  display: grid;
  gap: var(--space-4);
}

.demo-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: rgba(8, 22, 30, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
}

.chip-tide {
  border-color: rgba(25, 195, 177, 0.4);
  color: var(--tide-ink);
}

/* ==========================================================================
   Before / After Interactive Slider: Paper Card -> Koffiebar Noord App (Etapa 1b)
   ========================================================================== */
.compare-wrap {
  display: grid;
  gap: var(--space-2);
}

.compare-stage {
  --split: 52%;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 410px;
  user-select: none;
  touch-action: pan-y;
}

.compare-layer {
  position: absolute;
  inset: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

/* AFTER layer (bottom): sleek digital app */
.compare-after {
  background:
    radial-gradient(85% 85% at 100% 0%, rgba(25, 195, 177, 0.14), transparent 65%),
    var(--surface);
}

/* BEFORE layer (top, clipped by --split): worn paper stamp card */
.compare-before {
  background:
    radial-gradient(circle at 82% 20%, rgba(112, 72, 36, 0.14) 0, rgba(112, 72, 36, 0.14) 36px, transparent 39px),
    radial-gradient(circle at 82% 20%, transparent 32px, rgba(112, 72, 36, 0.22) 34px, transparent 37px),
    linear-gradient(155deg, #EAE0CE 0%, #DDD0B9 100%);
  color: #3A2A1E;
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

.compare-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.c-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
}

.c-pill-paper {
  background: rgba(58, 42, 30, 0.12);
  color: #5C4433;
  border: 1px dashed rgba(58, 42, 30, 0.35);
}

.c-pill-app {
  background: rgba(25, 195, 177, 0.16);
  color: var(--tide-ink);
  border: 1px solid rgba(25, 195, 177, 0.42);
}

/* Paper card visual */
.paper-card {
  background: #F6EFE2;
  border: 1.5px dashed #9D866B;
  border-radius: 10px;
  padding: 16px;
  transform: rotate(-1.2deg);
  box-shadow: 0 10px 22px -12px rgba(45, 30, 15, 0.35);
}

.paper-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 16px;
  color: #463224;
  border-bottom: 1px solid rgba(92, 68, 51, 0.22);
  padding-bottom: 8px;
}

.paper-head span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #7D6450;
}

.paper-stamps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.paper-dot {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid rgba(92, 68, 51, 0.35);
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  color: rgba(88, 52, 28, 0.65);
}

.paper-dot.inked {
  background: rgba(94, 58, 34, 0.14);
  transform: rotate(-8deg);
}

.paper-dot.smudged {
  opacity: 0.45;
  transform: rotate(12deg);
}

.paper-pain {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.paper-pain div {
  background: rgba(246, 239, 226, 0.85);
  border: 1px solid rgba(125, 100, 80, 0.28);
  border-radius: 10px;
  padding: 10px;
  font-size: 12.5px;
  line-height: 1.35;
  color: #5C4433;
}

.paper-pain strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: #9A3B36;
  margin-bottom: 2px;
}

/* Digital app visual inside AFTER layer */
.mock-card {
  background: #c99a62;
  color: #3b2418;
  border-radius: var(--radius-md);
  padding: 16px;
}

.mock-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}

.mock-card-head span {
  font-family: var(--font-mono);
  font-size: 12px;
}

.mock-beans {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.mock-bean {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed rgba(59, 36, 24, 0.45);
  display: grid;
  place-items: center;
}

.mock-bean.filled {
  border-style: solid;
  border-color: #3b2418;
  background: rgba(59, 36, 24, 0.14);
}

.mock-bean.filled::after {
  content: "";
  width: 9px;
  height: 13px;
  border-radius: 50%;
  background: #3b2418;
  transform: rotate(24deg);
}

.mock-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}

.mock-stat {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.mock-stat small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.mock-stat strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink);
}

/* Divider line & draggable handle */
.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 2px;
  background: var(--tide);
  box-shadow: 0 0 14px rgba(25, 195, 177, 0.8);
  transform: translateX(-1px);
  pointer-events: none;
  z-index: 4;
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--tide);
  color: var(--on-tide);
  border: 3px solid var(--surface);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 5;
}

.compare-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-inline: 4px;
}

/* ==========================================================================
   Portfolio: Mochi 3D Shorts (Local MP4s in clean 9:16 frames)
   ========================================================================== */
.stories-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.stories-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 760px) {
  .stories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.short-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.phone-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #040B10;
  border: 1px solid var(--line);
}

.phone-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(8, 22, 30, 0.08) 0%, rgba(8, 22, 30, 0.42) 100%);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.22s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(8, 22, 30, 0.82);
  border: 2px solid var(--tide);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-overlay:hover .play-circle {
  transform: scale(1.06);
  background: var(--tide);
}

.play-overlay:hover .play-circle svg {
  fill: var(--on-tide);
}

.play-circle svg {
  width: 22px;
  height: 22px;
  fill: var(--ink);
  margin-left: 3px;
}

.short-meta {
  display: grid;
  gap: var(--space-1);
  padding-inline: var(--space-1);
}

.short-meta h3 {
  font-size: 18px;
  line-height: 24px;
}

.short-meta p {
  font-size: 14px;
  line-height: 21px;
  color: var(--muted);
}

.channel-banner {
  margin-top: var(--space-6);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

/* ==========================================================================
   Etapa 3: Real AI Assistant ("Pregúntale a Aquavirya" — Workers AI + Turnstile)
   ========================================================================== */
.chat-shell {
  background:
    radial-gradient(60% 70% at 12% 0%, rgba(25, 195, 177, 0.12), transparent 65%),
    var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 860px) {
  .chat-shell {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    padding: var(--space-10);
    gap: var(--space-10);
    align-items: start;
  }
}

.chat-intro {
  display: grid;
  gap: var(--space-4);
}

.chat-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.prompt-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(8, 22, 30, 0.78);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.35;
  text-align: left;
  padding: 8px 13px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.prompt-chip:hover {
  border-color: var(--tide);
  color: var(--tide-ink);
  background: rgba(25, 195, 177, 0.08);
}

.chat-privacy {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
}

.chat-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: grid;
  gap: var(--space-4);
}

.chat-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.chat-head-id {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.chat-head-id img {
  width: 22px;
  height: 22px;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 190px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.chat-msg {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg.bot {
  align-self: flex-start;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  color: var(--ink);
}

.chat-msg.user {
  align-self: flex-end;
  background: rgba(25, 195, 177, 0.16);
  border: 1px solid rgba(25, 195, 177, 0.45);
  color: var(--ink);
}

.chat-msg.err {
  align-self: flex-start;
  background: rgba(240, 123, 118, 0.10);
  border: 1px solid rgba(240, 123, 118, 0.45);
  color: var(--ink);
}

.turnstile-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.turnstile-wrap[hidden] {
  display: none;
}

.chat-form {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.chat-input {
  flex: 1;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
}

.chat-input::placeholder {
  color: var(--muted);
}

.chat-input:focus {
  outline: none;
  border-color: var(--tide);
}

.chat-send {
  min-height: 46px;
  padding: 10px 18px;
  flex: none;
}

.chat-send:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.chat-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   Etapa 6: Free Digital Scanner ("Escáner digital gratis" — #scanner)
   ========================================================================== */
.scanner-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(65% 60% at 100% 0%, rgba(25, 195, 177, 0.12), transparent 68%),
    var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 820px) {
  .scanner-shell {
    padding: var(--space-10);
    gap: var(--space-8);
  }
}

.scanner-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.scanner-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(242, 182, 90, 0.13);
  border: 1px solid rgba(242, 182, 90, 0.5);
  color: var(--ember-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex: none;
}

.scanner-ribbon::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 8px rgba(242, 182, 90, 0.75);
}

.scanner-step-block {
  display: grid;
  gap: var(--space-4);
}

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

@media (min-width: 640px) {
  .biz-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .biz-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.biz-pill {
  appearance: none;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  text-align: center;
}

.biz-pill:hover {
  border-color: var(--tide);
  color: var(--ink);
}

.biz-pill[aria-pressed="true"] {
  background: rgba(25, 195, 177, 0.16);
  border-color: var(--tide);
  color: var(--tide-ink);
  font-weight: 600;
}

.scan-questions {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 820px) {
  .scan-questions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

.scan-q {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  display: grid;
  gap: 12px;
  transition: border-color 0.2s ease;
}

.scan-q.is-answered {
  border-color: rgba(25, 195, 177, 0.42);
}

.scan-q-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.scan-q-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--tide-ink);
  letter-spacing: 0.06em;
  flex: none;
}

.scan-q-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.scan-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scan-opt {
  appearance: none;
  flex: 1 1 auto;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.scan-opt:hover {
  border-color: var(--tide);
  color: var(--ink);
}

.scan-opt[aria-pressed="true"] {
  background: var(--tide);
  border-color: var(--tide);
  color: var(--on-tide);
  font-weight: 600;
}

.scanner-submit-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
}

.scanner-privacy {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 58ch;
}

.scanner-result {
  background: var(--surface);
  border: 1px solid rgba(25, 195, 177, 0.35);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: grid;
  gap: var(--space-6);
}

.scanner-result[hidden] {
  display: none;
}

.score-summary {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

@media (min-width: 720px) {
  .score-summary {
    grid-template-columns: 168px 1fr;
  }
}

.score-ring-wrap {
  position: relative;
  width: 152px;
  height: 152px;
  margin-inline: auto;
  display: grid;
  place-items: center;
}

.score-ring-svg {
  width: 152px;
  height: 152px;
  transform: rotate(-90deg);
}

.score-ring-bg {
  fill: none;
  stroke: rgba(34, 64, 76, 0.7);
  stroke-width: 10;
}

.score-ring-fg {
  fill: none;
  stroke: var(--tide);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 0.75s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease;
}

.score-ring-fg.is-mid {
  stroke: var(--ember);
}

.score-ring-fg.is-low {
  stroke: var(--signal-error);
}

.score-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.score-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}

.score-den {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.score-copy {
  display: grid;
  gap: 8px;
}

.scan-gaps-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 820px) {
  .scan-gaps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.gap-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gap-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gap-rank {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(25, 195, 177, 0.14);
  color: var(--tide-ink);
  border: 1px solid rgba(25, 195, 177, 0.35);
}

.gap-pts {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ember-ink);
}

.gap-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.gap-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.gap-service-link {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tide-ink);
  text-decoration: none;
}

.gap-service-link:hover {
  color: var(--ink);
}

.scan-ai-box {
  background: rgba(16, 36, 47, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.scan-ai-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scan-ai-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.scan-ai-output {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.scan-ai-output.is-err {
  border-color: rgba(240, 123, 118, 0.45);
  background: rgba(240, 123, 118, 0.08);
}

.scan-ai-output[hidden] {
  display: none;
}

.scan-cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.card:target {
  border-color: var(--tide);
  box-shadow: 0 0 0 2px rgba(25, 195, 177, 0.28);
}

/* ==========================================================================
   Etapa 5: Terminal Details + Aquavirya Labs + Live AI Reels Generator
   ========================================================================== */
.term-strip {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(14, 32, 42, 0.72);
  border: 1px solid rgba(34, 64, 76, 0.9);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  max-width: 100%;
  flex-wrap: wrap;
}

.term-cross {
  color: var(--tide-ink);
  font-weight: 600;
}

.term-code {
  color: var(--muted);
}

.term-cmd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--tide-ink);
}

.term-prompt {
  color: var(--ember-ink);
}

.term-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--tide);
  vertical-align: -2px;
  animation: termBlink 1.15s steps(1, end) infinite;
}

@keyframes termBlink {
  0%, 49% { opacity: 0.9; }
  50%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .term-cursor {
    animation: none;
    opacity: 0.75;
  }
}

.term-framed {
  position: relative;
}

.tf-mark {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  color: rgba(25, 195, 177, 0.42);
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.tf-tl { top: 10px; left: 14px; }
.tf-tr { top: 10px; right: 14px; }
.tf-bl { bottom: 10px; left: 14px; }
.tf-br { bottom: 10px; right: 14px; }

.labs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

.reels-shell {
  background:
    radial-gradient(60% 55% at 0% 0%, rgba(25, 195, 177, 0.10), transparent 65%),
    var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: grid;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

@media (min-width: 820px) {
  .reels-shell {
    padding: var(--space-10);
  }
}

.reels-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.reels-form {
  display: grid;
  gap: var(--space-4);
}

.reels-fields {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 820px) {
  .reels-fields {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: end;
  }
}

.reels-field {
  display: grid;
  gap: 8px;
}

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

@media (max-width: 520px) {
  .reels-pills {
    grid-template-columns: 1fr;
  }
}

.reels-pill {
  appearance: none;
  min-height: 46px;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-align: center;
}

.reels-pill:hover {
  border-color: var(--tide);
  color: var(--ink);
}

.reels-pill[aria-pressed="true"] {
  background: rgba(25, 195, 177, 0.16);
  border-color: var(--tide);
  color: var(--tide-ink);
  font-weight: 600;
}

@media (min-width: 960px) {
  .reels-biz-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

.reels-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
}

.reels-result {
  background: var(--surface);
  border: 1px solid rgba(25, 195, 177, 0.35);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: grid;
  gap: var(--space-4);
}

.reels-result[hidden] {
  display: none;
}

.reels-out-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reels-output-text {
  background: rgba(8, 22, 30, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.reels-output-text.is-err {
  border-color: rgba(240, 123, 118, 0.45);
  background: rgba(240, 123, 118, 0.08);
}

.labs-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 860px) {
  .labs-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
  }
}

.lab-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.lab-card:hover {
  border-color: rgba(25, 195, 177, 0.5);
  transform: translateY(-2px);
}

.lab-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lab-id {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--tide-ink);
}

.lab-status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.lab-status.is-live {
  border-color: rgba(25, 195, 177, 0.45);
  background: rgba(25, 195, 177, 0.12);
  color: var(--tide-ink);
}

.lab-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

.lab-tech {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: rgba(8, 22, 30, 0.55);
  border: 1px solid rgba(34, 64, 76, 0.75);
}

/* ==========================================================================
   Etapa 7: Isometric Underwater Studio Scene (5 Mochi Agents) + Real Activity
   ========================================================================== */
.sub-stage {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(25, 195, 177, 0.24);
  background:
    radial-gradient(65% 48% at 50% 0%, rgba(25, 195, 177, 0.16), transparent 68%),
    radial-gradient(45% 40% at 88% 85%, rgba(242, 182, 90, 0.08), transparent 65%),
    linear-gradient(180deg, #071A24 0%, #06121A 56%, #08161E 100%);
  padding: 20px;
  overflow: hidden;
}

.sub-rays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 18%, rgba(25, 195, 177, 0.07) 26%, transparent 35%),
    linear-gradient(114deg, transparent 52%, rgba(25, 195, 177, 0.06) 60%, transparent 70%);
  z-index: 0;
}

.sub-bubbles {
  display: none;
}

.sub-svg {
  display: none;
}

.sub-desks {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 440px) {
  .sub-desks {
    grid-template-columns: 1fr;
  }
}

.mochi-desk {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 12px 16px;
  gap: 6px;
  border-radius: 18px;
  background: rgba(8, 22, 30, 0.78);
  border: 1px solid rgba(34, 64, 76, 0.9);
  cursor: pointer;
  overflow: hidden;
}

.mochi-desk .agent-task {
  min-height: 0;
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 2px;
}

.mochi-bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: rgba(16, 36, 47, 0.92);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.mochi-bubble::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}

.mochi-desk.is-active .mochi-bubble {
  background: rgba(25, 195, 177, 0.18);
  border-color: var(--tide);
  color: var(--tide-ink);
  transform: translateY(-2px);
}

.mochi-desk.is-active .mochi-bubble::before {
  background: var(--tide);
  box-shadow: 0 0 8px var(--tide);
}

.mochi-desk.is-done .mochi-bubble {
  background: rgba(242, 182, 90, 0.16);
  border-color: rgba(242, 182, 90, 0.65);
  color: var(--ember-ink);
}

.mochi-desk.is-done .mochi-bubble::before {
  background: var(--ember);
}

.mochi-figure {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  position: relative;
}

.mochi-figure picture,
.mochi-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45));
  transition: transform 0.3s ease;
}

.mochi-desk.is-active .mochi-figure img {
  transform: translateY(-3px) scale(1.04);
}

.desk-meta {
  display: grid;
  gap: 2px;
}

.mochi-desk .agent-name {
  font-size: 14.5px;
}

.mochi-desk .agent-role {
  font-size: 12px;
}

/* Desktop Isometric Submarine Studio Floorplan (>= 920px) */
@media (min-width: 920px) {
  .sub-stage {
    padding: 0;
    height: 600px;
  }

  .sub-bubbles {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
  }

  .sub-bubbles span {
    position: absolute;
    bottom: -14px;
    border-radius: 50%;
    border: 1px solid rgba(25, 195, 177, 0.36);
    background: rgba(25, 195, 177, 0.08);
    animation: subBubbleRise 9s linear infinite;
  }

  .sub-bubbles span:nth-child(1) { left: 10%; width: 7px;  height: 7px;  animation-delay: 0s;   animation-duration: 8.5s; }
  .sub-bubbles span:nth-child(2) { left: 28%; width: 10px; height: 10px; animation-delay: 2.2s; animation-duration: 10.5s; }
  .sub-bubbles span:nth-child(3) { left: 48%; width: 6px;  height: 6px;  animation-delay: 4.1s; animation-duration: 7.8s; }
  .sub-bubbles span:nth-child(4) { left: 67%; width: 9px;  height: 9px;  animation-delay: 1.4s; animation-duration: 9.6s; }
  .sub-bubbles span:nth-child(5) { left: 82%; width: 7px;  height: 7px;  animation-delay: 3.5s; animation-duration: 8.8s; }
  .sub-bubbles span:nth-child(6) { left: 91%; width: 11px; height: 11px; animation-delay: 5.2s; animation-duration: 11.2s; }

  @keyframes subBubbleRise {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    15%  { opacity: 0.7; }
    85%  { opacity: 0.4; }
    100% { transform: translateY(-560px) translateX(14px); opacity: 0; }
  }

  .sub-svg {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
  }

  .wave-track {
    stroke: rgba(25, 195, 177, 0.22);
    stroke-width: 2;
    stroke-dasharray: 5 7;
  }

  .wave-pulse {
    stroke: #2CD3C1;
    stroke-width: 3.4;
    stroke-linecap: round;
    stroke-dasharray: 42 290;
    stroke-dashoffset: 332;
    opacity: 0;
    transition: opacity 0.35s ease;
  }

  .wave-pulse.is-flowing {
    opacity: 0.95;
    animation: waveFlow 1.75s linear infinite;
  }

  .wave-pulse.is-ember {
    stroke: #F2B65A;
  }

  @keyframes waveFlow {
    from { stroke-dashoffset: 332; }
    to   { stroke-dashoffset: 0; }
  }

  .sub-desks {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
  }

  .mochi-desk {
    position: absolute;
    width: 196px;
    transform: translate(-50%, -50%);
    padding: 10px 10px 12px;
    gap: 4px;
    background: rgba(8, 22, 30, 0.72);
    backdrop-filter: blur(4px);
  }

  .mochi-desk.is-active {
    transform: translate(-50%, -52%);
  }

  .mochi-desk .agent-task {
    display: none;
  }

  .mochi-figure {
    width: 120px;
    height: 120px;
  }

  .pos-chrome  { left: 16%; top: 29%; }
  .pos-claude  { left: 50%; top: 23%; }
  .pos-blender { left: 84%; top: 29%; }
  .pos-gemini  { left: 32%; top: 75%; }
  .pos-gpt     { left: 68%; top: 75%; }
}

@media (prefers-reduced-motion: reduce) {
  .sub-bubbles span,
  .wave-pulse.is-flowing {
    animation: none !important;
  }
  .wave-pulse.is-flowing {
    stroke-dasharray: none;
    opacity: 0.45;
  }
}

/* Real Studio Activity Tape (from CHANGELOG.md -> /activity.json) */
.real-activity {
  background: rgba(8, 22, 30, 0.84);
  border: 1px solid rgba(25, 195, 177, 0.28);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: grid;
  gap: 12px;
}

.real-activity-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.real-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tide);
  box-shadow: 0 0 8px var(--tide);
  flex: none;
}

.real-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.real-act-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--muted);
}

.real-act-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--tide-ink);
  background: rgba(25, 195, 177, 0.12);
  border: 1px solid rgba(25, 195, 177, 0.3);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}

.real-act-title {
  color: var(--ink);
  font-weight: 500;
}

.real-act-detail {
  color: var(--muted);
}

/* ==========================================================================
   Hybrid Editorial Contrast (Services Light + 4-Step Process Mist) & Scroll Reveal
   100% official Aquavirya brand tokens (Abismo ink + Tide + Ember)
   ========================================================================== */
.section-head-split {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 860px) {
  .section-head-split {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-10);
  }
  .section-head-split > div {
    display: grid;
    gap: 10px;
    max-width: 600px;
  }
  .section-head-split > .lead {
    max-width: 400px;
    font-size: 15.5px;
  }
}

.section-light {
  background: #F4F7F6;
  color: #08161E;
  border-top: 1px solid rgba(25, 195, 177, 0.22);
}

.section-light .label {
  color: #0A7A6E;
}

.section-light .label-muted {
  color: #4A6470;
}

.section-light .h2,
.section-light .h3 {
  color: #08161E;
}

.section-light .lead {
  color: #3E5661;
}

.section-light .card {
  background: #FFFFFF;
  border-color: #D4E1DF;
  color: #08161E;
  box-shadow: 0 12px 30px -24px rgba(8, 22, 30, 0.28);
}

.section-light .card:hover {
  border-color: #19C3B1;
  box-shadow: 0 22px 44px -26px rgba(8, 22, 30, 0.34);
}

.section-light .card > p,
.section-light .card-list {
  color: #3E5661;
}

.section-light .card-list li::before {
  background: #0C8577;
}

.section-light .icon-badge {
  background: rgba(25, 195, 177, 0.14);
  border-color: rgba(10, 122, 110, 0.28);
  color: #0A7A6E;
}

.section-mist {
  background: #E8F0EF;
  color: #08161E;
  border-top: 1px solid #D0DEDA;
  border-bottom: 1px solid rgba(25, 195, 177, 0.26);
}

.section-mist .label {
  color: #0A7A6E;
}

.section-mist .h2,
.section-mist .h3 {
  color: #08161E;
}

.section-mist .lead {
  color: #3E5661;
}

.process-steps {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid #C2D4D1;
}

@media (min-width: 640px) {
  .process-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .process-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.process-step {
  padding: 26px 24px 20px 0;
  border-bottom: 1px solid #C2D4D1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 960px) {
  .process-step {
    padding: 28px 24px 12px 24px;
    border-bottom: 0;
    border-right: 1px solid #C2D4D1;
  }
  .process-step:first-child {
    padding-left: 0;
  }
  .process-step:last-child {
    border-right: 0;
    padding-right: 0;
  }
}

.process-num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #0A7A6E;
}

.process-desc {
  font-size: 14.5px;
  line-height: 1.62;
  color: #3E5661;
  margin: 0;
}

.process-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.process-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #08161E;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #C2D4D1;
  border-radius: var(--radius-pill);
  padding: 6px 13px;
}

/* Smooth progressive scroll reveal (0 hidden content without JS or with reduced-motion) */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   About & Contact Section
   ========================================================================== */
.contact-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 820px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
}

.about-box, .contact-box {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 820px) {
  .about-box, .contact-box {
    padding: var(--space-10);
  }
}

.contact-box {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(85% 85% at 100% 0%, rgba(25, 195, 177, 0.14), transparent 68%),
    var(--abyss);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: auto;
  padding-top: var(--space-2);
}

.contact-email-mono {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--tide-ink);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-10);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-note {
  color: var(--muted);
  font-size: 14px;
}

/* Toast notification */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 24px);
  opacity: 0;
  visibility: hidden;
  background: var(--abyss);
  color: var(--ink);
  border: 1px solid var(--tide);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  z-index: 60;
  transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .play-circle, .toast { transition: none; }
}
