:root {
  --aigo-amber: #f5a623;
  --aigo-amber-dark: #d98c0f;
  --aigo-navy: #1c2530;
  --aigo-navy-light: #2a3644;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e3e6ea;
  --text: #1c2530;
  --text-muted: #6b7480;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  /* Some section on narrow screens ends up slightly wider than the
     viewport (pre-existing, not isolated to one element) — this stops it
     from pushing every line of text sideways instead of just clipping the
     harmless overflow itself. */
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--aigo-navy);
}

.nav-brand img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}

.nav-links a:hover {
  color: var(--aigo-amber-dark);
}

.nav-cta {
  background: var(--aigo-amber);
  color: var(--aigo-navy);
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--aigo-amber-dark);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--aigo-navy);
  margin: 5px 0;
  border-radius: 2px;
}

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--aigo-navy) 0%, var(--aigo-navy-light) 100%);
  color: #fff;
  padding: 4.5rem 0 5.5rem;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-copy {
  flex: 1.1;
}

.hero-badge {
  display: inline-block;
  background: rgba(245, 166, 35, 0.15);
  color: var(--aigo-amber);
  border: 1px solid rgba(245, 166, 35, 0.4);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  margin: 0 0 1.1rem;
}

.hero h1 span {
  color: var(--aigo-amber);
}

.hero p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.08rem;
  max-width: 480px;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary {
  background: var(--aigo-amber);
  color: var(--aigo-navy);
}

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

.hero-visual {
  flex: 0.9;
  display: flex;
  justify-content: center;
}

.hero-card {
  background: #fff;
  border-radius: 28px;
  padding: 2.5rem 2rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  max-width: 320px;
  text-align: center;
}

.hero-card img {
  margin: 0 auto;
}

/* Sections */
section {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3rem;
}

.eyebrow {
  color: var(--aigo-amber-dark);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.section-header h2 {
  font-size: 2rem;
  margin: 0 0 0.75rem;
  color: var(--aigo-navy);
}

.section-header p {
  color: var(--text-muted);
  margin: 0;
}

/* Download */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.8rem;
  text-align: center;
}

.download-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 16px;
}

.download-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--aigo-navy);
}

.download-card p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.play-badge {
  display: inline-block;
}

.play-badge img {
  height: 48px;
  width: auto;
  margin: 0 auto;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(245, 166, 35, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--aigo-navy);
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Vehicle types */
.vehicle-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.vehicle-item {
  text-align: center;
  padding: 1.25rem 0.5rem;
  border-radius: 14px;
}

.vehicle-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff8e8, #fdecc4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vehicle-icon svg {
  width: 42px;
  height: 32px;
}

.vehicle-item span {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--aigo-navy);
  text-transform: capitalize;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step {
  text-align: center;
}

.step-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--aigo-navy);
  color: var(--aigo-amber);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.step h3 {
  margin: 0 0 0.5rem;
  color: var(--aigo-navy);
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Driver CTA band */
.driver-band {
  background: var(--aigo-navy);
  color: #fff;
  border-radius: 24px;
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.driver-band h2 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}

.driver-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  max-width: 420px;
}

/* Guide / Troubleshooting hero with mascot illustrations */
.guide-hero,
.troubleshoot-hero {
  background: linear-gradient(160deg, var(--aigo-navy) 0%, var(--aigo-navy-light) 100%);
  color: #fff;
  padding: 3.5rem 0;
}

.guide-hero .container,
.troubleshoot-hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
}

.guide-hero-copy h1,
.troubleshoot-hero-copy h1 {
  margin: 0 0 0.6rem;
  font-size: 2.1rem;
}

.guide-hero-copy p,
.troubleshoot-hero-copy p {
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 1.5rem;
  max-width: 460px;
}

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

.hero-links .btn {
  /* Flex items don't shrink below their unwrapped content width by default —
     without this, a long label (e.g. "Troubleshooting guide") overflows the
     button and the viewport on narrow screens instead of wrapping. */
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.mascot-row {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.mascot-card {
  background: #fff;
  border-radius: 24px;
  padding: 0.85rem;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
}

.mascot {
  width: 120px;
  height: auto;
  display: block;
}

/* Tabs (User Guide) */
.tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  /* Buttons are flex items here (.tabs is display:flex) — without this a
     long label can refuse to shrink/wrap and sit partly off-screen on a
     narrow phone, which reads as "the button doesn't respond" when it's
     really just not fully reachable. */
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  position: relative;
  z-index: 1;
}

.tab-btn.active {
  background: var(--aigo-navy);
  color: #fff;
  border-color: var(--aigo-navy);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Guide steps — a taller vertical list than the homepage's 3-up .steps */
.guide-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.guide-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.guide-step .step-number {
  flex-shrink: 0;
}

.guide-step h3 {
  margin: 0 0 0.35rem;
  color: var(--aigo-navy);
  font-size: 1.05rem;
}

.guide-step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Troubleshooting issue groups reuse .faq-item/.faq-question/.faq-answer */
.issue-group {
  margin-bottom: 3rem;
}

.issue-group:last-child {
  margin-bottom: 0;
}

.issue-group h3 {
  color: var(--aigo-navy);
  font-size: 1.15rem;
  margin: 0 0 1.25rem;
  text-align: center;
}

.callout {
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  max-width: 760px;
  margin: 0 auto 2.5rem;
  text-align: center;
  font-size: 0.92rem;
}

.callout a {
  color: var(--aigo-amber-dark);
  font-weight: 700;
}

/* Help & Support */
.help-hero {
  background: var(--aigo-navy);
  color: #fff;
  padding: 3.5rem 0;
  text-align: center;
}

.help-hero h1 {
  margin: 0 0 0.6rem;
  font-size: 2.1rem;
}

.help-hero p {
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

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

.faq-question .chevron {
  color: var(--aigo-amber-dark);
  font-size: 1.1rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

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

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

.faq-item.open .faq-answer {
  max-height: 400px;
}

.faq-answer-inner {
  padding: 0 1.4rem 1.2rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.contact-grid {
  max-width: 760px;
  margin: 3rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.6rem;
  text-align: center;
}

.contact-card .feature-icon {
  margin: 0 auto 0.9rem;
}

.contact-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  color: var(--aigo-navy);
}

.contact-card p {
  margin: 0 0 0.6rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.contact-card a.btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
}

/* Legal pages (Privacy Policy, Terms & Conditions) */
.legal-hero {
  background: var(--aigo-navy);
  color: #fff;
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.legal-hero h1 {
  margin: 0 0 0.6rem;
  font-size: 2.1rem;
}

.legal-hero p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-size: 0.9rem;
}

.legal-section {
  padding: 0;
}

.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 0 4.5rem;
}

.legal-content h2 {
  color: var(--aigo-navy);
  font-size: 1.3rem;
  margin: 2.5rem 0 1rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  color: var(--aigo-navy);
  font-size: 1.05rem;
  margin: 1.5rem 0 0.6rem;
}

.legal-content p {
  color: var(--text);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.legal-content ul,
.legal-content ol {
  color: var(--text);
  font-size: 0.95rem;
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.legal-content li p {
  margin: 0;
}

.legal-content a {
  color: var(--aigo-amber-dark);
  font-weight: 600;
}

.legal-content strong {
  color: var(--aigo-navy);
}

.legal-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 2.5rem;
}

.legal-toc h2 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.legal-toc ol {
  columns: 2;
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
}

.legal-toc a {
  text-decoration: none;
}

.legal-note {
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

@media (max-width: 700px) {
  .legal-toc ol {
    columns: 1;
  }
}

/* Chat widget — floating toggle + lazy-loaded iframe panel, site-wide */
.chat-toggle {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--aigo-amber);
  color: var(--aigo-navy);
  border: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  transition: transform 0.15s ease, background 0.15s ease;
}

.chat-toggle:hover {
  background: var(--aigo-amber-dark);
  transform: scale(1.06);
}

.chat-toggle svg {
  width: 26px;
  height: 26px;
}

.chat-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 5.5rem;
  width: calc(100vw - 2.5rem);
  max-width: 420px;
  z-index: 200;
}

.chat-panel[hidden] {
  display: none;
}

.chat-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--aigo-navy);
  color: #fff;
  border: 2px solid #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  z-index: 1;
}

#chat-frame-container {
  height: min(600px, 85vh);
}

/* Footer */
.site-footer {
  background: var(--aigo-navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: 800;
  font-size: 1.35rem;
  text-decoration: none;
  margin-bottom: 0.6rem;
}

.footer-brand .amber {
  color: var(--aigo-amber);
}

.footer-tagline {
  font-size: 0.85rem;
  max-width: 280px;
}

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

.footer-col h4 {
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.8rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.85rem;
}

.footer-col a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
}

.footer-col a:hover {
  color: var(--aigo-amber);
}

.footer-bottom {
  padding-top: 1.5rem;
  font-size: 0.8rem;
  text-align: center;
}

/* Mobile */
@media (max-width: 860px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

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

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

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

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

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

  .driver-band {
    text-align: center;
    justify-content: center;
  }

  .guide-hero .container,
  .troubleshoot-hero .container {
    flex-direction: column;
    text-align: center;
  }

  .guide-hero-copy p,
  .troubleshoot-hero-copy p {
    margin-left: auto;
    margin-right: auto;
  }

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

@media (max-width: 700px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

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

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

  .mascot-row {
    gap: 0.6rem;
  }

  .mascot {
    width: 92px;
  }

  .guide-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
