/* ==========================================================================
   সহীহ ইসলাম শিক্ষা — Core Stylesheet
   Author: Developer Nayim
   --------------------------------------------------------------------------
   This file holds design tokens (colours, type, spacing) and every reusable
   component on the site. Viewport-specific rules live in responsive.css.
   Table of contents:
     1.  Design Tokens (light + dark theme)
     2.  Reset & Base Elements
     3.  Typography
     4.  Layout & Utility Classes
     5.  Buttons + Ripple Effect
     6.  Cards
     7.  Header & Primary Navigation
     8.  Theme Toggle
     9.  Hero (arch motif)
     10. Arcade Section Divider
     11. Features Grid
     12. Phone Mockup / Screenshots Gallery
     13. Download CTA Band
     14. FAQ Accordion
     15. About Page Blocks
     16. Contact Form
     17. Legal Document Typography
     18. 404 Page
     19. Footer
     20. Back-to-Top Button
     21. Scroll Reveal Animation
     22. Accessibility Helpers
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   -------------------------------------------------------------------------
   "Khidmat Green" is the app's Islamic-green brand colour. "Manuscript Gold"
   and "Parchment" nod to the open Qur'an / rehal artwork in the app icon.
   Dark-mode only redefines the tokens that actually need to change.
   ========================================================================== */
:root {
  /* -- Brand palette -- */
  --color-primary: #0b8457;          /* Khidmat Green (brand) */
  --color-primary-dark: #076241;
  --color-primary-light: #12a56e;
  --color-primary-50: #e8f5ef;        /* tint used for icon chips / hovers */
  --color-gold: #c9962c;              /* Manuscript Gold */
  --color-gold-light: #f0dca0;        /* Parchment Gold */
  --color-white: #ffffff;

  /* -- Surfaces & text (light mode defaults) -- */
  --color-bg: #fbf9f4;                /* warm parchment-white, not stark white */
  --color-bg-alt: #f3f0e8;
  --color-surface: #ffffff;
  --color-text: #16241d;              /* ink */
  --color-text-muted: #55665d;
  --color-border: #e4e0d4;
  --color-overlay: rgba(11, 33, 24, 0.55);

  /* -- Shadows -- */
  --shadow-sm: 0 2px 10px rgba(9, 35, 24, 0.07);
  --shadow-md: 0 10px 28px rgba(9, 35, 24, 0.10);
  --shadow-lg: 0 20px 54px rgba(9, 35, 24, 0.16);
  --shadow-gold: 0 10px 30px rgba(201, 150, 44, 0.35);

  /* -- Typography -- */
  --font-display: 'Noto Serif Bengali', 'Amiri', serif;
  --font-body: 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-arabic: 'Amiri', serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: clamp(1.4rem, 1.25rem + 0.7vw, 1.75rem);
  --fs-2xl: clamp(1.6rem, 1.3rem + 1.3vw, 2.1rem);
  --fs-3xl: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  --fs-4xl: clamp(2.3rem, 1.6rem + 2.9vw, 3.4rem);
  --lh-tight: 1.2;
  --lh-normal: 1.55;
  --lh-relaxed: 1.85;

  /* -- Spacing scale -- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.25rem;
  --space-xl: 3.5rem;
  --space-2xl: 5rem;
  --space-3xl: 7rem;

  /* -- Radius -- */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 42px;
  --radius-full: 999px;

  /* -- Motion -- */
  --transition-fast: 150ms ease;
  --transition-base: 280ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 550ms cubic-bezier(0.4, 0, 0.2, 1);

  /* -- Layout -- */
  --container-w: 1200px;
  --header-h: 76px;

  /* -- Z-index scale -- */
  --z-header: 100;
  --z-backtotop: 90;
  --z-overlay: 200;
}

/* Dark theme via OS preference (progressive enhancement, no JS required) */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0a1712;
    --color-bg-alt: #0e2019;
    --color-surface: #122a20;
    --color-text: #ecf3ee;
    --color-text-muted: #9fb3a8;
    --color-border: #1e3a2c;
    --color-overlay: rgba(0, 0, 0, 0.65);
    --color-primary-50: #12271d;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 54px rgba(0, 0, 0, 0.5);
  }
}

/* Explicit theme override, set by js/script.js and persisted in localStorage */
[data-theme='light'] {
  --color-bg: #fbf9f4;
  --color-bg-alt: #f3f0e8;
  --color-surface: #ffffff;
  --color-text: #16241d;
  --color-text-muted: #55665d;
  --color-border: #e4e0d4;
  --color-overlay: rgba(11, 33, 24, 0.55);
  --color-primary-50: #e8f5ef;
  --shadow-sm: 0 2px 10px rgba(9, 35, 24, 0.07);
  --shadow-md: 0 10px 28px rgba(9, 35, 24, 0.10);
  --shadow-lg: 0 20px 54px rgba(9, 35, 24, 0.16);
}

[data-theme='dark'] {
  --color-bg: #0a1712;
  --color-bg-alt: #0e2019;
  --color-surface: #122a20;
  --color-text: #ecf3ee;
  --color-text-muted: #9fb3a8;
  --color-border: #1e3a2c;
  --color-overlay: rgba(0, 0, 0, 0.65);
  --color-primary-50: #12271d;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 54px rgba(0, 0, 0, 0.5);
}


/* ==========================================================================
   2. RESET & BASE ELEMENTS
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Respect users who have asked the OS to minimise motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}


/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  font-weight: 700;
  color: var(--color-text);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { color: var(--color-text); }

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

.lede {
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
}

.arabic {
  font-family: var(--font-arabic);
  direction: rtl;
  unicode-bidi: isolate;
}

/* Small decorative eyebrow label used above section titles */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  background: var(--color-primary-50);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.eyebrow .material-symbols-outlined {
  font-size: 1.1em;
}

[data-theme='dark'] .eyebrow,
@media (prefers-color-scheme: dark) {
  /* handled by color-primary-50 token swap above */
}


/* ==========================================================================
   4. LAYOUT & UTILITY CLASSES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section {
  padding-block: var(--space-2xl);
}

.section-header {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header p {
  margin-top: var(--space-xs);
}

.text-center { text-align: center; }
.mb-md { margin-bottom: var(--space-md); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-sm);
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: var(--z-overlay);
  transition: top var(--transition-fast);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-sm);
}

/* Consistent, visible keyboard focus ring across the whole site */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.divider-icon {
  color: var(--color-gold);
  display: inline-flex;
}


/* ==========================================================================
   5. BUTTONS + RIPPLE EFFECT
   ========================================================================== */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-full);
  transition: transform var(--transition-fast), box-shadow var(--transition-base), background-color var(--transition-base);
  white-space: nowrap;
}

.btn .material-symbols-outlined {
  font-size: 1.25em;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-dark));
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  box-shadow: var(--shadow-lg);
}

.btn-gold {
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  color: #2b1d05;
  box-shadow: var(--shadow-gold);
}

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

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-sm {
  padding: 0.55rem 1.15rem;
  font-size: var(--fs-sm);
}

.btn-lg {
  padding: 1.1rem 2.25rem;
  font-size: var(--fs-md);
}

.btn-block {
  width: 100%;
}

/* Ripple element injected by js/script.js on pointer/keyboard activation */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  animation: ripple-anim 620ms ease-out;
}

.btn-outline .ripple,
.faq-item summary .ripple,
.footer-social a .ripple {
  background: rgba(11, 132, 87, 0.22);
}

/* Positioning context so ripples stay contained within round icon buttons */
.nav-toggle,
.theme-toggle,
.back-to-top,
.play-badge,
.footer-social a,
.faq-item summary {
  position: relative;
  overflow: hidden;
}

@keyframes ripple-anim {
  to {
    transform: scale(3.2);
    opacity: 0;
  }
}

/* Google Play badge-style button (generic mark -- see README for swapping in
   Google's official artwork before launch) */
.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #16241d;
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-base);
}

.play-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.play-badge .material-symbols-outlined {
  font-size: 2rem;
  color: var(--color-gold-light);
}

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

.play-badge .play-badge-text small {
  font-size: 0.7rem;
  opacity: 0.85;
}

.play-badge .play-badge-text strong {
  font-size: 1.05rem;
  font-family: var(--font-body);
}


/* ==========================================================================
   6. CARDS
   ========================================================================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

/* Glass-effect surface: used over the gradient hero / footer CTA */
.glass {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}


/* ==========================================================================
   7. HEADER & PRIMARY NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: var(--z-header);
  background: rgba(251, 249, 244, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

[data-theme='dark'] .site-header {
  background: rgba(10, 23, 18, 0.75);
}

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

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  height: var(--header-h);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.nav-logo .logo-frame {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 3px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.nav-logo img {
  width: 100%;
  height: 100%;
  border-radius: 7px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  position: relative;
  font-weight: 500;
  padding-block: 0.4rem;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link[aria-current='page'] {
  color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link[aria-current='page']::after {
  width: 100%;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text);
}

.nav-toggle:hover {
  background: var(--color-primary-50);
}


/* ==========================================================================
   8. THEME TOGGLE
   ========================================================================== */
.theme-toggle {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--color-primary-50);
  transform: rotate(-12deg);
}

.theme-toggle .theme-icon-dark { display: none; }

[data-theme='dark'] .theme-toggle .theme-icon-light { display: none; }
[data-theme='dark'] .theme-toggle .theme-icon-dark { display: inline-flex; }


/* ==========================================================================
   9. HERO — the signature arch (mihrab) motif
   -------------------------------------------------------------------------
   The rounded-top "arch-frame" echoes the mihrab/rehal artwork from the app
   icon and re-appears (quietly) as the phone-mockup bezel and the footer
   brand mark, so it reads as one deliberate idea rather than decoration.
   ========================================================================== */
.hero {
  position: relative;
  padding-block: var(--space-2xl) var(--space-3xl);
  overflow: hidden;
  background: linear-gradient(160deg, var(--color-primary-dark) 0%, #063d28 62%, #052a1b 100%);
  isolation: isolate;
}

[data-theme='dark'] .hero {
  background: linear-gradient(160deg, #0c2e21 0%, #06201a 65%, #041610 100%);
}

/* Subtle Islamic geometric lattice, drawn with layered gradients (no image request) */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(45deg, transparent 48%, var(--color-gold) 49%, var(--color-gold) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, var(--color-gold) 49%, var(--color-gold) 51%, transparent 52%);
  background-size: 64px 64px;
  z-index: -2;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.35), transparent 70%);
  z-index: -1;
}

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

.hero-copy {
  text-align: center;
}

.hero-copy .eyebrow {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-gold-light);
}

.hero-copy h1 {
  color: #fff;
  margin-bottom: var(--space-sm);
}

.hero-copy h1 .accent {
  display: block;
  color: var(--color-gold-light);
  font-size: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: var(--space-2xs);
}

.hero-copy .lede {
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

/* the arch itself, framing the logo like a mihrab niche */
.hero-arch-wrap {
  display: flex;
  justify-content: center;
}

.arch-frame {
  position: relative;
  width: 220px;
  padding: var(--space-lg) var(--space-md) var(--space-md);
  border-radius: 130px 130px var(--radius-md) var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(240, 220, 160, 0.55);
  box-shadow: 0 0 0 6px rgba(240, 220, 160, 0.08), var(--shadow-lg);
  animation: arch-float 6s ease-in-out infinite;
}

.arch-frame .logo-frame {
  width: 132px;
  height: 132px;
  margin-inline: auto;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-md);
}

.arch-frame img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

@keyframes arch-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-stats {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.hero-stat {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  text-align: center;
}

.hero-stat .material-symbols-outlined {
  color: var(--color-gold-light);
  font-size: 1.75rem;
  margin-bottom: var(--space-2xs);
}

.hero-stat strong {
  display: block;
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--fs-md);
}

.hero-stat span {
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--fs-sm);
}


/* ==========================================================================
   10. ARCADE SECTION DIVIDER
   -------------------------------------------------------------------------
   A row of scalloped arches (riwaq / mosque arcade), built with two radial
   gradients -- no image, no SVG request, scales to any width.
   ========================================================================== */
.arcade-divider {
  height: 34px;
  width: 100%;
  background-color: var(--color-bg);
}

.arcade-divider.flip-top {
  background-image: radial-gradient(circle at 18px 0, transparent 18px, #052a1b 19px);
  background-size: 36px 34px;
  background-repeat: repeat-x;
  background-position: top;
}

[data-theme='dark'] .arcade-divider.flip-top {
  background-image: radial-gradient(circle at 18px 0, transparent 18px, #041610 19px);
}

.arcade-divider.to-alt {
  background-color: var(--color-bg);
  background-image: radial-gradient(circle at 18px 34px, transparent 18px, var(--color-bg-alt) 19px);
  background-size: 36px 34px;
  background-repeat: repeat-x;
}

.arcade-divider.from-alt {
  background-color: var(--color-bg-alt);
  background-image: radial-gradient(circle at 18px 0, transparent 18px, var(--color-bg) 19px);
  background-size: 36px 34px;
  background-repeat: repeat-x;
}


/* ==========================================================================
   11. FEATURES GRID
   ========================================================================== */
.section-alt {
  background: var(--color-bg-alt);
}

.features-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature-card {
  padding: var(--space-lg);
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-primary-50);
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.feature-icon .material-symbols-outlined {
  font-size: 1.75rem;
}

.feature-card h3 {
  margin-bottom: var(--space-2xs);
  font-size: var(--fs-md);
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}


/* ==========================================================================
   12. PHONE MOCKUP / SCREENSHOTS GALLERY
   -------------------------------------------------------------------------
   Rendered entirely in HTML/CSS (no bitmap screenshots): keeps the page
   light, lets Bengali text render with correct native script shaping, and
   is trivial to restyle once real in-app captures are ready to swap in.
   ========================================================================== */
.screens-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 76%;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-block: var(--space-sm) var(--space-md);
  padding-inline: var(--space-md);
  margin-inline: calc(var(--space-md) * -1);
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) transparent;
}

.screens-track::-webkit-scrollbar {
  height: 6px;
}

.screens-track::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

.phone-mock {
  scroll-snap-align: center;
  background: linear-gradient(165deg, #133422, #0a1f15);
  border-radius: 130px 130px 30px 30px / 90px 90px 30px 30px;
  padding: 20px 14px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(240, 220, 160, 0.25);
}

.phone-screen {
  background: var(--color-surface);
  border-radius: 90px 90px 18px 18px / 60px 60px 18px 18px;
  min-height: 420px;
  padding: var(--space-lg) var(--space-sm) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.phone-screen .mock-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-xs);
  font-size: var(--fs-md);
}

.mock-row {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
}

.mock-row .material-symbols-outlined {
  color: var(--color-primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.mock-row .bar {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  flex: 1;
}

.mock-row .bar.w-60 { flex: 0 0 60%; }
.mock-row .bar.w-40 { flex: 0 0 40%; }
.mock-row .bar.gold { background: var(--color-gold-light); }

.mock-row-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.mock-row-text strong {
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-badge {
  align-self: flex-start;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-primary-dark);
  background: var(--color-primary-50);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
}

.mock-caption {
  text-align: center;
  margin-top: var(--space-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}


/* ==========================================================================
   13. DOWNLOAD CTA BAND
   ========================================================================== */
.cta-band {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-band h2 { color: #fff; }

.cta-band p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 520px;
  margin: var(--space-2xs) auto var(--space-lg);
}

.cta-band .btn-outline,
.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.cta-band .btn-outline:hover,
.btn-outline-light:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}


/* ==========================================================================
   14. FAQ ACCORDION (native <details>/<summary> for built-in accessibility)
   ========================================================================== */
.faq-list {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-weight: 600;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .material-symbols-outlined {
  color: var(--color-primary);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.faq-item[open] summary .material-symbols-outlined {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 var(--space-md) var(--space-md);
  color: var(--color-text-muted);
}


/* ==========================================================================
   15. ABOUT PAGE BLOCKS
   ========================================================================== */
.mv-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mv-card {
  padding: var(--space-lg);
  position: relative;
}

.mv-card .feature-icon {
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  color: #2b1d05;
}

.dev-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-xl);
  background: var(--color-bg-alt);
  border-radius: var(--radius-xl);
}

.dev-card .logo-frame {
  width: 120px;
  height: 120px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow-md);
  margin-inline: auto;
}

.dev-card img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
}

.dev-meta {
  text-align: left;
}

.dev-meta .role {
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 640px;
  margin-inline: auto;
}

.timeline-item {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.timeline-item .material-symbols-outlined {
  color: var(--color-gold);
  background: var(--color-primary-50);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}


/* ==========================================================================
   16. CONTACT FORM
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.contact-info-card {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-info-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.contact-info-row .material-symbols-outlined {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-primary-50);
  color: var(--color-primary);
  flex-shrink: 0;
}

.contact-info-row a:hover {
  color: var(--color-primary);
}

.form-card {
  padding: var(--space-lg);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: var(--fs-sm);
  margin-bottom: var(--space-2xs);
}

.form-group .required {
  color: #b5401e;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-50);
}

.form-control.is-invalid {
  border-color: #b5401e;
}

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

.form-error {
  color: #b5401e;
  font-size: var(--fs-xs);
  margin-top: 0.3rem;
  display: none;
}

.form-error.is-visible {
  display: block;
}

.form-status {
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.success {
  background: var(--color-primary-50);
  color: var(--color-primary-dark);
}

.form-status.error {
  background: #fbe9e4;
  color: #8a2c12;
}


/* ==========================================================================
   17. LEGAL DOCUMENT TYPOGRAPHY (privacy / terms / disclaimer)
   ========================================================================== */
.legal-header,
.page-header {
  background: linear-gradient(160deg, var(--color-primary-dark), #063d28);
  color: #fff;
  padding-block: var(--space-xl) var(--space-lg);
  text-align: center;
}

.legal-header h1,
.page-header h1 {
  color: #fff;
  font-size: var(--fs-3xl);
}

.legal-header p,
.page-header p {
  color: rgba(255, 255, 255, 0.78);
  margin-top: var(--space-2xs);
}

.page-header .eyebrow {
  background: rgba(255, 255, 255, 0.14);
  color: var(--color-gold-light);
}

.legal-body {
  max-width: 780px;
  margin-inline: auto;
  padding-block: var(--space-xl);
}

.legal-body .updated-note {
  background: var(--color-primary-50);
  color: var(--color-primary-dark);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
}

.legal-body h2 {
  font-size: var(--fs-xl);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xs);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.legal-body h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.legal-body h3 {
  font-size: var(--fs-md);
  margin-top: var(--space-md);
  margin-bottom: var(--space-2xs);
}

.legal-body p, .legal-body li {
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.legal-body ul, .legal-body ol {
  padding-left: 1.4rem;
  margin-bottom: var(--space-sm);
}

.legal-body ul { list-style: disc; }
.legal-body ol { list-style: decimal; }

.legal-body strong { color: var(--color-text); }

.legal-body a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-toc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-xl);
}

.legal-toc h2 {
  margin: 0 0 var(--space-xs);
  font-size: var(--fs-md);
  border: none;
  padding: 0;
}

.legal-toc ol {
  columns: 2;
  padding-left: 1.2rem;
}

.legal-toc a {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.legal-toc a:hover {
  color: var(--color-primary);
}


/* ==========================================================================
   18. 404 PAGE
   ========================================================================== */
.error-page {
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: var(--space-2xl);
  text-align: center;
  background: linear-gradient(160deg, var(--color-primary-dark), #063d28 70%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.error-page::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(45deg, transparent 48%, var(--color-gold) 49%, var(--color-gold) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, var(--color-gold) 49%, var(--color-gold) 51%, transparent 52%);
  background-size: 64px 64px;
}

.error-content {
  position: relative;
  z-index: 1;
  max-width: 520px;
  padding-inline: var(--space-md);
}

.error-arch {
  width: 150px;
  margin-inline: auto var(--space-md);
  padding: var(--space-md);
  border-radius: 90px 90px var(--radius-md) var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(240, 220, 160, 0.55);
  animation: arch-float 6s ease-in-out infinite;
}

.error-arch .material-symbols-outlined {
  font-size: 3.5rem;
  color: var(--color-gold-light);
}

.error-code {
  font-family: var(--font-display);
  font-size: 3.2rem;
  color: var(--color-gold-light);
  line-height: 1;
}

.error-content h1 {
  color: #fff;
  font-size: var(--fs-2xl);
  margin-block: var(--space-sm) var(--space-2xs);
}

.error-content p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-lg);
}

.error-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}


/* ==========================================================================
   19. FOOTER
   ========================================================================== */
.site-footer {
  background: #0c231a;
  color: rgba(255, 255, 255, 0.82);
  padding-block: var(--space-2xl) var(--space-md);
}

[data-theme='dark'] .site-footer {
  background: #060f0b;
}

.footer-grid {
  display: grid;
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-brand .brand-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-brand .logo-frame {
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 3px;
  flex-shrink: 0;
}

.footer-brand img {
  width: 100%;
  height: 100%;
  border-radius: 7px;
}

.footer-brand h3 {
  color: #fff;
  font-size: var(--fs-md);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-sm);
  max-width: 32ch;
}

.footer-social {
  display: flex;
  gap: var(--space-2xs);
  margin-top: var(--space-2xs);
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-primary);
  transform: translateY(-3px);
}

.footer-col h4 {
  color: #fff;
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.68);
  font-size: var(--fs-sm);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.footer-col a:hover {
  color: var(--color-gold-light);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom a:hover {
  color: var(--color-gold-light);
}


/* ==========================================================================
   20. BACK-TO-TOP BUTTON
   ========================================================================== */
.back-to-top {
  position: fixed;
  right: var(--space-md);
  bottom: var(--space-md);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-backtotop);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
}

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

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


/* ==========================================================================
   21. SCROLL REVEAL ANIMATION
   -------------------------------------------------------------------------
   js/script.js toggles .in-view via IntersectionObserver.
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  transition-delay: calc(var(--stagger-index, 0) * 90ms);
}


/* ==========================================================================
   22. ACCESSIBILITY HELPERS
   ========================================================================== */
@media (forced-colors: active) {
  .btn, .card, .faq-item, .form-control {
    border: 1px solid CanvasText;
  }
}
