/* ================================================================
   FLEETMATE LANDING PAGE — Design System & Styles
   ================================================================ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ── CSS Custom Properties ───────────────────────────────────── */
:root {
  /* Brand Palette */
  --navy-900: #001831;
  --navy-800: #002347;
  --navy-700: #003060;
  --navy-600: #0a3d6b;
  --navy-500: #1a5276;
  --navy-400: #2e6f95;
  --navy-300: #4a90b5;

  --orange-500: #E87722;
  --orange-400: #F08c3a;
  --orange-300: #F5a054;
  --orange-600: #D06518;
  --orange-glow: rgba(232, 119, 34, 0.35);

  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;

  /* Semantic */
  --bg-primary: var(--navy-900);
  --bg-secondary: var(--navy-800);
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-card-hover: rgba(232, 119, 34, 0.3);

  --text-primary: var(--gray-100);
  --text-secondary: var(--gray-400);
  --text-muted: var(--gray-500);
  --text-accent: var(--orange-500);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-padding: 6rem 2rem;
  --section-padding-mobile: 4rem 1.25rem;
  --container-max: 1200px;
  --card-radius: 16px;
  --btn-radius: 12px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-medium: 0.4s var(--ease-out);
  --transition-slow: 0.6s var(--ease-out);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

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

ul, ol {
  list-style: none;
}

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

/* ── Container ───────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

/* ── Typography ──────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange-500);
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 3rem;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.875rem 2rem;
  border-radius: var(--btn-radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: var(--white);
  box-shadow: 0 4px 20px var(--orange-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--orange-glow);
  background: linear-gradient(135deg, var(--orange-400), var(--orange-500));
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-icon {
  width: 20px;
  height: 20px;
}

.btn-google {
  background: var(--white);
  color: var(--gray-700);
  font-weight: 500;
  border: 1px solid var(--gray-200);
  width: 100%;
  padding: 0.75rem 1.5rem;
}

.btn-google:hover {
  background: var(--gray-50);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.btn-google img {
  width: 20px;
  height: 20px;
}

/* ── Navigation ──────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: all var(--transition-medium);
}

.navbar.scrolled {
  background: rgba(0, 24, 49, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.75rem 2rem;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav-brand span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--white);
}

.nav-brand .brand-accent {
  color: var(--orange-500);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-300);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange-500);
  transition: width var(--transition-fast);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 0.6rem 1.5rem !important;
  font-size: 0.9rem !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Hero Section ────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 6rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--orange-glow) 0%, transparent 70%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 82, 118, 0.3) 0%, transparent 70%);
  animation: heroGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.1); }
}

/* Floating gear shapes */
.gear {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  z-index: 0;
}

.gear-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  right: 5%;
  animation: gearSpin 30s linear infinite;
}

.gear-2 {
  width: 200px;
  height: 200px;
  bottom: 20%;
  right: 15%;
  animation: gearSpin 25s linear infinite reverse;
  border-color: rgba(232, 119, 34, 0.06);
}

.gear-3 {
  width: 150px;
  height: 150px;
  top: 30%;
  left: 5%;
  animation: gearSpin 20s linear infinite;
}

@keyframes gearSpin {
  to { transform: rotate(360deg); }
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  max-width: 580px;
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(232, 119, 34, 0.1);
  border: 1px solid rgba(232, 119, 34, 0.2);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--orange-400);
  margin-bottom: 1.5rem;
  max-width: 100%;
  flex-wrap: wrap;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--orange-500);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero h1 {
  margin-bottom: 1.5rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.8;
  max-width: 100%;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--orange-500);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Hero visual / image */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-width: 0;
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.hero-image-wrapper img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.hero-image-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, var(--orange-glow) 0%, transparent 60%);
  z-index: -1;
  filter: blur(40px);
}

/* ── Features Section ────────────────────────────────────────── */
.features {
  padding: var(--section-padding);
  text-align: center;
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  padding: 2rem;
  text-align: left;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange-500), transparent);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  transform: translateY(-4px);
}

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

.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  background: rgba(232, 119, 34, 0.08);
  border: 1px solid rgba(232, 119, 34, 0.15);
}

.feature-card h3 {
  margin-bottom: 0.75rem;
  color: var(--white);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ── How It Works Section ────────────────────────────────────── */
.how-it-works {
  padding: var(--section-padding);
  text-align: center;
  background: var(--bg-secondary);
  position: relative;
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1rem;
  position: relative;
}

/* Connector line between steps */
.steps-container::before {
  content: '';
  position: absolute;
  top: 48px;
  left: 16.67%;
  right: 16.67%;
  height: 2px;
  background: linear-gradient(90deg, var(--orange-500), var(--navy-400), var(--orange-500));
  opacity: 0.3;
}

.step-card {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
}

.step-number {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  box-shadow: 0 4px 24px var(--orange-glow);
}

.step-card h3 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ── Get Started / Auth Section ──────────────────────────────── */
.get-started {
  padding: var(--section-padding);
  text-align: center;
}

body.invite-mode .hero,
body.invite-mode .features,
body.invite-mode .how-it-works {
  display: none;
}

body.signed-in-mode .hero,
body.signed-in-mode .features,
body.signed-in-mode .how-it-works,
body.signed-in-mode .download {
  display: none;
}

body.invite-mode .get-started {
  min-height: 100vh;
  padding: 7rem 0 4rem;
  display: flex;
  align-items: center;
}

body.signed-in-mode .get-started {
  min-height: 100vh;
  padding: 7rem 0 4rem;
  display: flex;
  align-items: center;
}

body.invite-mode .get-started .container {
  width: min(100% - 2rem, 560px);
}

body.signed-in-mode .get-started .container {
  width: min(100% - 2rem, 560px);
}

body.invite-mode .auth-card {
  border-color: rgba(232, 119, 34, 0.28);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

body.signed-in-mode .auth-card {
  border-color: rgba(232, 119, 34, 0.28);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.auth-card {
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2.5rem;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange-500), transparent);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--orange-500);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(232, 119, 34, 0.1);
}

.form-input::placeholder {
  color: var(--gray-600);
}

.join-code-group,
.invite-group {
  margin-top: 0.5rem;
}

.join-code-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.invite-group {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(232, 119, 34, 0.22);
  border-radius: 10px;
  background: rgba(232, 119, 34, 0.08);
}

.invite-group .join-code-hint {
  margin: 0;
  color: var(--text-secondary);
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #fca5a5;
  display: none;
}

.auth-error.visible {
  display: block;
}

/* Post-auth state */
.post-auth {
  display: none;
  text-align: center;
}

.post-auth.visible {
  display: block;
}

.post-auth-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  border: 2px solid var(--orange-500);
  object-fit: cover;
}

.post-auth-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  border: 2px solid var(--orange-500);
  background: rgba(232, 119, 34, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--orange-500);
}

.post-auth h3 {
  color: var(--white);
  margin-bottom: 0.25rem;
}

.post-auth p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.post-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-signout {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: color var(--transition-fast);
}

.btn-signout:hover {
  color: var(--text-secondary);
}

/* ── Download Section ────────────────────────────────────────── */
.download {
  padding: var(--section-padding);
  text-align: center;
  background: var(--bg-secondary);
  position: relative;
}

.download-card {
  max-width: 700px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(232, 119, 34, 0.08), rgba(0, 24, 49, 0.6));
  border: 1px solid rgba(232, 119, 34, 0.15);
  border-radius: 24px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.download-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(232, 119, 34, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.download-card h2 {
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.download-card > p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.download-version {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Animations ──────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered children */
.stagger-children .feature-card:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .feature-card:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .feature-card:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .feature-card:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .feature-card:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .feature-card:nth-child(6) { transition-delay: 0.3s; }
.stagger-children .feature-card:nth-child(7) { transition-delay: 0.35s; }
.stagger-children .feature-card:nth-child(8) { transition-delay: 0.4s; }
.stagger-children .feature-card:nth-child(9) { transition-delay: 0.45s; }
.stagger-children .feature-card:nth-child(10) { transition-delay: 0.5s; }

.stagger-children .step-card:nth-child(1) { transition-delay: 0.1s; }
.stagger-children .step-card:nth-child(2) { transition-delay: 0.2s; }
.stagger-children .step-card:nth-child(3) { transition-delay: 0.3s; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .hero-content {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-image-wrapper {
    max-width: 360px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: var(--section-padding-mobile);
  }

  .navbar {
    padding: 0.75rem 1.25rem;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 24, 49, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-medium);
    z-index: 999;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    font-size: 1.25rem;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hero {
    padding: 6rem 1.25rem 4rem;
    min-height: auto;
  }

  .hero .container {
    width: 100%;
    max-width: 100%;
    gap: 2rem;
    justify-items: center;
  }

  .hero-content,
  .hero-visual {
    width: 100%;
    margin: 0 auto;
    min-width: 0;
  }

  .hero-content {
    padding-inline: 0.25rem;
  }

  .hero h1,
  .hero-description,
  .hero-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .hero h1 {
    font-size: clamp(1.95rem, 9vw, 2.75rem);
  }

  .hero-image-wrapper {
    width: min(100%, 320px);
    margin: 0 auto;
  }

  .hero-stats {
    gap: 1.5rem;
    width: 100%;
    justify-content: center;
  }

  .steps-container {
    grid-template-columns: 1fr;
  }

  .steps-container::before {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 1.75rem;
  }

  .download-card {
    padding: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }

  .download-buttons {
    flex-direction: column;
    align-items: center;
  }

  .download-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* ── Loading spinner ─────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-dark {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: var(--gray-700);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Utility ─────────────────────────────────────────────────── */
.text-center { text-align: center; }
.hidden { display: none !important; }
