/* 
   BaremApp CSS Stylesheet - Clinical Warm-Lofi & Minimalist
   Designed for premium visual appearance and mobile responsiveness
*/

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Figtree:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Theme Palette - Modern Clinical Tech */
  --bg-primary: #FAFCFF;       /* Clean near-white with cool tint */
  --bg-secondary: #EEF6FF;     /* Soft blue surface */
  --bg-tertiary: #DBEAFE;      /* Blue tint for containers */

  --text-primary: #0F172A;     /* Deep navy slate */
  --text-secondary: #475569;   /* Medium slate */
  --text-tertiary: #94A3B8;    /* Muted slate for metadata */

  --accent-green: #059669;     /* Vivid healthcare emerald */
  --accent-green-light: #DCFCE7;
  --accent-blue: #2563EB;      /* Modern clinical blue */
  --accent-blue-light: #EFF6FF;
  --accent-teal: #0D9488;      /* Teal gradient complement */
  --accent-orange: #EA580C;    /* Clinical alert orange */
  --accent-orange-light: #FFF7ED;
  --accent-sky: #0EA5E9;       /* Sky blue for highlights */

  /* Borders and Shadows */
  --border-color: #CBD5E1;
  --border-color-light: #E2E8F0;
  --border-radius: 14px;
  --border-radius-sm: 8px;
  --border-radius-lg: 24px;
  --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.04);
  --card-shadow-hover: 0 4px 32px rgba(37, 99, 235, 0.12), 0 1px 8px rgba(15, 23, 42, 0.06);
  --inset-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.04);

  /* Fonts */
  --font-sans: 'Figtree', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', Courier, monospace;

  /* Animation */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-medium: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base resets & grid paper background */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Fade dot pattern at edges */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(37, 99, 235, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(13, 148, 136, 0.04) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: 3rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

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

/* Clinical / Mono Tags */
.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--accent-green);
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.75rem;
}

.mono-tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--accent-green);
  border-radius: 50%;
}

/* Layout Elements */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color-light);
  background-color: rgba(250, 252, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

header.scrolled {
  box-shadow: 0 2px 20px rgba(15, 23, 42, 0.06);
  border-color: var(--border-color);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding-bottom: 2px;
}

/* Animated gradient underline */
.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-teal));
  border-radius: 2px;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:not(.btn):hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-blue);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-teal) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
  background-color: #fff;
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  padding-top: 80px;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--border-color-light);
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle, rgba(37, 99, 235, 0.06) 1px, transparent 1px),
    linear-gradient(160deg, rgba(37, 99, 235, 0.04) 0%, rgba(250, 252, 255, 0) 60%);
  background-size: 28px 28px, 100% 100%;
}

/* Animated shapes in hero background */
.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: shapeFloat 8s ease-in-out infinite;
}

.hero-shape-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08), transparent);
  top: -100px; right: -80px;
  animation-delay: 0s;
}

.hero-shape-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.07), transparent);
  bottom: -50px; right: 20%;
  animation-delay: -3s;
}

.hero-shape-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.06), transparent);
  top: 30%; left: -60px;
  animation-delay: -5s;
}

@keyframes shapeFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  33% { transform: translateY(-20px) scale(1.04); }
  66% { transform: translateY(10px) scale(0.97); }
}

.hero-grid,
.hero-content,
.hero-preview {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-blue) 60%, var(--accent-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  margin-top: 16px;
  margin-bottom: 32px;
  font-size: 1.1rem;
  max-width: 520px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* App Frame Simulator */
.hero-preview {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.device-frame {
  width: 100%;
  max-width: 310px;
  height: 620px;
  border: 10px solid #1E293B;
  border-radius: 44px;
  background-color: #1E293B;
  box-shadow:
    0 32px 80px rgba(15, 23, 42, 0.18),
    0 8px 32px rgba(37, 99, 235, 0.12),
    0 0 0 1px rgba(255,255,255,0.06) inset;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg) translateY(0);
  animation: device-float 5s ease-in-out infinite;
}

@keyframes device-float {
  0%, 100% { transform: perspective(1000px) rotateY(-4deg) rotateX(2deg) translateY(0px); }
  50%       { transform: perspective(1000px) rotateY(-4deg) rotateX(2deg) translateY(-10px); }
}

.device-frame:hover {
  animation-play-state: paused;
  transform: perspective(1000px) rotateY(-2deg) rotateX(1deg) translateY(-4px);
  transition: transform 0.3s ease;
}

/* Notch of the simulator */
.device-frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 20px;
  background-color: var(--text-primary);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 10;
}

.device-screen {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  background-color: #fff;
}

.device-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ECG Heartbeat Line animation */
/* ==========================================
   Full-Width ECG Monitor Strip
   ========================================== */
.ecg-monitor-strip {
  width: 100%;
  height: 72px;
  background: #0A1628;
  border-top: 1px solid rgba(5, 150, 105, 0.2);
  border-bottom: 1px solid rgba(14, 165, 233, 0.2);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  user-select: none;
}

.ecg-monitor-strip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 50% 50%, rgba(5,150,105,0.06) 0%, transparent 70%);
  animation: ecg-bg-pulse var(--bpm-interval, 0.83s) ease-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes ecg-bg-pulse {
  0%, 70%, 100% { opacity: 0; }
  15%            { opacity: 1; }
}

.ecg-monitor-label {
  flex-shrink: 0;
  width: 130px;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 2;
}

.ecg-monitor-label-left {
  border-right: 1px solid rgba(5,150,105,0.15);
}
.ecg-monitor-label-right {
  border-left: 1px solid rgba(14,165,233,0.15);
  align-items: flex-end;
}

.ecg-monitor-lead {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: rgba(5,150,105,0.6);
  text-transform: uppercase;
}

.ecg-monitor-rhythm-name {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #5EEAD4;
  letter-spacing: 0.04em;
  line-height: 1.2;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.ecg-monitor-rhythm-name.revealed {
  opacity: 1;
}

.ecg-monitor-bpm-wrap {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.ecg-monitor-bpm-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: #34D399;
  line-height: 1;
  letter-spacing: -0.02em;
}

.ecg-monitor-bpm-unit {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(52,211,153,0.6);
  letter-spacing: 0.08em;
}

.ecg-monitor-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #059669;
  box-shadow: 0 0 6px rgba(5,150,105,0.8);
  animation: ecg-dot-pulse var(--bpm-interval, 0.83s) ease-out infinite;
}
.ecg-monitor-dot.flatline {
  animation: none;
  background: rgba(5,150,105,0.2);
  box-shadow: none;
}

@keyframes ecg-dot-pulse {
  0%, 60%, 100% { transform: scale(1); opacity: 0.7; }
  15%            { transform: scale(1.8); opacity: 1; box-shadow: 0 0 12px rgba(5,150,105,1); }
}

.ecg-monitor-svg-wrap {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Fade edges — simulate monitor glow */
.ecg-monitor-svg-wrap::before,
.ecg-monitor-svg-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 3;
  pointer-events: none;
}
.ecg-monitor-svg-wrap::before {
  left: 0;
  background: linear-gradient(to right, #0A1628 0%, transparent 100%);
}
.ecg-monitor-svg-wrap::after {
  right: 0;
  background: linear-gradient(to left, #0A1628 0%, transparent 100%);
}

.ecg-full-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ecg-full-path {
  fill: none;
  stroke: url(#ecg-full-gradient);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#ecg-glow-filter);
}

#ecg-scroll-group {
  transform-box: fill-box;
  transform-origin: left center;
  animation: ecg-full-scroll var(--ecg-speed, 4s) linear infinite;
}

@keyframes ecg-full-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-20%); }
}

@media (max-width: 767px) {
  .ecg-monitor-strip {
    height: 56px;
  }
  .ecg-monitor-label {
    width: 80px;
    padding: 0 10px;
  }
  .ecg-monitor-bpm-value {
    font-size: 1.1rem;
  }
  .ecg-monitor-rhythm-name {
    font-size: 0.55rem;
  }
  .ecg-monitor-svg-wrap::before,
  .ecg-monitor-svg-wrap::after {
    width: 32px;
  }
}

/* Skip Link (accesibilidad teclado) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: var(--accent-green);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

#ecg-rhythm-select {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background-color: rgba(250, 248, 245, 0.95);
  color: var(--accent-green);
  border: 1px solid var(--border-color);
  padding: 1px 4px;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

#ecg-rhythm-select:hover {
  opacity: 1;
  border-color: var(--accent-green);
}


/* Features Grid */
.features-section {
  padding-top: 96px;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 64px;
}

.section-header h2 {
  margin-top: 8px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background-color: #fff;
  border: 1px solid var(--border-color-light);
  border-radius: var(--border-radius);
  padding: 32px;
  transition: all var(--transition-medium);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-teal));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: var(--card-shadow-hover);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  background-color: var(--accent-green-light);
  color: var(--accent-green);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-icon-wrapper.blue {
  background-color: var(--accent-blue-light);
  color: var(--accent-blue);
}

.feature-icon-wrapper.orange {
  background-color: var(--accent-orange-light);
  color: var(--accent-orange);
}

.feature-card h3 {
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.95rem;
}

/* Screenshots Gallery Section */
.gallery-section {
  padding-top: 96px;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--border-color-light);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, #fff 100%);
}

.gallery-container {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 32px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-green) var(--bg-secondary);
}

.gallery-container::-webkit-scrollbar {
  height: 8px;
}

.gallery-container::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

.gallery-container::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 4px;
  border: 2px solid var(--bg-secondary);
}

.gallery-container::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-tertiary);
}

.gallery-item {
  flex: 0 0 280px;
  scroll-snap-align: start;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: #fff;
  padding: 16px;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-fast);
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-image-wrapper {
  width: 100%;
  height: 480px;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.gallery-image-wrapper:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 20px 48px rgba(37,99,235,0.14), 0 4px 16px rgba(37,99,235,0.08);
  border-color: rgba(37,99,235,0.3);
}

.gallery-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.gallery-image-wrapper:hover img {
  transform: scale(1.04);
}

.gallery-caption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
}

/* Nuestra Historia Section */
.story-section {
  padding-top: 96px;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--border-color);
}

.story-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: center;
}

.story-content p {
  margin-bottom: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1.05rem;
}

.story-content p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.story-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.story-img {
  width: 100%;
  max-width: 400px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  display: block;
}

/* Custom Interactive Pixel Simulator Section */
.pixel-section {
  padding-top: 96px;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--border-color);
}

.pixel-console {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  background: linear-gradient(135deg, #fff 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-color-light);
  border-radius: var(--border-radius-lg);
  padding: 48px;
  box-shadow: 0 4px 32px rgba(37, 99, 235, 0.06), 0 1px 4px rgba(15, 23, 42, 0.04);
}

.pixel-monitor {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background-color: #fff;
  padding: 32px;
  border-radius: 12px;
  position: relative;
  min-height: 280px;
}

/* Little clinical decoration crosses */
.pixel-monitor::before,
.pixel-monitor::after {
  content: "+";
  position: absolute;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent-green);
  opacity: 0.5;
}

.pixel-monitor::before {
  top: 10px;
  left: 12px;
}

.pixel-monitor::after {
  bottom: 10px;
  right: 12px;
}

/* Pixel Avatar Graphic */
.pixel-avatar {
  width: 72px !important;
  height: 72px !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  margin-bottom: 0 !important;
  overflow: visible !important;
  box-shadow: none !important;
  transition: all var(--transition-fast) !important;
}

.pixel-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.08)) !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.pixel-avatar:hover img {
  transform: scale(1.1) rotate(3deg) !important;
  filter: drop-shadow(0 8px 16px rgba(58, 141, 113, 0.2)) !important;
}

/* Pixel Dialog speech bubble */
.pixel-bubble {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-align: center;
  max-width: 240px;
  position: relative;
}

.pixel-bubble::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent var(--border-color) transparent;
}

.console-controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Simulator label contrast fix */
.console-controls .form-group label,
.console-controls [style*="font-mono"] {
  color: var(--text-secondary) !important;
}

.console-controls [style*="text-transform: uppercase"] {
  color: var(--text-primary) !important;
  letter-spacing: 0.06em;
}

.console-controls h3 {
  margin-bottom: 12px;
}

.console-description {
  margin-bottom: 24px;
  font-size: 1rem;
}

.console-btn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.console-btn {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}

.console-btn:hover,
.console-btn.active {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background-color: var(--accent-green-light);
}

/* Support and Privacy specific styling */
.page-header {
  padding-top: 80px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.page-header h1 {
  font-size: 2.8rem;
  margin-top: 8px;
}

.content-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 48px;
  margin-top: 60px;
  margin-bottom: 96px;
  box-shadow: var(--card-shadow);
}

/* FAQ Accordion */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

.faq-item {
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.active {
  border-color: var(--accent-blue);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 24px;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
}

.faq-question::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--text-secondary);
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
  color: var(--accent-blue);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-medium);
  padding-left: 24px;
  padding-right: 24px;
}

.faq-answer p {
  padding-bottom: 20px;
  font-size: 0.95rem;
}

/* Support Form */
.support-form-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  background-color: #fff;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px var(--accent-green-light);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-status {
  display: none;
  margin-top: 16px;
  padding: 12px;
  background-color: var(--accent-green-light);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
}

.form-status.success {
  display: block;
}

.form-status.error {
  display: block;
  background-color: rgba(211, 47, 47, 0.1);
  color: #d32f2f;
  border: 1px solid #d32f2f;
}

/* Privacy Policy Layout */
.privacy-section {
  margin-bottom: 36px;
}

.privacy-section h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.privacy-section p, 
.privacy-section ul {
  margin-bottom: 16px;
}

.privacy-section ul {
  padding-left: 20px;
}

.privacy-section li {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* Footer styling */
footer {
  background: linear-gradient(160deg, #0F172A 0%, #1E293B 100%);
  border-top: none;
  padding-top: 72px;
  padding-bottom: 48px;
  color: #CBD5E1;
}

footer .logo {
  color: #F8FAFC;
}

footer .footer-brand p {
  color: #94A3B8;
}

footer .footer-column h4 {
  color: #64748B;
}

footer .footer-column a {
  color: #94A3B8;
}

footer .footer-column a:hover {
  color: var(--accent-sky);
}

footer .footer-bottom {
  border-top-color: rgba(255,255,255,0.06);
  color: #64748B;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 0.95rem;
  margin-top: 16px;
  max-width: 340px;
}

.footer-column h4 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 12px;
}

.footer-column a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-column a:hover {
  color: var(--accent-green);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 32px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  #feature-security-card {
    order: 10;
  }
  
  .pixel-console {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px;
  }
  
  .story-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .story-content {
    text-align: left;
  }
  
  .story-img {
    max-width: 320px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .hero-content h1 {
    font-size: 2.6rem;
  }
  
  .nav-container {
    padding-left: 12px;
    padding-right: 12px;
  }
  
  .logo {
    gap: 6px;
  }
  
  .logo span {
    font-size: 1.05rem;
  }
  
  .logo img {
    width: 24px;
    height: 24px;
  }
  
  .nav-links {
    display: flex;
    gap: 8px;
  }
  
  .nav-links li:last-child {
    display: none;
  }
  
  .nav-links a {
    font-size: 0.75rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* Mobile Hamburger Menu (Default Hidden for Desktop) */
.burger-menu-btn {
  display: none;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block !important;
  }
  
  .burger-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
  }
  
  .burger-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  }
  
  /* Transformation to X when menu is open */
  .burger-menu-btn.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .burger-menu-btn.open span:nth-child(2) {
    opacity: 0;
  }
  
  .burger-menu-btn.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  /* Mobile Navigation links drawer style */
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(250, 252, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 80px 24px 24px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 30px rgba(45, 50, 56, 0.05);
  }
  
  .nav-links.open {
    transform: translateX(0);
  }
  
  .nav-links li {
    width: 100%;
    text-align: center;
  }
  
  .nav-links a {
    font-size: 1.25rem !important;
    display: block;
    padding: 12px;
    font-family: var(--font-mono);
  }
  
  .nav-links li:last-child {
    display: block !important;
    margin-top: 16px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .nav-links li:last-child a {
    font-size: 1.05rem !important;
  }
}

/* ==========================================
   Advanced Animations & Interactive Mascot
   ========================================== */

/* Scroll Reveal — see new implementation in section below */

/* Mouse-tracking Glow Cards */
.glow-card {
  position: relative;
  overflow: hidden;
}

.glow-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(37, 99, 235, 0.06),
    transparent 80%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.glow-card:hover::before {
  opacity: 1;
}

/* Floating Pixel Mascot Widget */
.floating-pixel-container {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: 24px;
  width: 96px;
  height: 96px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  opacity: 1 !important;
  visibility: visible !important;
  will-change: transform;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.floating-pixel-container.is-dragging {
  transition: none !important;
}

.floating-pixel-container.on-left {
  align-items: flex-start;
}

.floating-pixel-container.on-left .pixel-mascot-bubble {
  right: auto !important;
  left: 0 !important;
  text-align: left;
}

.floating-pixel-container.on-left .pixel-mascot-bubble::after {
  right: auto;
  left: 24px;
}

/* Gallery navigation arrows */
.gallery-wrapper {
  position: relative;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(250,248,245,0.92);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  box-shadow: 0 2px 12px rgba(45,50,56,0.08);
  transition: background var(--transition-fast), transform var(--transition-fast);
  pointer-events: auto;
}

.gallery-arrow:hover {
  background: var(--accent-green);
  color: #fff;
  border-color: var(--accent-green);
  transform: translateY(-50%) scale(1.08);
}

.gallery-arrow.prev { left: -22px; }
.gallery-arrow.next { right: -22px; }

@media (max-width: 1280px) {
  .gallery-arrow.prev { left: 8px; }
  .gallery-arrow.next { right: 8px; }
}

/* No .jumping class needed anymore */

.pixel-mascot-body {
  width: 96px !important;
  height: 96px !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  box-shadow: none !important;
  animation: gentle-float 4s ease-in-out infinite !important;
  transition: all var(--transition-fast) !important;
  overflow: visible !important;
}

.pixel-mascot-body:hover {
  transform: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
}

.pixel-mascot-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.12)) !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.pixel-mascot-body:hover .pixel-mascot-img {
  transform: scale(1.15) translateY(-5px) rotate(-4deg) !important;
  filter: drop-shadow(0 12px 24px rgba(58, 141, 113, 0.25)) !important;
}

/* Orbiting particles around floating Pixel */
.pixel-mascot-orbit {
  position: absolute !important;
  top: -16px !important;
  left: -16px !important;
  width: 128px !important;
  height: 128px !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  animation: spin-orbit 12s linear infinite !important;
  z-index: -1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.orbit-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background-color: var(--border-color);
  border-radius: 1px;
  opacity: 0.5;
  transition: background-color var(--transition-fast);
}

.orbit-dot:nth-child(1) { top: 0; left: 50%; transform: translate(-50%, -50%); }
.orbit-dot:nth-child(2) { bottom: 0; left: 50%; transform: translate(-50%, 50%); }
.orbit-dot:nth-child(3) { left: 0; top: 50%; transform: translate(-50%, -50%); }
.orbit-dot:nth-child(4) { right: 0; top: 50%; transform: translate(50%, -50%); }

.pixel-mascot-body:hover ~ .pixel-mascot-orbit .orbit-dot,
.pixel-mascot-body:hover .pixel-mascot-orbit .orbit-dot {
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  opacity: 0.9;
}

/* Pixel interactive animation states */
.mascot-wiggle {
  animation: mascot-wiggle 0.6s ease-in-out infinite alternate !important;
}

.mascot-shake {
  animation: mascot-shake 0.4s ease-in-out infinite !important;
}

.mascot-bounce {
  animation: mascot-bounce 0.5s ease-in-out !important;
}

@keyframes mascot-wiggle {
  0% { transform: rotate(-8deg) scale(1.05); }
  100% { transform: rotate(8deg) scale(1.05); }
}

@keyframes mascot-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px) rotate(-1deg); }
  75% { transform: translateX(3px) rotate(1deg); }
}

@keyframes mascot-bounce {
  0%, 100% { transform: translateY(0) scaleY(1); }
  40% { transform: translateY(-12px) scaleY(0.9); }
  70% { transform: translateY(2px) scaleY(1.05); }
}

/* Speech Bubble (lofi glassmorphic) */
.pixel-mascot-bubble {
  position: absolute;
  bottom: 108px; /* 96px mascot body height + 12px margin */
  right: 0 !important;
  left: auto !important;
  width: max-content;
  max-width: min(240px, calc(100vw - 48px));
  white-space: normal;
  background-color: rgba(250, 248, 245, 0.9);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: var(--card-shadow);
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: right;
}

.pixel-mascot-bubble.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.pixel-mascot-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 24px;
  border-width: 6px;
  border-style: solid;
  border-color: var(--border-color) transparent transparent transparent;
}

/* Animations */
@keyframes gentle-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes cross-pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes spin-orbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ECG Dynamic Speed — applied via CSS variable set by JS */
#ecg-scroll-group {
  animation-duration: var(--ecg-speed, 4s);
}

/* Gallery dots */
.gallery-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}
.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border-color);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}
.gallery-dot.active {
  background-color: var(--accent-green);
  transform: scale(1.3);
}

/* FAQ Section */
.faq-section {
  padding-top: 96px;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--border-color);
}

/* Prefers-reduced-motion — accesibilidad */
/* ==========================================
   Feature Card — shimmer sweep on hover
   ========================================== */
.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -70%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255,255,255,0.05) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  transition: left 0.6s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}

.feature-card:hover::after {
  left: 130%;
}

/* ==========================================
   CTA Section — animated orbs
   ========================================== */
.cta-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.cta-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.7;
}

.cta-orb-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(5,150,105,0.22) 0%, transparent 70%);
  top: -80px;
  left: -60px;
  animation: cta-orb-drift-1 9s ease-in-out infinite alternate;
}

.cta-orb-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 70%);
  bottom: -60px;
  right: -40px;
  animation: cta-orb-drift-2 11s ease-in-out infinite alternate;
}

.cta-orb-3 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(14,165,233,0.14) 0%, transparent 70%);
  top: 50%;
  left: 45%;
  transform: translate(-50%, -50%);
  animation: cta-orb-drift-3 13s ease-in-out infinite alternate;
}

@keyframes cta-orb-drift-1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.15); }
}
@keyframes cta-orb-drift-2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-30px, -40px) scale(1.1); }
}
@keyframes cta-orb-drift-3 {
  from { transform: translate(-50%, -50%) scale(1); }
  to   { transform: translate(-42%, -58%) scale(1.2); }
}

/* ==========================================
   CTA Download Buttons — pulse ring
   ========================================== */
#google-play-cta-btn,
#apple-app-store-cta-btn {
  position: relative;
}

#google-play-cta-btn::before,
#apple-app-store-cta-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: transparent;
  border: 2px solid rgba(37,99,235,0.5);
  animation: cta-btn-ring 2.8s ease-out infinite;
  pointer-events: none;
}

#apple-app-store-cta-btn::before {
  border-color: rgba(100,100,120,0.4);
  animation-delay: -1.4s;
}

@keyframes cta-btn-ring {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}

/* ── Academia Banner ────────────────────────────────────── */
.academia-banner-section {
  padding: 40px 0;
  background: #F8FAFC;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.academia-banner-link {
  display: block;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  transition: transform 0.30s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.30s ease;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

/* shimmer sweep on hover */
.academia-banner-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.22) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0s;
  pointer-events: none;
  border-radius: inherit;
}

.academia-banner-link:hover::after {
  transform: translateX(120%);
  transition: transform 0.55s ease-out;
}

.academia-banner-link:hover {
  transform: translateY(-4px) scale(1.008);
  box-shadow: 0 16px 48px rgba(0,0,0,0.16);
}

.academia-banner-link:active {
  transform: translateY(-1px) scale(1.002);
  transition-duration: 0.1s;
}

.academia-banner-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  transition: transform 0.30s ease;
}

.academia-banner-link:hover .academia-banner-img {
  transform: scale(1.025);
}

.academia-banner-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  pointer-events: none;
  animation: academia-badge-pulse 3s ease-in-out infinite;
}

@keyframes academia-badge-pulse {
  0%, 100% { opacity: 0.85; }
  50%       { opacity: 1; box-shadow: 0 0 8px rgba(255,255,255,0.35); }
}


@media (max-width: 600px) {
  .academia-banner-section { padding: 28px 0; }
  .academia-banner-link { border-radius: 10px; }
  .academia-banner-img { border-radius: 10px; }
}

/* ── Utility classes extracted from inline styles ───────── */
.btn-icon-gap { gap: 8px; }
.btn-apple    { background: #1a1a2e; border-color: #1a1a2e; box-shadow: 0 2px 12px rgba(0,0,0,0.25); }
.btn-dashed   { border: 1px dashed var(--border-color); }

.footer-made-with {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ── FAQ grid max-width ─────────────────────────────────── */
.faq-grid {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Cursor pointer on interactive elements ─────────────── */
.gallery-image-wrapper,
.faq-question,
.gallery-arrow,
.gallery-dot,
.feature-card[tabindex],
.glow-card[role="button"] {
  cursor: pointer;
}

/* ── CTA Section (extracted from inline styles) ─────────── */
.cta-section {
  border-top: none;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 60%, #0D9488 100%);
  padding: 96px 0;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.cta-container {
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.cta-tag   { color: #5EEAD4; }
.cta-heading {
  margin-top: 10px;
  margin-bottom: 16px;
  color: #F8FAFC;
}
.cta-subheading {
  margin-bottom: 32px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  color: #94A3B8;
}
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Pricing Section ────────────────────────────────────── */
.pricing-section {
  padding: 96px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color-light);
  border-bottom: 1px solid var(--border-color-light);
}

.pricing-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-top: 48px;
}

.pricing-card {
  flex: 1 1 300px;
  max-width: 400px;
  padding: 28px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pricing-card--featured {
  border: 2px solid var(--accent-green);
  box-shadow: 0 0 32px rgba(5, 150, 105, 0.1);
}

.pricing-card-header { margin-bottom: 20px; }

.pricing-card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pricing-plan-name {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.pricing-plan-name--premium { color: var(--accent-green); }

.pricing-plan-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pricing-badge {
  background: var(--accent-green);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
}

.pricing-features {
  list-style: none;
  padding: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.pricing-check {
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1.4;
}
.pricing-check--yes   { color: var(--accent-green); }
.pricing-check--no    { color: var(--text-tertiary); }
.pricing-check--premium { color: var(--accent-green); }

.pricing-check-disabled { color: var(--text-tertiary); }

.pricing-card-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.pricing-price {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  justify-content: center;
}

.pricing-amount         { color: var(--text-secondary); }
.pricing-amount--premium { color: var(--accent-green); }
.pricing-period         { font-size: 0.78rem; font-weight: 400; color: var(--text-tertiary); }
.pricing-divider        { color: var(--border-color); font-weight: 400; }

.pricing-btn {
  width: 100%;
  justify-content: center;
}

/* ── Nav Premium link ─────────────────────────────────────── */
.nav-premium-link {
  color: var(--accent-green) !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.nav-premium-link:hover { color: var(--accent-teal) !important; }

/* ── Testimonios Section — horizontal scroll ──────────────── */
.testimonios-section {
  padding: 96px 0 80px;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  overflow: hidden;
}

.testimonios-header {
  text-align: center;
  margin-bottom: 48px;
}

.testimonios-track-wrap { position: relative; }

.testimonios-fade {
  position: absolute;
  top: 0; bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}
.testimonios-fade--left  { left: 0;  background: linear-gradient(to right, var(--bg-secondary), transparent); }
.testimonios-fade--right { right: 0; background: linear-gradient(to left,  var(--bg-primary),   transparent); }

.testimonios-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 20px 100px 32px;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color-light) transparent;
}
.testimonios-track::-webkit-scrollbar       { height: 3px; }
.testimonios-track::-webkit-scrollbar-track { background: transparent; }
.testimonios-track::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.testimonios-track:active { cursor: grabbing; }

/* ── card ─────────────────────────────────────────────────── */
.testimonio-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--border-color-light);
  border-radius: var(--border-radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.04);
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1), box-shadow 0.28s ease;
  position: relative;
  overflow: hidden;
}

/* colored top stripe always visible */
.testimonio-card::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-teal) 100%);
  flex-shrink: 0;
}

.testimonio-card--featured::before {
  background: linear-gradient(90deg, var(--accent-green) 0%, var(--accent-teal) 100%);
}

.testimonio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(37,99,235,0.13), 0 2px 8px rgba(15,23,42,0.06);
}

.testimonio-card--featured {
  border-color: rgba(13,148,136,0.3);
  background: linear-gradient(170deg, rgba(13,148,136,0.03) 0%, #fff 50%);
}

/* card inner padding wrapper */
.testimonio-card-body {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

/* big decorative quote */
.testimonio-quote-mark {
  position: absolute;
  bottom: 70px;
  right: 16px;
  font-size: 7rem;
  line-height: 1;
  color: var(--accent-blue);
  opacity: 0.05;
  font-family: Georgia, serif;
  pointer-events: none;
  user-select: none;
}
.testimonio-card--featured .testimonio-quote-mark {
  color: var(--accent-teal);
  opacity: 0.07;
}

/* stars */
.testimonio-stars {
  color: #F59E0B;
  font-size: 0.85rem;
  letter-spacing: 4px;
}

.testimonio-card blockquote { flex: 1; position: relative; z-index: 1; }

.testimonio-card blockquote p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.72;
}

/* author footer — no avatar, just name + role pill */
.testimonio-author {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border-color-light);
  padding-top: 14px;
}

.testimonio-author strong {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* role icon wrapper */
.testimonio-role-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-blue);
  flex-shrink: 0;
}
.testimonio-card--featured .testimonio-role-icon { color: var(--accent-teal); }

/* role pill */
.testimonio-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-secondary);
  color: var(--accent-blue);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 3px 10px 3px 8px;
  border-radius: 20px;
  border: 1px solid rgba(37,99,235,0.15);
  width: fit-content;
}
.testimonio-card--featured .testimonio-role-pill {
  background: rgba(13,148,136,0.07);
  color: var(--accent-teal);
  border-color: rgba(13,148,136,0.2);
}

/* small dot separator */
.testimonio-role-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .testimonio-card     { flex: 0 0 268px; }
  .testimonios-fade    { width: 48px; }
  .testimonios-track   { padding: 16px 48px 24px; }
  .cta-section         { padding: 64px 0; }
  .testimonios-section { padding: 64px 0 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .ecg-path {
    animation: none;
    stroke-dashoffset: 0;
  }
  #ecg-scroll-group,
  .ecg-monitor-dot,
  .ecg-monitor-strip::after { animation: none; }
  .device-frame { animation: none; }
  .cta-orb { animation: none; }
  #google-play-cta-btn::before,
  #apple-app-store-cta-btn::before { animation: none; }
  .pixel-mascot-body {
    animation: none !important;
  }
  .floating-pixel-container {
    transition: none !important;
  }
  .js-animations .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .js-animations .reveal-on-scroll.active {
    opacity: 1;
    transform: none;
  }
  .feature-card:hover {
    transform: none;
  }
  .feature-card::after { display: none; }
  .btn:hover {
    transform: none;
  }
  .gallery-item:hover,
  .gallery-image-wrapper:hover {
    transform: none;
  }
}

/* ==========================================
   Stats Bar — Modern Clinical Social Proof
   ========================================== */

.stats-bar {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-teal) 100%);
  padding: 20px 0;
  position: relative;
  overflow: hidden;
}

.stats-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 20px 20px;
}

.stats-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 40px;
  border-right: 1px solid rgba(255,255,255,0.2);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 2px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .stats-bar .container {
    gap: 0;
  }
  .stat-item {
    padding: 10px 20px;
    border-right: 1px solid rgba(255,255,255,0.2);
    border-bottom: none;
  }
  .stat-item:nth-child(2n) {
    border-right: none;
  }
  .stat-number { font-size: 1.3rem; }
}

/* ==========================================
   Staggered reveal animations
   ========================================== */

.js-animations .reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-animations .reveal-on-scroll.active {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children inside revealed sections */
.js-animations .stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-animations .stagger-children.active > *:nth-child(1) { transition-delay: 0ms; }
.js-animations .stagger-children.active > *:nth-child(2) { transition-delay: 80ms; }
.js-animations .stagger-children.active > *:nth-child(3) { transition-delay: 160ms; }
.js-animations .stagger-children.active > *:nth-child(4) { transition-delay: 240ms; }
.js-animations .stagger-children.active > *:nth-child(5) { transition-delay: 320ms; }
.js-animations .stagger-children.active > *:nth-child(6) { transition-delay: 400ms; }

.js-animations .stagger-children.active > * {
  opacity: 1;
  transform: translateY(0);
}

/* Counter animation */
.count-up {
  display: inline-block;
}

/* ==========================================
   Gradient text utility
   ========================================== */

.gradient-text {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================
   Enhanced Section alternation
   ========================================== */

.features-section {
  background: #fff;
}

.story-section {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, #fff 100%);
}

.pixel-section {
  background: #fff;
}

.faq-section {
  background: linear-gradient(180deg, #fff 0%, var(--bg-secondary) 100%);
}

/* ==========================================
   Press Banner modernized
   ========================================== */

.press-banner {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border-bottom: none !important;
  border-top: none !important;
}

.press-banner .mono-tag {
  color: var(--accent-sky) !important;
}

.press-banner .mono-tag::before {
  background-color: var(--accent-sky) !important;
}

.press-banner span,
.press-banner strong {
  color: #E2E8F0 !important;
}

.press-banner a.btn-secondary {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.2) !important;
  color: #CBD5E1 !important;
}

.press-banner a.btn-secondary:hover {
  background: rgba(255,255,255,0.16) !important;
  color: #fff !important;
}

/* ==========================================
   Mobile menu update for new palette
   ========================================== */

.burger-menu-btn span {
  background-color: var(--text-primary);
}

/* ==========================================
   Pixel Mascot — Mobile adjustments
   ========================================== */
@media (max-width: 767px) {
  .pixel-mascot-bubble {
    max-width: min(290px, calc(100vw - 28px));
    max-height: 48vh;
    overflow-y: auto;
    font-size: 0.82rem;
    line-height: 1.4;
  }
  /* On small/landscape screens, lower the bubble so it doesn't clip at top */
  .pixel-mascot-bubble {
    bottom: 104px;
  }
  /* On-left bubble: always keep inside right viewport edge */
  .floating-pixel-container.on-left .pixel-mascot-bubble {
    max-width: min(290px, calc(100vw - 32px));
  }
}

@media (max-height: 480px) {
  .pixel-mascot-bubble {
    bottom: 100px;
    max-height: 38vh;
    font-size: 0.78rem;
  }
}

/* ==========================================
   ECG Trivia Quiz inside Mascot Speech Bubble
   ========================================== */

/* ECG Trivia Quiz inside Mascot Speech Bubble */
.ecg-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  text-align: left;
}

.ecg-quiz-btn {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  background-color: rgba(250, 248, 245, 0.95);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
  text-align: left;
}

.ecg-quiz-btn:hover {
  background-color: var(--accent-green-light);
  border-color: var(--accent-green);
  color: var(--accent-green);
}
