/* ==========================================================================
   Earthwise Windows of Kansas City — site.css
   Brand tokens from references/brand/brand-guide.md
   ========================================================================== */

:root {
  --blue: #29ABE2;
  --blue-dark: #1B87B5;
  --blue-deep: #0E2A38;      /* footer / hero overlays */
  --blue-tint: #E3F4FC;
  --green: #8DC63F;
  --green-dark: #6FA32C;
  --green-tint: #F0F7E4;
  --slate: #808285;
  --ink: #22292E;
  --paper: #F4F7F9;
  --white: #FFFFFF;
  --font-brand: 'Montserrat', 'Century Gothic', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 3px rgba(14, 42, 56, .08);
  --shadow-md: 0 6px 24px rgba(14, 42, 56, .10);
  --shadow-lg: 0 16px 48px rgba(14, 42, 56, .16);
  --radius: 14px;
  --radius-sm: 8px;
  --container: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-brand);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--alt { background: var(--paper); }
.section--tight { padding: 56px 0; }

.kicker {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 12px;
}
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin-top: 14px; color: #4a545c; font-size: 1.05rem; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); color: #fff; }
.btn--green { background: var(--green); color: #103010; }
.btn--green:hover { background: var(--green-dark); color: #fff; }
.btn--ghost { border-color: #fff; color: #fff; background: transparent; }
.btn--ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn--outline { border-color: var(--blue); color: var(--blue-dark); background: transparent; }
.btn--outline:hover { background: var(--blue-tint); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--blue-deep);
  color: #cfe3ee;
  font-size: .82rem;
  padding: 7px 0;
}
.topbar .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topbar a { color: #fff; font-weight: 600; }
.topbar a:hover { color: var(--blue); }
.topbar-group { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 78px;
}
.logo img { height: 52px; width: auto; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav > a, .nav-item > button {
  display: inline-block;
  padding: 10px 14px;
  font-family: var(--font-brand);
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav > a:hover, .nav-item > button:hover { color: var(--blue-dark); background: var(--blue-tint); }
.nav > a.is-active { color: var(--blue-dark); }
.nav .btn { margin-left: 10px; padding: 11px 22px; }

.nav-item { position: relative; }
.nav-item > button::after { content: " ▾"; font-size: .7em; color: var(--slate); }
.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 230px;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 101;
}
.nav-item.open .dropdown, .nav-item:focus-within .dropdown, .nav-item:hover .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
}
.dropdown a:hover { background: var(--blue-tint); color: var(--blue-dark); }
.dropdown .dropdown-label {
  padding: 10px 14px 4px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--slate);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  color: #fff;
  background: var(--blue-deep);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(14,42,56,.88) 0%, rgba(14,42,56,.62) 46%, rgba(14,42,56,.28) 100%);
}
.hero .container { position: relative; z-index: 1; padding-top: 110px; padding-bottom: 110px; }
.hero--page .container { padding-top: 72px; padding-bottom: 72px; }
.hero h1 { color: #fff; max-width: 720px; }
.hero .lede { margin: 22px 0 34px; max-width: 620px; font-size: 1.15rem; color: #dcebf4; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .crumbs { font-size: .85rem; color: #9fc2d6; margin-bottom: 18px; font-weight: 600; }
.hero .crumbs a { color: #cfe3ee; }
.hero .crumbs a:hover { color: #fff; }

.trust-strip { background: #fff; box-shadow: var(--shadow-sm); position: relative; z-index: 2; }
.trust-strip .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 20px;
  padding-bottom: 20px;
}
.trust-strip img { height: 62px; width: auto; }
.trust-strip .trust-label { font-weight: 700; font-size: .9rem; color: var(--slate); letter-spacing: .06em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--blue-tint); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media--contain { display: flex; align-items: center; justify-content: center; padding: 18px; }
.card-media--contain img { width: auto; max-height: 100%; object-fit: contain; }
.card-body { padding: 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-body h3 { color: var(--blue-deep); }
.card-body p { color: #4a545c; font-size: .95rem; flex: 1; }
.card-link { font-weight: 700; font-size: .92rem; color: var(--blue-dark); }
.card-link::after { content: " →"; }

.feature-list { list-style: none; display: grid; gap: 12px; }
.feature-list li { padding-left: 34px; position: relative; color: #39434b; }
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green-dark);
  font-weight: 800;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-list strong { color: var(--ink); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; text-align: center; }
.stat-row .stat b { display: block; font-size: 2.6rem; font-weight: 800; color: var(--blue-dark); line-height: 1.1; }
.stat-row .stat span { color: var(--slate); font-weight: 600; font-size: .92rem; }

/* value cards */
.value-card {
  background: #fff;
  border-radius: var(--radius);
  border-top: 4px solid var(--green);
  box-shadow: var(--shadow-sm);
  padding: 30px 26px;
}
.value-card h3 { margin-bottom: 10px; color: var(--blue-deep); }
.value-card p { color: #4a545c; font-size: .95rem; }

/* CTA band */
.cta-band {
  background: linear-gradient(115deg, var(--blue-dark) 0%, var(--blue) 55%, var(--green) 130%);
  color: #fff;
}
.cta-band .container {
  padding-top: 72px;
  padding-bottom: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; max-width: 560px; }
.cta-band p { color: #eaf6fd; margin-top: 10px; max-width: 520px; }
.cta-band .btn--primary { background: #fff; color: var(--blue-dark); }
.cta-band .btn--primary:hover { background: var(--blue-tint); }

/* --------------------------------------------------------------------------
   Product pages
   -------------------------------------------------------------------------- */
.spec-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2px;
  background: var(--blue-deep);
  border-radius: var(--radius);
  overflow: hidden;
}
.spec-banner div { background: #143b4f; padding: 22px 20px; color: #fff; }
.spec-banner b { display: block; font-size: 1.05rem; margin-bottom: 3px; color: #fff; }
.spec-banner span { font-size: .8rem; color: #9fc2d6; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }

.style-row {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 44px;
  align-items: center;
  padding: 44px 0;
  border-bottom: 1px solid #e4eaee;
}
.style-row:last-child { border-bottom: 0; }
.style-row .style-media {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}
.style-row .style-media img { max-height: 300px; width: auto; object-fit: contain; }
.style-row h3 { font-size: 1.35rem; color: var(--blue-deep); margin-bottom: 10px; }
.style-row p { color: #4a545c; margin-bottom: 14px; }

.download-list { list-style: none; display: grid; gap: 12px; }
.download-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #e4eaee;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.download-list a:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); color: var(--blue-dark); }
.download-list a::before { content: "⤓"; font-size: 1.2rem; color: var(--blue); font-weight: 800; }

/* --------------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.gallery-grid a {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.gallery-grid a:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(14,42,56,.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 4vh 4vw;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 28px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.info-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin-bottom: 20px;
}
.info-card h3 { color: var(--blue-deep); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.info-card p { color: #4a545c; }
.info-card a { font-weight: 700; }

.form { display: grid; gap: 18px; }
.form label { font-weight: 700; font-size: .88rem; display: block; margin-bottom: 6px; }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #d7dfe5;
  border-radius: var(--radius-sm);
  font-family: var(--font-brand);
  font-size: .95rem;
  color: var(--ink);
  background: #fff;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-tint);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row--3 { grid-template-columns: 2fr 1fr 1fr; }
.form-legend { font-weight: 800; font-size: 1rem; color: var(--blue-deep); margin-bottom: -6px; padding-top: 6px; border-top: 1.5px solid #d7dfe5; }
.char-count { font-size: .8rem; color: var(--slate); margin-top: 4px; text-align: right; }
.map-embed { border: 0; width: 100%; height: 380px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--blue-deep); color: #b9cfdc; font-size: .92rem; }
.site-footer .container { padding-top: 64px; padding-bottom: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; }
.footer-grid h4 { color: #fff; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.footer-grid ul { list-style: none; display: grid; gap: 9px; }
.footer-grid a { color: #b9cfdc; }
.footer-grid a:hover { color: #fff; }
.footer-logo-tile { background: #fff; border-radius: var(--radius-sm); padding: 12px 16px; display: inline-block; margin-bottom: 16px; }
.footer-logo-tile img { height: 46px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: #7f9bab;
}

/* --------------------------------------------------------------------------
   Utilities & responsive
   -------------------------------------------------------------------------- */
.badge-row { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.badge-row img { height: 74px; width: auto; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; } .mt-4 { margin-top: 44px; }
.center { text-align: center; }

@media (max-width: 1020px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .style-row { grid-template-columns: 1fr; }
  .style-row .style-media { max-width: 420px; }
}

@media (max-width: 820px) {
  .section { padding: 60px 0; }
  .split, .contact-grid, .grid--2 { grid-template-columns: 1fr; }
  .split { gap: 32px; }
  .stat-row { grid-template-columns: 1fr; gap: 18px; }
  .topbar .topbar-group--secondary { display: none; }

  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 86vw);
    background: #fff;
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: stretch;
    padding: 90px 22px 30px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform .25s ease;
    overflow-y: auto;
    z-index: 99;
  }
  .nav.open { transform: translateX(0); }
  .nav > a, .nav-item > button { width: 100%; text-align: left; font-size: 1.02rem; padding: 13px 14px; }
  .nav-item .dropdown {
    position: static;
    display: none;
    box-shadow: none;
    background: var(--paper);
    margin: 4px 0 8px;
  }
  .nav-item.open .dropdown { display: block; }
  .nav-item:hover .dropdown { display: none; }
  .nav-item.open:hover .dropdown { display: block; }
  .nav .btn { margin: 14px 0 0; text-align: center; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 560px) {
  .grid--4, .grid--3 { grid-template-columns: 1fr; }
  .hero .container { padding-top: 72px; padding-bottom: 72px; }
  .trust-strip img { height: 46px; }
  .form-row, .form-row--3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Articles
   -------------------------------------------------------------------------- */
.article-date {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue-dark);
}
.article-body { max-width: 780px; font-size: 1.04rem; }
.article-body h2 { margin: 40px 0 14px; font-size: 1.5rem; color: var(--blue-deep); }
.article-body h3 { margin: 28px 0 10px; color: var(--blue-deep); }
.article-body p { margin: 0 0 18px; color: #39434b; }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; color: #39434b; }
.article-body li { margin-bottom: 8px; }
.article-body img { border-radius: var(--radius); margin: 24px 0; box-shadow: var(--shadow-md); }
.article-body a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.article-body b, .article-body strong { color: var(--ink); }

/* network list */
.network-list { columns: 2; gap: 40px; list-style: none; font-size: .95rem; }
.network-list li { break-inside: avoid; margin-bottom: 14px; padding-left: 26px; position: relative; }
.network-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
}
.network-list b { display: block; color: var(--ink); }
.network-list span { color: var(--slate); font-size: .85rem; }
@media (max-width: 560px) { .network-list { columns: 1; } }

/* --------------------------------------------------------------------------
   Spec table & color chips (brochure content)
   -------------------------------------------------------------------------- */
.table-scroll { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.spec-table { width: 100%; border-collapse: collapse; background: #fff; font-size: .92rem; min-width: 640px; }
.spec-table th {
  background: var(--blue-deep);
  color: #fff;
  padding: 13px 16px;
  text-align: left;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.spec-table td { padding: 13px 16px; border-bottom: 1px solid #edf1f4; color: #39434b; }
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table td:first-child { font-weight: 700; color: var(--ink); }

.chip-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.chip-row .chip-label { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; font-weight: 600; color: #39434b; }
.chip::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #d7dfe5; background: var(--chip, #fff); }
.chip--white { --chip: #FFFFFF; }
.chip--tan { --chip: #D9C9A3; }
.chip--black { --chip: #2B2B2B; }
.chip--custom::before { background: linear-gradient(120deg, var(--blue), var(--green)); border-color: transparent; }
