/* V8 — Behind the Drywall: building cross-section + live pipe map */

:root {
  --cavity: #0e1014;
  --wall: #1a1d24;
  --stud: #3d4454;
  --text: #e8eaef;
  --muted: #8b92a8;
  --cold: #38bdf8;
  --hot: #ef4444;
  --drain: #9ca3af;
  --gas: #fbbf24;
  --copper: #c87840;
  --font: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--cavity);
  color: var(--text);
  line-height: 1.55;
  min-height: 100dvh;
}
a { color: var(--cold); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.65rem 1.25rem;
  background: rgba(14,16,20,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stud);
}
.logo-well {
  background: #fff;
  border-radius: 10px;
  padding: 4px 8px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 8px 32px rgba(0,0,0,0.4);
}
.logo__brand { height: 44px; width: auto; }
.nav { display: flex; gap: 1rem; margin-left: auto; font-size: 0.9rem; font-weight: 500; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); }
.valve-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
  padding: 0.45rem 0.9rem;
  background: linear-gradient(180deg, #3d4454, #2a2f3a);
  border: 2px solid var(--copper);
  border-radius: 999px;
  color: var(--text);
}
.valve-btn__wheel {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--copper);
  background: conic-gradient(from 0deg, var(--copper) 0 25%, transparent 25% 50%, var(--copper) 50% 75%, transparent 75%);
}

.layout {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
}

.cutaway {
  position: sticky; top: 64px;
  height: calc(100dvh - 64px);
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--stud);
  display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 50% 30%, #1a2030 0%, var(--cavity) 70%);
}
.cutaway__label {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.2em;
  color: var(--muted); margin-bottom: 0.75rem;
}
.cutaway__svg { width: 100%; max-height: 55vh; flex-shrink: 0; }

.pipe {
  stroke-linecap: round;
  opacity: 0.35;
  transition: opacity 0.4s, filter 0.4s;
}
.pipe--flow {
  stroke-dasharray: 12 8;
  animation: flow 1.2s linear infinite;
}
.pipe.is-active {
  opacity: 1;
  filter: drop-shadow(0 0 8px currentColor);
}
.pipe--cold.is-active { filter: drop-shadow(0 0 12px var(--cold)); }
.pipe--hot.is-active { filter: drop-shadow(0 0 12px var(--hot)); }
.pipe--drain.is-active { filter: drop-shadow(0 0 10px var(--drain)); }
.pipe--gas.is-active { filter: drop-shadow(0 0 14px var(--gas)); }

@keyframes flow {
  to { stroke-dashoffset: -20; }
}

.legend {
  list-style: none; margin-top: auto; padding-top: 1rem;
  font-family: var(--mono); font-size: 0.65rem; color: var(--muted);
}
.legend li { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot--cold { background: var(--cold); }
.dot--hot { background: var(--hot); }
.dot--drain { background: var(--drain); }
.dot--gas { background: var(--gas); }

.content { padding: 1.5rem 1.5rem 3rem; min-width: 0; }

.hero { padding: 1rem 0 3rem; }
.eyebrow { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 1rem; }
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700; line-height: 1.1; margin-bottom: 1rem;
}
.hero h1 em { font-style: normal; color: var(--cold); }
.hero__lede { color: var(--muted); max-width: 42ch; margin-bottom: 1.25rem; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }
.btn-primary {
  display: inline-block; font-weight: 600;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--cold), #0ea5e9);
  color: #0a0a0c; border: none; border-radius: 8px;
  cursor: pointer; font-family: var(--font); font-size: 1rem;
}

.panel {
  padding: 2rem 0;
  border-top: 1px solid var(--stud);
  scroll-margin-top: 80px;
}
.panel__tag {
  display: inline-block; font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.15em; padding: 0.25rem 0.5rem;
  border: 1px solid var(--stud); border-radius: 4px;
  color: var(--muted); margin-bottom: 0.75rem;
}
.panel__tag--cold { border-color: var(--cold); color: var(--cold); }
.panel__tag--hot { border-color: var(--hot); color: var(--hot); }
.panel__tag--drain { border-color: var(--drain); color: var(--drain); }
.panel__tag--gas { border-color: var(--gas); color: var(--gas); }
.panel h2 { font-size: 1.5rem; margin-bottom: 0.65rem; }
.panel p { color: var(--muted); max-width: 50ch; }
.panel__list { margin-top: 1rem; padding-left: 1.25rem; color: var(--muted); font-size: 0.95rem; }
.panel__list li { margin-bottom: 0.35rem; }

.panel--reviews blockquote {
  margin-top: 1rem; padding: 1rem;
  background: var(--wall); border-left: 3px solid var(--cold);
  font-size: 0.95rem; color: var(--text);
}
.panel--reviews footer { margin-top: 0.5rem; font-size: 0.8rem; color: var(--gas); }

.panel--book .email { font-family: var(--mono); color: var(--cold); margin: 0.75rem 0 1.25rem; }
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem;
}
.form-grid label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; color: var(--muted); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea {
  background: var(--wall); border: 1px solid var(--stud); color: var(--text);
  padding: 0.5rem; border-radius: 6px; font-family: var(--font);
}
.form-ok { margin-top: 0.75rem; color: var(--gas); font-size: 0.9rem; }

.footer {
  text-align: center; padding: 2rem 1rem;
  border-top: 1px solid var(--stud);
  color: var(--muted); font-size: 0.8rem;
}
.footer-emblem { margin: 0 auto 0.75rem; opacity: 0.85; height: 48px; width: auto; }

.callbar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  text-align: center; padding: 0.85rem;
  background: var(--cold); color: #0a0a0c;
  font-family: var(--mono); font-weight: 600;
}

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .cutaway {
    position: relative; top: 0; height: auto;
    border-right: none; border-bottom: 1px solid var(--stud);
  }
  .cutaway__svg { max-height: 220px; }
  .legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 0.75rem; }
  .nav { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: 1; }
  .callbar { display: block; }
  body { padding-bottom: 3rem; }
}
