/* CarHeat legal/marketing site
   Theme tokens match lib/app/theme/colors.dart */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg:          #0B0608;
  --surface-1:    #171012;
  --surface-2:    #1F1517;
  --border:       rgba(255, 180, 140, 0.08);
  --border-strong: rgba(255, 150, 110, 0.18);
  --text:         #FEF2EA;
  --text-2:       #D4BFB5;
  --text-3:       #8B7870;
  --text-4:       #5A4A44;
  --heat-1:       #FFCC66;
  --heat-2:       #FF8833;
  --heat-3:       #FF5522;
  --heat-4:       #E63119;
  --heat-5:       #AA1B10;
  --danger:        #FF4D3A;
  --ok:           #65D38B;
  --max-w:         680px;
  --pad:           20px;
  --r:             12px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 35% at 50% -5%,
      rgba(255, 85, 34, 0.22) 0%,
      transparent 65%),
    radial-gradient(ellipse 40% 25% at 88% 85%,
      rgba(255, 136, 51, 0.06) 0%,
      transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Embed mode ──────────────────────────────────────── */
body.embed nav,
body.embed .hero-cta { display: none; }
body.embed .page { padding-top: 8px; }
body.embed footer { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 20px; }

/* ── Nav ──────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px var(--pad);
  background: rgba(11, 6, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.2px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
}

nav .links {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav .links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 150ms ease;
}

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

/* ── Page ─────────────────────────────────────────────── */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px var(--pad) 72px;
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px var(--pad) 48px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--heat-2);
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.08;
  margin: 0 0 16px;
}

.lead {
  font-size: clamp(15px, 2.5vw, 17px);
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto 24px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.app-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.app-badges .accent { color: var(--heat-2); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 150ms ease, filter 150ms ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--heat-2), var(--heat-4));
  color: #1A0804;
  box-shadow: 0 10px 28px -8px rgba(230, 49, 25, 0.5);
}

.btn-primary:hover {
  filter: brightness(1.08);
  color: #1A0804;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--heat-2);
  color: var(--heat-2);
}

.btn-disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* ── Estimate card ───────────────────────────────────── */
.estimate-card {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 22px;
  flex-wrap: wrap;
  justify-content: center;
}

.estimate-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--heat-2), var(--heat-4));
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px -6px rgba(230, 49, 25, 0.5);
  flex-shrink: 0;
}

.estimate-temp {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}

.estimate-unit {
  font-size: 16px;
  font-weight: 700;
}

.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.badge-danger {
  background: rgba(255, 77, 58, 0.16);
  color: var(--danger);
}

.estimate-divider {
  width: 1px;
  height: 44px;
  background: var(--border);
  flex-shrink: 0;
}

.estimate-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.estimate-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.estimate-meta-label {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  min-width: 44px;
}

.estimate-meta-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.estimate-meta-value.accent { color: var(--heat-2); }

/* ── Features ─────────────────────────────────────────── */
.features {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad) 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.feature {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  transition: border-color 150ms ease, transform 280ms ease;
}

.feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: rgba(255, 136, 51, 0.12);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.feature-icon svg {
  display: block;
}

.feature h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 5px;
}

.feature p {
  font-size: 12.5px;
  color: var(--text-3);
  margin: 0;
  line-height: 1.5;
}

/* ── Callout ─────────────────────────────────────────── */
.callout {
  background: linear-gradient(135deg,
    rgba(255, 77, 58, 0.14),
    rgba(170, 27, 16, 0.05));
  border: 1px solid rgba(255, 77, 58, 0.40);
  border-radius: var(--r);
  padding: 16px 18px;
  margin: 20px 0;
}

/* Only the direct-child <strong> acts as the callout title.
   Inline <strong> inside the body paragraph stays inline. */
.callout > strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.callout p {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ── Legal page typography ──────────────────────────────── */
h2 {
  font-size: clamp(17px, 3vw, 20px);
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.25;
  margin: 36px 0 10px;
  color: var(--text);
}

h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 20px 0 6px;
  color: var(--text-2);
}

p, li {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.65;
}

li + li { margin-top: 5px; }

ul, ol { padding-left: 20px; }

a {
  color: var(--heat-2);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: var(--heat-1);
  text-decoration: underline;
}

strong { color: var(--text); font-weight: 700; }
em { font-style: italic; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ── Card ─────────────────────────────────────────────── */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  margin: 16px 0;
}

.card p { margin: 0; }

/* ── TOC ──────────────────────────────────────────────── */
.toc {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 18px;
  margin: 18px 0 24px;
}

.toc strong {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}

.toc ol {
  margin: 0;
  padding-left: 18px;
}

.toc a {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.8;
}

.toc a:hover { color: var(--heat-2); }

/* ── FAQ ──────────────────────────────────────────────── */
.faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

details.faq-item {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 13px 16px;
  transition: border-color 150ms ease;
}

details.faq-item[open] {
  border-color: var(--border-strong);
}

details.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}

details.faq-item summary::-webkit-details-marker { display: none; }

details.faq-item summary::after {
  content: '+';
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 136, 51, 0.14);
  color: var(--heat-2);
  font-weight: 800;
  font-size: 15px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 150ms ease;
}

details.faq-item[open] summary::after {
  content: '\2212';
}

details.faq-item p {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
}

/* ── Support contact card ──────────────────────────────── */
.contact-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-row svg { flex-shrink: 0; }

.contact-label {
  font-size: 11.5px;
  color: var(--text-3);
  font-weight: 600;
}

.contact-value {
  font-size: 13px;
  color: var(--heat-2);
  font-weight: 600;
}

/* ── Footer ───────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px var(--pad) 48px;
  text-align: center;
}

footer .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 12px;
}

footer .links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

footer .links a {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}

footer .links a:hover { color: var(--heat-2); }

footer .legal {
  font-size: 11px;
  color: var(--text-4);
}

/* ── Meta ─────────────────────────────────────────────── */
.last-updated {
  display: inline-block;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 6px;
}

.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11px; }
.muted { color: var(--text-3); }
.accent { color: var(--heat-2); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 580px) {
  .features { grid-template-columns: 1fr; }
  nav .links { gap: 14px; }
  nav .links a { font-size: 12px; }
}

@media (max-width: 380px) {
  h1 { font-size: 28px; }
  .page { padding: 36px 16px 56px; }
  .hero { padding: 56px 16px 40px; }
  .estimate-card { flex-direction: column; align-items: flex-start; }
  .estimate-divider { display: none; }
}
