/* Gutter Installation Casper — high-plains contractor, conversion-first */
:root {
  --navy: #142033;
  --navy-2: #1c2d4a;
  --ink: #1b1713;
  --paper: #f3eee4;
  --paper-2: #e8e0d2;
  --cream: #faf7f1;
  --white: #fffcf7;
  --copper: #b85c38;
  --copper-2: #9a4a2c;
  --sage: #5e6f5c;
  --muted: #5f584f;
  --line: #d6cdbe;
  --shadow: 0 18px 40px rgba(20, 32, 51, 0.12);
  --radius: 14px;
  --header-h: 72px;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--copper-2); }
a:hover { color: var(--copper); }
:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--white);
  padding: 0.5rem 0.8rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  color: var(--cream);
  height: var(--header-h);
  transition: box-shadow 0.25s ease, height 0.25s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  height: 64px;
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 100%;
  padding: 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  flex: 1;
}
.logo-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-text strong {
  font-family: var(--serif);
  font-weight: 650;
  font-size: 0.92rem;
  letter-spacing: -0.015em;
}
.logo-text small {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9c1b2;
}
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.15rem 1rem;
}
.site-nav a {
  color: #e7e0d3;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--copper);
}
.nav-toggle {
  display: none;
  margin-left: auto;
  background: #243656;
  color: var(--cream);
  border: 1px solid #5a6f93;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-call,
.btn-copper {
  background: var(--copper);
  color: #fff !important;
  border-bottom: 0 !important;
  white-space: nowrap;
}
.btn-call:hover,
.btn-copper:hover { background: var(--copper-2); }
.btn-navy {
  background: var(--navy);
  color: #fff !important;
}
.btn-navy:hover { background: var(--navy-2); }
.btn-ghost {
  background: transparent;
  color: var(--navy) !important;
  border: 1.5px solid var(--navy);
}
.btn-ghost-light {
  background: transparent;
  color: #fff !important;
  border: 1.5px solid #e7e0d3;
}
.header-inner .btn-call { padding: 0.55rem 0.95rem; font-size: 0.92rem; }

/* Hero */
.hero {
  position: relative;
  color: var(--cream);
  min-height: 86vh;
  display: flex;
  align-items: stretch;
}
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-color: var(--navy);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: -6%;
  background-color: var(--navy);
  background-image: inherit;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  animation: heroKen 18s ease-out forwards;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 38, 0.88) 0%, rgba(15, 23, 38, 0.62) 48%, rgba(15, 23, 38, 0.28) 100%),
    linear-gradient(180deg, rgba(15, 23, 38, 0.2), rgba(15, 23, 38, 0.45));
}
@keyframes heroKen {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
.hero-grid {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 3.2rem 1.1rem 3.6rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.2rem;
  align-items: center;
  width: 100%;
}
.hero-grid > * { min-width: 0; }
.kicker {
  display: inline-block;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  color: #e2b399;
  margin-bottom: 0.7rem;
}
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 650; letter-spacing: -0.02em; }
h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.55rem);
  line-height: 1.12;
  margin: 0 0 0.9rem;
  color: inherit;
  overflow-wrap: break-word;
}
.lede {
  font-size: 1.15rem;
  max-width: 42rem;
  color: #e6dfd2;
  margin: 0 0 1.2rem;
}
.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.3rem;
}
.chip {
  background: rgba(255, 252, 247, 0.1);
  border: 1px solid rgba(255, 252, 247, 0.18);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 0.4rem; }

/* Form card */
.quote-card {
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  animation: cardIn 0.7s 0.15s ease both;
  min-width: 0;
  max-width: 100%;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.quote-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.45rem;
  color: var(--navy);
}
.quote-card .sub {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.quote-form {
  display: grid;
  gap: 0.7rem;
}
.quote-form label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--navy);
}
.quote-form input,
.quote-form select,
.quote-form textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.62rem 0.7rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.quote-form input[type="file"] {
  padding: 0.4rem 0;
}
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  border-color: var(--navy);
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 32, 51, 0.12);
}
.hp { position: absolute; left: -10000px; }
.file-note { font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.quote-form .btn { width: 100%; margin-top: 0.2rem; }
.form-fine { font-size: 0.78rem; color: var(--muted); margin: 0.55rem 0 0; font-weight: 400; }

/* Layout */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.1rem;
}
.section { padding: 4rem 0; }
.section-tight { padding: 3rem 0; }
.center { text-align: center; }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); color: var(--navy); margin: 0 0 0.7rem; }
h3 { font-size: 1.28rem; color: var(--navy); margin: 1.6rem 0 0.5rem; }
.section-intro {
  max-width: 46rem;
  color: var(--muted);
  margin: 0 auto 2rem;
}
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin: 0 0 0.35rem; }
.prose a { font-weight: 650; }

/* Stats */
.stats {
  background: var(--navy);
  color: var(--cream);
  padding: 1.6rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.stat { text-align: center; }
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 650;
  color: #f0c2ab;
}
.stat span { display: block; font-size: 0.86rem; color: #c9c1b2; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
a.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #c9b79a;
  color: inherit;
}
.card svg { width: 32px; height: 32px; margin-bottom: 0.55rem; color: var(--copper); }
.card h3 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card .more {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 700;
  color: var(--copper-2);
  font-size: 0.9rem;
}

/* Split */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}
.split img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  max-height: 460px;
}
.split.reverse { grid-template-columns: 0.95fr 1.05fr; }
.split.reverse .copy { order: 2; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.2rem 0 1.6rem; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream);
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: var(--navy);
  color: var(--cream);
  font-weight: 650;
}
tr:nth-child(even) td { background: #f7f1e7; }

/* FAQ */
.faq { max-width: 48rem; margin: 0 auto; }
.faq-item {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.55rem;
  overflow: hidden;
}
.faq-item button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
  padding: 0.95rem 1.05rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item button::after {
  content: "+";
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--copper);
  transition: transform 0.2s ease;
}
.faq-item.is-open button::after { transform: rotate(45deg); }
.faq-panel {
  display: none;
  padding: 0 1.05rem 1rem;
  color: var(--muted);
}
.faq-item.is-open .faq-panel { display: block; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Areas */
.area-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.area-list li {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-weight: 650;
}

/* CTA band */
.cta-band {
  background: linear-gradient(160deg, var(--navy) 0%, #243656 100%);
  color: var(--cream);
  text-align: center;
  padding: 3.2rem 1.1rem;
}
.cta-band h2 { color: inherit; }
.cta-band p { max-width: 38rem; margin: 0 auto 1.2rem; color: #d9d1c4; }
.cta-band .btn { min-width: 12rem; }

/* Page hero (interior) */
.page-hero {
  background: var(--navy);
  color: var(--cream);
  padding: 2.6rem 0 2.8rem;
  position: relative;
}
.page-hero.with-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-img, none) center/cover no-repeat;
  opacity: 0.45;
  pointer-events: none;
}
.page-hero.with-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 38, 0.55), rgba(15, 23, 38, 0.88));
  pointer-events: none;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { max-width: min(24ch, 100%); }
.page-hero .lede { max-width: 42rem; }

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.2rem;
  align-items: start;
  padding: 2.6rem 0 4rem;
}
.sticky-form {
  position: sticky;
  top: 88px;
}
.crumb {
  font-size: 0.85rem;
  color: #c9c1b2;
  margin-bottom: 0.8rem;
}
.crumb a { color: #e2b399; text-decoration: none; }

.callout {
  background: #efe6d6;
  border-left: 4px solid var(--copper);
  padding: 0.9rem 1rem;
  margin: 1.2rem 0 1.4rem;
  border-radius: 0 10px 10px 0;
}
.figure {
  margin: 1.3rem 0 1.5rem;
}
.figure img {
  width: 100%;
  border-radius: var(--radius);
  max-height: 420px;
  object-fit: cover;
}
.figure figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.45rem;
}

/* Footer */
.site-footer {
  background: #101827;
  color: #cfc6b8;
  padding: 2.6rem 0 5.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1.6rem;
}
.site-footer a { color: #f3eee4; text-decoration: none; }
.site-footer a:hover { color: #e2b399; }
.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 0.7rem;
  font-family: var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 0.35rem; }
.nap { font-size: 1.05rem; }
.legal { margin-top: 1.8rem; font-size: 0.82rem; color: #8e877c; }

/* Mobile call bar */
.mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--navy);
  padding: 0.55rem 0.7rem calc(0.55rem + env(safe-area-inset-bottom));
  gap: 0.5rem;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
}
.mobile-bar .btn { flex: 1; min-width: 0; padding: 0.75rem 0.6rem; }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }

/* Thank you */
.thanks {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

@media (max-width: 980px) {
  .hero-grid,
  .split,
  .split.reverse,
  .page-layout,
  .footer-grid,
  .stats-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }
  .split.reverse .copy { order: 0; }
  .page-layout { display: flex; flex-direction: column; }
  .sticky-form { position: static; order: -1; margin-bottom: 0.5rem; }
  .hero { min-height: 0; }
  .hero-bg::after {
    background: linear-gradient(180deg, rgba(15, 23, 38, 0.55), rgba(15, 23, 38, 0.92));
  }
  h1 { font-size: 1.7rem; line-height: 1.2; word-break: break-word; }
  .lede { font-size: 1.02rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .header-inner { position: relative; }
  .logo-text strong { font-size: 0.8rem; }
  .nav-toggle {
    display: inline-flex !important;
    align-items: center;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }
  .header-inner .btn-call { display: none; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #101827;
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 1rem 1rem;
    gap: 0;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 0.7rem 0.2rem;
    border-bottom: 1px solid #243049;
  }
  .mobile-bar { display: flex; }
  body { padding-bottom: 4.2rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .area-list { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg, .reveal, .quote-card, .faq-item.is-open .faq-panel, .btn {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 780px) {
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  h1 { font-size: 1.55rem; }
  .chip { width: 100%; text-align: center; }
}
