/* ==========================================================================
   Indy Window Guide — site styles
   To change the colors, edit the values in the :root block below.
   ========================================================================== */

/* Layout concept: an editorial homeowner guide — narrow reading columns,
   ivory paper, navy type, sage and gold used sparingly as accents. */
:root {
  --ivory: #faf6ee;       /* page background */
  --paper: #fffdf8;       /* cards and raised panels */
  --sand: #f1eadc;        /* soft section bands */
  --navy: #1c2b45;        /* headings, navigation, primary buttons */
  --navy-soft: #2f4366;
  --sage: #7f9682;        /* accents */
  --sage-soft: #e3eadf;
  --sage-deep: #4f6653;
  --gold: #b8883a;        /* small highlights only */
  --gold-soft: #f3e6c8;
  --ink: #2a2f38;         /* body text */
  --muted: #5b6372;
  --line: #e4dccb;
  --white: #ffffff;

  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(28, 43, 69, .06), 0 8px 24px rgba(28, 43, 69, .07);
  --max: 1160px;
  --read: 68ch;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

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

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

a { color: var(--navy); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--sage-deep); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  font-weight: 600;
  text-wrap: balance;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 1.25rem + 1.8vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; margin: 0 0 1em; }
li { margin-bottom: .35em; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: var(--white); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.read { max-width: var(--read); }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: .8rem;
}
.lead { font-size: 1.15rem; color: var(--muted); }

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 238, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; }
.logo-tag { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sage-deep); margin-top: 4px; font-weight: 600; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 12px; font: inherit; font-size: .95rem; color: var(--navy); cursor: pointer;
  align-items: center; gap: 8px;
}
.nav-toggle-bars { width: 18px; height: 12px; position: relative; display: inline-block; }
.nav-toggle-bars::before, .nav-toggle-bars::after, .nav-toggle-bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--navy); border-radius: 2px;
}
.nav-toggle-bars::before { top: 0; } .nav-toggle-bars span { top: 5px; } .nav-toggle-bars::after { bottom: 0; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.site-nav li { margin: 0; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--navy); font-weight: 500; font-size: .96rem;
}
.site-nav a:hover { background: var(--sage-soft); color: var(--navy); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.site-nav .nav-cta { margin-left: 8px; }
.site-nav .nav-cta a { background: var(--navy); color: var(--white); padding: 9px 16px; border-radius: 999px; }
.site-nav .nav-cta a:hover { background: var(--navy-soft); color: var(--white); }
.site-nav .nav-cta a[aria-current="page"] { box-shadow: none; border-radius: 999px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 10px max(20px, env(safe-area-inset-left, 0px)) 18px; gap: 2px; }
  .site-nav a { padding: 12px 10px; font-size: 1.05rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); }
  .site-nav .nav-cta { margin: 10px 0 0; }
  .site-nav .nav-cta a { text-align: center; }
}

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-soft); color: var(--white); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--gold-soft); color: var(--navy); }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-tight { padding-block: clamp(40px, 6vw, 64px); }
.band-sand { background: var(--sand); }
.band-sage { background: var(--sage-soft); }
.band-navy { background: var(--navy); color: #dfe5ee; }
.band-navy h2, .band-navy h3 { color: var(--white); }
.section-head { max-width: 640px; margin-bottom: 36px; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(48px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h1 { margin-bottom: .4em; }
.hero h1 em { font-style: italic; color: var(--sage-deep); }
.hero .lead { margin-bottom: 1.6rem; max-width: 34em; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.hero-art { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: var(--sand); }
.hero-art img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { order: -1; } }

/* Page hero (inner pages) */
.page-hero { padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.page-hero .lead { max-width: 40em; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.card h3 { margin: 0; font-size: 1.25rem; }
.card p { margin: 0; color: var(--muted); }
.card-link { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-link:hover { border-color: var(--sage); box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.card-link .more { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--navy); font-size: .95rem; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--sage-soft); display: grid; place-items: center; color: var(--sage-deep); }
.card-icon svg { width: 24px; height: 24px; }

/* Guide panels on home page */
.guide-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.guide-split > * { min-width: 0; }
.guide-panel { border-radius: 20px; padding: clamp(26px, 4vw, 40px); }
.guide-panel.windows { background: var(--paper); border: 1px solid var(--line); }
.guide-panel.doors { background: var(--navy); color: #dfe5ee; }
.guide-panel.doors h3, .guide-panel.doors a { color: var(--white); }
.guide-panel h3 { font-size: 1.6rem; }
.link-list { list-style: none; padding: 0; margin: 18px 0 24px; border-top: 1px solid currentColor; border-color: rgba(127, 150, 130, .35); }
.link-list li { margin: 0; border-bottom: 1px solid rgba(127, 150, 130, .35); }
.link-list a { display: flex; justify-content: space-between; align-items: center; padding: 12px 2px; text-decoration: none; font-weight: 500; }
.link-list a::after { content: "→"; color: var(--gold); }
.link-list a:hover { padding-left: 6px; }
@media (max-width: 760px) { .guide-split { grid-template-columns: 1fr; } }

/* Service area */
.area-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.area-grid > * { min-width: 0; }
.town-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.town-list li { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 500; color: var(--navy); }
@media (max-width: 760px) { .area-grid { grid-template-columns: 1fr; } }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.steps li { margin: 0; counter-increment: step; position: relative; padding-top: 56px; min-width: 0; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem;
  background: var(--gold-soft); color: var(--navy); border: 1px solid var(--gold);
}
.steps h3 { font-size: 1.2rem; margin-bottom: .3em; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Disclosure */
.disclosure {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--sage);
  border-radius: var(--radius-sm); padding: 22px 24px; max-width: 860px;
}
.disclosure p { margin: 0; }
.disclosure-icon { flex: none; width: 28px; height: 28px; color: var(--sage-deep); margin-top: 2px; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .wrap > * { margin-left: auto; margin-right: auto; }
.cta-band p { max-width: 36em; color: #dfe5ee; font-size: 1.1rem; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Article / guide pages ---------- */
.guide-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 96px; font-size: .94rem; }
.toc h2 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sage-deep); margin-bottom: 10px; }
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--navy); border-left-color: var(--gold); }
@media (max-width: 900px) {
  .guide-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
}

.prose { max-width: var(--read); }
.prose > section { scroll-margin-top: 96px; padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.prose > section:last-child { border-bottom: 0; }
.prose h2 { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }

.style-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.style-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; min-width: 0; }
.style-item h4 { margin-bottom: .3em; }
.style-item p { margin: 0; font-size: .95rem; color: var(--muted); }

.callout { background: var(--gold-soft); border-radius: var(--radius-sm); padding: 18px 22px; margin: 20px 0; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--navy); }

.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .95rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--navy); background: var(--sand); }
tr:last-child td { border-bottom: 0; }

.q-list { list-style: none; padding: 0; }
.q-list li { padding: 10px 0 10px 30px; position: relative; border-bottom: 1px dashed var(--line); margin: 0; }
.q-list li::before { content: "?"; position: absolute; left: 0; top: 10px; width: 20px; height: 20px; border-radius: 50%; background: var(--sage-soft); color: var(--sage-deep); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }

.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 12px; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 16px 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.checklist li { margin: 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--sage-deep); flex: none; }

/* ---------- Forms ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .form-layout { grid-template-columns: 1fr; } }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field legend { font-weight: 600; color: var(--navy); font-size: .95rem; }
.field .optional { font-weight: 400; color: var(--muted); font-size: .85rem; }
.field .req { color: #9b3d2b; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1.5px solid #cfc6b4; border-radius: var(--radius-sm);
  padding: 12px 14px; width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--gold-soft); }
.field.has-error input, .field.has-error select { border-color: #9b3d2b; }
.field-error { color: #9b3d2b; font-size: .88rem; display: none; }
.field.has-error .field-error { display: block; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-row label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); background: var(--white); border: 1.5px solid #cfc6b4; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.radio-row input { accent-color: var(--navy); }
.consent { background: var(--sand); border-radius: var(--radius-sm); padding: 16px 18px; font-size: .92rem; color: var(--ink); margin: 22px 0 18px; }
.consent p { margin: 0 0 .5em; } .consent p:last-child { margin: 0; }
.form-status { display: none; border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 16px; font-weight: 500; }
.form-status.is-error { display: block; background: #f6e3dd; color: #7a2e1f; border: 1px solid #e3b9ac; }
.hidden-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.side-note { display: flex; flex-direction: column; gap: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c9d2df; padding-block: 56px 28px; font-size: .95rem; }
.site-footer a { color: #e7ecf3; text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.footer-grid > * { min-width: 0; }
.footer-grid h2 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.site-footer .logo { color: var(--white); margin-bottom: 14px; }
.site-footer .logo-tag { color: #a9bfae; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: #9eabbe; font-size: .88rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Print (for the planning checklist) ---------- */
@media print {
  .site-header, .site-footer, .toc, .btn, .btn-row, .cta-band, .skip-link { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .guide-layout { display: block; }
  .prose > section { break-inside: avoid; border: 0; }
  a { color: #000; text-decoration: none; }
}
