/* ============================================================
   Swenson Supply — The Culvert Headquarters
   Premium-minimal single page. Inter, 3 colors, zero clutter.
   ============================================================ */

:root {
  --ink: #10181e;
  --ink-2: #0b1116;
  --bg: #fcfcfb;
  --bg-soft: #f4f4f2;
  --line: rgba(16, 24, 30, 0.12);
  --line-dark: rgba(252, 252, 251, 0.16);
  --muted: rgba(16, 24, 30, 0.62);
  --muted-dark: rgba(252, 252, 251, 0.64);
  --accent: #f25c0a;
  --accent-ink: #ffffff;
  --radius: 6px;
  --font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --pad-section: clamp(88px, 11vw, 160px);
  --container: 1240px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* ---------- type scale ---------- */

h1, h2, h3 { margin: 0; text-wrap: balance; }

.display {
  font-size: clamp(2.6rem, 6.2vw, 5.4rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.headline {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
  max-width: 56ch;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 16px 28px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
  min-height: 44px;
}

.btn:active { transform: translateY(1px); }

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-accent:hover { background: color-mix(in oklch, var(--accent), black 12%); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: rgba(16, 24, 30, 0.35);
}
.btn-outline:hover { border-color: var(--ink); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-outline-light:hover { border-color: #fff; }

.btn-sm { padding: 11px 20px; font-size: 0.92rem; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 76px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  line-height: 1.1;
}
.wordmark .mark { flex: none; }
.wordmark-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.wordmark .name {
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.wordmark .tag {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.main-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--ink); }

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: url('assets/culverts-stacked.jpg');
  background-size: cover;
  background-position: center 30%;
  filter: grayscale(0.5) brightness(0.6) contrast(1.05);
  opacity: 0.5;
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(16, 24, 30, 0.92) 18%, rgba(16, 24, 30, 0.55) 58%, rgba(16, 24, 30, 0.78) 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  display: none;
  background: repeating-linear-gradient(
    -32deg,
    transparent 0px,
    transparent 42px,
    rgba(255, 255, 255, 0.045) 42px,
    rgba(255, 255, 255, 0.045) 46px
  );
}
.hero-pattern::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -32deg,
    transparent 0px,
    transparent 230px,
    rgba(255, 255, 255, 0.03) 230px,
    rgba(255, 255, 255, 0.03) 320px
  );
}

[data-hero="pattern"] .hero-media { display: none; }
[data-hero="pattern"] .hero-pattern { display: block; }

.hero-inner {
  position: relative;
  padding-block: clamp(96px, 14vw, 190px) clamp(72px, 9vw, 130px);
}

.hero h1 {
  max-width: 14ch;
  margin-bottom: 28px;
}

.hero .lede {
  color: var(--muted-dark);
  margin: 0 0 44px;
  max-width: 46ch;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.trust-strip {
  position: relative;
  border-top: 1px solid var(--line-dark);
}
.trust-strip .container {
  display: flex;
  gap: clamp(24px, 5vw, 72px);
  padding-block: 22px;
  flex-wrap: wrap;
}
.trust-strip .item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--muted-dark);
}
.trust-strip .item strong {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

/* ---------- shared section rhythm ---------- */

.section { padding-block: var(--pad-section); }

.section-head { margin-bottom: clamp(40px, 6vw, 72px); }

/* ---------- products ---------- */

.product-hero {
  margin: 0 0 clamp(40px, 6vw, 72px);
}
.product-hero img {
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
  mix-blend-mode: multiply;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.product-card {
  background: var(--bg);
  padding: clamp(28px, 3vw, 44px) clamp(22px, 2.4vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 320px;
}

.product-card .icon {
  width: 44px;
  height: 44px;
  color: var(--ink);
}
.product-card .icon svg { width: 100%; height: 100%; }

.product-card h3 {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  text-wrap: pretty;
}

.product-card .link {
  margin-top: auto;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.product-card .link::after { content: '→'; transition: transform 0.15s ease; }
.product-card .link:hover::after { transform: translateX(3px); }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.about-copy p {
  margin: 0 0 1.2em;
  color: var(--muted);
  font-size: 1.08rem;
  text-wrap: pretty;
}
.about-copy p:last-child { margin-bottom: 0; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
  margin-top: clamp(56px, 7vw, 96px);
}

.stat {
  background: var(--bg);
  padding: clamp(32px, 4vw, 52px) clamp(20px, 3vw, 44px);
}
.stat .num {
  font-size: clamp(3.2rem, 6vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat .label {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- delivery (dark) ---------- */

.delivery {
  background: var(--ink);
  color: #fff;
}

.delivery .eyebrow { color: var(--muted-dark); }

.delivery-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.delivery .lede { color: var(--muted-dark); margin: 0 0 48px; }

.delivery-photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.delivery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.35) contrast(1.02);
}

.steps {
  display: flex;
  flex-direction: column;
}
.step {
  display: flex;
  gap: 22px;
  align-items: baseline;
  padding-block: 22px;
  border-top: 1px solid var(--line-dark);
}
.step:last-child { border-bottom: 1px solid var(--line-dark); }
.step .n {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted-dark);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
}
.step .t {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* ---------- reviews ---------- */

.reviews { background: var(--bg-soft); }

.featured-quote {
  max-width: 880px;
  margin: 0 auto clamp(56px, 7vw, 88px);
  text-align: center;
}
.featured-quote blockquote {
  margin: 0 0 28px;
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.featured-quote cite {
  font-style: normal;
  font-size: 1rem;
  color: var(--muted);
}

.stars {
  display: inline-flex;
  gap: 3px;
  color: var(--ink);
  margin-bottom: 24px;
}
.stars svg { width: 17px; height: 17px; }

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.review-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review-card .stars { margin: 0; }
.review-card .stars svg { width: 13px; height: 13px; }
.review-card p {
  margin: 0;
  font-size: 0.98rem;
  text-wrap: pretty;
}
.review-card cite {
  font-style: normal;
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: auto;
}

/* ---------- quote form ---------- */

.quote-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.quote-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-size: 0.85rem;
  font-weight: 600;
}
.field label .opt {
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field textarea {
  font: inherit;
  font-size: 1rem;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.15s ease;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.field input.invalid,
.field textarea.invalid { border-color: var(--accent); }

.field .err {
  font-size: 0.8rem;
  color: var(--accent);
  display: none;
}
.field.show-err .err { display: block; }

.quote-form .btn { grid-column: 1 / -1; justify-self: start; padding-inline: 40px; }

.form-success {
  grid-column: 1 / -1;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 32px;
  display: none;
}
.form-success h3 { font-size: 1.3rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.form-success p { margin: 0; color: var(--muted); }
.quote-form.sent .form-success { display: block; }
.quote-form.sent .field,
.quote-form.sent .btn { display: none; }

.prefer-talk {
  border-left: 1px solid var(--line);
  padding-left: clamp(28px, 4vw, 56px);
}
.prefer-talk h3 {
  font-size: 1.05rem;
  font-weight: 650;
  margin-bottom: 16px;
}
.prefer-talk .big-phone {
  display: block;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  margin-bottom: 20px;
}
.prefer-talk .big-phone:hover { color: var(--accent); }
.prefer-talk .hours {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
}
.prefer-talk .hours strong { color: var(--ink); font-weight: 600; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink-2);
  color: var(--muted-dark);
  font-size: 0.92rem;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  padding-block: clamp(48px, 6vw, 72px) clamp(36px, 5vw, 56px);
}

.site-footer .wordmark .name { color: #fff; }
.site-footer .wordmark .tag { color: var(--muted-dark); }
.footer-about { margin-top: 16px; max-width: 36ch; text-wrap: pretty; }

.footer-col h4 {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--muted-dark); text-decoration: none; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding-block: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

/* ---------- mobile sticky call bar ---------- */

.call-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--ink-2);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  gap: 10px;
  border-top: 1px solid var(--line-dark);
}
.call-bar .btn { flex: 1; }

/* ---------- fade-up on scroll ---------- */

.fade-up { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 1.1s cubic-bezier(0.16, 0.7, 0.18, 1), transform 1.1s cubic-bezier(0.16, 0.7, 0.18, 1);
    will-change: opacity, transform;
  }
  .fade-up.in { opacity: 1; transform: none; }

  /* grids that stagger their children don't move as a whole — children do */
  .product-grid.fade-up,
  .stats.fade-up,
  .review-grid.fade-up { opacity: 1; transform: none; }

  /* staggered reveal — grid children cascade in one after another */
  .product-grid .product-card,
  .stats .stat,
  .review-grid .review-card {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 1s cubic-bezier(0.16, 0.7, 0.18, 1), transform 1s cubic-bezier(0.16, 0.7, 0.18, 1);
  }
  .product-grid.in .product-card,
  .stats.in .stat,
  .review-grid.in .review-card {
    opacity: 1;
    transform: none;
  }
  .product-grid.in .product-card:nth-child(1),
  .stats.in .stat:nth-child(1),
  .review-grid.in .review-card:nth-child(1) { transition-delay: 0.1s; }
  .product-grid.in .product-card:nth-child(2),
  .stats.in .stat:nth-child(2),
  .review-grid.in .review-card:nth-child(2) { transition-delay: 0.24s; }
  .product-grid.in .product-card:nth-child(3),
  .stats.in .stat:nth-child(3),
  .review-grid.in .review-card:nth-child(3) { transition-delay: 0.38s; }
  .product-grid.in .product-card:nth-child(4),
  .review-grid.in .review-card:nth-child(4) { transition-delay: 0.52s; }
  .review-grid.in .review-card:nth-child(5) { transition-delay: 0.66s; }

  /* delivery steps reveal in sequence */
  .delivery .fade-up.in .step {
    animation: step-in 0.85s cubic-bezier(0.16, 0.7, 0.18, 1) both;
  }
  .delivery .fade-up.in .step:nth-child(1) { animation-delay: 0.2s; }
  .delivery .fade-up.in .step:nth-child(2) { animation-delay: 0.4s; }
  .delivery .fade-up.in .step:nth-child(3) { animation-delay: 0.6s; }
  @keyframes step-in {
    from { opacity: 0; transform: translateX(-14px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- hover motion (subtle lift) ---------- */

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .product-card,
  .review-card,
  .stat {
    transition: transform 0.3s cubic-bezier(0.16, 0.7, 0.18, 1),
                box-shadow 0.3s cubic-bezier(0.16, 0.7, 0.18, 1),
                opacity 0.7s cubic-bezier(0.16, 0.7, 0.18, 1);
  }
  .product-card:hover,
  .review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px -22px rgba(16, 24, 30, 0.35);
  }
  .product-card .icon { transition: transform 0.3s cubic-bezier(0.16, 0.7, 0.18, 1); }
  .product-card:hover .icon { transform: translateY(-2px) scale(1.04); }

  .stat:hover .num { color: var(--accent); }
  .stat .num { transition: color 0.3s ease; }

  .delivery-photo img,
  .product-hero img { transition: transform 0.6s cubic-bezier(0.16, 0.7, 0.18, 1); }
  .delivery-photo:hover img { transform: scale(1.04); }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-card { min-height: 260px; }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
  }
  .menu-open .main-nav { display: flex; }
  .main-nav a { padding: 14px clamp(20px, 4vw, 48px); font-size: 1.05rem; }

  .menu-toggle { display: flex; }
  .header-actions { margin-left: auto; }
  .header-actions .btn-quote-header { display: none; }

  .about-grid,
  .delivery-grid,
  .quote-grid { grid-template-columns: 1fr; }

  .delivery-photo { aspect-ratio: 16 / 10; order: -1; }

  .prefer-talk {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 40px;
  }

  .stats { grid-template-columns: 1fr; }
  .stat { display: flex; align-items: baseline; gap: 20px; }
  .stat .label { margin-top: 0; }

  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-main > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 0; }
  .review-grid { grid-template-columns: 1fr; }
  .quote-form { grid-template-columns: 1fr; }
  .call-bar { display: flex; }
  body { padding-bottom: 76px; }
  .hero-ctas .btn { flex: 1 1 100%; }

  /* keep the header on one line at narrow widths */
  .site-header .container { gap: 12px; }
  .header-actions { gap: 8px; }
  .header-actions .btn-sm { padding: 11px 14px; }

  .footer-main { grid-template-columns: 1fr; }
}
