/* ==========================================================================
   Q-Nica · High-Frame-Rate Mobile & Desktop Design System (site.css)
   ========================================================================== */

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg-primary: #050811;
  --bg-elevated: #0b1120;
  --bg-surface: rgba(15, 23, 42, 0.84);
  --bg-surface-strong: rgba(17, 26, 46, 0.94);
  --bg-glass: rgba(8, 13, 26, 0.78);
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-highlight: rgba(96, 165, 250, 0.42);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --brand-blue: #2563eb;
  --brand-cyan: #38bdf8;
  --brand-emerald: #10b981;
  --brand-amber: #f59e0b;
  --shadow-card: 0 20px 50px -16px rgba(0, 0, 0, 0.6);
  --shadow-device: 0 32px 72px -18px rgba(2, 6, 23, 0.88), 0 0 36px rgba(37, 99, 235, 0.22);
  --bezel-outer: linear-gradient(145deg, #475569 0%, #1e293b 48%, #0f172a 100%);
  --bezel-inner: #030712;
  --orb-opacity: 0.55;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg-primary: #f5f7fb;
  --bg-elevated: #ffffff;
  --bg-surface: rgba(255, 255, 255, 0.92);
  --bg-surface-strong: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.84);
  --border-subtle: rgba(15, 23, 42, 0.09);
  --border-highlight: rgba(37, 99, 235, 0.35);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --brand-blue: #1d4ed8;
  --brand-cyan: #0284c7;
  --brand-emerald: #059669;
  --brand-amber: #d97706;
  --shadow-card: 0 18px 42px -16px rgba(15, 23, 42, 0.1);
  --shadow-device: 0 28px 64px -16px rgba(15, 23, 42, 0.25), 0 0 30px rgba(37, 99, 235, 0.12);
  --bezel-outer: linear-gradient(145deg, #334155 0%, #1e293b 60%, #0f172a 100%);
  --bezel-inner: #090d16;
  --orb-opacity: 0.28;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  left: 16px;
}

.container {
  width: min(1220px, calc(100% - 36px));
  margin-inline: auto;
}

/* ==========================================================================
   GPU-Friendly Ambient Backdrop (Zero Real-Time Gaussian Blur Filter)
   ========================================================================== */
.ambient-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  contain: strict;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  opacity: var(--orb-opacity);
}

.orb-1 {
  width: 780px;
  height: 780px;
  top: -280px;
  left: -220px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.42) 0%, rgba(37, 99, 235, 0.14) 38%, transparent 70%);
}

.orb-2 {
  width: 720px;
  height: 720px;
  top: 8%;
  right: -240px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.36) 0%, rgba(14, 165, 233, 0.12) 40%, transparent 70%);
}

.orb-3 {
  width: 820px;
  height: 820px;
  bottom: -320px;
  left: 20%;
  background: radial-gradient(circle, rgba(30, 64, 175, 0.38) 0%, rgba(30, 64, 175, 0.1) 42%, transparent 70%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 25%, #000 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 25%, #000 35%, transparent 80%);
}

/* ==========================================================================
   Frosted Glass Topbar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-logo-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-copy span {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.topnav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--text-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  transform: scale(1.05);
  border-color: var(--border-highlight);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

html[data-theme="dark"] .icon-moon {
  display: none;
}

html[data-theme="light"] .icon-sun {
  display: none;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #ffffff;
  box-shadow: 0 8px 22px -6px rgba(37, 99, 235, 0.65);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -6px rgba(14, 165, 233, 0.75);
}

.btn-smart-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a7f3d0;
  box-shadow: 0 0 8px #34d399;
}

/* ==========================================================================
   Typography Gradients & Badges
   ========================================================================== */
.text-gradient-titanium {
  background: linear-gradient(135deg, #ffffff 0%, #93c5fd 48%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .text-gradient-titanium {
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #0284c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-blue {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 55%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .text-gradient-blue {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 60%, #059669 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: var(--brand-cyan);
  font-size: 0.81rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  flex-shrink: 0;
  animation: pulseDotScale 2s infinite ease-in-out;
}

@keyframes pulseDotScale {
  0%, 100% { transform: scale(0.9); opacity: 0.75; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* ==========================================================================
   1. HERO STAGE & 3D INTERACTIVE HARDWARE SHOWCASE
   ========================================================================== */
.hero-scroll-track {
  position: relative;
  min-height: 155vh;
  padding-top: 24px;
  padding-bottom: 44px;
  --scroll-p: 0;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
}

.hero-sticky-viewport {
  position: sticky;
  top: 64px;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding-block: 20px 32px;
}

.hero-stage-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.hero-copy-block {
  max-width: 840px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: heroCopyEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes heroCopyEnter {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.hero-headline {
  margin: 0;
  font-size: clamp(2.25rem, 5.2vw, 4.35rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.hero-lead {
  margin: 0;
  max-width: 700px;
  font-size: clamp(1rem, 1.55vw, 1.2rem);
  color: var(--text-secondary);
}

.hero-lead strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Store CTA Cluster */
.hero-cta-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.store-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-radius: 16px;
  background: var(--bg-surface-strong);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  text-align: left;
}

.store-badge-btn:hover,
.store-badge-btn.is-recommended {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
  box-shadow: 0 18px 38px -12px rgba(37, 99, 235, 0.42);
}

.store-badge-btn.is-recommended {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(15, 23, 42, 0.94));
}

html[data-theme="light"] .store-badge-btn.is-recommended {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), #ffffff);
}

.store-badge-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.store-badge-icon svg {
  width: 26px;
  height: 26px;
}

.store-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-badge-text small {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 600;
}

.store-badge-text strong {
  font-size: 1.04rem;
  font-weight: 700;
}

/* 3D Hardware Stage */
.hero-hardware-stage {
  position: relative;
  width: 100%;
  max-width: 1020px;
  height: clamp(390px, 50vw, 550px);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  margin-top: 8px;
  touch-action: pan-y;
  user-select: none;
  animation: heroHardwareEnter 0.95s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes heroHardwareEnter {
  from {
    opacity: 0;
    transform: translate3d(0, 36px, 0) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.stage-aura {
  position: absolute;
  width: min(740px, 95vw);
  height: min(480px, 65vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.34) 0%, rgba(14, 165, 233, 0.14) 42%, transparent 72%);
  transform: scale(calc(0.94 + (var(--scroll-p) * 0.16)));
  pointer-events: none;
}

/* Titanium Phone Frame */
.titanium-device {
  margin: 0;
  position: absolute;
  cursor: pointer;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
  will-change: transform;
}

.device-bezel {
  position: relative;
  padding: 10px;
  border-radius: 40px;
  background: var(--bezel-outer);
  box-shadow: var(--shadow-device), inset 0 0 0 1.5px rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.device-bezel img {
  width: 100%;
  height: auto;
  border-radius: 31px;
  background: var(--bezel-inner);
  display: block;
}

.dynamic-island {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 18px;
  border-radius: 999px;
  background: #02040a;
  z-index: 3;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
}

.island-camera {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #38bdf8 0%, #1e3a8a 70%);
}

.screen-glare {
  position: absolute;
  inset: 10px;
  border-radius: 31px;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.02) 38%, transparent 55%);
  pointer-events: none;
  z-index: 2;
}

/* Default Desktop Positions (Center focused, wings fanned out by scroll) */
.device-center {
  width: clamp(205px, 23vw, 268px);
  z-index: 4;
  transform:
    translate3d(0, calc((1 - var(--scroll-p)) * 10px), calc(var(--scroll-p) * 30px))
    rotateX(calc(((1 - var(--scroll-p)) * 8deg) + var(--tilt-y)))
    rotateY(var(--tilt-x))
    scale(calc(0.96 + (var(--scroll-p) * 0.06)));
}

.device-wing {
  width: clamp(172px, 19.5vw, 228px);
  z-index: 2;
  opacity: calc(0.84 + (var(--scroll-p) * 0.16));
}

.device-left {
  transform:
    translate3d(calc(-135px - (var(--scroll-p) * 110px)), calc(16px - (var(--scroll-p) * 8px)), -30px)
    rotateY(calc(18deg - (var(--scroll-p) * 5deg)))
    rotateZ(calc(-7deg - (var(--scroll-p) * 2deg)))
    scale(calc(0.88 + (var(--scroll-p) * 0.06)));
}

.device-right {
  transform:
    translate3d(calc(135px + (var(--scroll-p) * 110px)), calc(16px - (var(--scroll-p) * 8px)), -30px)
    rotateY(calc(-18deg + (var(--scroll-p) * 5deg)))
    rotateZ(calc(7deg + (var(--scroll-p) * 2deg)))
    scale(calc(0.88 + (var(--scroll-p) * 0.06)));
}

/* Interactive Focus States when user clicks/swipes a specific Hero phone */
.hero-hardware-stage[data-active-phone="left"] .device-left {
  z-index: 6;
  opacity: 1;
  transform: translate3d(0, 0, 40px) rotateY(0deg) rotateZ(0deg) scale(1.06);
}
.hero-hardware-stage[data-active-phone="left"] .device-center {
  z-index: 3;
  opacity: 0.82;
  transform: translate3d(130px, 16px, -25px) rotateY(-16deg) rotateZ(6deg) scale(0.85);
}
.hero-hardware-stage[data-active-phone="left"] .device-right {
  z-index: 1;
  opacity: 0.62;
  transform: translate3d(-130px, 22px, -50px) rotateY(18deg) rotateZ(-7deg) scale(0.78);
}

.hero-hardware-stage[data-active-phone="right"] .device-right {
  z-index: 6;
  opacity: 1;
  transform: translate3d(0, 0, 40px) rotateY(0deg) rotateZ(0deg) scale(1.06);
}
.hero-hardware-stage[data-active-phone="right"] .device-center {
  z-index: 3;
  opacity: 0.82;
  transform: translate3d(-130px, 16px, -25px) rotateY(16deg) rotateZ(-6deg) scale(0.85);
}
.hero-hardware-stage[data-active-phone="right"] .device-left {
  z-index: 1;
  opacity: 0.62;
  transform: translate3d(130px, 22px, -50px) rotateY(-18deg) rotateZ(7deg) scale(0.78);
}

.wing-caption {
  margin-top: 10px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

/* Hero Phone Switcher Pills */
.hero-phone-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.hero-switch-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.hero-switch-btn.is-active {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

/* Floating Spatial Callout Chips (Desktop) */
.spatial-chip {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-radius: 16px;
  background: var(--bg-surface-strong);
  border: 1px solid var(--border-highlight);
  box-shadow: var(--shadow-card);
  text-align: left;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.spatial-chip strong {
  display: block;
  font-size: 0.83rem;
  line-height: 1.2;
}

.spatial-chip span {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.chip-icon {
  font-size: 1.2rem;
}

.chip-top-left {
  top: 10%;
  left: 2%;
  transform: translate3d(calc((1 - var(--scroll-p)) * 18px), calc(var(--scroll-p) * -10px), 0);
}

.chip-bottom-left {
  bottom: 12%;
  left: 4%;
  transform: translate3d(calc((1 - var(--scroll-p)) * 22px), calc(var(--scroll-p) * 8px), 0);
}

.chip-top-right {
  top: 12%;
  right: 2%;
  transform: translate3d(calc((1 - var(--scroll-p)) * -18px), calc(var(--scroll-p) * -10px), 0);
}

.chip-bottom-right {
  bottom: 12%;
  right: 4%;
  transform: translate3d(calc((1 - var(--scroll-p)) * -22px), calc(var(--scroll-p) * 8px), 0);
}

/* ==========================================================================
   2. METRICS RIBBON
   ========================================================================== */
.metrics-ribbon {
  padding-block: 32px 52px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.metric-item {
  padding: 24px 22px;
  border-radius: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.metric-item:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
}

.metric-value {
  display: block;
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.metric-accent {
  color: var(--brand-cyan);
}

.metric-title {
  display: block;
  margin-top: 6px;
  font-size: 0.98rem;
  font-weight: 700;
}

.metric-item p {
  margin: 8px 0 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
  max-width: 760px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-cyan);
  margin-bottom: 10px;
}

.section-header h2 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 3.6vw, 2.95rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-header p {
  margin: 0;
  font-size: 1.02rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   3. INTERACTIVE APP EXPLORER (#explora)
   ========================================================================== */
.scrolly-section {
  padding-block: 64px;
}

.scrolly-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 40px;
  align-items: start;
}

.scrolly-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.scrolly-step {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 18px;
  padding: 26px;
  border-radius: 26px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, background-color 0.3s ease;
}

.scrolly-step:hover,
.scrolly-step.is-active {
  border-color: var(--border-highlight);
  background: var(--bg-surface-strong);
  transform: translateY(-2px);
}

.step-index {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.98rem;
  background: rgba(37, 99, 235, 0.15);
  color: var(--brand-cyan);
  border: 1px solid rgba(96, 165, 250, 0.28);
  transition: background 0.25s ease, color 0.25s ease;
}

.scrolly-step.is-active .step-index {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
}

.step-kicker {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-cyan);
}

.step-body h3 {
  margin: 6px 0 10px;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.step-body p {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.step-highlights {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.step-highlights li::marker {
  color: var(--brand-cyan);
}

/* Sticky Phone Column */
.scrolly-sticky-col {
  position: sticky;
  top: 88px;
}

.scrolly-device-card {
  position: relative;
  padding: 22px;
  border-radius: 32px;
  background: var(--bg-surface-strong);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  overflow: hidden;
}

.scrolly-device-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28) 0%, rgba(14, 165, 233, 0.1) 42%, transparent 70%);
  pointer-events: none;
}

/* Segmented Module Tabs inside Phone Showcase Card */
.scrolly-module-tabs {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 5px;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  z-index: 2;
}

.scrolly-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 8px 6px;
  border-radius: 11px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.scrolly-tab.is-active {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.scrolly-phone-frame {
  position: relative;
  width: min(262px, 68vw);
  aspect-ratio: 680 / 1404;
  padding: 10px;
  border-radius: 40px;
  background: var(--bezel-outer);
  box-shadow: var(--shadow-device), inset 0 0 0 1.5px rgba(255, 255, 255, 0.22);
  overflow: hidden;
  z-index: 2;
  touch-action: pan-y;
}

.scrolly-screen-img {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: cover;
  border-radius: 30px;
  opacity: 0;
  transform: translate3d(18px, 0, 0) scale(0.95);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.scrolly-screen-img.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.scrolly-caption {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 360px;
  z-index: 2;
}

/* ==========================================================================
   4. BENTO GRID ADVANTAGES (#arquitectura)
   ========================================================================== */
.bento-section {
  padding-block: 64px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.bento-card {
  padding: 28px;
  border-radius: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
}

.bento-span-7 { grid-column: span 7; }
.bento-span-5 { grid-column: span 5; }
.bento-span-4 { grid-column: span 4; }

.bento-chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.14);
  color: var(--brand-cyan);
  border: 1px solid rgba(96, 165, 250, 0.28);
  margin-bottom: 12px;
}

.chip-emerald {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

.bento-card h3 {
  margin: 0 0 10px;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
}

.bento-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.bento-normativa-matrix {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.norm-pill {
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.norm-pill strong {
  color: var(--brand-cyan);
  margin-right: 4px;
}

.security-visual {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.24);
}

.security-shield {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.security-meta strong {
  display: block;
  font-size: 0.9rem;
}

.security-meta span {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.bento-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

/* ==========================================================================
   5. INTERACTIVE CLINICAL MINI-EXPERIENCE (#demo-interactivo)
   ========================================================================== */
.demo-section {
  padding-block: 64px;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: stretch;
}

.demo-card {
  padding: 28px;
  border-radius: 28px;
  background: var(--bg-surface-strong);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.demo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.demo-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-cyan);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.28);
}

.demo-difficulty {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.demo-vignette {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.demo-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.demo-option:hover {
  border-color: var(--border-highlight);
  transform: translateX(3px);
}

.demo-option:active {
  transform: scale(0.99);
}

.demo-option.is-correct {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}

.demo-option.is-wrong {
  background: rgba(239, 68, 68, 0.14);
  border-color: #ef4444;
}

.opt-letter {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.15);
  color: var(--brand-cyan);
  font-weight: 700;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.demo-feedback {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.12);
  border-left: 4px solid var(--brand-cyan);
  font-size: 0.88rem;
  line-height: 1.55;
  animation: feedbackSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes feedbackSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feedback-badge {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.demo-feedback p {
  margin: 0;
  color: var(--text-secondary);
}

.demo-feedback strong {
  color: var(--text-primary);
}

/* 3D Flip Flashcard */
.demo-flashcard-col {
  display: flex;
}

.flashcard-stage {
  width: 100%;
  perspective: 1200px;
}

.flashcard-3d {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.flashcard-3d.is-flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  inset: 0;
  padding: 28px;
  border-radius: 28px;
  background: var(--bg-surface-strong);
  border: 1px solid var(--border-highlight);
  box-shadow: var(--shadow-card);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.flashcard-back {
  transform: rotateY(180deg);
}

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

.fc-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-cyan);
}

.fc-srs-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.fc-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.fc-question h3 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.4;
}

.fc-answer ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.89rem;
  color: var(--text-secondary);
}

.fc-answer strong {
  color: var(--text-primary);
}

.fc-flip-hint {
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--brand-cyan);
}

.fc-srs-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.srs-btn {
  padding: 8px 6px;
  border-radius: 10px;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
}

.srs-again { background: rgba(239, 68, 68, 0.16); color: #f87171; }
.srs-hard  { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.srs-good  { background: rgba(16, 185, 129, 0.16); color: #34d399; }
.srs-easy  { background: rgba(56, 189, 248, 0.16); color: #38bdf8; }

/* ==========================================================================
   6. SPECIALTIES GRID (#especialidades)
   ========================================================================== */
.specialties-section {
  padding-block: 64px;
}

.specialties-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.specialty-card {
  padding: 24px 20px;
  border-radius: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.specialty-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
}

.spec-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.specialty-card h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
}

.specialty-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   7. FINAL CTA BANNER & FOOTER
   ========================================================================== */
.final-cta-section {
  padding-block: 52px 80px;
}

.final-cta-box {
  padding: clamp(30px, 5vw, 54px);
  border-radius: 34px;
  background:
    radial-gradient(circle at 85% 20%, rgba(14, 165, 233, 0.24), transparent 55%),
    radial-gradient(circle at 15% 80%, rgba(37, 99, 235, 0.26), transparent 55%),
    var(--bg-surface-strong);
  border: 1px solid var(--border-highlight);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.final-cta-copy {
  max-width: 680px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.final-cta-copy h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.5vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.final-cta-copy p {
  margin: 0;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  padding-block: 36px 48px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.disclaimer-box {
  margin: 0 0 24px;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  line-height: 1.5;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-brand img {
  border-radius: 7px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

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

/* ==========================================================================
   Spring Scroll Reveal Animations
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0) scale(0.97);
  transition:
    opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* ==========================================================================
   Responsive Breakpoints (Mobile-First Fluidity & Animations)
   ========================================================================== */
@media (max-width: 1080px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .specialties-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-span-7,
  .bento-span-5,
  .bento-span-4 {
    grid-column: span 6;
  }
  .spatial-chip {
    display: none;
  }
}

@media (max-width: 860px) {
  .topnav {
    display: none;
  }
  .hero-scroll-track {
    min-height: auto;
    padding-top: 18px;
    padding-bottom: 28px;
  }
  .hero-sticky-viewport {
    position: relative;
    top: 0;
    min-height: auto;
    padding-block: 10px 16px;
  }
  .hero-hardware-stage {
    height: 410px;
    margin-top: 4px;
  }
  .device-center {
    width: 196px;
    transform:
      translate3d(0, calc((1 - var(--scroll-p)) * 8px), 20px)
      scale(calc(0.95 + (var(--scroll-p) * 0.06)));
  }
  .device-wing {
    width: 168px;
    opacity: 0.9;
  }
  .device-left {
    transform:
      translate3d(calc(-64px - (var(--scroll-p) * 38px)), 14px, -25px)
      rotateY(16deg)
      rotateZ(calc(-4deg - (var(--scroll-p) * 4deg)))
      scale(0.84);
  }
  .device-right {
    transform:
      translate3d(calc(64px + (var(--scroll-p) * 38px)), 14px, -25px)
      rotateY(-16deg)
      rotateZ(calc(4deg + (var(--scroll-p) * 4deg)))
      scale(0.84);
  }

  /* Mobile active phone carousel transforms */
  .hero-hardware-stage[data-active-phone="left"] .device-left {
    transform: translate3d(0, 0, 28px) rotateY(0deg) rotateZ(0deg) scale(1.03);
  }
  .hero-hardware-stage[data-active-phone="left"] .device-center {
    transform: translate3d(88px, 14px, -25px) rotateY(-16deg) rotateZ(6deg) scale(0.82);
  }
  .hero-hardware-stage[data-active-phone="left"] .device-right {
    transform: translate3d(-88px, 18px, -45px) rotateY(16deg) rotateZ(-6deg) scale(0.76);
  }

  .hero-hardware-stage[data-active-phone="right"] .device-right {
    transform: translate3d(0, 0, 28px) rotateY(0deg) rotateZ(0deg) scale(1.03);
  }
  .hero-hardware-stage[data-active-phone="right"] .device-center {
    transform: translate3d(-88px, 14px, -25px) rotateY(16deg) rotateZ(-6deg) scale(0.82);
  }
  .hero-hardware-stage[data-active-phone="right"] .device-left {
    transform: translate3d(88px, 18px, -45px) rotateY(-16deg) rotateZ(6deg) scale(0.76);
  }

  .scrolly-grid,
  .demo-grid {
    grid-template-columns: 1fr;
  }
  .scrolly-sticky-col {
    position: relative;
    top: 0;
    order: -1;
  }
  .bento-span-7,
  .bento-span-5,
  .bento-span-4 {
    grid-column: span 12;
  }
}

@media (max-width: 560px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .metric-item {
    padding: 18px 16px;
  }
  .specialties-grid {
    grid-template-columns: 1fr;
  }
  .hero-cta-cluster {
    flex-direction: column;
    width: 100%;
  }
  .store-badge-btn {
    width: 100%;
    justify-content: center;
  }
  .scrolly-step {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .scrolly-module-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  .flashcard-3d {
    min-height: 450px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
