/* Car Remote Hub brand: dark "classic" palette from the Flutter app
   (lib/theme/app_theme.dart). Text and link colours are chosen to meet
   WCAG AA against the backgrounds they sit on. */
:root {
  --bg: #0a0c0e;
  --surface: #16191d;
  --surface-2: #1f2328;
  --accent: #79fcb0;
  --on-accent: #0a0c0e;
  --secondary: #103a30;
  --good: #00a651;
  --danger: #ff6b6b;
  --warning: #ffc24b;
  --ink: #e8ecef;
  --muted: #9aa3ab;
  --border: rgba(121, 252, 176, 0.18);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

html,
body {
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--ink);
}

main {
  flex: 1 0 auto;
}

a {
  color: var(--accent);
}
a:hover {
  color: #a6ffcb;
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5 {
  color: var(--ink);
}
h2,
h3 {
  font-weight: 700;
}

.brand-text {
  color: var(--accent) !important;
}
.muted {
  color: var(--muted);
}
.light {
  font-weight: 400;
  color: var(--muted);
}

blockquote {
  border-left: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
  font-size: inherit !important;
  line-height: inherit !important;
  font-style: normal !important;
  color: inherit !important;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 0 0 8px 8px;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
  color: var(--on-accent);
}

/* Nav */
nav.brand-primary,
footer.brand-primary {
  background-color: var(--surface);
  box-shadow: none;
}
nav.brand-primary {
  border-bottom: 1px solid var(--border);
}
nav.brand-primary a,
nav.brand-primary .brand-logo {
  color: var(--ink);
}
nav.brand-primary .brand-logo {
  font-weight: 700;
  font-size: 1.5rem;
}
nav.brand-primary ul a:hover {
  background-color: var(--surface-2);
  color: var(--accent);
}
nav.brand-primary li.active-page a {
  color: var(--accent);
}
nav.brand-primary .lang-switch a {
  color: var(--muted);
  font-weight: 600;
  padding: 0 10px;
}
nav.brand-primary .lang-switch a.active {
  color: var(--accent);
}
nav .sidenav-trigger {
  float: right;
  margin: 0 0 0 12px;
  height: 56px;
}
nav .sidenav-trigger i {
  color: var(--ink);
}

/* Mobile sidenav */
.sidenav {
  background-color: var(--surface);
}
.sidenav li > a {
  color: var(--ink);
}
.sidenav li > a:hover,
.sidenav li.active-page > a {
  background-color: var(--surface-2);
  color: var(--accent);
}
.sidenav .lang-switch a {
  color: var(--muted);
  display: inline-block;
}
.sidenav .lang-switch {
  display: inline-block;
}
.sidenav .lang-switch a.active {
  color: var(--accent);
}
.sidenav-overlay {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Hero */
.hero {
  padding: 48px 0 24px;
}
.hero-row {
  margin-bottom: 0;
}
.hero h1 {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 16px;
  font-size: 3rem;
}
.hero .tagline {
  color: var(--ink);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.5;
  margin: 0 0 16px;
}
.hero .lead {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 24px;
}
.hero .store-badge {
  display: inline-block;
}
.hero .store-badge img {
  max-width: 220px;
  height: auto;
  transition: transform 0.2s ease;
}
.hero .store-badge:hover img {
  transform: translateY(-2px);
}
.hero .hero-art {
  text-align: center;
}
.app-icon-tile {
  display: inline-block;
  padding: 18px;
  background: #ffffff;
  border-radius: 36px;
  box-shadow: var(--shadow), 0 0 0 1px var(--border);
  line-height: 0;
}
.app-icon-tile img {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 18px;
}

/* Sections */
.features,
.how {
  padding: 24px 0 32px;
}
h2.section-title {
  text-align: center;
  color: var(--ink);
  font-weight: 800;
  margin-bottom: 32px;
  font-size: 2rem;
}
/* Flex rows so cards in a row share one height (floats cannot) */
.features .row,
.how .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.features .row .col,
.how .row .col {
  float: none;
  margin-left: 0; /* Materialize's auto margin would push a lone card right */
}
.card-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  height: calc(100% - 20px);
  margin-bottom: 20px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card-feature .feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--secondary);
  color: var(--accent);
  margin-bottom: 16px;
}
.card-feature .feature-icon i {
  font-size: 34px;
}
.card-feature .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 16px;
}
.card-feature h3 {
  color: var(--ink);
  margin: 0 0 10px;
  font-size: 1.25rem;
}
.card-feature p {
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.legal-notice {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Documents (privacy, terms, FAQ) */
main h1.header {
  font-size: 3rem;
  margin: 24px 0 12px;
}
.doc-h,
.faq-q {
  color: var(--ink);
  font-size: 1.5rem;
  margin: 0 0 12px;
}
.faq-q {
  font-size: 1.35rem;
}
.doc-list {
  padding-left: 1.5rem;
  list-style: disc;
}
.doc-list li {
  list-style: disc;
  margin-bottom: 6px;
}
main .container p,
main .container li {
  line-height: 1.6;
}
.divider {
  background-color: var(--surface-2);
}
.support-hint {
  color: var(--warning);
}

/* Policy tables: real table on wide screens, stacked cards on mobile */
.policy-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
  color: var(--ink);
}
.policy-table th {
  text-align: left;
  color: var(--accent);
  background: var(--surface);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.policy-table td {
  padding: 12px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--surface-2);
  overflow-wrap: anywhere;
}
.policy-table td.strong-cell {
  font-weight: 700;
}
@media (max-width: 700px) {
  .policy-table,
  .policy-table tbody,
  .policy-table tr,
  .policy-table td {
    display: block;
    width: 100%;
  }
  .policy-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .policy-table tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 6px 0;
  }
  .policy-table td {
    border-bottom: none;
    padding: 8px 14px;
  }
  .policy-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
}

/* Forms and buttons */
.card-panel {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: none;
  color: var(--ink);
}
.input-field label {
  color: var(--muted);
}
.input-field input[type="text"],
.input-field textarea.materialize-textarea {
  color: var(--ink);
  border-bottom: 1px solid var(--muted);
}
.input-field input[type="text"]:focus,
.input-field textarea.materialize-textarea:focus {
  border-bottom: 1px solid var(--accent) !important;
  box-shadow: 0 1px 0 0 var(--accent) !important;
}
.input-field input[type="text"]:focus + label,
.input-field textarea.materialize-textarea:focus + label {
  color: var(--accent) !important;
}
.btn,
.btn:hover,
.btn:focus {
  background-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  border-radius: 24px;
  box-shadow: none;
}
.btn:hover {
  background-color: #a6ffcb;
}
.btn .material-icons {
  color: var(--on-accent);
}

/* Footer */
footer.brand-primary {
  color: var(--ink);
  border-top: 1px solid var(--border);
}
footer.brand-primary h5 {
  color: var(--ink);
}
footer.brand-primary p {
  color: var(--muted);
}
footer.brand-primary a {
  color: var(--accent);
}
footer.brand-primary .lang-switch {
  display: inline-block;
}
footer.brand-primary .footer-copyright {
  background-color: var(--bg);
  color: var(--muted);
}

/* Small screens */
@media (max-width: 600px) {
  .hero {
    padding: 24px 0 8px;
  }
  .hero h1 {
    font-size: 2.2rem;
    text-align: center;
  }
  main h1.header {
    font-size: 2.2rem;
  }
  .hero .hero-copy {
    text-align: center;
  }
  .hero .hero-art {
    margin-top: 24px;
  }
  .app-icon-tile img {
    max-width: 200px;
  }
  .hero-row {
    display: block;
  }
  /* Compact cards: icon beside the title, text below at full width */
  .card-feature {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 14px;
    align-items: center;
    height: auto;
    padding: 18px 16px;
    margin-bottom: 12px;
    text-align: left;
  }
  .card-feature .feature-icon,
  .card-feature .step-number {
    width: 44px;
    height: 44px;
    margin-bottom: 0;
  }
  .card-feature .feature-icon {
    border-radius: 12px;
  }
  .card-feature .feature-icon i {
    font-size: 26px;
  }
  .card-feature h3 {
    margin: 0;
    font-size: 1.15rem;
  }
  .card-feature p {
    grid-column: 1 / -1;
    margin-top: 10px;
  }
}
