/* My Garage Conversions — shared styles. Mobile-first, no framework. */

:root {
  --brand: #0e7c66;
  --brand-dark: #0a5c4c;
  --brand-tint: #e7f3f0;
  --ink: #16202b;
  --muted: #5b6b7a;
  --bg: #ffffff;
  --surface: #f6f8f7;
  --border: #e3e8e6;
  --accent: #f5a524;
  --danger: #c0392b;
  --ok: #2e9e5b;
  --warn: #d98324;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(16, 32, 43, .06), 0 6px 24px rgba(16, 32, 43, .06);
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}

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

a { color: var(--brand-dark); }

h1, h2, h3 { line-height: 1.2; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 750; margin-top: 1.4em; }
h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1.4em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.brand svg { flex: none; }
.site-header .nav-links { display: none; gap: 22px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--ink); }
.site-header .nav-cta { display: none; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid var(--border); background: #fff;
  border-radius: var(--radius-sm); cursor: pointer;
}
.nav-toggle svg { display: block; }
.mobile-menu { display: none; border-top: 1px solid var(--border); background: #fff; padding: 8px 0 16px; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 12px 20px; color: var(--ink); text-decoration: none; font-weight: 600; }
.mobile-menu .btn { margin: 12px 20px 0; }

@media (min-width: 900px) {
  .site-header .nav-links { display: flex; }
  .site-header .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--radius-sm); font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .04s ease, background .15s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-lg { padding: 16px 28px; font-size: 1.08rem; }
.btn-block { display: flex; width: 100%; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; background: linear-gradient(180deg, var(--brand-tint), #fff); }
.hero .eyebrow { color: var(--brand-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: 10px; }
.hero p.lede { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-note { margin-top: 14px; font-size: .85rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section.alt { background: var(--surface); }
.section-head { max-width: 680px; margin-bottom: 8px; }
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-tint); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.chip { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: .9rem; color: var(--ink); }

.callout {
  border: 1px solid var(--border); border-left: 4px solid var(--brand);
  background: var(--surface); border-radius: var(--radius-sm); padding: 16px 18px; margin: 20px 0;
}
.callout.warn { border-left-color: var(--warn); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--ink); }

/* Article/content pages */
.prose { max-width: 760px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose h2 { border-top: 1px solid var(--border); padding-top: 1.2em; }
.prose h2:first-of-type { border-top: 0; padding-top: 0; }

/* Simple table */
.table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { background: var(--surface); font-weight: 700; }

/* CTA band */
.cta-band { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 32px; text-align: center; }
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { color: #cdd6dd; max-width: 560px; margin: 0 auto 20px; }

/* Floor plan diagrams (pure CSS) */
.plan { border: 2px solid var(--ink); border-radius: 6px; display: grid; gap: 4px; padding: 6px; background: var(--surface); aspect-ratio: 3/2; }
.plan .room { background: #fff; border: 1px dashed var(--muted); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; color: var(--muted); text-align: center; padding: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 40px 0 28px; margin-top: 40px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px; }
.footer-grid a { display: block; color: var(--ink); text-decoration: none; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--brand-dark); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 26px; padding-top: 18px; color: var(--muted); font-size: .82rem; }
.footer-bottom p { margin: 0 0 .6em; }

/* ---------- Assessment ---------- */
.assessment-shell { max-width: 640px; margin: 0 auto; }
.progress { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.progress-bar { height: 100%; width: 0; background: var(--brand); transition: width .3s ease; }
.progress-meta { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-bottom: 20px; }

.step { display: none; animation: fade .25s ease; }
.step.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step h2 { margin-top: 0; }
.step .help { color: var(--muted); margin-top: -.4em; }

fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; padding: 0; }

.options { display: grid; gap: 10px; margin: 14px 0; }
.option {
  display: flex; align-items: center; gap: 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; background: #fff; font-weight: 600;
}
.option:hover { border-color: var(--brand); }
.option input { accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.option.selected { border-color: var(--brand); background: var(--brand-tint); }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 1rem; font-family: inherit; color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus, .option:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }

.step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.step-nav .btn { min-width: 120px; }
.error-text { color: var(--danger); font-size: .88rem; margin-top: 8px; display: none; }
.error-text.show { display: block; }

/* Result */
.result-head { text-align: center; margin-bottom: 24px; }
.badge { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.badge.low { background: #e4f5ea; color: #1c7a41; }
.badge.moderate { background: #fdf0d9; color: #9a6412; }
.badge.higher { background: #fbe4e0; color: #9a2c1e; }

.result-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; background: #fff; }
.result-block h3 { margin-top: 0; display: flex; align-items: center; gap: 8px; }
.cost-figure { font-size: 1.6rem; font-weight: 800; color: var(--ink); }

.focus-visible-ring:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

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