/* ==========================================================================
   TallyMyCash 3.0 — Production Stylesheet
   Light-theme only | Semantic HTML5 | Accessible WCAG 2.1 AA | Responsive
   ========================================================================== */

:root {
  color-scheme: light;

  /* Brand Palette (derived from TallyMyCash Android App #419569 / #2D6A4A / #FFD048) */
  --brand-primary: #1b6543;
  --brand-primary-hover: #134b31;
  --brand-primary-mid: #2d7d56;
  --brand-primary-light: #ebf5f0;
  --brand-primary-Subtle: #d7eddf;
  --brand-accent-gold: #ffd048;
  --brand-accent-amber-text: #92400e;
  --brand-accent-amber-bg: #fef3c7;
  --brand-accent-amber-border: #f59e0b;

  /* Surfaces */
  --bg-page: #ffffff;
  --bg-section-mint: #f4f9f6;
  --bg-section-slate: #f8fafc;
  --bg-section-warm: #fcfaf5;
  --bg-card: #ffffff;
  --bg-footer: #0f241b;

  /* Typography Colors (WCAG 2.1 AA/AAA compliant on light backgrounds) */
  --text-strong: #0f172a;
  --text-body: #334155;
  --text-muted: #475569;
  --text-on-dark: #f8fafc;
  --text-on-dark-muted: #cbd5e1;

  /* Borders & Shadows */
  --border-light: #e2e8f0;
  --border-mint: #d5e6dc;
  --shadow-xs: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
  --focus-ring: 0 0 0 3px rgba(27, 101, 67, 0.35);

  /* Layout & Spacing */
  --nav-height: 72px;
  --container-max: 1240px;
  --container-narrow: 820px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* Typography Stack */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background-color: var(--bg-page);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-slide.is-active img,
  .hero-slide.is-leaving img {
    animation: none !important;
    transform: scale(1) !important;
  }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-page);
  color: var(--text-body);
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
  padding-top: var(--nav-height);
}

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

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
  color: var(--brand-primary-hover);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

/* Skip to main content link for keyboard accessibility */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 2000;
  background: var(--brand-primary);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  box-shadow: var(--shadow-md);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  color: #ffffff;
  outline: 2px solid #ffffff;
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Global Fixed Navbar
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}

.navbar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-strong);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-link:hover {
  color: var(--brand-primary);
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name {
  font-weight: 800;
  color: var(--text-strong);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.nav-links a {
  color: var(--text-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 4px;
  position: relative;
  transition: color 0.18s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--brand-primary);
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2.5px;
  background-color: var(--brand-primary);
  border-radius: 2px;
}

/* Industry-Standard Navbar Language Dropdown */
.nav-lang-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-mint);
  background-color: var(--bg-section-mint);
  color: var(--brand-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.nav-lang-trigger:hover,
.nav-lang-dropdown.is-open .nav-lang-trigger {
  background-color: var(--brand-primary-light);
  border-color: var(--brand-primary);
}

.nav-lang-globe {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.nav-lang-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.nav-lang-dropdown.is-open .nav-lang-chevron {
  transform: rotate(180deg);
}

.nav-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 176px;
  max-height: min(450px, calc(100vh - var(--nav-height) - 20px));
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 1100;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-lang-dropdown.is-open .nav-lang-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-lang-menu[hidden] {
  display: none;
}

.nav-lang-option:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: -2px;
  background-color: var(--bg-section-mint);
}

.nav-lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 46px;
  min-height: 46px;
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-strong);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-lang-option:hover {
  background-color: var(--bg-section-mint);
}

.nav-lang-option.is-selected {
  background-color: var(--brand-primary-light);
  color: var(--brand-primary);
}

.nav-lang-opt-labels {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.nav-lang-opt-native {
  font-size: 0.925rem;
  font-weight: 700;
  line-height: 1.2;
}

.nav-lang-opt-sub {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-muted);
}

.nav-lang-check {
  width: 16px;
  height: 16px;
  color: var(--brand-primary);
  opacity: 0;
  flex-shrink: 0;
}

.nav-lang-option.is-selected .nav-lang-check {
  opacity: 1;
}

/* Mobile Menu Button */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  color: var(--text-strong);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.mobile-menu-toggle:hover {
  background-color: var(--bg-section-slate);
  border-color: var(--brand-primary);
}

.hamburger-icon {
  width: 22px;
  height: 16px;
  position: relative;
  display: inline-block;
}

.hamburger-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--text-strong);
  border-radius: 2px;
  transition: transform 0.2s ease, top 0.2s ease, opacity 0.2s ease;
}

.hamburger-icon span:nth-child(1) {
  top: 0;
}
.hamburger-icon span:nth-child(2) {
  top: 7px;
}
.hamburger-icon span:nth-child(3) {
  top: 14px;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

/* Mobile Dropdown Menu (Compact & Accessible, Not Fullscreen) */
.mobile-nav-panel {
  display: none;
  visibility: hidden;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  padding: 16px 24px 20px;
  z-index: 999;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-nav-panel.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-strong);
  font-weight: 600;
  font-size: 1rem;
}

.mobile-nav-links a:hover,
.mobile-nav-links a[aria-current="page"] {
  background-color: var(--brand-primary-light);
  color: var(--brand-primary);
}

/* ==========================================================================
   First-Time Language Selection Screen (Multi-Language Modal)
   ========================================================================== */
.lang-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lang-modal-overlay.is-open {
  display: flex;
}

.lang-modal-card {
  width: 100%;
  max-width: 520px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px 22px 22px;
  max-height: 90vh;
  overflow-y: auto;
}

.lang-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.lang-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 8px;
  line-height: 1.35;
}

.lang-modal-subtitle {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.lang-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 76px;
  min-height: 76px;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background-color: var(--bg-page);
  color: var(--text-strong);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.lang-option-btn:hover {
  border-color: var(--brand-primary);
  background-color: var(--bg-section-mint);
}

.lang-option-btn.is-selected {
  border-color: var(--brand-primary);
  background-color: var(--brand-primary-light);
  box-shadow: 0 0 0 2px rgba(27, 101, 67, 0.18);
}

.lang-native-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-strong);
}

.lang-english-name {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-muted);
}

.lang-modal-footer {
  display: flex;
  justify-content: center;
}

.lang-continue-btn {
  width: 100%;
  padding: 13px 24px;
  border: none;
  border-radius: var(--radius-md);
  background-color: var(--brand-primary);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.lang-continue-btn:hover {
  background-color: var(--brand-primary-hover);
}

/* ==========================================================================
   Hero Section & Full-Width Screenshot Carousel
   ========================================================================== */
.hero-section {
  position: relative;
  width: 100%;
  height: clamp(540px, calc(100vh - var(--nav-height)), 820px);
  min-height: 540px;
  background-color: #0d261b;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
}

.hero-carousel-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

@keyframes heroKenBurns {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.08);
  }
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.hero-slide picture,
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--slide-pos, center 50%);
}

.hero-slide img {
  transform: scale(1);
  will-change: transform;
}

.hero-slide.is-active img,
.hero-slide.is-leaving img {
  animation: heroKenBurns 5.7s linear forwards;
}

/* Adaptive Gradient Overlay:
   Preserves screenshot visibility around the frame while guaranteeing strong
   WCAG AA/AAA contrast behind the centered headline and bottom CTA/controls */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(ellipse 58% 48% at 50% 44%, rgba(9, 28, 20, 0.56) 0%, rgba(9, 28, 20, 0.24) 62%, rgba(9, 28, 20, 0.1) 100%),
    linear-gradient(180deg, rgba(9, 28, 20, 0.22) 0%, rgba(9, 28, 20, 0.08) 38%, rgba(9, 28, 20, 0.24) 74%, rgba(9, 28, 20, 0.72) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 36px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  pointer-events: none;
}

.hero-top-spacer {
  flex: 0 0 8px;
}

.hero-copy-box {
  max-width: 780px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: rgba(9, 29, 20, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
  pointer-events: auto;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-accent-gold);
  background: rgba(255, 208, 72, 0.14);
  border: 1px solid rgba(255, 208, 72, 0.35);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.hero-title {
  color: #ffffff;
  font-size: clamp(1.85rem, 3.6vw, 3rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero-subtitle {
  color: #f1f5f9;
  font-size: clamp(1rem, 1.35vw, 1.1875rem);
  line-height: 1.55;
  max-width: 660px;
  margin: 0 auto;
  font-weight: 400;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

/* Bottom Hero Stack: Google Play CTA + Carousel Controls */
.hero-bottom-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  pointer-events: auto;
}

.hero-play-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  background: rgba(11, 33, 23, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-play-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 208, 72, 0.6);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.hero-play-cta img {
  height: 54px;
  width: auto;
}

.carousel-controls {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(11, 33, 23, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.carousel-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.24);
}

.carousel-arrow:focus-visible {
  outline: 2px solid var(--brand-accent-gold);
  outline-offset: 2px;
}

.carousel-arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  border: none;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  padding: 0;
  transition: width 0.22s ease, background-color 0.22s ease;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.75);
}

.carousel-dot[aria-selected="true"] {
  width: 26px;
  background: var(--brand-accent-gold);
}

.carousel-dot:focus-visible {
  outline: 2px solid var(--brand-accent-gold);
  outline-offset: 2px;
}

/* ==========================================================================
   Features Section (Stacked Categories)
   ========================================================================== */
.features-wrapper {
  width: 100%;
}

.features-intro-banner {
  background-color: var(--bg-page);
  padding: 64px 0 28px;
  text-align: center;
}

.section-kicker {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand-primary);
  background-color: var(--brand-primary-light);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.section-main-title {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  line-height: 1.22;
  margin-bottom: 12px;
}

.section-main-lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

/* Individual Stacked Category Section */
.feature-category {
  padding: 56px 0;
  border-top: 1px solid var(--border-light);
}

.feature-category.bg-white {
  background-color: var(--bg-page);
}

.feature-category.bg-mint {
  background-color: var(--bg-section-mint);
}

.feature-category.bg-warm {
  background-color: var(--bg-section-warm);
}

.feature-category.bg-slate {
  background-color: var(--bg-section-slate);
}

.category-header {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.category-title {
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.015em;
  line-height: 1.28;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background-color: var(--brand-primary-Subtle);
  color: var(--brand-primary);
}

.category-pill.pill-highlight {
  background-color: var(--brand-accent-amber-bg);
  color: var(--brand-accent-amber-text);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.category-intro {
  font-size: 1.025rem;
  color: var(--text-muted);
  max-width: 780px;
}

/* Responsive Card Grids by Count */
.feature-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, 1fr);
}

.feature-grid.grid-4 {
  grid-template-columns: repeat(2, 1fr);
}

.feature-grid.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Informational Feature Card (Non-clickable) */
.feature-card {
  min-width: 0;
  overflow-wrap: anywhere;
  background-color: var(--bg-card);
  border: 1px solid var(--border-mint);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(27, 101, 67, 0.35);
}

.feature-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feature-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background-color: var(--brand-primary-light);
  border: 1px solid rgba(27, 101, 67, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon-wrap img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.tier-tag {
  font-size: 0.725rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tier-tag.tier-free {
  background-color: var(--brand-primary-light);
  color: var(--brand-primary);
}

.tier-tag.tier-pro {
  background-color: var(--brand-accent-amber-bg);
  color: var(--brand-accent-amber-text);
}

.feature-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.35;
}

.feature-card-desc {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* ==========================================================================
   Final Branded Download CTA Section
   ========================================================================== */
.final-cta-section {
  background: linear-gradient(135deg, #134b31 0%, #1b6543 55%, #23764f 100%);
  color: #ffffff;
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final-cta-box {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.final-cta-title {
  font-size: clamp(1.75rem, 3vw, 2.375rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.final-cta-copy {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  max-width: 600px;
}

.final-cta-actions {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.final-play-btn {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.final-play-btn:hover {
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.42);
}

.final-play-btn img {
  height: 56px;
  width: auto;
}

.final-cta-subnote {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.82);
}

.final-cta-subnote a {
  color: var(--brand-accent-gold);
  text-decoration: underline;
  font-weight: 600;
}

.final-cta-subnote a:hover {
  color: #ffffff;
}

/* ==========================================================================
   Compact Global Footer
   ========================================================================== */
.site-footer {
  background-color: var(--bg-footer);
  color: var(--text-on-dark);
  padding: 36px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.925rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-contact-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-on-dark);
  font-weight: 500;
  text-decoration: none;
}

.footer-contact-item:hover {
  color: var(--brand-accent-gold);
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
}

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

.footer-legal-links a {
  color: var(--text-on-dark-muted);
  font-weight: 500;
}

.footer-legal-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-on-dark-muted);
  font-size: 0.875rem;
}

/* ==========================================================================
   Subtle Back to Top Button
   ========================================================================== */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--brand-primary);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease, background-color 0.18s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--brand-primary-hover);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
}

/* ==========================================================================
   Pricing Page (`pricing.html`)
   ========================================================================== */
.pricing-hero {
  background: linear-gradient(180deg, var(--bg-section-mint) 0%, var(--bg-page) 100%);
  padding: 56px 0 36px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.pricing-hero-title {
  font-size: clamp(1.85rem, 3.4vw, 2.65rem);
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.pricing-hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto 28px;
}

/* Billing Cycle Toggle (Monthly / Yearly) */
.billing-toggle-wrap {
  display: inline-flex;
  align-items: center;
  background-color: #e2ece7;
  padding: 5px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-mint);
  gap: 4px;
}

.billing-toggle-btn {
  border: none;
  background: transparent;
  color: var(--text-body);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.billing-toggle-btn[aria-pressed="true"] {
  background-color: var(--brand-primary);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

.savings-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background-color: var(--brand-accent-gold);
  color: #1e293b;
}

/* Pricing Plans Layout (Free vs Pro Card) */
.pricing-cards-section {
  padding: 40px 0 56px;
}

.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 980px;
  margin: 0 auto;
  align-items: stretch;
}

.plan-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plan-card.plan-pro {
  border: 2px solid var(--brand-primary);
  box-shadow: var(--shadow-md);
  position: relative;
}

.plan-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background-color: var(--brand-accent-amber-bg);
  color: var(--brand-accent-amber-text);
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.plan-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 6px;
}

.plan-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.plan-price-block {
  padding: 18px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 22px;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.plan-period {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.plan-price-note {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--brand-primary);
  font-weight: 600;
}

.plan-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.plan-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-body);
}

.plan-highlights li svg {
  width: 19px;
  height: 19px;
  color: var(--brand-primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.plan-cta-box {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.plan-play-link {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background-color: var(--brand-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.plan-play-link:hover {
  background-color: var(--brand-primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.plan-card.plan-free .plan-play-link {
  background-color: var(--brand-primary-light);
  color: var(--brand-primary);
  border: 1px solid var(--border-mint);
}

.plan-card.plan-free .plan-play-link:hover {
  background-color: var(--brand-primary-Subtle);
}

/* Who Pro Is For Section */
.who-pro-section {
  background-color: var(--bg-section-mint);
  padding: 52px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.who-pro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 28px;
}

.who-pro-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-mint);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

.who-pro-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 8px;
}

.who-pro-card p {
  font-size: 0.95rem;
  color: var(--text-body);
}

/* Full Free vs Pro Comparison Table */
.comparison-section {
  padding: 56px 0;
}

.comparison-table-wrap {
  margin-top: 28px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-xs);
  background: var(--bg-card);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 600px;
}

.comparison-table th,
.comparison-table td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.comparison-table thead th {
  background-color: var(--bg-section-slate);
  color: var(--text-strong);
  font-weight: 800;
  font-size: 0.95rem;
}

.comparison-table th.col-center,
.comparison-table td.col-center {
  text-align: center;
  width: 140px;
}

.comparison-table tr.group-row td {
  background-color: var(--brand-primary-light);
  color: var(--brand-primary);
  font-weight: 800;
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 20px;
}

.comparison-feature-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.comparison-feature-cell img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.comparison-feature-name {
  font-weight: 700;
  color: var(--text-strong);
  font-size: 0.95rem;
  display: block;
}

.comparison-feature-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
}

.check-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--brand-primary-light);
  color: var(--brand-primary);
  font-weight: 800;
}

.pro-only-dash {
  color: #94a3b8;
  font-weight: 600;
}

.comparison-footnotes {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Google Play Billing Note Box */
.billing-note-section {
  padding: 0 0 64px;
}

.billing-note-card {
  background-color: var(--bg-section-slate);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  max-width: 980px;
  margin: 0 auto;
}

.billing-note-card h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 10px;
}

.billing-note-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9375rem;
  color: var(--text-body);
}

/* ==========================================================================
   Legal & Compliance Pages (`terms.html`, `privacy_policy.html`, `delete_data.html`)
   ========================================================================== */
.legal-page-section {
  padding: 48px 0 72px;
  background-color: var(--bg-section-slate);
}

.legal-document {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 44px 48px;
  box-shadow: var(--shadow-xs);
}

.legal-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.legal-title {
  font-size: clamp(1.65rem, 2.8vw, 2.25rem);
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 8px;
}

.legal-meta {
  font-size: 0.925rem;
  color: var(--text-muted);
}

.legal-section {
  margin-bottom: 28px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 10px;
  line-height: 1.35;
}

.legal-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-strong);
  margin: 16px 0 8px;
}

.legal-section p {
  margin-bottom: 12px;
  font-size: 0.975rem;
  color: var(--text-body);
}

.legal-section ul,
.legal-section ol {
  padding-left: 22px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-section li {
  font-size: 0.975rem;
  color: var(--text-body);
  overflow-wrap: anywhere;
}

.legal-section p,
.legal-section a,
.legal-section code {
  overflow-wrap: anywhere;
}

.legal-callout {
  background-color: var(--bg-section-mint);
  border: 1px solid var(--border-mint);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 16px 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .who-pro-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  :root {
    --nav-height: 64px;
  }

  .navbar {
    gap: 10px;
  }

  .nav-right {
    margin-left: auto;
    gap: 10px;
  }

  .nav-right nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .mobile-nav-panel {
    display: block;
  }

  .pricing-cards-grid {
    grid-template-columns: 1fr;
    max-width: 540px;
  }

  .who-pro-grid {
    grid-template-columns: 1fr;
  }

  .legal-document {
    padding: 32px 24px;
  }
}

@media (max-width: 640px) {
  .container,
  .container-narrow {
    padding: 0 16px;
  }

  .brand-link {
    gap: 8px;
    font-size: 1.125rem;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .nav-lang-trigger {
    padding: 5px 10px;
    font-size: 0.825rem;
    min-height: 36px;
  }

  .lang-modal-overlay {
    padding: 14px;
  }

  .lang-modal-card {
    padding: 20px 16px 18px;
  }

  .lang-grid {
    gap: 8px;
    margin-bottom: 18px;
  }

  .lang-option-btn {
    height: 68px;
    min-height: 68px;
    padding: 8px 4px;
  }

  .lang-native-name {
    font-size: 0.95rem;
  }

  .lang-english-name {
    font-size: 0.72rem;
  }

  /* Taller mobile hero so 16:9 images crop well with object-fit: cover across all 9 languages */
  .hero-section {
    height: clamp(590px, 88vh, 710px);
    min-height: 590px;
  }

  .hero-inner {
    padding: 18px 16px 16px;
  }

  .hero-copy-box {
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 18px 16px;
  }

  .hero-title {
    font-size: 1.55rem;
  }

  .hero-subtitle {
    font-size: 0.925rem;
  }

  /* Script-aware hero typography on small phones for wider/taller Indic scripts */
  html[lang^="ta"] .hero-copy-box,
  html[lang^="ml"] .hero-copy-box,
  html[lang^="te"] .hero-copy-box,
  html[lang^="kn"] .hero-copy-box {
    padding: 14px 14px;
  }

  html[lang^="ta"] .hero-eyebrow,
  html[lang^="ml"] .hero-eyebrow,
  html[lang^="te"] .hero-eyebrow,
  html[lang^="kn"] .hero-eyebrow {
    font-size: 0.72rem;
    padding: 3px 10px;
    margin-bottom: 10px;
  }

  html[lang^="ta"] .hero-title,
  html[lang^="ml"] .hero-title,
  html[lang^="te"] .hero-title,
  html[lang^="kn"] .hero-title {
    font-size: 1.25rem;
    line-height: 1.28;
    margin-bottom: 10px;
  }

  html[lang^="ta"] .hero-subtitle,
  html[lang^="ml"] .hero-subtitle,
  html[lang^="te"] .hero-subtitle,
  html[lang^="kn"] .hero-subtitle {
    font-size: 0.8rem;
    line-height: 1.42;
  }

  .hero-play-cta img {
    height: 48px;
  }

  .carousel-controls {
    padding: 5px 10px;
    gap: 10px;
  }

  .carousel-arrow {
    width: 32px;
    height: 32px;
  }

  .feature-category {
    padding: 42px 0;
  }

  .section-main-title,
  .category-title,
  .final-cta-title,
  .pricing-hero-title {
    overflow-wrap: anywhere;
  }

  html[lang^="ta"] .section-main-title,
  html[lang^="ml"] .section-main-title,
  html[lang^="te"] .section-main-title,
  html[lang^="kn"] .section-main-title,
  html[lang^="ta"] .final-cta-title,
  html[lang^="ml"] .final-cta-title,
  html[lang^="te"] .final-cta-title,
  html[lang^="kn"] .final-cta-title {
    font-size: 1.45rem;
  }

  html[lang^="ta"] .category-title,
  html[lang^="ml"] .category-title,
  html[lang^="te"] .category-title,
  html[lang^="kn"] .category-title {
    font-size: 1.25rem;
  }

  .feature-grid,
  .feature-grid.grid-4,
  .feature-grid.grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 20px 18px;
  }

  .billing-toggle-btn {
    padding: 9px 14px;
    font-size: 0.875rem;
  }

  .site-footer {
    padding: 32px 0 80px;
    text-align: center;
  }

  .footer-top-row,
  .footer-bottom-row {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .footer-contact-links {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  .footer-legal-links {
    justify-content: center;
  }
}
