/* ===== CSS VARIABLES (from app_colors.dart) ===== */
:root {
  /* Primary palette */
  --color-primary: #2196F3;
  --color-primary-dark: #1976D2;
  --color-primary-light: #64B5F6;
  --color-primary-bg: #E3F2FD;

  /* Semantic colors */
  --color-success: #4CAF50;
  --color-success-bg: #E8F5E9;
  --color-warning: #FF9800;
  --color-warning-bg: #FFF3E0;
  --color-error: #F44336;
  --color-error-bg: #FFEBEE;

  /* Backgrounds & surfaces */
  --color-bg: #FFFFFF;
  --color-surface: #F5F5F5;
  --color-surface-elevated: #FFFFFF;
  --color-border: #E0E0E0;

  /* Text */
  --color-text-primary: #212121;
  --color-text-secondary: #757575;
  --color-text-hint: #BDBDBD;
  --color-text-on-primary: #FFFFFF;

  /* Spacing (from app_theme.dart) */
  --space-xs: 4px;
  --space-s: 8px;
  --space-m: 16px;
  --space-l: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Border radius */
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);

  /* Navbar */
  --navbar-height: 72px;
  --navbar-bg: rgba(255,255,255,0.92);
  --navbar-blur: 12px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Font */
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dark theme */
[data-theme="dark"] {
  --color-bg: #121212;
  --color-surface: #1E1E1E;
  --color-surface-elevated: #2A2A2A;
  --color-border: #333333;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #B0B0B0;
  --color-text-hint: #666666;
  --color-primary: #64B5F6;
  --color-primary-bg: rgba(33,150,243,0.15);
  --color-success-bg: rgba(76,175,80,0.15);
  --color-warning-bg: rgba(255,152,0,0.15);
  --color-error-bg: rgba(244,67,54,0.15);
  --navbar-bg: rgba(18,18,18,0.92);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.6);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { opacity: 0.85; }

h1, h2, h3, h4 {
  line-height: 1.25;
  color: var(--color-text-primary);
}
h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2.25rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 500; }

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-l);
}
.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-l);
}

.section {
  padding: var(--space-4xl) 0;
}
.section-alt {
  background-color: var(--color-surface);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
}
.section-header p {
  margin-top: var(--space-m);
  color: var(--color-text-secondary);
  font-size: 1.125rem;
}

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  padding: 12px 24px;
  border-radius: var(--radius-m);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); opacity: 1; }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
}
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }

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

.btn-white {
  background: #FFFFFF;
  color: #212121;
  border-color: #FFFFFF;
}
.btn-white:hover { background: #F5F5F5; color: #212121; }

.btn-outline-white {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); color: #fff; }

.btn-sm { padding: 8px 18px; font-size: 0.875rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { display: flex; justify-content: center; width: 100%; }

/* ===== BADGES ===== */
.section-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-m);
}
.badge-green { background: var(--color-success-bg); color: #2E7D32; }
.badge-blue { background: var(--color-primary-bg); color: #1565C0; }
.badge-orange { background: var(--color-warning-bg); color: #E65100; }
.badge-gold { background: linear-gradient(135deg, #FFD700, #FFA500); color: #fff; }

[data-theme="dark"] .badge-green { color: #66BB6A; }
[data-theme="dark"] .badge-blue { color: #64B5F6; }
[data-theme="dark"] .badge-orange { color: #FFB74D; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--navbar-bg);
  backdrop-filter: blur(var(--navbar-blur));
  -webkit-backdrop-filter: blur(var(--navbar-blur));
  z-index: 1000;
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}
.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-l);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 43px;
  width: auto;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
}
.nav-links a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}
.nav-links a:hover { color: var(--color-primary); opacity: 1; }

/* Nav dropdown menu */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-dropdown-toggle svg {
  transition: transform 0.2s ease;
}
.nav-dropdown:hover .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 170px;
  padding-top: 12px;
  background: transparent;
  list-style: none;
  z-index: 1000;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu-inner {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 8px 0;
  overflow: hidden;
}
.nav-dropdown-menu-inner a {
  display: block;
  padding: 10px 20px;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown-menu-inner a:hover {
  background: var(--color-primary);
  color: #fff;
  opacity: 1;
}

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

/* Theme toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-s);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  border-radius: var(--radius-s);
  transition: background var(--transition-fast);
}
.theme-toggle:hover { background: var(--color-surface); }

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* Logo switching */
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-s);
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  transition: all var(--transition-fast);
  border-radius: 2px;
}
.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 ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--navbar-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg-pharmacy.jpg') center/cover no-repeat;
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(25,118,210,0.85) 0%, rgba(33,150,243,0.80) 40%, rgba(21,101,192,0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3xl);
  max-width: 1200px;
  padding: var(--space-xxl) var(--space-l);
  width: 100%;
}

.hero-text {
  flex: 1;
  color: #FFFFFF;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--space-l);
}

.gradient-text {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: var(--space-xl);
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: var(--space-m);
  flex-wrap: wrap;
}

.hero-mockup {
  flex-shrink: 0;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-s);
  font-size: 0.8rem;
  animation: bounce 2s infinite;
  z-index: 1;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== PHONE FRAME (CSS-only device mockup) ===== */
.phone-frame {
  position: relative;
  width: 280px;
  background: #000;
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-xl), 0 0 0 2px rgba(255,255,255,0.1);
  overflow: hidden;
}
.phone-frame::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #000;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}
.phone-frame img {
  border-radius: 28px;
  width: 100%;
  height: auto;
  display: block;
  max-height: 540px;
  object-fit: cover;
  object-position: top;
}

.phone-tilted {
  transform: perspective(1000px) rotateY(-8deg) rotateX(2deg);
  transition: transform var(--transition-slow);
}
.phone-tilted:hover { transform: perspective(1000px) rotateY(-3deg) rotateX(1deg); }

.phone-tilted-left {
  transform: perspective(1000px) rotateY(8deg) rotateX(2deg);
  transition: transform var(--transition-slow);
}
.phone-tilted-left:hover { transform: perspective(1000px) rotateY(3deg) rotateX(1deg); }

.phone-sm { width: 220px; border-radius: 32px; }
.phone-sm::before { width: 80px; height: 22px; }
.phone-sm img { border-radius: 22px; }

.phone-android { border-radius: 28px; }
.phone-android::before {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  top: 8px;
}

/* ===== LAPTOP FRAME ===== */
.laptop-frame {
  position: relative;
  width: 500px;
  background: #1a1a1a;
  border-radius: 12px 12px 0 0;
  padding: 8px 8px 0;
  box-shadow: var(--shadow-lg);
}
.laptop-frame img {
  border-radius: 6px 6px 0 0;
  width: 100%;
  height: auto;
}
.laptop-frame::after {
  content: '';
  display: block;
  width: 120%;
  height: 16px;
  background: linear-gradient(180deg, #333, #222);
  border-radius: 0 0 8px 8px;
  margin: 0 -10%;
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--color-surface);
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--color-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-l);
  text-align: center;
}

.stat-item {}
.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
}
.stat-label {
  display: block;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
}

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-l);
}

.feature-card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  padding: var(--space-xl);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-m);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-m);
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-s);
}
.feature-card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== SHOWCASE SECTIONS ===== */
.showcase {
  display: flex;
  align-items: center;
  gap: var(--space-3xl);
}
.showcase-right { flex-direction: row; }
.showcase-left { flex-direction: row; }

.showcase-text { flex: 1; }
.showcase-text h2 { margin-bottom: var(--space-m); }
.showcase-text > p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: var(--space-l);
}

.showcase-mockup {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-m);
  font-size: 0.95rem;
}
.feature-list li svg { flex-shrink: 0; margin-top: 2px; }

/* ===== INTERACTIVE TUTORIAL ===== */
.tut-viewer {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  padding: var(--space-xl);
  max-width: 600px;
  margin: 0 auto;
}
.tut-slides { position: relative; min-height: 480px; }
.tut-slide {
  display: none;
  text-align: center;
  animation: tutFadeIn 0.35s ease;
}
.tut-slide.active { display: block; }
@keyframes tutFadeIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }

.tut-slide-visual {
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-m);
}
.tut-slide-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.tut-slide-desc {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto;
}

/* Welcome slide */
.tut-welcome-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(78,206,148,0.15), rgba(78,205,196,0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-m);
  animation: tutPulse 2s ease-in-out infinite;
}
@keyframes tutPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.tut-logo { margin-bottom: var(--space-s); }
[data-theme="light"] .tut-logo-dark, [data-theme="dark"] .tut-logo-light { display: none; }
[data-theme="light"] .tut-logo-light, [data-theme="dark"] .tut-logo-dark { display: inline; }

/* Mock grids — desktop matches app (~450px grid) */
.tut-grid {
  display: grid;
  grid-template-columns: repeat(5, 72px);
  grid-template-rows: repeat(5, 72px);
  gap: 4px;
  margin: 0 auto;
}
.tut-grid-6 {
  grid-template-columns: repeat(6, 60px);
  grid-template-rows: repeat(6, 60px);
}
.tut-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  transition: background 0.4s ease, color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  user-select: none;
}
.tut-cell.hl-green { background: #4CAF50; color: #fff; border-color: #4CAF50; }
.tut-cell.hl-blue { background: #2196F3; color: #fff; border-color: #2196F3; }
.tut-cell.hl-pink { background: #E91E63; color: #fff; border-color: #E91E63; }
.tut-cell.hint-glow {
  box-shadow: 0 0 12px 4px rgba(255,152,0,0.6);
  border-color: #FF9800;
  animation: tutHintPulse 1.2s ease-in-out infinite;
}
@keyframes tutHintPulse { 0%,100% { box-shadow: 0 0 8px 2px rgba(255,152,0,0.3); } 50% { box-shadow: 0 0 16px 6px rgba(255,152,0,0.7); } }

/* Grid container — positioning parent for swipe finger */
.tut-grid-container {
  position: relative;
  display: inline-block;
}

/* Swipe finger — touch_app icon, matching Flutter selectionTrail color */
.tut-swipe-finger {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  background: rgba(100, 181, 246, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px 4px rgba(100, 181, 246, 0.4);
  z-index: 10;
}
.tut-swipe-finger svg {
  width: 20px;
  height: 20px;
}

/* Streak — matches Flutter tutorial_page_streaks.dart exactly */
.tut-streak-days {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: var(--space-l);
}
.tut-day {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 2px solid var(--color-border);
  color: var(--color-text-secondary);
  opacity: 0;
  transform: scale(0);
}
.tut-day.complete {
  background: #4CAF50;
  border-color: #4CAF50;
  color: #fff;
}
.tut-day.current {
  border-color: #2196F3;
  background: #2196F3;
  color: #fff;
}
.tut-day.upcoming {
  opacity: 0;
  transform: scale(0);
}
.tut-day-label {
  font-size: 0.55rem;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tut-day-num {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
}

/* XP Orb — matches Flutter radial gradient with gold border */
.tut-xp-orb {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #FFF3E0, #FFE0B2);
  border: 3px solid #FFB300;
  box-shadow: 0 0 16px 4px rgba(255,179,0,0.3);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-m);
}
.tut-xp-plus {
  font-size: 1.1rem;
  font-weight: 700;
  color: #5D4037;
}
.tut-xp-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #5D4037;
  line-height: 1;
}
.tut-xp-pts {
  font-size: 0.75rem;
  font-weight: 600;
  color: #FF8F00;
  width: 100%;
  text-align: center;
  margin-top: -2px;
}

/* Level bar — matches Flutter LinearProgressIndicator */
.tut-level-bar {
  width: 280px;
  max-width: 100%;
}
.tut-level-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.tut-level-num {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}
.tut-level-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-primary);
}
.tut-level-track {
  height: 10px;
  background: var(--color-border);
  border-radius: 6px;
  overflow: hidden;
}
.tut-level-fill {
  height: 100%;
  width: 0;
  background: #4CAF50;
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Direction labels */
.tut-direction-labels {
  display: flex;
  gap: 12px;
  margin-top: var(--space-s);
  flex-wrap: wrap;
  justify-content: center;
}
.tut-dir-label {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  transition: opacity 0.5s ease;
}
.tut-dir-label[data-dir="h"] { color: #4CAF50; background: rgba(76,175,80,0.12); }
.tut-dir-label[data-dir="v"] { color: #2196F3; background: rgba(33,150,243,0.12); }
.tut-dir-label[data-dir="d"] { color: #E91E63; background: rgba(233,30,99,0.12); }

/* Grid wrapper for button positioning */
.tut-grid-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tut-btn-row {
  display: flex;
  width: 100%;
  max-width: 376px; /* match 5-col grid width: 5*72 + 4*4 = 376 */
  margin-top: 8px;
}
.tut-btn-row.tut-btn-left { justify-content: flex-start; }
.tut-btn-row.tut-btn-right { justify-content: flex-end; }

/* Action buttons (hint, rotate, new) */
.tut-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 56px;
  height: 56px;
}
.tut-action-btn svg {
  width: 24px;
  height: 24px;
}
/* Hint button — orange border + glow (matches app) */
.tut-hint-btn {
  border-color: #FF9800;
  color: #FF9800;
  box-shadow: 0 0 8px 2px rgba(255,152,0,0.3);
}
.tut-hint-btn:hover {
  border-color: #FFA726;
  color: #FFA726;
  box-shadow: 0 0 12px 4px rgba(255,152,0,0.45);
}
/* Rotate button — subtle border, no shadow */
.tut-rotate-btn {
  border-color: var(--color-border);
}
.tut-rotate-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
/* New Puzzle button — no border, no background, icon + text */
.tut-new-btn {
  border: none;
  background: transparent;
  width: auto;
  height: auto;
  padding: 6px 4px;
  gap: 4px;
  font-size: 0.95rem;
  font-weight: 400;
}
.tut-new-btn span {
  font-size: inherit;
  font-weight: inherit;
}
.tut-new-btn:hover {
  border: none;
  color: var(--color-primary);
}

/* Rotate — animation driven by JS (360° full rotation) */

/* Navigation */
.tut-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-m);
  margin-top: var(--space-l);
}
.tut-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.tut-nav-btn:hover:not(:disabled) { border-color: var(--color-primary); color: var(--color-primary); }
.tut-nav-btn:disabled { opacity: 0.3; cursor: default; }
.tut-dots { display: flex; gap: 8px; }
.tut-dot {
  width: 8px;
  height: 8px;
  border-radius: 8px;
  background: var(--color-border);
  transition: all 0.3s ease;
  cursor: pointer;
}
.tut-dot.active {
  width: 24px;
  background: var(--color-primary);
}

/* ===== PLATFORM SHOWCASE ===== */
.platform-showcase {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.platform-device { text-align: center; }

.device-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-m);
}

.platform-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-m);
  flex-wrap: wrap;
}

.store-badge { transition: transform var(--transition-fast); }
.store-badge:hover { transform: translateY(-2px); opacity: 1; }
.store-badge img,
.store-badge svg { height: 48px; width: auto; }

/* Light/dark badge switching */
.badge-dark { display: none; }
[data-theme="dark"] .badge-light { display: none; }
[data-theme="dark"] .badge-dark { display: block; }

/* ===== PRICING ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-l);
  align-items: start;
}

.pricing-card {
  position: relative;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  padding: var(--space-xl);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-featured {
  border-color: var(--color-primary);
  border-width: 2px;
  transform: scale(1.03);
}
.pricing-featured:hover { transform: scale(1.03) translateY(-4px); }

.pricing-badge {
  position: absolute;
  top: -12px;
  right: var(--space-l);
  background: var(--color-primary);
  color: #fff;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.pricing-badge.badge-gold {
  background: linear-gradient(135deg, #FFD700, #FFA500);
}

.pricing-header {
  text-align: center;
  margin-bottom: var(--space-l);
  padding-bottom: var(--space-l);
  border-bottom: 1px solid var(--color-border);
}
.pricing-header h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-s);
}

.pricing-price { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.price-amount { font-size: 2.5rem; font-weight: 700; color: var(--color-text-primary); }
.price-period { font-size: 0.9rem; color: var(--color-text-secondary); }
.price-savings {
  display: block;
  margin-top: var(--space-s);
  font-size: 0.8rem;
  color: var(--color-success);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  margin-bottom: var(--space-l);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}
.pricing-features li {
  font-size: 0.9rem;
  padding-left: 28px;
  position: relative;
  color: var(--color-text-secondary);
}
.pricing-features li::before {
  position: absolute;
  left: 0;
  font-size: 1rem;
}
.pricing-features li.included::before {
  content: '\2713';
  color: var(--color-success);
  font-weight: 700;
}
.pricing-features li.not-included {
  opacity: 0.4;
}
.pricing-features li.not-included::before {
  content: '\2717';
  color: var(--color-text-hint);
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.faq-item {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}
.faq-item:hover { box-shadow: var(--shadow-sm); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-l);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-primary);
  text-align: left;
}
.faq-question svg {
  flex-shrink: 0;
  transition: transform var(--transition-normal);
  color: var(--color-text-secondary);
}
.faq-item.active .faq-question svg { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal), padding var(--transition-normal);
}
.faq-item.active .faq-answer {
  max-height: 300px;
}
.faq-answer p {
  padding: 0 var(--space-l) var(--space-l);
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, #1976D2 0%, #2196F3 50%, #1565C0 100%);
  text-align: center;
  padding: var(--space-4xl) 0;
}

.cta-content h2 {
  color: #FFFFFF;
  font-size: 2.5rem;
  margin-bottom: var(--space-m);
}
.cta-content p {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  margin-bottom: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-m);
  flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-links {
  display: contents;
}

.footer-brand p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-top: var(--space-m);
  max-width: 280px;
}

.footer-logo { height: 30px; width: auto; }

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}
.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-hint);
  margin-bottom: var(--space-s);
}
.footer-col a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}
.footer-col a:hover { color: var(--color-primary); }

.footer-bottom {
  text-align: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}
.footer-bottom p {
  color: var(--color-text-hint);
  font-size: 0.8rem;
}

/* ===== FEATURE CARD EXPAND ===== */
.feature-card {
  cursor: pointer;
  position: relative;
}
.feature-card::after {
  content: '';
  position: absolute;
  right: var(--space-l);
  top: var(--space-l);
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform var(--transition-normal);
}
.feature-card.expanded::after {
  transform: rotate(180deg);
}

.feature-expand-panel {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
  opacity: 0;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
}
.feature-expand-panel.active {
  max-height: 600px;
  opacity: 1;
  padding: var(--space-l);
}

.feature-expand-content {
  display: flex;
  gap: var(--space-l);
  align-items: flex-start;
}

.feature-expand-screenshots {
  display: flex;
  gap: var(--space-m);
  flex: 1;
  overflow-x: auto;
  padding-bottom: var(--space-s);
}
.feature-expand-screenshots img {
  height: 320px;
  width: auto;
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.feature-expand-text {
  flex: 0 0 280px;
}
.feature-expand-text h4 {
  margin-bottom: var(--space-s);
}
.feature-expand-text p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== CONTACT FORM ===== */
.contact-section {
  background: var(--color-surface);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.contact-info h3 {
  margin-bottom: var(--space-m);
}
.contact-info p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-l);
}
.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  font-weight: 500;
  font-size: 1rem;
}

.contact-form {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  padding: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-m);
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}
.form-group select,
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--color-text-primary);
  background: var(--color-bg);
  transition: border-color var(--transition-fast);
}
.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-success,
.form-error {
  display: none;
  padding: var(--space-m);
  border-radius: var(--radius-s);
  font-size: 0.9rem;
  margin-top: var(--space-m);
}
.form-success {
  background: var(--color-success-bg);
  color: #2E7D32;
}
.form-error {
  background: var(--color-error-bg);
  color: #C62828;
}
[data-theme="dark"] .form-success { color: #66BB6A; }
[data-theme="dark"] .form-error { color: #EF5350; }

.form-success.show,
.form-error.show { display: block; }

.contact-report-link {
  margin-top: var(--space-m);
  font-size: 0.9rem;
}

/* ===== SUPPORT ACCORDION ===== */
.support-accordion {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  margin-bottom: var(--space-m);
  overflow: hidden;
}
.support-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-l) var(--space-xl);
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.support-accordion-header:hover {
  background: var(--color-primary-bg);
}
.support-accordion-label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.support-accordion-label svg {
  color: var(--color-primary);
  flex-shrink: 0;
}
.support-accordion-chevron {
  transition: transform 0.3s ease;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}
.support-accordion.open .support-accordion-chevron {
  transform: rotate(180deg);
}
.support-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 var(--space-xl);
}
.support-accordion.open .support-accordion-body {
  max-height: 2000px;
  padding: 0 var(--space-xl) var(--space-xl);
}
.support-accordion-desc {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-m);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== REPORT AN ISSUE FORM ===== */
.report-form-wrapper {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  padding: var(--space-xl) var(--space-xl) var(--space-l);
  max-width: 520px;
  margin: 0 auto;
}

.report-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-s);
}

.report-subtitle {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-l);
}

.required-star {
  color: var(--color-error);
  font-weight: 600;
}

.form-char-count {
  text-align: right;
  font-size: 0.8rem;
  color: var(--color-text-hint);
  margin-top: var(--space-xs);
}

.report-screenshot-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-s);
  padding: var(--space-m) var(--space-l);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-m);
  background: var(--color-bg);
  cursor: pointer;
  color: var(--color-primary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.report-screenshot-btn:hover {
  background: var(--color-primary-bg);
  border-color: var(--color-primary);
}

.screenshot-preview {
  position: relative;
  display: inline-block;
  margin-top: var(--space-s);
}
.screenshot-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-s);
  border: 1px solid var(--color-border);
}
.screenshot-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-error);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-icon-wrapper {
  position: relative;
}
.input-icon-wrapper .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-hint);
  pointer-events: none;
}
.input-icon-wrapper input {
  padding-left: 38px;
}

.report-app-source {
  display: flex;
  gap: 12px;
}
.app-source-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.app-source-btn:hover {
  border-color: var(--color-text-secondary);
}
.app-source-btn.selected {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(78, 205, 196, 0.08);
}
.app-source-btn svg {
  flex-shrink: 0;
}
.report-mode-select {
  display: flex;
  gap: 12px;
}
.mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mode-btn:hover {
  border-color: var(--color-text-secondary);
}
.mode-btn.selected {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(78, 205, 196, 0.08);
}

.report-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-m) var(--space-m);
  background: var(--color-bg);
  border-radius: var(--radius-m);
  margin-bottom: var(--space-m);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-primary);
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--color-border);
  border-radius: 26px;
  transition: background var(--transition-fast);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--color-primary);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}
.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Device info collapsible */
.report-device-info {
  background: var(--color-bg);
  border-radius: var(--radius-m);
  margin-bottom: var(--space-l);
  overflow: hidden;
}

.device-info-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-m);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-align: left;
}
.device-info-toggle span { flex: 1; }
.device-info-chevron {
  transition: transform var(--transition-normal);
}
.report-device-info.open .device-info-chevron {
  transform: rotate(180deg);
}

.device-info-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal), padding var(--transition-normal);
  padding: 0 var(--space-m);
}
.report-device-info.open .device-info-details {
  max-height: 200px;
  padding: 0 var(--space-m) var(--space-m);
}

.device-info-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-xs) 0;
  font-size: 0.85rem;
  border-top: 1px solid var(--color-border);
}
.device-info-row:first-child {
  border-top: none;
  padding-top: var(--space-s);
}
.device-info-row span:first-child {
  color: var(--color-text-secondary);
}
.device-info-row span:last-child {
  font-weight: 500;
  color: var(--color-text-primary);
}

.report-submit-btn {
  margin-top: var(--space-s);
}

.report-footer-text {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-hint);
  margin-top: var(--space-m);
  line-height: 1.4;
}

/* ===== TABLET DEVICES ===== */
.platform-tablet {
  text-align: center;
}
.tablet-frame {
  position: relative;
  width: 180px;
  background: #000;
  border-radius: 20px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.tablet-frame img {
  border-radius: 12px;
  width: 100%;
  height: auto;
  display: block;
}

/* ===== SCROLL ANIMATIONS ===== */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.features-grid .animate-in:nth-child(2) { transition-delay: 0.1s; }
.features-grid .animate-in:nth-child(3) { transition-delay: 0.2s; }
.features-grid .animate-in:nth-child(4) { transition-delay: 0.3s; }
.features-grid .animate-in:nth-child(5) { transition-delay: 0.4s; }
.features-grid .animate-in:nth-child(6) { transition-delay: 0.5s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-scroll-indicator { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== RESPONSIVE — TABLET ===== */
@media (max-width: 1023px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.875rem; }

  .hero-content { flex-direction: column; text-align: center; }
  .hero-text { max-width: 600px; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero-title { font-size: 2.75rem; }

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

  .showcase {
    flex-direction: column !important;
    text-align: center;
  }
  .showcase-text { order: 1; }
  .showcase-mockup { order: 2; }
  .feature-list { align-items: flex-start; max-width: 450px; margin: 0 auto; }

  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-featured { transform: scale(1); }
  .pricing-featured:hover { transform: translateY(-4px); }

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

  .platform-showcase { flex-wrap: wrap; }
  .laptop-frame { width: 400px; }

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

  .feature-expand-content { flex-direction: column; }
  .feature-expand-text { flex: 1; }
}

/* ===== RESPONSIVE — MOBILE ===== */
@media (max-width: 767px) {
  :root { --space-4xl: 64px; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .section { padding: var(--space-3xl) 0; }

  /* Navbar mobile */
  .nav-links {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    height: calc(100vh - var(--navbar-height));
    height: calc(100dvh - var(--navbar-height));
    background: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.active { display: flex; }
  .nav-links a { font-size: 1.25rem; color: var(--color-text-primary); opacity: 1; }
  .nav-links > li > a { font-size: 1.25rem; color: var(--color-text-primary); opacity: 1; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  /* Mobile dropdown — tap to open/close */
  .nav-dropdown { position: static; }
  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu {
    position: static;
    transform: none;
    min-width: 0;
    padding-top: 4px;
    text-align: center;
  }
  .nav-dropdown-menu-inner {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .nav-dropdown-menu-inner a {
    font-size: 1rem;
    padding: 6px 16px;
    color: var(--color-text-secondary);
  }
  .nav-dropdown-menu-inner a:hover {
    background: transparent;
    color: var(--color-primary);
  }

  /* Hero */
  .hero-title { font-size: 2.25rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 280px; justify-content: center; }
  .hero-scroll-indicator { display: none; }
  .phone-frame { width: 240px; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

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

  /* Pricing */
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }

  /* Tutorial — match app mobile (~260px grid, ~46px cells) */
  .tut-viewer { max-width: 420px; }
  .tut-slides { min-height: 400px; }
  .tut-grid { grid-template-columns: repeat(5, 46px); grid-template-rows: repeat(5, 46px); gap: 3px; }
  .tut-grid-6 { grid-template-columns: repeat(6, 38px); grid-template-rows: repeat(6, 38px); }
  .tut-cell { font-size: 1.1rem; }
  .tut-btn-row { max-width: 242px; } /* 5*46 + 4*3 = 242 */
  .tut-action-btn { width: 44px; height: 44px; }
  .tut-action-btn svg { width: 20px; height: 20px; }
  .tut-new-btn { width: auto; height: auto; font-size: 0.85rem; }
  .tut-new-btn svg { width: 16px; height: 16px; }

  /* Platform */
  .platform-showcase { flex-direction: column; align-items: center; }
  .platform-device.platform-laptop { order: -1; }
  .laptop-frame { width: 100%; max-width: 350px; }
  .phone-sm { width: 180px; }
  .tablet-frame { width: 140px; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }

  /* Feature expand */
  .feature-expand-screenshots img { height: 240px; }
  .feature-expand-content { flex-direction: column; }
  .feature-expand-text { flex: 1; }

  /* Footer */
  .footer-content { grid-template-columns: 1fr; }
  .footer-brand { text-align: center; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  .footer-logo { margin: 0 auto; }
  .footer-col { align-items: center; }

  /* CTA */
  .cta-content h2 { font-size: 1.75rem; }
  .cta-buttons { flex-direction: column; align-items: center; }
}

/* ===== SMALL PHONES ===== */
@media (max-width: 380px) {
  .hero-title { font-size: 1.85rem; }
  .phone-frame { width: 200px; }
  .tut-viewer { padding: var(--space-m); }
  .tut-slides { min-height: 360px; }
  .tut-grid { grid-template-columns: repeat(5, 40px); grid-template-rows: repeat(5, 40px); }
  .tut-grid-6 { grid-template-columns: repeat(6, 32px); grid-template-rows: repeat(6, 32px); }
  .tut-cell { font-size: 1rem; }
  .tut-btn-row { max-width: 212px; } /* 5*40 + 4*3 = 212 */
  .tut-action-btn { width: 40px; height: 40px; }
  .tut-action-btn svg { width: 18px; height: 18px; }
  .tut-new-btn { width: auto; height: auto; font-size: 0.8rem; }
  .tut-new-btn svg { width: 14px; height: 14px; }
}
