:root {
  --paper: #f3f1eb;
  --paper-clean: #fbfaf6;
  --ink: #111311;
  --muted: #5a615d;
  --line: #d6d1c6;
  --line-strong: #9f9a90;
  --orange: #f15a24;
  --green: #2f6f50;
  --blue-gray: #253f4a;
  --blue-gray-soft: #dce6e8;
  --shadow: 0 24px 60px rgba(17, 19, 17, 0.16);
  --ease: cubic-bezier(0.22, 0.78, 0, 1);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  background:
    linear-gradient(rgba(17, 19, 17, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 17, 0.03) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: "Archivo", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(241, 90, 36, 0.08), transparent 24%, transparent 76%, rgba(37, 63, 74, 0.08)),
    linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.2));
  mix-blend-mode: multiply;
  z-index: -1;
}

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid rgba(17, 19, 17, 0.12);
  background: rgba(243, 241, 235, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  min-width: 0;
}

.brand-mark {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.brand-line,
.eyebrow,
.ledger-label,
.flow-step span,
.panel-label,
.work-order-header span,
.form-note,
.site-footer,
.desktop-nav,
.mobile-menu-panel {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0;
}

.brand-line {
  color: var(--muted);
  font-size: 0.85rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.desktop-nav a,
.mobile-menu-panel a {
  padding: 0.55rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 6px;
  transition:
    border-color 180ms var(--ease),
    background-color 180ms var(--ease),
    color 180ms var(--ease);
}

.desktop-nav a:hover,
.mobile-menu-panel a:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.header-cta {
  display: inline-flex;
  min-height: 2.45rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.9rem;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper-clean);
  font-size: 0.9rem;
  font-weight: 700;
  transition:
    transform 180ms var(--ease),
    background-color 180ms var(--ease);
}

.header-cta:hover {
  transform: translateY(-2px);
  background: var(--blue-gray);
}

.nav-toggle {
  display: none;
  position: relative;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-clean);
  color: var(--ink);
}

.nav-toggle span {
  position: absolute;
  left: 50%;
  width: 1rem;
  height: 2px;
  background: currentColor;
  transform-origin: center;
  transition: transform 180ms var(--ease);
}

.nav-toggle span:first-child {
  transform: translate(-50%, -4px);
}

.nav-toggle span:last-child {
  transform: translate(-50%, 4px);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translate(-50%, 0) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translate(-50%, 0) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 4.4rem 1rem auto;
  z-index: 30;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu-panel {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper-clean);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  display: grid;
  min-height: 540px;
  height: calc(100svh - 8.6rem);
  max-height: 720px;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(17, 19, 17, 0.18);
  isolation: isolate;
}

.hero-photo,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.08);
  z-index: -3;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(17, 19, 17, 0.86) 0%, rgba(17, 19, 17, 0.64) 46%, rgba(17, 19, 17, 0.22) 100%),
    linear-gradient(180deg, rgba(17, 19, 17, 0.18), rgba(17, 19, 17, 0.58));
  z-index: -2;
}

.hero-inner {
  align-self: center;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 2.2rem clamp(1rem, 4vw, 2rem);
  color: var(--paper-clean);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 1.1rem;
  font-size: 4.65rem;
  font-weight: 800;
}

h2 {
  max-width: 11ch;
  margin-bottom: 1rem;
  font-size: 3.8rem;
  font-weight: 800;
}

h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.hero-copy {
  max-width: 41rem;
  margin-bottom: 1.45rem;
  color: rgba(251, 250, 246, 0.82);
  font-size: 1.22rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  line-height: 1.1;
  transition:
    transform 180ms var(--ease),
    background-color 180ms var(--ease),
    border-color 180ms var(--ease),
    color 180ms var(--ease);
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: scale(0.98);
}

.button-primary {
  background: var(--orange);
  color: #120f0d;
}

.button-primary:hover {
  background: #ff733f;
}

.button-secondary {
  border-color: rgba(251, 250, 246, 0.38);
  color: var(--paper-clean);
  background: rgba(17, 19, 17, 0.28);
}

.button-secondary:hover {
  border-color: rgba(251, 250, 246, 0.72);
  background: rgba(17, 19, 17, 0.46);
}

.hero-ledger {
  position: absolute;
  right: 0;
  bottom: 0;
  align-self: end;
  justify-self: end;
  width: min(32rem, calc(100% - 2rem));
  margin: 0 clamp(1rem, 4vw, 2rem) 1.2rem;
  padding: 1rem;
  border: 1px solid rgba(251, 250, 246, 0.32);
  border-radius: 8px;
  background: rgba(17, 19, 17, 0.7);
  color: var(--paper-clean);
  box-shadow: var(--shadow);
}

.hero-ledger div {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(251, 250, 246, 0.18);
}

.ledger-label {
  color: var(--orange);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.hero-ledger strong {
  font-size: 1.1rem;
}

.hero-ledger p {
  margin: 0.85rem 0 0;
  color: rgba(251, 250, 246, 0.74);
  line-height: 1.5;
}

.section {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 5.5rem clamp(1rem, 4vw, 2rem) 0;
}

.lead-strip {
  padding-top: 1.1rem;
}

.lead-strip p {
  max-width: 62rem;
  margin: 0;
  padding: 1.1rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  color: var(--blue-gray);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
}

.section-grid,
.install-grid,
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 2rem;
  align-items: start;
}

.section-heading p,
.install-copy > p,
.contact-copy > p {
  color: var(--muted);
  line-height: 1.62;
}

.section-heading h2,
.install-copy h2,
.contact-copy h2 {
  color: var(--ink);
}

.section-heading .eyebrow,
.install-copy .eyebrow,
.contact-copy .eyebrow {
  color: var(--green);
}

.leak-board {
  display: grid;
  border-top: 1px solid var(--ink);
}

.leak-board article {
  display: grid;
  grid-template-columns: 4.5rem minmax(10rem, 0.6fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.leak-board span,
.flow-step span {
  color: var(--orange);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
}

.leak-board h3,
.leak-board p {
  margin: 0;
}

.leak-board p {
  color: var(--muted);
  line-height: 1.5;
}

.flow-section {
  display: grid;
  gap: 2rem;
}

.flow-shell {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper-clean);
  box-shadow: var(--shadow);
}

.flow-line {
  position: absolute;
  left: 2rem;
  right: 2rem;
  top: 3.25rem;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--green), var(--blue-gray));
}

.flow-step {
  position: relative;
  padding: 3.2rem 0.6rem 0.45rem;
}

.flow-step::before {
  content: "";
  position: absolute;
  top: 1.73rem;
  left: 0.65rem;
  width: 0.92rem;
  height: 0.92rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 0 0 5px var(--paper-clean);
}

.flow-step:nth-of-type(3)::before {
  background: var(--green);
}

.flow-step:nth-of-type(4)::before,
.flow-step:nth-of-type(5)::before {
  background: var(--blue-gray);
}

.flow-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.52;
}

.install-grid {
  align-items: stretch;
}

.install-copy {
  display: grid;
  align-content: start;
}

.work-order,
.fit-panel,
.lead-form {
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper-clean);
  box-shadow: var(--shadow);
}

.work-order-header {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border-bottom: 1px solid var(--ink);
  background: var(--blue-gray-soft);
}

.work-order-header span,
.panel-label {
  color: var(--blue-gray);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.work-order-header strong {
  font-size: 1.65rem;
}

.work-order ul,
.fit-panel ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-order li,
.fit-panel li {
  position: relative;
  padding: 1rem 1rem 1rem 2.2rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
  line-height: 1.45;
}

.work-order li:first-child,
.fit-panel li:first-child {
  border-top: 0;
}

.work-order li::before,
.fit-panel li::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1.45rem;
  width: 0.42rem;
  height: 0.42rem;
  background: var(--orange);
}

.fit-section {
  display: grid;
  gap: 2rem;
}

.fit-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.fit-panel {
  overflow: hidden;
}

.fit-panel .panel-label {
  display: block;
  padding: 1rem;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.fit-panel:nth-child(2) .work-order li::before,
.fit-panel:nth-child(2) li::before {
  background: var(--blue-gray);
}

.contact-section {
  padding-bottom: 4.5rem;
}

.contact-copy a {
  color: var(--blue-gray);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
}

.lead-form {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.lead-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--blue-gray);
  font-weight: 800;
}

.honey-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lead-form input,
.lead-form select {
  width: 100%;
  min-height: 3.15rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  transition:
    border-color 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.lead-form input:focus,
.lead-form select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(241, 90, 36, 0.18);
}

.turnstile-wrap {
  min-height: 65px;
}

.lead-form .button {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.lead-form .button[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.lead-form.is-success {
  border-color: var(--green);
}

.lead-form.is-error {
  border-color: var(--orange);
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 2rem) 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

.site-footer span {
  color: var(--line-strong);
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 520ms var(--ease),
    transform 520ms var(--ease);
  transition-delay: var(--delay, 0ms);
}

.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .desktop-nav,
  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: 560px;
    height: calc(100svh - 7rem);
    max-height: none;
  }

  .hero-inner {
    padding-top: 4rem;
    padding-bottom: 2rem;
  }

  h1 {
    max-width: 9.5ch;
    font-size: 4rem;
  }

  h2 {
    max-width: 12ch;
    font-size: 3rem;
  }

  .hero-copy {
    font-size: 1.08rem;
  }

  .hero-ledger {
    position: relative;
    right: auto;
    bottom: auto;
    justify-self: start;
  }

  .section-grid,
  .install-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 4rem;
  }

  .lead-strip {
    padding-top: 1rem;
  }

  .flow-shell,
  .fit-board {
    grid-template-columns: 1fr;
  }

  .flow-line {
    top: 2rem;
    bottom: 2rem;
    left: 2.1rem;
    width: 2px;
    height: auto;
    right: auto;
    background: linear-gradient(180deg, var(--orange), var(--green), var(--blue-gray));
  }

  .flow-step {
    padding: 0.55rem 0.6rem 0.55rem 3.2rem;
  }

  .flow-step::before {
    top: 0.86rem;
    left: 0.62rem;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 0.75rem 1rem;
  }

  .brand {
    display: grid;
    gap: 0.15rem;
  }

  .brand-line {
    font-size: 0.74rem;
  }

  .hero-inner {
    padding-top: 3.2rem;
  }

  h1 {
    max-width: 10.5ch;
    font-size: 2.85rem;
  }

  h2 {
    font-size: 2.35rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .hero-ledger {
    display: none;
  }

  .lead-strip p {
    font-size: 1.08rem;
  }

  .leak-board article {
    grid-template-columns: 3.25rem 1fr;
  }

  .leak-board p {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
