:root {
  color-scheme: light dark;
  /* The Horizon Narrative Design Tokens */
  --horizon-blue: #00478D;
  --horizon-blue-container: #005EB8;
  --horizon-teal: #006874;
  --horizon-teal-container: #97F0FF;
  --horizon-amber: #795900;
  --horizon-amber-container: #FFDEA0;

  --bg-canvas: #F9F9FF;
  --bg-surface-low: #F2F3FB;
  --bg-surface: #ECEDF6;
  --bg-surface-elevated: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.82);

  --text-primary: #191C21;
  --text-secondary: #41484F;
  --text-muted: #71787E;
  --border-color: #E2E8F0;
  --border-subtle: #C2C6D4;

  --accent-primary: #00478D;
  --accent-secondary: #006874;
  --badge-bg: #E0F2FE;
  --badge-text: #0369A1;
  --success-bg: #E6F4EA;
  --success-text: #137333;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 71, 141, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 36px rgba(0, 71, 141, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-family: var(--font-body);
}

@media (prefers-color-scheme: dark) {
  :root {
    --horizon-blue: #9ECAFF;
    --horizon-blue-container: #00478D;
    --horizon-teal: #4FD8EB;
    --horizon-teal-container: #004F58;
    --horizon-amber: #F2BF48;
    --horizon-amber-container: #5C4000;

    --bg-canvas: #111318;
    --bg-surface-low: #191C21;
    --bg-surface: #1D2025;
    --bg-surface-elevated: #282A2F;
    --bg-glass: rgba(29, 32, 37, 0.82);

    --text-primary: #E2E2E9;
    --text-secondary: #C5C6D0;
    --text-muted: #8B9198;
    --border-color: #334155;
    --border-subtle: #44464F;

    --accent-primary: #9ECAFF;
    --accent-secondary: #4FD8EB;
    --badge-bg: #0C4A6E;
    --badge-text: #7DD3FC;
    --success-bg: #0D381E;
    --success-text: #81C995;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
  }
}

html[data-theme="light"] {
  color-scheme: light;
  --horizon-blue: #00478D;
  --horizon-teal: #006874;
  --horizon-amber: #795900;
  --bg-canvas: #F9F9FF;
  --bg-surface-low: #F2F3FB;
  --bg-surface: #ECEDF6;
  --bg-surface-elevated: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --text-primary: #191C21;
  --text-secondary: #41484F;
  --text-muted: #71787E;
  --border-color: #E2E8F0;
  --border-subtle: #C2C6D4;
  --accent-primary: #00478D;
  --accent-secondary: #006874;
  --badge-bg: #E0F2FE;
  --badge-text: #0369A1;
  --success-bg: #E6F4EA;
  --success-text: #137333;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 71, 141, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 36px rgba(0, 71, 141, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --horizon-blue: #9ECAFF;
  --horizon-teal: #4FD8EB;
  --horizon-amber: #F2BF48;
  --bg-canvas: #111318;
  --bg-surface-low: #191C21;
  --bg-surface: #1D2025;
  --bg-surface-elevated: #282A2F;
  --bg-glass: rgba(29, 32, 37, 0.82);
  --text-primary: #E2E2E9;
  --text-secondary: #C5C6D0;
  --text-muted: #8B9198;
  --border-color: #334155;
  --border-subtle: #44464F;
  --accent-primary: #9ECAFF;
  --accent-secondary: #4FD8EB;
  --badge-bg: #0C4A6E;
  --badge-text: #7DD3FC;
  --success-bg: #0D381E;
  --success-text: #81C995;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-size-adjust: from-font;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Bilingual Toggle Support */
[data-lang] {
  display: none !important;
}

html[lang="en"] [data-lang="en"],
html:not([lang="es"]) [data-lang="en"] {
  display: block !important;
}

html[lang="es"] [data-lang="es"] {
  display: block !important;
}

html[lang="en"] span[data-lang="en"],
html[lang="en"] strong[data-lang="en"],
html[lang="en"] a[data-lang="en"] {
  display: inline !important;
}

html[lang="es"] span[data-lang="es"],
html[lang="es"] strong[data-lang="es"],
html[lang="es"] a[data-lang="es"] {
  display: inline !important;
}

html[lang="en"] .btn-playstore-sub[data-lang="en"],
html[lang="es"] .btn-playstore-sub[data-lang="es"],
html[lang="en"] .brand-caption[data-lang="en"],
html[lang="es"] .brand-caption[data-lang="es"] {
  display: block !important;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top Navigation Bar */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: var(--bg-glass);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 71, 141, 0.28);
}

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

.brand-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-trip {
  color: #0284c7;
}

html[data-theme="dark"] .brand-trip {
  color: #38bdf8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-trip {
    color: #38bdf8;
  }
}

.brand-caption {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  margin-top: 2px;
  padding-left: 1px;
}

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

.lang-switcher, .theme-switcher {
  display: inline-flex;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.lang-btn, .theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.theme-btn {
  padding: 6px 10px;
}

.theme-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.lang-btn:hover, .theme-btn:hover {
  color: var(--text-primary);
}

.lang-btn[aria-pressed="true"], .theme-btn[aria-pressed="true"] {
  background-color: var(--bg-surface-elevated);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

.header-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--horizon-blue) 0%, var(--horizon-teal) 100%);
  color: #FFFFFF !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-cta-link:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  padding: 80px 0 60px 0;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-secondary);
  border-radius: 50%;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.22;
  margin-bottom: 20px;
  text-wrap: balance;
}

.hero-title .gradient-text {
  display: inline-block;
  padding: 0.08em 0.08em 0.22em 0.02em;
  margin: -0.08em -0.08em -0.22em -0.02em;
  background: linear-gradient(135deg, var(--horizon-blue) 0%, var(--horizon-teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 19px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  text-wrap: pretty;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  scroll-margin-top: 96px;
}

.btn-playstore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 24px;
  min-height: 52px;
  box-sizing: border-box;
  background-color: var(--text-primary);
  color: var(--bg-canvas) !important;
  text-decoration: none;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 15px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-playstore:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.btn-playstore svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex-shrink: 0;
}

.btn-playstore-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.btn-playstore-sub {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.88;
}

.btn-playstore-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 22px;
  min-height: 52px;
  box-sizing: border-box;
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  text-decoration: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}

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

.hero-trust-row {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent-secondary);
}

/* Hero Authentic App Screenshot */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-screenshot-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 20px 40px rgba(0, 71, 141, 0.22)) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.08));
}

.app-screenshot-frame:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 28px 50px rgba(0, 71, 141, 0.28)) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.12));
}

@media (prefers-color-scheme: dark) {
  .app-screenshot-frame {
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.55)) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.3));
  }
  .app-screenshot-frame:hover {
    filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.65)) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
  }
}

html[data-theme="dark"] .app-screenshot-frame {
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.55)) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.3));
}

html[data-theme="dark"] .app-screenshot-frame:hover {
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.65)) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}

html[data-theme="light"] .app-screenshot-frame {
  filter: drop-shadow(0 20px 40px rgba(0, 71, 141, 0.22)) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.08));
}

html[data-theme="light"] .app-screenshot-frame:hover {
  filter: drop-shadow(0 28px 50px rgba(0, 71, 141, 0.28)) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.12));
}

.app-screenshot {
  width: 100%;
  height: auto;
  vertical-align: middle;
  user-select: none;
  -webkit-user-drag: none;
}

/* Core Pillars / Feature Showcase */
.features-section {
  padding: 80px 0;
  background-color: var(--bg-surface-low);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  scroll-margin-top: 72px;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px auto;
}

.section-eyebrow {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-secondary);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.2;
  text-wrap: balance;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  text-wrap: pretty;
}

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

.feature-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface-low);
  border: 1px solid var(--border-color);
  margin-bottom: 4px;
  color: var(--accent-primary);
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.feature-card:hover .feature-icon-wrapper {
  background-color: var(--badge-bg);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.feature-icon-wrapper svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Architecture / Philosophy Section */
.philosophy-section {
  padding: 80px 0;
}

.philosophy-card {
  background: linear-gradient(135deg, var(--bg-surface-elevated) 0%, var(--bg-surface-low) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow-md);
}

.philosophy-text h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.2;
}

.philosophy-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
}

.stat-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-box {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--accent-primary);
  margin-bottom: 4px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* CTA Banner Section */
.cta-banner {
  padding: 70px 0;
  background: linear-gradient(135deg, #00478D 0%, #006874 100%);
  color: #FFFFFF;
  text-align: center;
}

.cta-banner h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: #FFFFFF;
}

.cta-banner p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 32px auto;
  text-wrap: pretty;
}

.cta-banner .btn-playstore {
  background-color: #FFFFFF;
  color: #00478D !important;
}

/* Footer */
footer.site-footer {
  padding: 48px 0;
  background-color: var(--bg-canvas);
  border-top: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-muted);
}

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

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

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

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

/* Responsive Queries */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .philosophy-card {
    grid-template-columns: 1fr;
    padding: 32px;
  }
  .hero-title {
    font-size: 38px;
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 32px;
  }
  .hero {
    padding: 40px 0;
  }
  .header-actions .header-cta-link {
    display: none;
  }
  .stat-boxes {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}
