/* HOLDFAST — home repair triage */

:root {
  --concrete: #c5ccd6;
  --concrete-deep: #aeb6c2;
  --chalk: #f2f4f7;
  --ink: #1a1f26;
  --muted: #4a5564;
  --line: rgba(26, 31, 38, 0.14);
  --amber: #d97706;
  --amber-deep: #b45309;
  --navy: #1b4f72;
  --navy-deep: #163a54;
  --danger: #b91c1c;
  --ok: #0f766e;
  --surface: #ffffff;
  --shadow: 0 18px 40px rgba(26, 31, 38, 0.12);

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--chalk);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
ul { list-style: none; }
::selection { background: var(--amber); color: #fff; }

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0; }

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(242, 244, 247, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand__mark {
  width: 1.1rem;
  height: 1.1rem;
  background: var(--amber);
  clip-path: polygon(50% 0, 100% 35%, 82% 100%, 18% 100%, 0 35%);
}

.brand__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  line-height: 1;
}

.nav {
  display: none;
  gap: 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav a { opacity: 0.72; transition: opacity 0.2s var(--ease); }
.nav a:hover { opacity: 1; }

.header-acts {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.phone {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
}

.burger {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-content: center;
  gap: 5px;
}
.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.drawer {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.25rem 1.4rem;
  background: var(--chalk);
  border-bottom: 1px solid var(--line);
}
.drawer[hidden] { display: none; }
.drawer a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.back-link {
  display: inline-block;
  margin: 0.75rem 1.25rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.65;
}
.back-link:hover { opacity: 1; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.85rem;
  padding: 0.65rem 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { min-height: 2.35rem; padding: 0.45rem 0.9rem; font-size: 0.9rem; }
.btn--solid {
  background: var(--ink);
  color: var(--chalk);
}
.btn--solid:hover { background: var(--navy); }
.btn--ghost {
  background: transparent;
  border-color: rgba(26, 31, 38, 0.28);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--ink); }

/* Hero */
.hero {
  position: relative;
  min-height: min(100svh, 820px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: linear-gradient(160deg, #d5dbe4 0%, var(--concrete) 45%, #9eA8b6 100%);
}

.hero__ground {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.35) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 60%, rgba(26,31,38,0.12) 0 1px, transparent 1.5px);
  background-size: 18px 18px, 22px 22px;
}

.hero__stripes {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  background: repeating-linear-gradient(
    -45deg,
    var(--ink) 0 10px,
    var(--amber) 10px 20px
  );
}

.hero__stage {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 6.5rem 0 4rem;
  display: grid;
  gap: 2.5rem;
  align-items: end;
}

.brand-lock {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 12vw, 7rem);
  letter-spacing: 0.04em;
  line-height: 0.9;
  color: var(--ink);
  margin-bottom: 0.85rem;
  animation: rise 0.8s var(--ease) both;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  letter-spacing: 0.02em;
  line-height: 1.05;
  max-width: 12ch;
  animation: rise 0.8s var(--ease) 0.08s both;
}

.lede {
  margin-top: 0.9rem;
  max-width: 36ch;
  color: var(--muted);
  font-size: 1.05rem;
  animation: rise 0.8s var(--ease) 0.14s both;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  animation: rise 0.8s var(--ease) 0.2s both;
}

.house {
  justify-self: center;
  width: min(100%, 420px);
  animation: rise 0.9s var(--ease) 0.18s both;
}

.house__svg {
  width: 100%;
  filter: drop-shadow(0 16px 28px rgba(26, 31, 38, 0.18));
}

.zone {
  color: var(--navy);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.zone__hit {
  fill: rgba(27, 79, 114, 0.06);
  transition: fill 0.2s var(--ease);
}
.zone:hover,
.zone.is-hot {
  color: var(--amber-deep);
}
.zone:hover .zone__hit,
.zone.is-hot .zone__hit {
  fill: rgba(217, 119, 6, 0.16);
}
.zone__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  fill: currentColor;
  letter-spacing: 0.08em;
}

.house__cap {
  margin-top: 0.75rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.sec-head { margin-bottom: 1.75rem; max-width: 36rem; }
.sec-head--light .eyebrow,
.sec-head--light h2,
.sec-head--light .sec-lede { color: var(--chalk); }
.sec-head--light .sec-lede { opacity: 0.78; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 0.55rem;
}

.sec-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.sec-lede {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Triage */
.triage {
  padding: 4.5rem 0 5rem;
  background: var(--chalk);
}

.triage__shell {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.15rem 1.5rem;
}

.triage__progress {
  height: 4px;
  background: rgba(26, 31, 38, 0.08);
  margin-bottom: 0.85rem;
  overflow: hidden;
}
.triage__bar {
  display: block;
  height: 100%;
  width: 33%;
  background: var(--amber);
  transition: width 0.35s var(--ease);
}

.triage__step {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.triage__q {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.triage__panel[hidden] { display: none; }
.triage__back { margin-top: 1.1rem; }

.choice-grid {
  display: grid;
  gap: 0.7rem;
}

.choice {
  text-align: left;
  padding: 1rem 1.05rem;
  border: 1.5px solid var(--line);
  background: #fafbfc;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.choice:hover,
.choice[aria-selected="true"] {
  border-color: var(--ink);
  background: #fff;
  transform: translateY(-1px);
}
.choice__title {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}
.choice__hint {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.triage__result .result__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.result__code {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.result__urgency {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
}

.result__urgency[data-level="emergency"] { color: var(--danger); }
.result__urgency[data-level="same-day"] { color: var(--amber-deep); }
.result__urgency[data-level="scheduled"] { color: var(--navy); }

.result__meter {
  height: 10px;
  background: rgba(26, 31, 38, 0.08);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.result__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--amber);
  transition: width 0.7s var(--ease);
}
.result__fill[data-level="emergency"] { background: var(--danger); }
.result__fill[data-level="same-day"] { background: var(--amber); }
.result__fill[data-level="scheduled"] { background: var(--navy); }

.result__facts {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}
.result__facts dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.result__facts dd {
  font-size: 1.2rem;
  font-weight: 700;
}

.result__now {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.result__do {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.35rem;
}
.result__do li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--muted);
}
.result__do li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--ok);
}

.result__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* Trades */
.trades {
  padding: 4.5rem 0;
  background: linear-gradient(180deg, #e7ebf1 0%, var(--chalk) 100%);
  border-top: 1px solid var(--line);
}

.trade-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.trade-list li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.trade-list__code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber-deep);
  padding-top: 0.2rem;
}
.trade-list h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.trade-list p { color: var(--muted); max-width: 40ch; }

/* Windows */
.windows {
  padding: 4.5rem 0 5rem;
  background:
    linear-gradient(180deg, rgba(26, 31, 38, 0.92), rgba(26, 31, 38, 0.96)),
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(217, 119, 6, 0.08) 12px 24px);
}

.window-grid {
  display: grid;
  gap: 0.9rem;
}

.window-card {
  padding: 1.25rem 1.15rem 1.4rem;
  border-left: 4px solid transparent;
  background: rgba(242, 244, 247, 0.06);
  color: var(--chalk);
}
.window-card--red { border-color: #f87171; }
.window-card--amber { border-color: var(--amber); }
.window-card--blue { border-color: #60a5fa; }
.window-card__tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 0.45rem;
}
.window-card h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 0.45rem;
}
.window-card p { opacity: 0.8; max-width: 36ch; }

/* Book */
.book {
  padding: 4.5rem 0 5rem;
  background: var(--chalk);
}

.book__grid {
  display: grid;
  gap: 2rem;
}

.book-form {
  display: grid;
  gap: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.book-form label {
  display: grid;
  gap: 0.35rem;
}
.book-form label span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.book-form input,
.book-form textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #fafbfc;
  padding: 0.75rem 0.85rem;
  resize: vertical;
}
.book-form input:focus,
.book-form textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: #fff;
}

.form-msg {
  font-size: 0.95rem;
  color: var(--ok);
  font-weight: 600;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  background: var(--concrete);
}
.footer__inner {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.footer__inner a { font-weight: 600; color: var(--ink); }

@media (min-width: 720px) {
  .nav { display: flex; }
  .phone { display: inline; }
  .burger { display: none; }
  .drawer { display: none !important; }

  .hero__stage {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    padding: 7rem 0 4.5rem;
  }

  .choice-grid {
    grid-template-columns: 1fr 1fr;
  }
  .choice-grid--compact {
    grid-template-columns: repeat(3, 1fr);
  }

  .result__facts {
    grid-template-columns: repeat(3, 1fr);
  }

  .window-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .book__grid {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }

  .book-form {
    grid-template-columns: 1fr 1fr;
  }
  .book-form__full { grid-column: 1 / -1; }

  .triage__shell { padding: 1.6rem 1.6rem 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
