/* Gladris — brand layer on top of Pico CSS v2.
   Change colors here; every page picks them up. */

/* ---------- Brand tokens ---------- */
:root {
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-soft: #eef2ff;
  --accent: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
  --radius-lg: 1rem;
  --pico-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pico-border-radius: 0.6rem;
}

:root:not([data-theme="dark"]),
[data-theme="light"] {
  --pico-primary: var(--brand);
  --pico-primary-background: var(--brand);
  --pico-primary-border: var(--brand);
  --pico-primary-underline: rgba(79, 70, 229, 0.5);
  --pico-primary-hover: var(--brand-hover);
  --pico-primary-hover-background: var(--brand-hover);
  --pico-primary-hover-border: var(--brand-hover);
  --pico-primary-focus: rgba(79, 70, 229, 0.25);
  --pico-primary-inverse: #fff;
  --surface: #ffffff;
  --surface-alt: #f7f8fc;
  --hero-glow: rgba(79, 70, 229, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --brand: #818cf8;
    --brand-hover: #a5b4fc;
    --brand-soft: rgba(129, 140, 248, 0.12);
    --pico-primary: var(--brand);
    --pico-primary-background: #6366f1;
    --pico-primary-border: #6366f1;
    --pico-primary-underline: rgba(129, 140, 248, 0.5);
    --pico-primary-hover: var(--brand-hover);
    --pico-primary-hover-background: #4f46e5;
    --pico-primary-hover-border: #4f46e5;
    --pico-primary-focus: rgba(129, 140, 248, 0.3);
    --pico-primary-inverse: #fff;
    --surface: #181c25;
    --surface-alt: #13171f;
    --hero-glow: rgba(129, 140, 248, 0.16);
  }
}

/* ---------- Layout ---------- */
body { background: var(--surface); }
section { padding-block: clamp(3rem, 8vw, 5.5rem); margin: 0; }
section.alt { background: var(--surface-alt); }
.container { max-width: 1120px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.75rem; }
.section-head h2 { margin-bottom: 0.6rem; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 0.6rem;
}
.muted { color: var(--pico-muted-color); }
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cards > article { margin: 0; }

/* ---------- Header ---------- */
/* ---------- In-page links (#section) ---------- */
/* Glide to sections instead of jumping, and stop below the sticky header
   so section titles aren't hidden behind it. */
html { scroll-behavior: smooth; scroll-padding-top: 6.5rem; }
@media (max-width: 560px) { html { scroll-padding-top: 6.25rem; } }
/* Respect visitors who turn off animations in their device settings. */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pico-muted-border-color);
}
.site-header nav { padding-block: 0; }
.site-header nav li { padding-block: 0.6rem; }
body > main { padding-block: 0; }
body > main.container { padding-block: 2.5rem; }
body > main.container > section { padding-block: 0; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards-3 { grid-template-columns: 1fr; } }
.logo { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; font-size: 1.15rem; color: var(--pico-color); text-decoration: none; }
.logo img { width: 30px; height: 30px; }
.nav-links a:not([role="button"]) { color: var(--pico-color); font-size: 0.95rem; }
@media (max-width: 760px) { .nav-links .hide-sm { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; padding-block: clamp(3rem, 9vw, 6.5rem);
  background: radial-gradient(60rem 30rem at 50% -10%, var(--hero-glow), transparent 70%);
}
.hero-inner { text-align: center; max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 1rem; }
.hero h1 .hl { color: var(--brand); }
.hero .lead { font-size: 1.15rem; color: var(--pico-muted-color); max-width: 600px; margin: 0 auto 2rem; }
.pill {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.8rem; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: 0.85rem; font-weight: 600; margin-bottom: 1.25rem;
}

/* Finder card */
.finder {
  text-align: left; margin: 0 auto; max-width: 680px; padding: 1.25rem;
  border-radius: var(--radius-lg); box-shadow: 0 20px 50px -20px rgba(15, 23, 42, 0.25);
}
.finder-row { display: flex; gap: 0.6rem; align-items: stretch; }
.finder-row > #finder-input { flex: 1; min-width: 0; }
.finder-row button { margin: 0; white-space: nowrap; padding-inline: 1.4rem; }
#finder-input input { margin: 0; }
@media (max-width: 560px) { .finder-row { flex-direction: column; } }

/* Google's Place Autocomplete web component */
gmp-place-autocomplete {
  width: 100%;
  color-scheme: light;
  background-color: var(--pico-form-element-background-color);
  border: 1px solid var(--pico-form-element-border-color);
  border-radius: var(--pico-border-radius);
}
@media (prefers-color-scheme: dark) { gmp-place-autocomplete { color-scheme: dark; } }

.finder-hint { font-size: 0.85rem; margin: 0.75rem 0 0; color: var(--pico-muted-color); }
.finder-notice { font-size: 0.88rem; margin: 0.9rem 0 0; padding: 0.7rem 0.9rem; border-radius: 0.5rem; background: var(--brand-soft); }
.finder-notice.error { background: rgba(239, 68, 68, 0.1); color: var(--bad); }
.link-btn {
  all: unset; cursor: pointer; color: var(--brand); font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px; font-size: inherit;
}

.finder-preview {
  margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 0.75rem;
  border: 1.5px solid var(--brand); background: var(--brand-soft);
  animation: pop 0.25s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.preview-head { display: flex; gap: 0.8rem; align-items: flex-start; }
.preview-pin { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--brand); color: #fff; }
.preview-label { margin: 0; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand); }
.preview-name { margin: 0.1rem 0 0; font-size: 1.15rem; }
.preview-type { margin: 0; font-size: 0.85rem; color: var(--pico-muted-color); }
.preview-addr { margin: 0.7rem 0 0.25rem; font-size: 0.95rem; }
.preview-rating { margin: 0 0 0.6rem; font-size: 0.92rem; }
.stars { color: var(--warn); letter-spacing: 1px; margin-right: 0.25rem; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.9rem; }

.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; margin-top: 1.75rem; font-size: 0.9rem; color: var(--pico-muted-color); }
.trust span::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 0.4rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; text-align: center; }
.stat strong { display: block; font-size: 2.4rem; font-weight: 800; color: var(--brand); letter-spacing: -0.02em; }
.stat span { color: var(--pico-muted-color); font-size: 0.95rem; }

/* ---------- Steps & features ---------- */
.step-num {
  display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 0.8rem;
}
.icon {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 0.7rem;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 0.9rem;
}
.icon svg { width: 22px; height: 22px; }
article h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
article p:last-child { margin-bottom: 0; }

/* ---------- Pricing ---------- */
.pricing { max-width: 460px; margin: 0 auto; text-align: center; border: 2px solid var(--brand); }
.price { font-size: 3rem; font-weight: 800; letter-spacing: -0.02em; margin: 0.25rem 0; }
.price small { font-size: 1rem; font-weight: 500; color: var(--pico-muted-color); }
.checklist { list-style: none; padding: 0; text-align: left; margin: 1.25rem 0 1.5rem; }
.checklist li { list-style: none; padding-left: 1.6rem; position: relative; margin-bottom: 0.5rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ---------- Testimonials ---------- */
blockquote { margin: 0; border: none; padding: 0; font-style: normal; }
.quote footer { margin-top: 1rem; font-size: 0.9rem; color: var(--pico-muted-color); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--pico-muted-border-color); padding-bottom: 0.75rem; }

/* ---------- CTA ---------- */
.cta { text-align: center; border-radius: var(--radius-lg); padding: clamp(2rem, 6vw, 3.5rem); background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; }
.cta h2, .cta p { color: #fff; }
.cta a[role="button"] { background: #fff; color: #4f46e5; border-color: #fff; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--pico-muted-border-color); padding-block: 2.5rem; font-size: 0.9rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 2fr repeat(3, 1fr); }
.footer-grid h4 { font-size: 0.9rem; margin-bottom: 0.6rem; }
.footer-grid ul { padding: 0; margin: 0; }
.footer-grid li { list-style: none; margin-bottom: 0.35rem; }
.footer-grid a { color: var(--pico-muted-color); text-decoration: none; }
.footer-bottom { margin-top: 2rem; color: var(--pico-muted-color); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Audit page ---------- */
.audit-head { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; }
@media (max-width: 680px) { .audit-head { grid-template-columns: 1fr; text-align: center; } }
.score-ring {
  --score: 0; --ring: var(--bad);
  width: 170px; height: 170px; border-radius: 50%; margin: 0 auto;
  background: conic-gradient(var(--ring) calc(var(--score) * 1%), var(--pico-muted-border-color) 0);
  display: grid; place-items: center; transition: --score 1s;
}
.score-ring > div { width: 136px; height: 136px; border-radius: 50%; background: var(--pico-card-background-color); display: grid; place-items: center; text-align: center; }
.score-ring strong { font-size: 2.6rem; line-height: 1; display: block; }
.score-ring span { font-size: 0.8rem; color: var(--pico-muted-color); }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { list-style: none; display: grid; grid-template-columns: 1.6rem 1fr auto; gap: 0.6rem; padding: 0.8rem 0; border-bottom: 1px solid var(--pico-muted-border-color); align-items: start; }
.check-list li:last-child { border-bottom: none; }
.check-list .mark { font-weight: 700; }
.check-list .ok { color: var(--accent); }
.check-list .part { color: var(--warn); }
.check-list .no { color: var(--bad); }
.check-list p { margin: 0.15rem 0 0; font-size: 0.88rem; color: var(--pico-muted-color); }
.check-list .pts { font-size: 0.85rem; color: var(--pico-muted-color); white-space: nowrap; }

/* ---------- Pricing page ---------- */
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards-2, .cards-4 { grid-template-columns: 1fr; } }

.plan-section { padding-top: clamp(2rem, 6vw, 3.5rem); background: radial-gradient(60rem 26rem at 50% -10%, var(--hero-glow), transparent 70%); }
.plan-title { font-size: clamp(1.7rem, 4.5vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }

.biz-strip {
  display: flex; align-items: center; gap: 0.8rem; max-width: 720px; margin: 0 auto 1.25rem;
  padding: 0.75rem 1rem; border-radius: 0.75rem; border: 1px solid var(--pico-muted-border-color);
  background: var(--pico-card-background-color);
}
.biz-strip > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.biz-strip .muted { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-link { font-size: 0.9rem; white-space: nowrap; }

.plan-card {
  max-width: 720px; margin: 0 auto; padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 2px solid var(--brand); border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -25px rgba(79, 70, 229, 0.45);
}
.plan-top { text-align: center; padding-bottom: 1.5rem; border-bottom: 1px solid var(--pico-muted-border-color); margin-bottom: 1.5rem; }
.tier-badge { display: inline-block; padding: 0.3rem 0.9rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em; }
.plan-price { font-size: clamp(3rem, 9vw, 4.2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 0.9rem 0 0.6rem; }
.plan-price small { font-size: 1.1rem; font-weight: 500; color: var(--pico-muted-color); letter-spacing: 0; }
.plan-why { margin: 0 auto; max-width: 480px; font-size: 0.95rem; color: var(--pico-muted-color); }
.plan-why strong { color: var(--pico-color); }

.plan-list-title { font-size: 1.15rem; margin-bottom: 1rem; }
.promise-list { list-style: none; padding: 0; margin: 0 0 1.75rem; display: grid; gap: 0.2rem 1.5rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .promise-list { grid-template-columns: 1fr; } }
.promise-list li { list-style: none; position: relative; padding: 0.55rem 0 0.55rem 2rem; margin: 0; }
.promise-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0.6rem; width: 1.35rem; height: 1.35rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 800; color: #fff; background: var(--accent);
}
.promise-list strong { display: block; font-size: 0.98rem; }
.promise-list span { display: block; font-size: 0.86rem; color: var(--pico-muted-color); line-height: 1.45; }

.plan-cta { display: block; width: 100%; text-align: center; font-size: 1.1rem; font-weight: 700; padding-block: 0.95rem; }
.plan-fine { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.25rem; font-size: 0.85rem; color: var(--pico-muted-color); margin: 0.85rem 0 1.1rem; }
.guarantee { text-align: center; font-size: 0.92rem; padding: 0.8rem 1rem; border-radius: 0.6rem; background: rgba(16, 185, 129, 0.1); border: 1px dashed var(--accent); }
.plan-alt { text-align: center; font-size: 0.88rem; margin: 1rem 0 0; }
.worry h3 { font-size: 1.05rem; }

/* ---------- Invite & contact pages ---------- */
.narrow { max-width: 760px; }
.success-mark {
  width: 3.6rem; height: 3.6rem; margin: 0 auto 1rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; color: #fff;
  background: var(--accent); box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.6);
}
.invite-card { max-width: none; }
.small-label { display: block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pico-muted-color); margin: 0 0 0.4rem; }
.copy-row { display: flex; gap: 0.6rem; }
.copy-row input { margin: 0; font-weight: 600; font-family: var(--pico-font-family-monospace); }
.copy-row button { margin: 0; white-space: nowrap; }
.shortcuts { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.shortcuts [role="button"] { margin: 0; flex: 1 1 240px; text-align: center; }
.hint { font-size: 0.85rem; color: var(--pico-muted-color); margin: 0.6rem 0 0; }

.tabs { display: flex; gap: 0.25rem; margin: 1.75rem 0 0; border-bottom: 1px solid var(--pico-muted-border-color); overflow-x: auto; }
.tabs [role="tab"] {
  all: unset; cursor: pointer; padding: 0.6rem 0.9rem; font-size: 0.92rem; font-weight: 600; white-space: nowrap;
  color: var(--pico-muted-color); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs [role="tab"][aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tabs [role="tab"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
[role="tabpanel"] { padding-top: 1rem; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.steps li { list-style: none; counter-increment: s; position: relative; padding: 0.45rem 0 0.45rem 2.3rem; margin: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0.4rem; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.82rem; font-weight: 700; background: var(--brand-soft); color: var(--brand);
}

.contact-single { max-width: 720px; margin: 0 auto; }
.contact-form-card { margin: 0; padding: clamp(1.25rem, 4vw, 2rem); }
.grid-2 { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.contact-done { text-align: center; padding-block: 2rem; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- Demo mode (no API keys) ---------- */
.demo-combo { position: relative; }
.demo-combo input { margin: 0; }
.demo-list {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0;
  margin: 0; padding: 0.3rem; list-style: none; max-height: 320px; overflow-y: auto;
  background: var(--pico-card-background-color, var(--pico-background-color));
  border: 1px solid var(--pico-form-element-border-color); border-radius: var(--pico-border-radius);
  box-shadow: 0 16px 40px -16px rgba(15, 23, 42, 0.35);
}
.demo-list li { list-style: none; margin: 0; padding: 0.55rem 0.7rem; border-radius: 0.45rem; cursor: pointer; display: flex; flex-direction: column; gap: 0.1rem; }
.demo-list li[aria-selected="true"], .demo-list li[data-i]:hover { background: var(--brand-soft); }
.demo-list .demo-list-head { cursor: default; padding: 0.35rem 0.7rem 0.2rem; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pico-muted-color); }
.demo-list .demo-list-head:hover { background: none; }
.demo-opt-name { font-weight: 600; font-size: 0.95rem; }
.demo-opt-sub { font-size: 0.8rem; color: var(--pico-muted-color); }
.demo-tag {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  background: rgba(245, 158, 11, 0.18); color: #92400e;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .demo-tag { color: #fcd34d; } }
[data-theme="dark"] .demo-tag { color: #fcd34d; }
.demo-badge {
  position: fixed; z-index: 50; left: 50%; bottom: 14px; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 0.45rem 0.9rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: #1f2937; color: #fff; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.4);
}
.demo-badge a { color: #fcd34d; margin-left: 0.5rem; }
