/* ===== Design System ===== */
:root {
  --primary-red: #FF3B3B;
  --primary-red-dark: #E60023;
  --primary-red-light: #FF6B6B;
  --primary-gradient: linear-gradient(135deg, #FF3B3B, #E60023);

  --bg-main: #F7F7F7;
  --bg-card: #FFFFFF;
  --bg-soft: #FAFAFA;

  --text-primary: #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-light: #A0A0A0;

  --success: #22C55E;
  --success-bg: #E8F8EF;

  --error: #FF3B3B;
  --error-bg: #FFEAEA;

  --accent-blue: #3B82F6;
  --accent-yellow: #F59E0B;

  --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  --card-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
  --border-light: #EEEEEE;

  --radius: 16px;
  --radius-lg: 24px;
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 680px;
}

.section {
  padding: 3rem 0;
}

.section-muted {
  background-color: var(--bg-soft);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-light); font-size: 0.875rem; }
.mt-6 { margin-top: 1.5rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  padding: 0.75rem 1.75rem;
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  border-radius: 12px;
}

.btn-lg {
  padding: 0.9375rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
}

.btn-primary:hover { opacity: 0.9; }

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

.btn-white:hover { background: #f0f0f0; }

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline-white:hover { background: rgba(255,255,255,0.1); }

.btn-block {
  width: 100%;
  border-radius: var(--radius);
}

/* ===== Card ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.card-lg {
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow-lg);
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: 64px;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.logo-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.logo-mark {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* ===== Hero ===== */
.hero {
  padding-top: 96px;
  padding-bottom: 3rem;
}

.hero-card {
  background: var(--primary-gradient);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.hero-circle-1 {
  width: 260px;
  height: 260px;
  top: -80px;
  right: -80px;
}

.hero-circle-2 {
  width: 160px;
  height: 160px;
  bottom: -40px;
  left: -40px;
  background: rgba(255,255,255,0.05);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 2rem;
}

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

/* ===== Stats ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: -2rem;
  position: relative;
  z-index: 3;
  padding: 0 1rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.25rem;
  text-align: center;
}

.stat-icon {
  color: var(--primary-red);
  margin: 0 auto 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.feature-card:hover {
  transform: scale(1.03);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.feature-icon-red { background: rgba(255,59,59,0.1); color: var(--primary-red); }
.feature-icon-blue { background: rgba(59,130,246,0.1); color: var(--accent-blue); }
.feature-icon-yellow { background: rgba(245,158,11,0.1); color: var(--accent-yellow); }
.feature-icon-green { background: rgba(34,197,94,0.1); color: var(--success); }

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

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

/* ===== Demo ===== */
.demo-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow-lg);
  overflow: hidden;
}

.demo-header {
  background: var(--primary-gradient);
  padding: 1.5rem;
  color: #fff;
}

.demo-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.demo-header-top span {
  font-size: 0.8125rem;
  font-weight: 600;
  opacity: 0.8;
}

.demo-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
}

.demo-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
}

.demo-progress {
  height: 4px;
  background: var(--border-light);
}

.demo-progress-bar {
  height: 100%;
  background: var(--primary-gradient);
  transition: width 0.5s ease;
}

.demo-options {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-btn {
  width: 100%;
  text-align: left;
  padding: 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--border-light);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.option-btn:hover:not(.option-disabled) {
  border-color: rgba(255,59,59,0.3);
  background: rgba(255,59,59,0.03);
}

.option-letter {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.option-text { flex: 1; }

.option-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.option-correct {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
}

.option-wrong {
  border-color: var(--error);
  background: var(--error-bg);
  color: var(--error);
}

.option-disabled {
  opacity: 0.5;
  cursor: default;
}

/* ===== Traffic Signs ===== */
.signs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.sign-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.2s ease;
}

.sign-card:hover { transform: scale(1.03); }

.sign-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.sign-card h3 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.sign-card p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.sign-save {
  font-size: 0.75rem;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  opacity: 0.5;
  cursor: not-allowed;
  background: none;
  border: none;
  font-family: inherit;
}

/* ===== Question Guide ===== */
.guide-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guide-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.guide-label {
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.375rem 0.75rem;
  border-radius: 10px;
  flex-shrink: 0;
}

.guide-body h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.guide-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Screenshots ===== */
.screenshots-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.screenshots-scroll::-webkit-scrollbar { display: none; }

.screenshot-placeholder {
  flex-shrink: 0;
  width: 220px;
  scroll-snap-align: center;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.screenshot-image {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  object-position: center;
  background: var(--bg-main);
}

.screenshot-inner {
  aspect-ratio: 9 / 16;
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-light);
}

.screenshot-icon { opacity: 0.4; }

.screenshot-inner span {
  font-size: 0.8125rem;
  opacity: 0.6;
}

/* ===== Testimonials ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.testimonial-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
}

.stars {
  color: var(--accent-yellow);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  letter-spacing: 2px;
}

.testimonial-card > p {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.testimonial-author strong {
  display: block;
  font-size: 0.875rem;
}

.testimonial-author span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  gap: 1rem;
}

.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-light);
  transition: transform 0.3s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding: 0 1.25rem 1.25rem;
}

.faq-answer p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== CTA ===== */
.cta-card {
  background: var(--primary-gradient);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-card h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-card p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

/* ===== Footer ===== */
.footer {
  padding: 2rem 0 1.25rem;
  background: #f8faff;
  border-top: 1px solid var(--border-light);
}

.footer-inner {
  display: block;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-brand-col {
  max-width: 420px;
}

.footer-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.footer-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-disclaimer {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary);
  text-align: center;
  max-width: 560px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links-col {
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.footer-divider {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border-light);
}

.footer-copy {
  margin: 0.8rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ===== Sticky Download (mobile only) ===== */
.sticky-download {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 0.75rem;
  background: linear-gradient(to top, #fff, rgba(255,255,255,0.95));
  backdrop-filter: blur(10px);
  display: block;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow-lg);
  padding: 2.5rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: modalIn 0.4s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.modal-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.modal-card > p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.modal-dismiss {
  display: block;
  margin: 1rem auto 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.2s;
}

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

/* ===== Legal Pages ===== */
.legal-page {
  background: #f6f7fb;
  padding-bottom: 0;
}

.legal-main {
  padding-top: 88px;
  padding-bottom: 24px;
}

.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--accent-red);
  font-weight: 700;
  margin-bottom: 14px;
}

.legal-back svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.legal-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.legal-card h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.legal-card p {
  margin: 0 0 10px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.legal-card h2 {
  margin: 18px 0 8px;
  font-size: 1.05rem;
}

.legal-line {
  margin: 10px 0;
  color: var(--text-primary) !important;
  font-weight: 600;
}

/* ===== Animations ===== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Utility: hide on mobile ===== */
.hide-mobile {
  display: inline;
}

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .section { padding: 5rem 0; }

  .section-header h2 { font-size: 2rem; }

  .hero-card { padding: 3.5rem; }
  .hero h1 { font-size: 3rem; }

  .stats-row {
    gap: 1.5rem;
    padding: 0 3rem;
  }

  .stat-card { padding: 1.5rem; }
  .stat-value { font-size: 1.75rem; }

  .features-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .feature-card { padding: 2rem; }

  .demo-header { padding: 1.75rem; }
  .demo-header h3 { font-size: 1.25rem; }

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

  .screenshot-placeholder { width: 256px; }

  .testimonials-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

  .cta-card { padding: 4rem 3rem; }
  .cta-card h2 { font-size: 2.5rem; }
  .cta-buttons { flex-direction: row; justify-content: center; }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    align-items: start;
  }

  .footer-disclaimer {
    text-align: left;
    max-width: 440px;
  }

  .sticky-download { display: none; }
}

@media (max-width: 767px) {
  .hide-mobile { display: none; }

  body { padding-bottom: 72px; }
}
