/* ============================================================
   Terrashield Windows & Doors — placeholder marketing site
   Plain CSS, no build step. Swap the brand tokens below.
   ============================================================ */

:root {
  /* Brand palette — change these to rebrand the whole site */
  --brand:        #2563eb;   /* modern azure blue */
  --brand-dark:   #1d4ed8;
  --brand-darker: #172554;   /* deep navy for gradients */
  --brand-tint:   #eff4ff;   /* pale blue wash */
  --accent:       #2563eb;   /* CTAs use brand blue */
  --accent-dark:  #1d4ed8;
  --star:         #f6b73c;   /* gold — review stars only */

  /* Neutrals — cool slate greys */
  --ink:          #0f172a;   /* headings */
  --body:         #475569;   /* body text */
  --muted:        #94a3b8;
  --line:         #e5e9f2;
  --bg:           #ffffff;
  --bg-alt:       #f7f9fc;
  --white:        #ffffff;

  --radius:       22px;
  --radius-sm:    14px;
  --shadow:       0 24px 60px -18px rgba(15, 23, 42, 0.22), 0 8px 20px -12px rgba(15, 23, 42, 0.12);
  --shadow-sm:    0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px -16px rgba(15, 23, 42, 0.18);
  --glow:         0 20px 50px -12px rgba(37, 99, 235, 0.35);
  --grad:         linear-gradient(115deg, #2563eb, #4f86ff 55%, #38bdf8);
  --maxw:         1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.14; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.03em; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); letter-spacing: -0.02em; font-weight: 800; }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p  { margin: 0 0 1rem; }
a  { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.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;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; font-weight: 650; font-size: .98rem;
  padding: .78rem 1.4rem; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer; transition: .2s cubic-bezier(.4,0,.2,1);
  white-space: nowrap; line-height: 1;
}
.btn-primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 10px 24px -8px rgba(37,99,235,.5); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--glow); }
.btn-ghost { background: rgba(255,255,255,.7); color: var(--ink); border-color: var(--line); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: #fff; color: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--ink); }
.brand-mark { font-size: 1.6rem; color: var(--brand); line-height: 1; }
.brand-name { display: flex; flex-direction: column; font-size: 1.15rem; letter-spacing: -.02em; line-height: 1.05; }
.brand-sub { font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 1.5rem; margin-left: auto; }
.nav a { color: var(--body); font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--brand); }
.header-cta { display: flex; align-items: center; gap: .7rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero (light, modern) ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(820px 520px at 88% -18%, rgba(37,99,235,.16), transparent 62%),
    radial-gradient(640px 480px at -8% 15%, rgba(56,189,248,.10), transparent 55%),
    var(--bg-alt);
  color: var(--body);
  padding: clamp(3.5rem, 6vw, 6rem) 0;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(15,23,42,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.02) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(100% 100% at 50% 0%, #000 8%, transparent 55%);
  -webkit-mask-image: radial-gradient(100% 100% at 50% 0%, #000 8%, transparent 55%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.3fr .9fr; gap: 3rem; align-items: center; }
.hero-copy h1 { color: var(--ink); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700;
  color: var(--brand); margin: 0 0 1.1rem;
}
.lede { font-size: 1.15rem; color: var(--body); max-width: 46ch; }

.hero-card { background: rgba(255,255,255,.72); backdrop-filter: blur(16px) saturate(150%); color: var(--body); border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); position: relative; }
.hero-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(37,99,235,.35), transparent 45%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.hero-card h2 { margin-top: .4rem; font-size: 1.95rem; }
.hero-card h2 span { color: var(--brand); }
.mini-form { display: grid; gap: .7rem; margin: 1.2rem 0 .6rem; }
.mini-form input { padding: .82rem .95rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 1rem; font-family: inherit; background: var(--bg-alt); }
.mini-form input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-tint); }
.fineprint { font-size: .78rem; color: var(--muted); margin: 0; }

/* ---------- Trust bar ---------- */
.trustbar { background: var(--brand-darker); }
.trustbar-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 1.05rem 20px; }
.trust-item { color: #cdd9f2; font-weight: 600; font-size: .95rem; display: flex; align-items: center; gap: .55rem; }
.trust-ico { display: inline-flex; color: #6ea8fe; }
.trust-ico svg { width: 20px; height: 20px; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.8rem; }
.section-sub { color: var(--muted); font-size: 1.08rem; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); transition: .25s cubic-bezier(.4,0,.2,1); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card-ico { color: var(--brand); background: var(--brand-tint); width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 1.2rem; border: 1px solid rgba(37,99,235,.12); }
.card-ico svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: .4rem; }
.card p { font-size: .95rem; color: var(--body); }
.card-link { font-weight: 700; font-size: .92rem; }

/* ---------- Services split (cards + checklist) ---------- */
#services { padding-block: clamp(3rem, 5vw, 4.5rem); }
#services .section-head { margin-bottom: 2rem; }
.services-split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.4rem; align-items: stretch; }
.services-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.services-cards .card { padding: 1.4rem; }
.services-cards .card-ico { width: 46px; height: 46px; border-radius: 12px; margin-bottom: .85rem; }
.services-cards .card-ico svg { width: 24px; height: 24px; }
.services-cards .card h3 { font-size: 1.02rem; }
.services-cards .card p { font-size: .87rem; }

.services-aside { display: flex; flex-direction: column; background: linear-gradient(160deg, var(--brand-darker), var(--brand-dark)); color: #dbe6fb; border-radius: var(--radius); padding: 1.7rem; box-shadow: var(--shadow); }
.aside-group { margin-bottom: 1.3rem; }
.aside-group h4 { color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; margin: 0 0 .75rem; opacity: .85; }
.services-aside .check-list { margin: 0; gap: .5rem; }
.services-aside .check-list li { color: #eaf1fd; font-weight: 500; font-size: .92rem; padding-left: 0; display: flex; align-items: center; gap: .65rem; }
.services-aside .check-list li::before { position: static; flex: none; }
.services-aside .check-list li::before { background: rgba(255,255,255,.16); color: #fff; width: 20px; height: 20px; top: 1px; }
.services-aside .check-list-opt li::before {
  content: "";
  background:
    linear-gradient(#fff, #fff) center / 13px 3px no-repeat,
    linear-gradient(#fff, #fff) center / 3px 13px no-repeat;
  opacity: .55; border: 0; border-radius: 0;
}
.services-aside .btn { margin-top: auto; }

/* ---------- Style options — horizontal scroller ---------- */
.style-scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 288px);
  gap: 1.3rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: .3rem 20px 1.4rem; margin: 0 -20px;
  scrollbar-width: thin; scrollbar-color: var(--brand) var(--line);
  overscroll-behavior-x: contain;
}
.style-scroller:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: var(--radius); }
.style-scroller::-webkit-scrollbar { height: 8px; }
.style-scroller::-webkit-scrollbar-track { background: var(--line); border-radius: 999px; }
.style-scroller::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 999px; }
.style-slide {
  scroll-snap-align: start; margin: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: .25s cubic-bezier(.4,0,.2,1);
}
.style-slide:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.style-slide img { width: 100%; height: 300px; object-fit: cover; display: block; }
.style-slide figcaption { padding: 1.1rem 1.2rem; }
.style-slide figcaption strong { display: block; font-size: 1.05rem; color: var(--ink); margin-bottom: .15rem; }
.style-slide figcaption span { font-size: .9rem; color: var(--body); }

/* ---------- Pricing comparison ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; max-width: 880px; margin: 0 auto; }
.compare-card { position: relative; border-radius: var(--radius); padding: 1.9rem; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.compare-bad { background: var(--bg-alt); }
.compare-good { background: var(--white); border-color: transparent; box-shadow: var(--shadow); }
.compare-good::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: linear-gradient(140deg, var(--brand), #38bdf8); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.compare-tag { font-weight: 800; font-size: 1.05rem; margin-bottom: 1.3rem; }
.compare-bad .compare-tag { color: var(--muted); }
.compare-good .compare-tag { color: var(--brand); }
.compare-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.compare-list li { padding-left: 2.1rem; position: relative; color: var(--body); font-weight: 500; }
.compare-list li::before { position: absolute; left: 0; top: 0; width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; line-height: 1; }
.compare-bad .compare-list li::before { content: "✕"; background: #f2e3e2; color: #c0554f; }
.compare-good .compare-list li { color: var(--ink); font-weight: 600; }
.compare-good .compare-list li::before { content: "✓"; background: var(--brand-tint); color: var(--brand); }

/* ---------- Steps (connected timeline) ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 30px; left: 12.5%; right: 12.5%; height: 3px;
  background: linear-gradient(90deg, var(--brand), #38bdf8);
  border-radius: 3px; z-index: 0;
}
.step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.step-node {
  flex: none; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 1.35rem;
  box-shadow: 0 4px 12px -4px rgba(37,99,235,.45), 0 0 0 6px var(--bg);
  margin-bottom: 1.4rem; transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.step:hover .step-node { transform: translateY(-4px); }
.step-body {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.4rem; box-shadow: var(--shadow-sm); width: 100%;
  transition: .25s cubic-bezier(.4,0,.2,1);
}
.step:hover .step-body { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.step-ico { display: flex; justify-content: center; margin-bottom: .7rem; color: var(--brand); }
.step-ico svg { width: 30px; height: 30px; }
.step h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.step p { font-size: .93rem; margin: 0; }

/* ---------- Reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.review { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; box-shadow: var(--shadow-sm); }
.stars { color: var(--star); letter-spacing: 2px; font-size: 1.05rem; margin-bottom: .6rem; }
.review p { font-size: 1rem; color: var(--ink); }
.review footer { font-weight: 700; color: var(--muted); font-size: .9rem; }

/* ---------- Check list (used in quote) ---------- */
.check-list { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; display: grid; gap: .6rem; }
.check-list li { padding-left: 1.9rem; position: relative; font-weight: 600; color: var(--ink); }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; background: var(--brand-tint); color: var(--brand); border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; }

/* ---------- Quote ---------- */
.quote { background: linear-gradient(160deg, var(--brand-darker), var(--brand-dark) 90%); color: #dbe6fb; }
.quote-inner { display: grid; grid-template-columns: .95fr 1.05fr; gap: 3rem; align-items: start; }
.quote-copy h2 { color: #fff; }
.quote-copy .check-list li { color: #eaf1fd; }
.quote-copy .check-list li::before { background: rgba(255,255,255,.16); color: #fff; }
.quote-call { font-weight: 600; margin-top: 1.4rem; }
.quote-call a { color: #bcd3ff; }
.quote-form { background: var(--white); color: var(--body); border-radius: var(--radius); padding: 1.9rem; box-shadow: var(--shadow); }
.field-row { margin-bottom: 1rem; }
.field-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field label { font-weight: 700; font-size: .88rem; color: var(--ink); }
.field .opt { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  padding: .8rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 1rem; font-family: inherit; color: var(--ink); width: 100%; background: var(--bg-alt);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-tint); }
.field .invalid, input.invalid, select.invalid { border-color: #e0555a; box-shadow: 0 0 0 3px rgba(224,85,90,.12); }
.form-note { font-weight: 700; margin: .4rem 0 .2rem; min-height: 1.2em; }
.form-note.ok { color: #1c8a4d; }
.form-note.err { color: #d94a4a; }

/* ---------- Survey wizard ---------- */
.survey-head { display: flex; align-items: center; gap: 1rem; margin-bottom: .7rem; min-height: 22px; }
.survey-back { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 600; font-size: .9rem; cursor: pointer; font-family: inherit; }
.survey-back:hover { color: var(--brand); }
.survey-count { color: var(--muted); font-weight: 700; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; margin-left: auto; }
.survey-progress { height: 6px; background: var(--brand-tint); border-radius: 999px; overflow: hidden; margin-bottom: 1.7rem; }
.survey-bar { display: block; height: 100%; width: 20%; background: var(--grad); border-radius: 999px; transition: width .35s cubic-bezier(.4,0,.2,1); }

.survey-step { display: none; }
.survey-step.is-active { display: block; animation: surveyIn .28s ease; }
@keyframes surveyIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.survey-q { font-size: 1.3rem; margin-bottom: 1.2rem; }
.q-hint { font-size: .8rem; font-weight: 600; color: var(--muted); margin-left: .35rem; }

.survey-options { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.opt-card {
  display: flex; align-items: center; gap: .7rem; text-align: left;
  padding: .95rem 1.1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font-weight: 600; font-size: .98rem; font-family: inherit;
  cursor: pointer; transition: .16s ease;
}
.opt-card::before {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line); transition: .16s ease;
}
.survey-options[data-multi] .opt-card::before { border-radius: 6px; }
.opt-card:hover { border-color: var(--brand); background: var(--brand-tint); }
.opt-card.selected { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); }
.opt-card.selected::before { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 3px #fff; }

.survey-step .field { margin-bottom: 0; }
.survey-step .field-row { margin-bottom: .7rem; }
.survey-nav { margin-top: 1.4rem; }

.survey-done { text-align: center; padding: 1.5rem 0; }
.done-check { width: 66px; height: 66px; margin: 0 auto 1.1rem; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; }
.done-check svg { width: 32px; height: 32px; }
.survey-done h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.survey-done p { color: var(--body); margin: 0 auto; max-width: 36ch; }

/* ---------- Footer ---------- */
.site-footer { background: #0b1220; color: #9aa6bd; padding: 3.5rem 0 1.5rem; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer-col h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-col a { color: #9aa6bd; }
.footer-col a:hover { color: #fff; }
.brand-footer { color: #fff; margin-bottom: 1rem; }
.brand-footer .brand-name { color: #fff; }
.brand-footer .brand-sub { color: #6f7d99; }
.license { font-size: .85rem; color: #6f7d99; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; border-top: 1px solid #1c2842; margin-top: 2.5rem; padding-top: 1.5rem; font-size: .82rem; color: #6f7d99; }
.footer-bottom p { margin: 0; }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed; bottom: 16px; right: 16px; z-index: 60; display: none;
  background: var(--brand); color: #fff; font-weight: 800;
  padding: .85rem 1.3rem; border-radius: 999px; box-shadow: 0 10px 24px rgba(37,99,235,.35);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cards, .steps { grid-template-columns: repeat(2, 1fr); }
  .services-split { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .hero-inner, .financing-inner, .quote-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav, .header-quote { display: none; }
  .nav-toggle { display: flex; }
  .nav.open { display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: 1rem 20px; gap: 1rem; margin: 0; }
  .header-inner { gap: 1rem; }
  .header-cta { margin-left: auto; }
  .cards, .steps, .reviews, .footer-inner, .field-row.two, .survey-options, .compare, .services-cards { grid-template-columns: 1fr; }
  .sticky-cta { display: inline-block; }
}
