:root {
  --bench: #EEF1F3;
  --natural: #F8F9F7;
  --ink: #0E2F5A;
  --blue: #1B8BD6;
  --blue-deep: #1270B3;
  --green: #5DB547;
  --graphite: #4A5563;
  --line: #D3DAE0;

  --step--1: clamp(0.84rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --step-3: clamp(2.4rem, 1.6rem + 4vw, 5.2rem);

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bench); scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-variation-settings: "wdth" 100;
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-variation-settings: "wdth" 125;
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
}
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* 3D canvas sits behind the transparent sections */
#pellets { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; pointer-events: none; }
main, .site-footer { position: relative; z-index: 1; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  transition: background .3s, box-shadow .3s;
}
.site-header.scrolled { background: rgb(238 241 243 / .88); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: auto; }
.brand-name { font-variation-settings: "wdth" 125; font-weight: 900; font-size: 1.2rem; line-height: 1; letter-spacing: .01em; }
.brand-name span { display: block; font-weight: 600; font-size: .62rem; letter-spacing: .14em; color: var(--graphite); margin-top: 3px; }
.site-header nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 32px); font-size: var(--step--1); font-weight: 600; }
.site-header nav a { text-decoration: none; }
.site-header nav a:not(.nav-cta):hover { color: var(--blue-deep); }
.nav-cta { background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 999px; }
.nav-cta:hover { background: var(--blue-deep); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.menu-toggle { display: none; }
@media (max-width: 720px) {
  .site-header { background: rgb(238 241 243 / .94); backdrop-filter: blur(12px); }
  .menu-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto;
    border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
  }
  .bars, .bars::before, .bars::after {
    display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px;
    transition: transform .25s var(--ease), opacity .2s;
  }
  .bars { position: relative; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; } .bars::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] .bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
  .site-header nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bench); box-shadow: 0 1px 0 var(--line), 0 18px 30px rgb(14 47 90 / .12);
    padding: 8px var(--gutter) 20px; font-size: var(--step-0);
    transform-origin: top; transform: perspective(800px) rotateX(-12deg); opacity: 0; visibility: hidden;
    transition: transform .3s var(--ease), opacity .25s, visibility 0s .3s;
  }
  .site-header nav.open { transform: none; opacity: 1; visibility: visible; transition: transform .3s var(--ease), opacity .25s; }
  .site-header nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-header nav .nav-cta { margin-top: 14px; border: 0; text-align: center; padding: 14px 16px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .2s var(--ease), background .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--blue-deep); color: #fff; }
.btn-primary:hover { background: #0D5A93; }
.btn-quiet { border-color: var(--ink); color: var(--ink); background: rgb(248 249 247 / .6); }
.btn-quiet:hover { background: var(--natural); }

/* Hero: transparent so the pellets show */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--gutter) 80px; position: relative;
}
.hero-copy { max-width: 40rem; }
.hero h1 { font-size: var(--step-3); max-width: 11ch; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--graphite); max-width: 34rem; margin: 28px 0 36px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.scroll-hint { position: absolute; bottom: 28px; left: var(--gutter); margin: 0; font-size: var(--step--1); color: var(--graphite); }
.scroll-hint::before { content: ""; display: inline-block; width: 1px; height: 28px; background: var(--graphite); vertical-align: middle; margin-right: 12px; animation: drip 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 720px) {
  .hero { justify-content: flex-end; padding-bottom: 96px; }
  .hero-copy { background: linear-gradient(to top, var(--bench) 70%, rgb(238 241 243 / 0)); padding-top: 40px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
}

/* Opaque panels cover the canvas */
.panel { background: var(--natural); padding: clamp(80px, 12vw, 160px) 0; }
.section-head { max-width: 46rem; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2, .process h2 { font-size: var(--step-2); }
.section-head p { color: var(--graphite); margin: 18px 0 0; max-width: 38rem; }

/* Materials spec table */
.spec { border-top: 2px solid var(--ink); perspective: 1200px; }
.spec-row {
  display: grid; grid-template-columns: 1.1fr 1fr 1.6fr; gap: 16px 32px;
  padding: 26px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.spec-head { font-size: var(--step--1); font-weight: 700; color: var(--graphite); padding: 14px 0; }
.poly { font-variation-settings: "wdth" 125; font-weight: 800; font-size: var(--step-1); display: flex; align-items: center; gap: 14px; }
.swatch { width: 22px; height: 14px; border-radius: 50%; flex: none; box-shadow: inset -3px -3px 5px rgb(0 0 0 / .18), inset 2px 2px 4px rgb(255 255 255 / .5); }
.s-blue { background: var(--blue); } .s-green { background: var(--green); }
.s-natural { background: #E4E6DF; } .s-navy { background: var(--ink); }
.note { margin: 28px 0 0; color: var(--graphite); }
@media (max-width: 720px) {
  .spec-head { display: none; }
  .spec-row { grid-template-columns: 1fr; gap: 4px; }
  .spec-row span:nth-child(2) { font-weight: 600; }
  .spec-row span:nth-child(3) { color: var(--graphite); }
}

/* Process: transparent, pellets sort themselves on the right */
.process { padding: clamp(100px, 14vw, 180px) 0; }
.process-copy { max-width: 30rem; background: rgb(238 241 243 / .82); backdrop-filter: blur(6px); padding: clamp(20px, 3vw, 36px); border-radius: 20px; }
.steps { list-style: none; margin: 40px 0 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 36px 64px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -4px;
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-weight: 800; font-size: .95rem;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 44px; bottom: 6px; width: 2px; background: var(--line); }
.steps h3 { font-size: var(--step-1); margin-bottom: 6px; }
.steps p { margin: 0; color: var(--graphite); }

/* Impact */
.impact { background: var(--ink); color: #fff; }
.impact .section-head p { color: #B8C6D8; }
.pledges { list-style: none; margin: 0; padding: 36px 0 0; border-top: 1px solid rgb(255 255 255 / .2);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.pledges li { position: relative; padding-top: 34px; }
.pledges li::before { content: ""; position: absolute; top: 0; left: 0; width: 22px; height: 14px; border-radius: 50%;
  background: var(--green); box-shadow: inset -3px -3px 5px rgb(0 0 0 / .22), inset 2px 2px 4px rgb(255 255 255 / .45); }
.pledges h3 { font-size: var(--step-1); color: #fff; margin-bottom: 10px; }
.pledges p { margin: 0; color: #B8C6D8; max-width: 22rem; }
@media (max-width: 720px) { .pledges { grid-template-columns: 1fr; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-copy h2 { font-size: var(--step-2); }
.contact-copy > p { color: var(--graphite); margin: 18px 0 32px; }
.contact-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact-lines li { display: grid; gap: 2px; }
.contact-lines li > span:first-child { font-size: var(--step--1); color: var(--graphite); }
.contact-lines a, .contact-lines li > span:last-child { font-weight: 700; text-decoration: none; }
.quote-form { background: var(--bench); padding: clamp(24px, 4vw, 44px); border-radius: 24px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { font-size: var(--step--1); font-weight: 700; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgb(27 139 214 / .25); }
.field [aria-invalid="true"] { border-color: #C2410C; }
.hp { position: absolute; left: -9999px; }
.quote-form .btn { justify-self: start; }
.form-status { margin: 0; min-height: 1.5em; font-weight: 600; }
.form-status.ok { color: #2E7D32; } .form-status.err { color: #C2410C; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .field-pair { grid-template-columns: 1fr; } }

.site-footer { background: var(--natural); border-top: 1px solid var(--line); padding: 28px 0; font-size: var(--step--1); color: var(--graphite); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer-row p { margin: 0; }
.footer-row strong { color: var(--ink); }

/* Scroll reveal: blocks tilt up out of the page in 3D */
.js [data-reveal] {
  opacity: 0;
  transform: perspective(1100px) translate3d(0, 56px, -60px) rotateX(14deg);
  transform-origin: 50% 100%;
  transition: opacity .9s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .scroll-hint::before { animation: none; }
}
