/* AutoGlass AI website. Brand colours match the app (lib/theme/app_colors.dart). */
:root {
  --brand: #A52DE0;
  --brand-deep: #5B1486;
  --brand-ink: #6E1B9A;
  --brand-wash: #F4EAFC;
  --ink: #17121C;
  --muted: #5E5666;
  --line: #ECE4F2;
  --ground: #FFFFFF;
  --soft: #FAF6FD;
  --ok: #1F7A4D;
  --ok-wash: #E3F4EA;
  --warn: #8A5A00;
  --warn-wash: #FFF3D6;
  --error: #B3261E;
  --error-wash: #FCE9E7;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(23, 18, 28, .06), 0 8px 24px rgba(23, 18, 28, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 17px/1.6 var(--body); }
img { max-width: 100%; height: auto; }
a { color: var(--brand-ink); }
a:hover { color: var(--brand-deep); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -.015em; text-wrap: balance; margin: 0 0 .4em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.small { font-size: .9rem; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.eyebrow, .kicker { font-size: .78rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: .6em; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; background: var(--brand); color: #fff; font: 600 1rem var(--body); text-decoration: none; border: 0; cursor: pointer; transition: background .15s, transform .15s; }
.btn:hover { background: var(--brand-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 8px 16px; font-size: .92rem; }
.btn-large { padding: 15px 28px; font-size: 1.08rem; }
.btn-ghost { background: var(--brand-wash); color: var(--brand-ink); }
.btn-ghost:hover { background: #EAD6FA; color: var(--brand-deep); }
.btn-light { background: #fff; color: var(--brand-deep); }
.btn-light:hover { background: var(--brand-wash); color: var(--brand-deep); }
.btn-outline-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }
button:disabled { opacity: .6; cursor: default; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.2rem var(--display); color: var(--ink); text-decoration: none; }
.brand img { border-radius: 8px; }
.brand-light { color: #fff; }
.main-nav { display: flex; gap: 22px; flex: 1; }
.main-nav a, .link-quiet { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--brand-ink); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.mobile-nav { display: none; margin-left: auto; }
.mobile-nav summary { list-style: none; cursor: pointer; width: 40px; height: 40px; display: grid; place-content: center; gap: 5px; border-radius: 10px; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
.mobile-nav nav { position: absolute; left: 0; right: 0; top: 68px; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px 20px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.mobile-nav nav a { padding: 10px 4px; color: var(--ink); text-decoration: none; font-weight: 500; }
.mobile-nav nav .btn { margin-top: 8px; color: #fff; }
@media (max-width: 900px) {
  .main-nav, .header-actions { display: none; }
  .mobile-nav { display: block; }
}

/* Hero */
.hero { background: linear-gradient(135deg, #A52DE0 0%, #6E1B9A 55%, #3E0E61 100%); color: #fff; padding-block: 64px 72px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -80px; top: -60px; width: 460px; height: 460px; background: conic-gradient(from 200deg, rgba(255,255,255,.12), transparent 30%, rgba(255,255,255,.08) 60%, transparent 80%); clip-path: polygon(20% 0, 100% 20%, 70% 100%, 0 70%); pointer-events: none; }
.hero .eyebrow { color: rgba(255, 255, 255, .85); }
.hero h1 { color: #fff; }
.hero .lede { color: rgba(255, 255, 255, .88); }
.hero a { color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { display: none; } }
.hero-note { font-size: .92rem; color: rgba(255, 255, 255, .8); margin-top: 14px; }
.hero-installer { padding-block: 72px; }
.cta-pair { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }

/* The quote form — the DoorDash "enter your address" moment */
.quote-form { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 10px; align-items: end; background: #fff; padding: 12px; border-radius: 20px; box-shadow: 0 12px 40px rgba(30, 5, 50, .25); max-width: 640px; }
.quote-form .field span { color: var(--muted); }
.page-head .quote-form { box-shadow: var(--shadow); border: 1px solid var(--line); margin-top: 18px; }
@media (max-width: 640px) { .quote-form { grid-template-columns: 1fr; } .quote-form .btn { width: 100%; } }
.field { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; }
.field input, .field select, .field textarea, .search input { font: 400 1rem var(--body); color: var(--ink); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-wash); }

/* Illustrative bids in the hero */
.bid-stack { display: grid; gap: 12px; }
.bid { background: #fff; color: var(--ink); border-radius: 16px; padding: 14px 18px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; box-shadow: 0 10px 30px rgba(20, 0, 40, .25); position: relative; }
.bid-name { font-weight: 600; }
.bid-meta { grid-column: 1; font-size: .85rem; color: var(--muted); }
.bid-price { grid-row: 1 / span 2; grid-column: 2; align-self: center; font: 800 1.5rem var(--display); }
.bid-best { transform: translateX(-18px); outline: 3px solid #fff; }
.bid-tag { position: absolute; top: -10px; left: 16px; background: var(--ok); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.art-caption { font-size: .8rem; color: rgba(255, 255, 255, .7); margin-top: 12px; text-align: right; }

/* Sections */
.section { padding-block: 64px; }
.section.soft { background: var(--soft); }
.section-title { margin-bottom: .3em; }
.section-lede { color: var(--muted); max-width: 60ch; margin-bottom: 28px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head { padding-block: 56px 16px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 24px; } }

/* Three audience tiles (DoorDash's Dasher / Merchant / App row) */
.tiles-section { padding-block: 40px 24px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr; } }
.tile { display: grid; gap: 6px; align-content: start; padding: 26px; border-radius: var(--radius); background: var(--soft); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.tile h2 { font-size: 1.35rem; margin: 6px 0 0; }
.tile p { color: var(--muted); margin: 0; }
.tile-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.tile-icon svg { width: 26px; height: 26px; }
.tile-link { color: var(--brand-ink); font-weight: 600; margin-top: 8px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-wash); color: var(--brand-ink); font: 800 1.1rem var(--display); margin-bottom: 12px; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.steps-vertical { grid-template-columns: 1fr; margin-bottom: 32px; }

/* Services */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.service { padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.service:hover { border-color: var(--brand); color: var(--ink); }
.service h3 { margin-bottom: 4px; }
.service p { color: var(--muted); margin: 0; font-size: .95rem; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { padding-left: 34px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%231F7A4D' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }

.city-list, .inline-links, .topic-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.city-list a, .topic-list a { display: inline-block; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }
.city-list a:hover, .topic-list a:hover, .topic-list a[aria-current="page"] { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-wash); }
.inline-links li:not(:last-child)::after { content: "·"; margin-left: 10px; color: var(--muted); }

/* FAQ */
.faq details, .post-faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary, .post-faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker, .post-faq summary::-webkit-details-marker { display: none; }
.faq summary::after, .post-faq summary::after { content: "+"; font: 600 1.4rem/1 var(--display); color: var(--brand-ink); }
.faq details[open] summary::after, .post-faq details[open] summary::after { content: "–"; }
.faq details p, .post-faq details p { margin: 10px 0 0; color: var(--muted); }

/* Blog */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }
.post-card a { display: grid; gap: 6px; color: var(--ink); text-decoration: none; }
.post-card img { border-radius: 14px; aspect-ratio: 1200 / 630; object-fit: cover; width: 100%; background: var(--brand-wash); }
.post-card .kicker { margin: 6px 0 0; }
.post-card h3 { font-size: 1.12rem; margin: 0; }
.post-card a:hover h3 { color: var(--brand-ink); }
.post-card time { font-size: .85rem; color: var(--muted); }
.search { display: flex; gap: 8px; max-width: 520px; margin: 14px 0 16px; }
.center .search { margin-inline: auto; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 36px; font-weight: 500; }
.empty { color: var(--muted); }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

.post-head { padding-block: 44px 20px; }
.post-meta { color: var(--muted); font-size: .95rem; }
.post-cover { border-radius: 18px; width: 100%; margin-bottom: 28px; }
.toc { background: var(--soft); border-radius: 14px; padding: 16px 20px; margin-bottom: 28px; }
.toc p { font-weight: 600; margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.prose { font-size: 1.08rem; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose img { border-radius: 14px; display: block; margin: 1.2em 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.2em 0; padding: 4px 20px; border-left: 4px solid var(--brand); color: var(--muted); }
.table-scroll { overflow-x: auto; margin: 1.2em 0; }
.prose table { border-collapse: collapse; min-width: 480px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.post-cta { margin: 40px 0 24px; padding: 26px; border-radius: var(--radius); background: var(--brand-wash); }
.post-cta h2 { font-size: 1.4rem; }
.author-box { display: flex; gap: 14px; align-items: center; padding: 18px 0 40px; border-top: 1px solid var(--line); }
.author-box img { border-radius: 50%; }
.author-name { font-weight: 600; margin: 0; }
.post-faq { margin-top: 32px; }

.notice { padding: 12px 16px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); font-size: .95rem; }
.notice-ok { background: var(--ok-wash); border-color: transparent; color: var(--ok); }
.notice-warn { background: var(--warn-wash); border-color: transparent; color: var(--warn); }
.notice-error { background: var(--error-wash); border-color: transparent; color: var(--error); }

/* Team */
.team-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 28px; }
.team-grid img, .avatar-blank { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 20px; background: var(--brand-wash); margin-bottom: 12px; }
.team-grid h2 { font-size: 1.2rem; margin: 0 0 2px; }
.team-grid p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Installer earnings */
.earnings { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.earnings th, .earnings td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.earnings td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.earnings .total th, .earnings .total td { font-weight: 800; font-family: var(--display); font-size: 1.15rem; border-bottom: 0; color: var(--brand-ink); }

/* Contact */
.contact-form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }

/* CTA band + footer */
.cta-band { background: var(--brand-deep); color: #fff; padding-block: 44px; }
.cta-band h2 { color: #fff; margin: 0 0 4px; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .85); }
.cta-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer { background: #17121C; color: #D9D2DF; padding-block: 56px 28px; font-size: .95rem; }
.site-footer a { color: #D9D2DF; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer-col h2 { font: 600 .8rem var(--body); letter-spacing: .09em; text-transform: uppercase; color: #fff; margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-brand p { color: #B9B0C1; margin: 12px 0; }
.footer-contact a { text-decoration: underline; }
.footer-base { border-top: 1px solid #2E2634; margin-top: 40px; padding-top: 20px; color: #9C93A5; font-size: .85rem; }
.store-badge { display: inline-block; margin-top: 6px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
