/* Case Study Pages (Solar Water Heater & SUNOVA Energy) */

.crumb {
  padding-top: 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--graphite);
}

.crumb a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 2px;
}

.crumb a:hover {
  color: var(--sienna);
  border-color: var(--sienna);
}

.cs-hero {
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--rule-strong);
}

.cs-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 800;
  margin: 0.8rem 0 1rem;
}

.cs-hero .lead {
  font-size: 1.16rem;
  color: var(--ink-soft);
  max-width: 58ch;
}

.cs-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  align-items: start;
}

.cs-aside {
  position: sticky;
  top: 90px;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  padding: 1.4rem 1.5rem;
}

.cs-aside dl { margin: 0; }
.cs-aside dt {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--graphite);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 1rem;
}
.cs-aside dt:first-child { margin-top: 0; }
.cs-aside dd {
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-size: 0.96rem;
}

.cs-block {
  margin-bottom: 3.2rem;
}

.cs-block h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  margin-bottom: 0.9rem;
}

.cs-block ul {
  padding-left: 1.2rem;
  margin: 0.8rem 0;
}

.cs-block li { margin-bottom: 0.45rem; }
.cs-block li::marker { color: var(--sienna); }

/* Interactive System Explorer */
.explorer-frame {
  background: var(--paper-card);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-print);
  margin-top: 1.2rem;
  padding: 0.9rem;
}

.xp-stage {
  position: relative;
  overflow: hidden;
  background: #141514;
}

.xp-stage img {
  width: 100%;
  height: auto;
  display: block;
}

.hs-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 1.5px solid var(--paper-card);
  background: rgba(20, 21, 20, 0.84);
  color: var(--paper-card);
  font: 700 0.8rem var(--font-mono);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: transform 0.2s var(--ease-ink), background-color 0.2s;
}

.hs-pin:hover,
.hs-pin.active {
  background: var(--sienna);
  transform: scale(1.14);
}

.xp-card {
  padding: 1.2rem 0.4rem 0.3rem;
  margin-top: 0.9rem;
  border-top: 1px solid var(--rule);
}

.xp-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.xp-ar {
  font-size: 1.05rem;
  color: var(--sienna);
  font-weight: 600;
  margin: 0 0 0.4rem;
}

.xp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.xp-chip {
  background: var(--paper-card);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  font: 500 0.86rem var(--font-sans);
  padding: 0.45rem 0.85rem;
  min-height: 40px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.xp-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-card);
}

/* Real Photo Gallery */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  margin-top: 1.2rem;
}

.photo-gallery .pin-frame {
  cursor: zoom-in;
  transition: transform 0.3s var(--ease-ink);
}

.photo-gallery .pin-frame:hover {
  transform: translateY(-3px);
}

.photo-gallery .pin-frame img {
  aspect-ratio: 4/5;
  object-fit: cover;
}

.photo-gallery .pin-frame.contain img {
  object-fit: contain;
  background: #141514;
}

/* SUNOVA Roadmap */
.roadmap {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  border-left: 1.5px solid var(--rule-strong);
}

.roadmap li {
  position: relative;
  padding: 0 0 1.4rem 1.5rem;
}

.roadmap li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.42rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
}

.roadmap li.now::before {
  background: var(--sienna);
  border-color: var(--sienna);
}

.roadmap b {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.roadmap em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cobalt);
}

.decision-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.decision-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  padding: 0.9rem 1.15rem;
}

.decision-row strong {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 840px) {
  .cs-layout { grid-template-columns: 1fr; }
  .cs-aside { position: static; }
  .photo-gallery { grid-template-columns: 1fr; }
  .hs-pin { width: 26px; height: 26px; margin: -13px 0 0 -13px; font-size: 0.72rem; }
  .decision-row { flex-direction: column; gap: 0.25rem; }
}
