/*
 * Grand Rapids Michigan Fence - Component Styles
 * Buttons, header, footer, cards, hero, fence-type sections, forms, CTA
 */


/* =========================================================
   1. Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-full);
  font-family: var(--font-manrope);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    background-color var(--transition-fast),
    color            var(--transition-fast),
    border-color     var(--transition-fast),
    box-shadow       var(--transition-fast);
}

/* Primary — fresh green (primary conversion action) */
.btn-primary {
  background-color: var(--color-fresh-green);
  color: var(--color-white);
  border-color: var(--color-fresh-green);
}
.btn-primary:hover {
  background-color: #2D8A58;
  border-color: #2D8A58;
  color: var(--color-white);
}
.btn-primary:focus-visible {
  outline: 3px solid var(--color-fresh-green);
  outline-offset: 3px;
}

/* Outline — transparent → charcoal fill on hover */
.btn-outline {
  background-color: transparent;
  color: var(--color-charcoal);
  border-color: var(--color-charcoal);
}
.btn-outline:hover {
  background-color: var(--color-charcoal);
  color: var(--color-white);
}
.btn-outline:focus-visible {
  outline: 3px solid var(--color-moss-green);
  outline-offset: 3px;
}

/* Ghost white — for dark/blue backgrounds */
.btn-ghost-white {
  background-color: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost-white:hover {
  background-color: rgba(255,255,255,0.15);
  border-color: var(--color-white);
  color: var(--color-white);
}

/* White solid — for dark/blue backgrounds */
.btn-white {
  background-color: var(--color-white);
  color: var(--color-charcoal);
  border-color: var(--color-white);
}
.btn-white:hover {
  background-color: var(--color-warm-cream);
  border-color: var(--color-warm-cream);
  color: var(--color-charcoal);
}

/* Size variants */
.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.05rem;
}
.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

/* Button group */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}


/* =========================================================
   2. Header
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-warm-cream);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-sm);
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.site-logo img {
  height: 52px;
  width: auto;
}

/* Desktop nav */
.site-nav {
  display: flex;
  align-items: center;
}
.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.site-nav__list a {
  font-family: var(--font-manrope);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--color-charcoal);
  padding-block: var(--space-2);
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] {
  color: var(--color-electric-blue);
  border-bottom-color: var(--color-electric-blue);
}

/* Header CTA */
.site-header__cta {
  flex-shrink: 0;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
}
.nav-toggle:hover { background-color: var(--color-soft-stone); }
.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-charcoal);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* Mobile nav drawer */
.site-header__mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-sm);
  overflow: hidden;
}
.site-header__mobile-nav.is-open {
  display: flex;
}
.site-header__mobile-nav a {
  font-family: var(--font-manrope);
  font-weight: 600;
  font-size: var(--text-base);
  text-decoration: none;
  color: var(--color-charcoal);
  padding: var(--space-3) var(--space-md);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.site-header__mobile-nav a:hover {
  background-color: var(--color-soft-stone);
  color: var(--color-electric-blue);
}
.site-header__mobile-nav .btn {
  margin: var(--space-sm) var(--space-md);
  width: calc(100% - var(--space-2xl));
  justify-content: center;
}

/* Pin mobile CTA text to white — prevents charcoal link color from bleeding in */
.site-header__mobile-nav .btn-primary,
.site-header__mobile-nav .btn-primary:link,
.site-header__mobile-nav .btn-primary:visited,
.site-header__mobile-nav .btn-primary:hover,
.site-header__mobile-nav .btn-primary:focus,
.site-header__mobile-nav .btn-primary:focus-visible,
.site-header__mobile-nav .btn-primary:active {
  color: var(--color-white);
}

@media (max-width: 900px) {
  .site-nav,
  .site-header__cta { display: none; }
  .nav-toggle { display: flex; }
}


/* =========================================================
   3. Footer
   ========================================================= */

.site-footer {
  background-color: var(--color-charcoal);
  color: var(--color-warm-cream);
}

.site-footer__inner {
  padding-block: var(--space-2xl) var(--space-xl);
}

.site-footer__columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.site-footer__logo {
  display: block;
  margin-bottom: var(--space-md);
}
.site-footer__logo img {
  display: block;
  width: 270px;
  height: auto;
  max-width: 100%;
  margin-left: 0;
}

.site-footer__tagline {
  font-family: var(--font-manrope);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-moss-green);
  margin-bottom: var(--space-2);
}

.site-footer__description {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-soft-stone);
  max-width: 280px;
}

.site-footer__nav-heading {
  font-family: var(--font-manrope);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-soft-stone);
  margin-bottom: var(--space-md);
}

.site-footer__nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.site-footer__nav-list a {
  font-size: var(--text-sm);
  color: var(--color-soft-stone);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.site-footer__nav-list a:hover {
  color: var(--color-white);
}

.site-footer__divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-block: var(--space-lg) var(--space-md);
}

.site-footer__bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.site-footer__disclosure,
.site-footer__copyright {
  font-size: var(--text-xs);
  color: rgba(239,232,218,0.6);
  line-height: 1.5;
}

.site-footer__copyright {
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .site-footer__columns {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .site-footer__columns { grid-template-columns: 1fr; gap: var(--space-lg); }
  .site-footer__logo img { width: 210px; }
  .site-footer__bottom { flex-direction: column; }
  .site-footer__copyright { text-align: left; }
}


/* =========================================================
   4. Breadcrumb
   ========================================================= */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}
.breadcrumb__sep {
  color: var(--color-border);
  user-select: none;
}
.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.breadcrumb a:hover {
  color: var(--color-electric-blue);
  text-decoration: underline;
}
.breadcrumb [aria-current="page"] {
  color: var(--color-charcoal);
  font-weight: 500;
}


/* =========================================================
   5. Hero — Homepage
   ========================================================= */

.hero-home {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-home__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-home__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-home__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(34, 34, 34, 0.78) 0%,
    rgba(34, 34, 34, 0.55) 55%,
    rgba(34, 34, 34, 0.18) 100%
  );
}

.hero-home__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: var(--space-2xl);
}

.hero-home__inner {
  max-width: 680px;
}

.hero-home__eyebrow {
  color: var(--color-soft-sage);
}

.hero-home__title {
  font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
  color: var(--color-white);
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

.hero-home__sub {
  font-size: var(--text-lg);
  color: rgba(250, 248, 243, 0.85);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: var(--space-lg);
}

@media (max-width: 600px) {
  .hero-home { min-height: 65vh; }
  .hero-home__content { padding-block: var(--space-xl); }
}


/* =========================================================
   6. Hero — Interior Pages (warm cream, compact)
   ========================================================= */

.hero-page {
  background-color: var(--color-warm-cream);
  padding-block: var(--space-xl) var(--space-lg);
}

.hero-page__eyebrow { margin-bottom: var(--space-3); }

.hero-page__title {
  margin-bottom: var(--space-sm);
}

.hero-page__sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 660px;
  line-height: 1.65;
}


/* =========================================================
   7. Hero — Fence Type pages (two-column, image right)
   ========================================================= */

.hero-ft {
  background-color: var(--color-warm-cream);
  padding-block: var(--space-xl);
  overflow: hidden;
}

.hero-ft__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero-ft__content {}

.hero-ft__eyebrow { margin-bottom: var(--space-3); }
.hero-ft__title   { margin-bottom: var(--space-sm); }
.hero-ft__sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

.hero-ft__image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.hero-ft__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 900px) {
  .hero-ft__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .hero-ft__image { order: -1; }
}


/* =========================================================
   8. Fence Type Cards (hub page + homepage)
   ========================================================= */

.fence-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.fence-card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  text-decoration: none;
  color: inherit;
}
.fence-card:hover {
  box-shadow: 0 8px 32px rgba(34,34,34,0.1);
  transform: translateY(-2px);
}

.fence-card__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.fence-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.fence-card:hover .fence-card__image img {
  transform: scale(1.04);
}

.fence-card__body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.fence-card__title {
  font-family: var(--font-manrope);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-charcoal);
}

.fence-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
  flex: 1;
}

.fence-card__link {
  font-family: var(--font-manrope);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-electric-blue);
  text-decoration: none;
  margin-top: var(--space-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}
.fence-card__link::after { content: ' →'; }

@media (max-width: 1100px) { .fence-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .fence-cards { grid-template-columns: 1fr; } }


/* =========================================================
   9. Pros / Cons Table
   ========================================================= */

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.pros-cons__col {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.pros-cons__heading {
  font-family: var(--font-manrope);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.pros-cons__heading--pros { color: var(--color-moss-green); }
.pros-cons__heading--cons { color: #B04B2E; }

.pros-cons__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.pros-cons__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.55;
}
.pros-cons__icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.55;
}

@media (max-width: 600px) {
  .pros-cons { grid-template-columns: 1fr; }
}


/* =========================================================
   10. Cost Table
   ========================================================= */

.cost-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: var(--text-sm);
}
.cost-table thead {
  background-color: var(--color-charcoal);
  color: var(--color-white);
}
.cost-table th {
  font-family: var(--font-manrope);
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  letter-spacing: 0.02em;
}
.cost-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  line-height: 1.4;
  vertical-align: top;
}
.cost-table tr:nth-child(even) td { background-color: var(--color-warm-cream); }
.cost-table tr:last-child td { border-bottom: none; }
.cost-table__note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}


/* =========================================================
   11. Info Cards / Feature Grid
   ========================================================= */

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.info-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.info-card__icon {
  font-size: 1.75rem;
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.info-card__title {
  font-family: var(--font-manrope);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.info-card__text {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
}

@media (max-width: 900px) { .info-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .info-grid { grid-template-columns: 1fr; } }


/* =========================================================
   12. Steps (How it works)
   ========================================================= */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  counter-reset: steps;
}

.step {
  counter-increment: steps;
  position: relative;
  padding-top: var(--space-lg);
}

.step::before {
  content: counter(steps);
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-manrope);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--color-soft-stone);
  line-height: 1;
  letter-spacing: -0.04em;
}

.step__title {
  font-family: var(--font-manrope);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--color-charcoal);
}

.step__text {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--color-text-muted);
}

@media (max-width: 900px) { .steps { grid-template-columns: 1fr; gap: var(--space-md); } }


/* =========================================================
   13. Section headings + intro
   ========================================================= */

.section-intro {
  margin-bottom: var(--space-xl);
}
.section-intro--center {
  text-align: center;
  max-width: 660px;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}
.section-intro .eyebrow { margin-bottom: var(--space-3); }
.section-intro h2 { margin-bottom: var(--space-sm); }
.section-intro p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}


/* =========================================================
   14. CTA Section (Electric Blue)
   ========================================================= */

.cta-section {
  background-color: var(--color-electric-blue);
  color: var(--color-white);
  padding-block: var(--space-2xl);
}

.cta-section__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.cta-section__eyebrow { color: rgba(255,255,255,0.7); }

.cta-section__title {
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.cta-section__text {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

.cta-section__image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.cta-section__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Compact centered CTA (for inner pages) */
.cta-band {
  background-color: var(--color-electric-blue);
  color: var(--color-white);
  padding-block: var(--space-xl);
  text-align: center;
}
.cta-band__title {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}
.cta-band__text {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-lg);
  max-width: 560px;
  margin-inline: auto;
}

@media (max-width: 900px) {
  .cta-section__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .cta-section__image {
    display: block;
    order: -1;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
  }
  .cta-section { padding-block: var(--space-xl); }
}


/* =========================================================
   15. Quote / Contact Form
   ========================================================= */

.form-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md) var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-label {
  font-family: var(--font-manrope);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-charcoal);
}
.form-label .required {
  color: #B04B2E;
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-inter);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  background-color: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-electric-blue);
  box-shadow: 0 0 0 3px rgba(23, 107, 255, 0.12);
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23777167' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25em;
  padding-right: 2.5rem;
}

.form-textarea { min-height: 120px; resize: vertical; }

.form-footer {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.form-footer .btn { width: 100%; }
.form-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: var(--space-lg); }
}


/* =========================================================
   16. Two-column content layout (page template)
   ========================================================= */

.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-2xl);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: calc(var(--space-md) + 70px);
}

.sidebar-card {
  background-color: var(--color-warm-cream);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.sidebar-card__heading {
  font-family: var(--font-manrope);
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--color-charcoal);
}

.toc {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.toc a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-1) 0;
  border-left: 2px solid var(--color-border);
  padding-left: var(--space-sm);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.toc a:hover {
  color: var(--color-electric-blue);
  border-left-color: var(--color-electric-blue);
}

@media (max-width: 1100px) {
  .content-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}


/* =========================================================
   17. Compare Strip (fence type comparison)
   ========================================================= */

.compare-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.compare-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.compare-card__type {
  font-family: var(--font-manrope);
  font-weight: 700;
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  color: var(--color-charcoal);
}

.compare-card__summary {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: var(--space-sm);
}

.compare-card__facts {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.compare-card__fact {
  font-size: var(--text-xs);
  display: flex;
  gap: var(--space-2);
}
.compare-card__fact strong {
  font-family: var(--font-manrope);
  font-weight: 600;
  color: var(--color-charcoal);
  min-width: 80px;
}

@media (max-width: 700px) {
  .compare-strip { grid-template-columns: 1fr; }
}


/* =========================================================
   18. Maintenance / Info Accordion
   ========================================================= */

.accordion {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.accordion__item {
  border-bottom: 1px solid var(--color-border);
}
.accordion__item:last-child { border-bottom: none; }

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-md);
  text-align: left;
  font-family: var(--font-manrope);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-charcoal);
  background: var(--color-white);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}
.accordion__trigger:hover { background-color: var(--color-warm-cream); }
.accordion__icon {
  font-size: 1.2rem;
  transition: transform var(--transition-base);
  flex-shrink: 0;
}
.accordion__item.is-open .accordion__icon {
  transform: rotate(45deg);
}

.accordion__body {
  padding: var(--space-sm) var(--space-md) var(--space-md);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-muted);
  display: none;
  border-top: 1px solid var(--color-border);
  background-color: rgba(248, 251, 255, 0.6);
}
.accordion__item.is-open .accordion__body { display: block; }


/* =========================================================
   19. Alert / Callout
   ========================================================= */

.callout {
  border-left: 4px solid var(--color-moss-green);
  background-color: rgba(111, 138, 99, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  line-height: 1.65;
}
.callout strong { color: var(--color-electric-blue); }

.callout--blue {
  border-left-color: var(--color-electric-blue);
  background-color: rgba(23, 107, 255, 0.06);
}
.callout--blue strong { color: var(--color-electric-blue); }


/* =========================================================
   20. Image + Caption
   ========================================================= */

.img-block {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.img-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-block--aspect-16-9 { aspect-ratio: 16 / 9; }
.img-block--aspect-4-3  { aspect-ratio: 4 / 3; }
.img-block--aspect-3-2  { aspect-ratio: 3 / 2; }

.img-caption {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-2);
  font-style: italic;
}


/* =========================================================
   21. Tag / Badge
   ========================================================= */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3em 0.75em;
  border-radius: var(--radius-full);
  font-family: var(--font-manrope);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  background-color: var(--color-soft-stone);
  color: var(--color-charcoal);
}
.tag-green {
  background-color: rgba(111,138,99,0.12);
  color: var(--color-moss-green);
}


/* =========================================================
   22. Horizontal rule
   ========================================================= */

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-xl);
}


/* =========================================================
   23. 404 page
   ========================================================= */

.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: var(--space-2xl);
}
.error-page__code {
  font-family: var(--font-manrope);
  font-size: 8rem;
  font-weight: 800;
  color: var(--color-soft-stone);
  line-height: 1;
  letter-spacing: -0.04em;
}
.error-page__title { margin-block: var(--space-sm); }
.error-page__text { color: var(--color-text-muted); margin-bottom: var(--space-lg); }


/* =========================================================
   24. Hero Home — Two-column with quote form
   ========================================================= */

/* Override full-viewport height — let content drive the height */
.hero-home { min-height: 540px; }
.hero-home__content { padding-block: var(--space-xl); }
.hero-home__inner { max-width: none; }

.hero-home__grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--space-xl);
  align-items: center;
}

.hero-home__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  color: rgba(255,255,255,0.75);
  font-family: var(--font-manrope);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  margin-top: var(--space-md);
  transition: color var(--transition-fast);
}
.hero-home__link:hover { color: var(--color-white); }

/* Hero quote form card */
.hero-form-card {
  background-color: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-md);
  box-shadow: 0 24px 64px rgba(0,0,0,0.22), 0 4px 12px rgba(0,0,0,0.1);
  width: 100%;
  min-width: 0;
}
.hero-form-card__heading {
  font-family: var(--font-manrope);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-charcoal);
  margin-bottom: var(--space-md);
}

.hero-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

/* Form success / error messages */
.form-success,
.form-error {
  display: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-top: var(--space-sm);
  text-align: center;
}
.form-success { background: rgba(56,161,105,0.1); border: 1px solid var(--color-fresh-green); color: #276749; }
.form-error   { background: rgba(176,75,46,0.1);  border: 1px solid #B04B2E; color: #B04B2E; }

/* Consent checkbox */
.hero-form-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1.5;
}
.hero-form-consent input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--color-fresh-green);
}
/* Also style consent checkboxes in regular form cards */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1.5;
  grid-column: 1 / -1;
}
.form-consent input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--color-fresh-green);
}

@media (max-width: 960px) {
  .hero-home__grid { grid-template-columns: 1fr; gap: var(--space-lg); }
  .hero-home { min-height: auto; }
  .hero-form-card { box-shadow: 0 8px 24px rgba(0,0,0,0.16); }
}
@media (max-width: 600px) {
  .hero-form-grid { grid-template-columns: 1fr; }
  .hero-form-card { padding: var(--space-sm) var(--space-md); }
}


/* =========================================================
   25. SVG icon classes
   ========================================================= */

.info-icon {
  width: 32px;
  height: 32px;
  color: var(--color-electric-blue);
  display: block;
  flex-shrink: 0;
}
.info-card__icon {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-sm);
  line-height: 1;
}
.icon-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  color: var(--color-fresh-green);
  vertical-align: middle;
}
.icon-warn {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  color: #C07820;
  vertical-align: middle;
}


/* =========================================================
   26. Responsive layout helpers
   ========================================================= */

/* Material rows — fence type comparison pages */
.material-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  margin-bottom: var(--space-2xl);
}
@media (max-width: 700px) {
  .material-row { grid-template-columns: 1fr; gap: var(--space-md); margin-bottom: var(--space-xl); }
  .material-row .img-block { order: -1; }
}

/* Generic two-column content rows (homepage sections) */
.content-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}
@media (max-width: 700px) {
  .content-row { grid-template-columns: 1fr; gap: var(--space-lg); }
  .content-row .img-block { order: -1; }
}

/* Find-a-contractor two-column layout */
.fac-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-2xl);
  align-items: start;
}
@media (max-width: 960px) {
  .fac-layout { grid-template-columns: 1fr; gap: var(--space-lg); }
  .fac-layout .sidebar { position: static; }
}

/* Contact page two-column layout — class replaces inline style so media queries work */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-2xl);
  align-items: start;
}
@media (max-width: 960px) {
  .contact-layout { grid-template-columns: 1fr; gap: var(--space-lg); }
  .contact-layout .sidebar { position: static; }
}

/* Scrollable table wrapper — prevents horizontal overflow on mobile */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
}
.table-responsive .cost-table { min-width: 480px; }

/* Long text overflow wrap */
.prose p, .prose li, td, th {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Prevent narrow flex/grid children from overflowing */
.site-nav__list li,
.site-footer__nav-list li,
.fence-card,
.compare-card,
.info-card,
.sidebar-card {
  min-width: 0;
}

/* Very small viewport: allow button labels to wrap */
@media (max-width: 380px) {
  .btn { white-space: normal; text-align: center; padding-inline: var(--space-sm); }
}

/* Button group: stack vertically on mobile (≤600px) */
@media (max-width: 600px) {
  .btn-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8125rem; /* 13px */
  }
  .btn-group .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    white-space: nowrap;
  }
}


/* =========================================================
   27. Hero CTA buttons
   ========================================================= */

.hero-home__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* Fresh Green primary button — used in hero */
.btn-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-manrope);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: var(--radius-pill, 9999px);
  border: 2px solid var(--color-fresh-green);
  background-color: var(--color-fresh-green);
  color: var(--color-white);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
/* Pin white text on every interaction state — prevents global a:hover blue bleed */
.btn-green:hover,
.btn-green:focus,
.btn-green:active,
.btn-green:visited {
  color: var(--color-white);
  text-decoration: none;
}
.btn-green:hover {
  background-color: #2d9a5b;
  border-color: #2d9a5b;
  transform: translateY(-1px);
}
.btn-green:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}
.btn-green:active {
  background-color: #278751;
  transform: translateY(0);
}

/* Ghost/outlined secondary button for hero — white on dark bg */
.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-manrope);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: var(--radius-pill, 9999px);
  border: 2px solid rgba(255, 255, 255, 0.8);
  background-color: transparent;
  color: var(--color-white);
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
/* Pin white text on every interaction state — prevents global a:hover blue bleed */
.hero-btn-secondary:hover,
.hero-btn-secondary:focus,
.hero-btn-secondary:active,
.hero-btn-secondary:visited {
  color: var(--color-white);
  text-decoration: none;
}
.hero-btn-secondary:hover {
  border-color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.hero-btn-secondary:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}
.hero-btn-secondary:active {
  background-color: rgba(255, 255, 255, 0.08);
  transform: translateY(0);
}


/* =========================================================
   28. Hero mobile layout — separate image below copy
   ========================================================= */

/* Mobile fence image is hidden on desktop */
.hero-mobile-img {
  display: none;
}

@media (max-width: 959px) {
  /* Replace hero background image with dark gradient on mobile */
  .hero-home__bg { display: none; }
  .hero-home {
    background: linear-gradient(150deg, #0d1826 0%, #162040 60%, #0d1826 100%);
  }

  /* Show the mobile fence image below the CTA buttons */
  .hero-mobile-img {
    display: block;
    margin-top: var(--space-lg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
  }
  .hero-mobile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 55%;
    display: block;
  }

  /* Form card gets lighter shadow on mobile */
  .hero-form-card {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    max-width: 100%;
    width: 100%;
  }

  /* Ensure the hero text stays white */
  .hero-home__title,
  .hero-home__sub { color: var(--color-white); }
}

/* Homepage hero CTA group: stack vertically on mobile */
@media (max-width: 600px) {
  .hero-home__ctas {
    flex-direction: column;
    gap: 0.8125rem; /* 13px — within 12–14px spec */
    align-items: stretch;
  }
  .hero-home__ctas .btn-green,
  .hero-home__ctas .hero-btn-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
    white-space: nowrap;
    padding-inline: 1.5rem;
  }
}


/* =========================================================
   29. Mobile cost comparison cards
   ========================================================= */

/* Desktop: show table, hide cards */
.cost-mobile-cards { display: none; }

/* Mobile: hide table, show stacked cards */
@media (max-width: 768px) {
  .cost-table-wrapper { display: none; }

  .cost-mobile-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
  }
}

.cost-card {
  background: var(--color-white);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.cost-card__type {
  font-family: var(--font-manrope);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-charcoal);
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-electric-blue);
}

.cost-card__dl {
  margin: 0;
  padding: 0;
}

.cost-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  padding: var(--space-2) 0;
}
.cost-card__row:not(:last-child) {
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.cost-card__row dt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 400;
  margin: 0;
}
.cost-card__row dd {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-charcoal);
  margin: 0;
  text-align: right;
  white-space: nowrap;
}


/* =========================================================
   30. Additional overflow safety for narrow viewports
   ========================================================= */

/* Prevent any single element from blowing past 100vw */
img, video, iframe, table { max-width: 100%; }

/* Hero form card never exceeds parent on mobile */
@media (max-width: 959px) {
  .hero-home__grid { overflow: hidden; }
  .hero-form-grid { grid-template-columns: 1fr; }
}

/* Ensure content-row text column doesn't overflow */
.content-row > * { min-width: 0; }

/* Footer nav wrap on small viewports */
@media (max-width: 400px) {
  .site-footer__nav-list { flex-direction: column; gap: var(--space-sm); }
}

/* Cost card group labels (cost guide page) */
.cost-card--group-label {
  background: var(--color-electric-blue);
  color: var(--color-white);
  font-family: var(--font-manrope);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-md);
  border-radius: var(--radius-md);
  border: none;
}


/* =========================================================
   31. Wood Fence page — inline-grid to responsive classes
       + shared mobile polish
   ========================================================= */

/* --- Bump container padding to 20px at narrow viewports --- */
@media (max-width: 600px) {
  .container,
  .container-narrow { padding-inline: 20px; }
}

/* --- Fence-type hero: reduce section padding on mobile --- */
@media (max-width: 900px) {
  .hero-ft { padding-block: var(--space-lg) var(--space-md); }
  .hero-ft__title { margin-bottom: var(--space-sm); }
  .hero-ft__sub {
    font-size: var(--text-base);
    margin-bottom: var(--space-md);
  }
  /* Ensure every grid child can shrink on mobile */
  .hero-ft__grid > * { min-width: 0; }
}

/* --- Cedar vs. Pressure-Treated two-col grid --- */
.cedar-pt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
  margin-bottom: var(--space-xl);
}
@media (max-width: 768px) {
  .cedar-pt-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* --- Michigan weather two-col grid ---
     align-items:start keeps the right-side image and callout
     anchored when accordion items open/close             --- */
.weather-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}
@media (max-width: 768px) {
  .weather-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  /* Image + callout column moves below the full accordion group */
  .weather-grid > :last-child { order: 1; }
  .weather-grid > :first-child { order: 0; }
}

/* --- Maintenance section two-col grid --- */
.maintenance-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
  margin-bottom: var(--space-xl);
}
@media (max-width: 768px) {
  .maintenance-two-col {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* --- Maintenance photo pair (2-col) --- */
.maintenance-img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
@media (max-width: 600px) {
  .maintenance-img-pair {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
}

/* --- Photo gallery strip (3-col) --- */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}
@media (max-width: 700px) {
  .gallery-strip { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) and (min-width: 701px) {
  .gallery-strip { grid-template-columns: 1fr 1fr; }
}

/* --- Info-grid cards: full width on very small screens --- */
@media (max-width: 600px) {
  .info-card {
    width: 100%;
    box-sizing: border-box;
  }
  /* Remove fixed heights that can compress cards */
  .info-card__icon { height: auto; }
}

/* --- Sidebar / TOC: ensure full-width and no sticky on mobile --- */
@media (max-width: 1100px) {
  .content-with-sidebar > * { min-width: 0; }
  .sidebar {
    position: static;
    width: 100%;
  }
  .sidebar-card {
    width: 100%;
    box-sizing: border-box;
  }
  .toc a {
    display: block;
    padding: var(--space-2) var(--space-sm);
  }
}

/* --- Quote sidebar card: full-width on mobile --- */
@media (max-width: 768px) {
  .sidebar-card { margin-bottom: var(--space-sm); }
}

/* --- Section intro: tighter top margin on mobile --- */
@media (max-width: 600px) {
  .section-intro { margin-bottom: var(--space-lg); }
  .section-intro h2 { font-size: clamp(var(--text-2xl), 7vw, var(--text-3xl)); }
}

/* --- Pros/cons cols: ensure readable padding on mobile --- */
@media (max-width: 600px) {
  .pros-cons__col { padding: var(--space-sm); }
}

/* --- Compare strip: cards full-width on mobile (already 1fr < 700px;
     just add min-width safety)                              --- */
.compare-card { min-width: 0; }

/* --- CTA section: ensure image uses full width on mobile --- */
@media (max-width: 900px) {
  .cta-section__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* --- Fence Cost page: How to Get an Accurate Quote — button group --- */
.quote-btn-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem; /* 16px horizontal gap on desktop */
  margin-top: var(--space-lg);
}
@media (max-width: 600px) {
  .quote-btn-group {
    flex-direction: column;
    gap: 0.875rem; /* 14px vertical gap on mobile */
    align-items: stretch; /* both buttons fill the same width */
  }
  .quote-btn-group .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* =========================================================
   32. Vinyl Fence page: maintenance seasonal timeline
   ========================================================= */

.maintenance-timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.maintenance-phase {
  background: var(--color-warm-cream);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}
.maintenance-phase__heading {
  font-family: var(--font-manrope);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-charcoal);
  margin-bottom: var(--space-sm);
}
.maintenance-phase ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}
.maintenance-phase li {
  font-size: var(--text-sm);
  line-height: 1.6;
  padding-left: 1.25rem;
  position: relative;
}
.maintenance-phase li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-electric-blue);
}
@media (max-width: 768px) {
  .maintenance-timeline {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   33. Vinyl Fence page: vinyl vs wood comparison
   ========================================================= */

/* Desktop: table is visible; mobile cards are hidden */
.vinyl-vs-mobile { display: none; }
.vinyl-vs-wrapper { overflow-x: auto; margin-bottom: var(--space-lg); }

@media (max-width: 768px) {
  .vinyl-vs-wrapper { display: none; }
  .vinyl-vs-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: var(--space-lg);
  }
}
.vinyl-vs-card {
  background: var(--color-warm-cream);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}
.vinyl-vs-card__label {
  font-family: var(--font-manrope);
  font-weight: 700;
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-electric-blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}
.vinyl-vs-card__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}
.vinyl-vs-card__brand {
  display: block;
  font-family: var(--font-manrope);
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: 0.2rem;
}
.vinyl-vs-card__body p {
  font-size: var(--text-sm);
  line-height: 1.55;
  margin: 0;
}

/* =========================================================
   39. Thank-you page — numbered steps + disclosure
   ========================================================= */

.ty-steps {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.ty-step {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.ty-step__num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background-color: var(--color-electric-blue);
  color: var(--color-white);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.ty-step__body {
  flex: 1;
}

.ty-step__label {
  display: block;
  font-size: var(--text-base);
  color: var(--color-charcoal);
  margin-bottom: 0.25rem;
}

.ty-step__desc {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.ty-disclosure {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-sm);
  margin-top: var(--space-md);
  line-height: 1.6;
}

/* =========================================================
   38. Mobile form system — compact layout for contact + find-a-contractor (≤768px)
   =========================================================

   Root causes addressed here:
   - .form-card padding was var(--space-2xl) = 7.5rem (120px); ≤700px rule dropped it
     to var(--space-lg) = 3.5rem (56px) — still far too large on narrow viewports.
   - .form-grid gap was var(--space-md) = 2rem (32px) between fields.
   - Contact page used an inline grid style with no breakpoint (now replaced with
     .contact-layout class; its mobile override lives in the .fac-layout block above).
   - .form-consent checkbox was 16×16px (below comfortable tap spec).
   - .btn-primary had no :visited/:active color pins — potential tap-color bleed.

   Scope: .form-card, .form-grid, .form-input/select/textarea, .form-consent,
          .form-footer, .callout. Does NOT touch .hero-form-card / .hero-form-grid /
          .hero-form-consent — those are separate classes used only by the homepage hero.
   ========================================================= */

@media (max-width: 768px) {

  /* 1. Form card: compact padding, subtle shadow, no overflow */
  .form-card {
    padding: 1.25rem;                              /* 20px — within 20–24px spec */
    box-shadow: 0 8px 24px rgba(31, 31, 31, 0.06);
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }

  /* 2. Form grid: single column, compact gaps between field groups */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1.125rem;  /* 18px — within 16–20px spec */
  }

  /* 3. Individual field: tighter label-to-input gap */
  .form-field {
    gap: 0.25rem;
    min-width: 0;
  }

  /* 4. Inputs / selects / textarea: ensure they don't overflow,
        keep current padding (0.75rem = 12px vertical — already reasonable) */
  .form-input,
  .form-select,
  .form-textarea {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }

  /* 5. Textarea: cap minimum height so it doesn't dominate the screen */
  .form-textarea {
    min-height: 100px;
  }

  /* 6. Callout: full content width, compact padding, no edge bleed */
  .callout {
    box-sizing: border-box;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-left: 0;
    margin-right: 0;
  }

  /* 7. Consent checkbox: bump to 20px for comfortable tap + visual alignment */
  .form-consent {
    align-items: flex-start;
    gap: 0.5rem;
  }
  .form-consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 1px;
  }

  /* 8. Submit button: full width, at least 44px tap height */
  .form-footer {
    margin-top: var(--space-sm);
  }
  .form-footer .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  /* 9. btn-primary color pins — prevents tap/visited/active bleed on mobile */
  .form-footer .btn-primary {
    background-color: var(--color-fresh-green);
    border-color: var(--color-fresh-green);
    color: var(--color-white);
  }
  .form-footer .btn-primary:hover,
  .form-footer .btn-primary:focus,
  .form-footer .btn-primary:active,
  .form-footer .btn-primary:visited {
    color: var(--color-white);
    text-decoration: none;
  }
  .form-footer .btn-primary:hover {
    background-color: #2D8A58;
    border-color: #2D8A58;
  }
  .form-footer .btn-primary:focus-visible {
    outline: 3px solid rgba(56, 161, 105, 0.45);
    outline-offset: 3px;
  }
  .form-footer .btn-primary:active {
    background-color: #278751;
  }
}


/* =========================================================
   37. Mobile hero — white background, image-first order (≤768px)
   =========================================================

   The existing @media (max-width: 959px) block (section 28) applies a dark
   gradient background and shows .hero-mobile-img below the CTAs. These rules
   override that from 768px down: white background, charcoal text, image
   reordered to top via flex order. Desktop (>768px) is untouched.
   ========================================================= */

@media (max-width: 768px) {

  /* 1. White background — override the dark gradient from the 959px rule */
  .hero-home {
    background: var(--color-white);
  }

  /* 2. Charcoal text — override the white text from the 959px rule */
  .hero-home__title {
    color: var(--color-charcoal);
  }
  .hero-home__sub {
    color: var(--color-text-muted); /* #4A5568 — dark, readable on white */
  }

  /* 3. Reorder: flex-column on the inner copy block so we can use `order` */
  .hero-home__inner {
    display: flex;
    flex-direction: column;
  }

  /* 4. Float the mobile image to the top (before h1) */
  .hero-mobile-img {
    order: -1;            /* first child visually */
    margin-top: 0;
    margin-bottom: var(--space-lg);
    aspect-ratio: 4 / 3; /* portrait-ish crop gives more fence, less sky */
  }
  .hero-mobile-img img {
    object-position: center 68%; /* shift down — fence fills frame, sky is cropped */
  }

  /* 5. Explicit order for remaining children (no change, just insurance) */
  .hero-home__title  { order: 0; }
  .hero-home__sub    { order: 1; }
  .hero-home__ctas   { order: 2; }

  /* 6. Secondary button — charcoal text + charcoal border on white background */
  .hero-home .hero-btn-secondary {
    color: var(--color-charcoal);
    border-color: var(--color-charcoal);
    background-color: transparent;
  }
  /* Pin charcoal text on all passive states (visited, focus, active) */
  .hero-home .hero-btn-secondary:hover,
  .hero-home .hero-btn-secondary:focus,
  .hero-home .hero-btn-secondary:active,
  .hero-home .hero-btn-secondary:visited {
    color: var(--color-charcoal);
    text-decoration: none;
  }
  .hero-home .hero-btn-secondary:hover {
    background-color: rgba(34, 34, 34, 0.06);
    border-color: var(--color-electric-blue);
    transform: translateY(-1px);
  }
  .hero-home .hero-btn-secondary:focus-visible {
    outline: 3px solid rgba(0, 110, 235, 0.4);
    outline-offset: 3px;
  }
  .hero-home .hero-btn-secondary:active {
    background-color: rgba(34, 34, 34, 0.10);
    transform: translateY(0);
  }

  /* 7. Primary button — explicitly pin Fresh Green + white text (no bleed) */
  .hero-home .btn-green {
    background-color: var(--color-fresh-green);
    border-color: var(--color-fresh-green);
    color: var(--color-white);
  }
  .hero-home .btn-green:hover,
  .hero-home .btn-green:focus,
  .hero-home .btn-green:active,
  .hero-home .btn-green:visited {
    color: var(--color-white);
    text-decoration: none;
  }
  .hero-home .btn-green:hover {
    background-color: #2d9a5b;
    border-color: #2d9a5b;
    transform: translateY(-1px);
  }
  .hero-home .btn-green:focus-visible {
    outline: 3px solid rgba(56, 161, 105, 0.45);
    outline-offset: 3px;
  }
  .hero-home .btn-green:active {
    background-color: #278751;
    transform: translateY(0);
  }

  /* 8. Reduce top padding — image leads the section, no need for extra breathing room above */
  .hero-home__content {
    padding-block-start: var(--space-md);
  }

  /* 9. CTA gap fix — --space-lg is 3.5rem (56px). Sub has margin-bottom: 56px AND
        ctas has margin-top: 56px. In a flex column, margins don't collapse, so the
        gap was 112px total. Zero out the top margin; sub's bottom margin alone gives
        ~24px of breathing room (overridden to 1.5rem below to be explicit). */
  .hero-home__ctas {
    margin-top: 0;
  }
  .hero-home__sub {
    margin-bottom: 1.5rem; /* 24px — within the 24–32px spec */
  }

  /* 10. Shadow wedge fix — the 959px block sets overflow:hidden on .hero-home__grid
         to prevent tablet overflow. On a single-column white hero, this hard-clips
         the form card's box-shadow at the grid boundary, creating triangular artifacts
         at the card corners. Release the clip at mobile widths; single-column layout
         has no overflow risk. Use the clean subtle shadow specified in the brief. */
  .hero-home__grid {
    overflow: visible;
  }
  .hero-form-card {
    box-shadow: 0 8px 24px rgba(31, 31, 31, 0.08);
  }
}


/* --- Footer brand column: logo and text share the same left edge --- */
.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.site-footer__brand .site-footer__tagline,
.site-footer__brand .site-footer__description {
  margin-left: 0;
  padding-left: 0;
}


/* =========================================================
   34. Details/summary accordion (service-page FAQ + Michigan sections)
   ========================================================= */

/* Style <summary> to match the button-based .accordion__trigger */
details.accordion__item > summary.accordion__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-md);
  text-align: left;
  font-family: var(--font-manrope);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-charcoal);
  background: var(--color-white);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  user-select: none;
  min-height: 56px; /* exceeds 44px tap target requirement */
}

/* Remove native disclosure triangle across browsers */
details.accordion__item > summary.accordion__summary::-webkit-details-marker {
  display: none;
}
details.accordion__item > summary.accordion__summary::marker {
  content: '';
}

/* Custom +/- indicator aligned right */
details.accordion__item > summary.accordion__summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-electric-blue);
  line-height: 1;
  flex-shrink: 0;
  width: 1.4rem;
  text-align: center;
}
details[open].accordion__item > summary.accordion__summary::after {
  content: '\2212'; /* minus sign */
}
details.accordion__item > summary.accordion__summary:hover {
  background-color: var(--color-warm-cream);
}

/* KEY FIX: override the unconditional display:none when details is open */
details[open] > .accordion__body {
  display: block;
}

/* Ensure body has comfortable padding and border-top separation */
details.accordion__item > .accordion__body {
  padding: var(--space-md);
  border-top: 1px solid var(--color-border);
  background-color: rgba(248, 251, 255, 0.6);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-muted);
}
details.accordion__item > .accordion__body p {
  margin: 0;
}

/* Mobile: ensure full-width, no horizontal overflow */
@media (max-width: 600px) {
  details.accordion__item > summary.accordion__summary {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    min-height: 52px;
  }
  details.accordion__item > .accordion__body {
    padding: var(--space-sm) var(--space-md);
  }
}


/* =========================================================
   35. Sidebar card link contrast
   Links inside .sidebar-card sit on a warm-cream / light background.
   The inherited .site-footer__nav-list rule uses --color-soft-stone
   (#D9ECFF) which is near-invisible on light backgrounds.
   These rules restore readable Electric Blue contrast.
   ========================================================= */

.sidebar-card a:not(.btn) {
  color: var(--color-electric-blue);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.sidebar-card a:not(.btn):hover,
.sidebar-card a:not(.btn):focus-visible {
  color: #0f52cc;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar-card a:not(.btn):visited {
  color: var(--color-electric-blue);
}

/* Ensure sidebar-card has consistent padding, radius, and gap */
.fac-layout .sidebar-card {
  background-color: var(--color-warm-cream);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.fac-layout .sidebar-card:last-child {
  margin-bottom: 0;
}

.fac-layout .sidebar-card p {
  line-height: 1.65;
}

.fac-layout .sidebar-card .sidebar-card__heading {
  margin-bottom: var(--space-sm);
}


/* =========================================================
   35. vinyl-vs-table: full visual styling (was relying on browser defaults)
   ========================================================= */

.vinyl-vs-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: var(--text-sm);
  table-layout: auto;
}
.vinyl-vs-table thead {
  background-color: var(--color-charcoal);
  color: var(--color-white);
}
.vinyl-vs-table th {
  font-family: var(--font-manrope);
  font-weight: 600;
  padding: 0.875rem 1.25rem;
  text-align: left;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.vinyl-vs-table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  line-height: 1.5;
  vertical-align: top;
}
/* First column: factor/label — gets priority width */
.vinyl-vs-table th:first-child,
.vinyl-vs-table td:first-child {
  min-width: 140px;
  width: 25%;
}
.vinyl-vs-table tr:nth-child(even) td { background-color: var(--color-warm-cream); }
.vinyl-vs-table tr:last-child td { border-bottom: none; }


/* =========================================================
   36. Cost-factor mobile cards with labeled rows (replaces unlabeled spans)
   ========================================================= */

.vinyl-vs-card__factor {
  font-family: var(--font-manrope);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-charcoal);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-electric-blue);
}
.vinyl-vs-card__dl {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.vinyl-vs-card__row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: var(--space-sm) 0;
}
.vinyl-vs-card__row:not(:last-child) {
  border-bottom: 1px solid var(--color-border);
}
.vinyl-vs-card__row dt {
  font-family: var(--font-manrope);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-electric-blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}
.vinyl-vs-card__row dd {
  font-size: var(--text-sm);
  color: var(--color-charcoal);
  line-height: 1.5;
  margin: 0;
}
