/* ============================================================
   Renewal by Andersen Sioux Falls — Shared Site Styles
   ============================================================ */

:root {
  --green: #83be5c;
  --green-dark: #558548;
  --orange: #ecaf5f;
  --bg: #f7f7f7;
  --white: #ffffff;
  --ink: #1c2418;
  --ink-soft: #4a554a;
  --line: #e3e3e0;

  --max: 1320px;
  --pad: clamp(20px, 4vw, 56px);

  --shadow-sm: 0 1px 2px rgba(20, 28, 18, .06), 0 1px 3px rgba(20, 28, 18, .04);
  --shadow-md: 0 4px 14px rgba(20, 28, 18, .08), 0 2px 4px rgba(20, 28, 18, .04);
  --shadow-lg: 0 18px 48px rgba(20, 28, 18, .14);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

sup { font-size: 0.5em; line-height: 0; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--orange);
  color: var(--ink);
  border-color: var(--orange);
}
.btn-primary:hover { background: #e29f49; border-color: #e29f49; }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--white); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  padding: 10px 22px;
}
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Section heading ---------- */
.section-heading {
  text-align: center;
  margin-bottom: 56px;
}
.section-heading h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: .22em;
  font-weight: 500;
  text-transform: uppercase;
  display: inline-block;
  position: relative;
  padding-bottom: 18px;
}
.section-heading h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 80px;
  height: 2px;
  background: var(--green);
  transform: translateX(-50%);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: var(--green);
}

.nav {
  width: 100%;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 36px);
  padding: 14px clamp(20px, 3vw, 40px);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.nav-brand img {
  height: 52px;
  width: auto;
}
.nav-brand .sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--ink);
  line-height: 1.2;
}
.nav-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: .01em;
  line-height: 1.1;
}
.nav-phone span {
  font-size: 10px;
  letter-spacing: .22em;
  font-weight: 600;
  color: var(--green-dark);
  margin-top: 2px;
}
.nav-spacer { flex: 1; }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 32px);
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 10px 0;
  position: relative;
  transition: color .15s ease;
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--green-dark); }
.nav-links a.has-caret::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 8px;
  vertical-align: middle;
}

/* Dropdowns */
.nav-item { position: relative; }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: -16px;
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
}
.nav-dropdown a img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}
.nav-dropdown a:hover {
  background: var(--bg);
  color: var(--green-dark);
}
.nav-dropdown hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 4px;
}
.nav-dropdown .group-label {
  display: block;
  padding: 12px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Burger */
.nav-burger {
  display: none;
  background: transparent;
  border: 1.5px solid var(--green);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: auto;
}
.nav-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--green-dark);
  position: relative;
}
.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--green-dark);
}
.nav-burger span::before { top: -6px; }
.nav-burger span::after  { top:  6px; }
.nav-phone-icon { display: none; }

/* Mobile menu panel */
.nav-mobile {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--line);
}
.nav-mobile.is-open { display: block; }
.nav-mobile ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.nav-mobile li > a,
.nav-mobile .m-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.nav-mobile .m-group-label {
  width: 100%;
  background: none;
  border-left: 0; border-right: 0; border-top: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.nav-mobile .m-group-label span {
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: var(--green-dark);
  transition: transform .2s ease;
}
.nav-mobile .m-group-label[aria-expanded="true"] span { transform: rotate(45deg); }
.nav-mobile .m-sub {
  list-style: none;
  margin: 0;
  padding: 0 0 12px var(--pad);
  background: var(--bg);
}
.nav-mobile .m-sub a {
  padding: 10px var(--pad);
  border-bottom: none;
  font-size: 13px;
  letter-spacing: .1em;
  font-weight: 500;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-mobile .m-sub a img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}
.nav-mobile .m-phone {
  padding: 16px var(--pad);
  font-weight: 700;
  font-size: 18px;
  color: var(--green-dark);
  display: block;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.nav-mobile .m-cta {
  padding: 18px var(--pad);
}
.nav-mobile .m-cta .btn { width: 100%; justify-content: center; text-align: center; }

@media (max-width: 1024px) {
  .nav-links, .nav-header-cta { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-mobile .m-phone { display: none; }
}
@media (max-width: 560px) {
  .nav-phone { display: none; }
  .nav-brand img { height: 44px; }
  .nav-brand .sub { font-size: 10px; }
  .nav-phone-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; flex-shrink: 0;
    border: 1.5px solid var(--green); border-radius: var(--radius-sm);
    color: var(--green-dark); margin-left: auto;
  }
  .nav-burger { margin-left: 8px; }
}

/* ============================================================
   FOOTER  — slim white bar matching mockup
   ============================================================ */
.site-footer {
  background: var(--white);
  color: var(--ink);
}
.site-footer::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--green-dark);
}

.footer-top {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 36px);
  padding: 18px clamp(20px, 3vw, 40px);
}
.footer-brand-link img {
  height: 52px;
  width: auto;
  display: block;
}
.footer-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: .01em;
}
.footer-phone span {
  font-size: 10px;
  letter-spacing: .22em;
  font-weight: 600;
  color: var(--green-dark);
  margin-top: 2px;
}
.footer-spacer { flex: 1; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 14px clamp(20px, 3vw, 40px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.footer-legal .sep { color: var(--line); }
.footer-legal a { color: var(--ink-soft); }
.footer-legal a:hover { color: var(--green-dark); }
.footer-credit { color: var(--ink-soft); }

@media (max-width: 720px) {
  .footer-top {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 14px;
  }
  .footer-spacer { display: none; }
  .footer-cta { order: 3; flex-basis: 100%; }
  .footer-cta.btn { width: 100%; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ============================================================
   TEAM FLIP CARDS (shared: homepage + local difference)
   ============================================================ */
.team-card.flip {
  cursor: pointer;
  perspective: 1200px;
  outline: none;
}
.team-flip {
  position: relative;
  width: 100%;
  min-height: 340px;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.4,.2,.2,1);
}
.team-card.flip.is-flipped .team-flip,
.team-card.flip:hover .team-flip { transform: rotateY(180deg); }
.team-card.flip:focus-visible .team-flip { box-shadow: 0 0 0 3px rgba(85,133,72,.35); border-radius: var(--radius-md); }

.team-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: var(--radius-md);
}
.team-face.front { justify-content: flex-end; }
.team-face.front .team-photo {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0 auto 14px;
}
.team-face.front .team-photo img { max-height: 250px; width: auto; }
.team-face.back {
  transform: rotateY(180deg);
  background: var(--green-dark);
  color: var(--white);
  justify-content: center;
  text-align: center;
  padding: 26px 24px;
}
.team-face.back h3, .team-face.back h4 { color: var(--white); margin: 0 0 12px; }
.team-face.back p {
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  max-width: 240px;
  color: rgba(255,255,255,.94);
}
.flip-hint { display: none; }
.team-card.flip:hover .flip-hint { transform: scale(1.08); background: var(--green-dark); }
.flip-hint svg { width: 15px; height: 15px; }

/* ============================================================
   UTILITY
   ============================================================ */
.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;
}

/* ============================================================
   CTA ESTIMATE FORM (interior pages, under FAQ)
   ============================================================ */
.cta-estimate {
  background: var(--white);
  padding: 84px 0;
  border-top: 1px solid var(--line);
}
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}
.cta-media img {
  height: clamp(320px, 34vw, 440px);
  width: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}
@media (max-width: 880px) {
  .cta-media { display: flex; justify-content: center; }
  .cta-media img { width: 100%; height: auto; max-width: 440px; }
}
.cta-body { text-align: left; }
.cta-estimate .eyebrow {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 14px;
}
.cta-estimate h2 {
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 0 0 14px;
}
.cta-estimate p {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0;
  max-width: 520px;
  line-height: 1.55;
}
.cta-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
  text-align: left;
}
.cta-form .field { display: flex; flex-direction: column; gap: 5px; }
.cta-form label {
  font-size: 10px;
  letter-spacing: .22em;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.cta-form input {
  font: inherit;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cta-form input:focus {
  outline: none;
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(85,133,72,.15);
}
.cta-form .submit-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  margin-top: 8px;
}
@media (max-width: 880px) {
  .cta-grid { grid-template-columns: 1fr; }
  .cta-media { order: -1; }
}
@media (max-width: 460px) {
  .cta-form { grid-template-columns: 1fr; }
}

/* Image placeholder (until real product/gallery photo provided) */
.media-ph {
  background: repeating-linear-gradient(135deg, #eef0ec 0 12px, #f7f7f7 12px 24px);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px;
}
.gallery-card .media-ph { width: 100%; height: 100%; }
.why-ph {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
}
.product-ph {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
}

/* ============================================================
   OPTIONS PAGES — responsive (shared across window/door options)
   ============================================================ */
@media (max-width: 880px) {
  .opt-head.with-media {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 36px;
  }
  .opt-head.with-media .opt-media { order: -1; }
  .opt-section { padding: 52px 0; }
  .opt-head { margin-bottom: 32px; }
}
@media (max-width: 560px) {
  .opt-section { padding: 40px 0; }
  .opt-head h2 { font-size: clamp(24px, 7vw, 30px); }
  .subhead.spaced { margin-top: 40px; }
}
