:root {
  --bg: #FEFBF6;
  --panel: #FCFAF4;
  --panel-2: #F2EDE4;
  --line: #D8D2C6;
  --muted-line:rgba(31, 43, 51, 0.12);
  --text: #17332F;
  --body: #344054;
  --muted: #7D8582;
  --accent: #066E61;
  --accent-soft: #E6F1EC;
  --accent-dark: #07594B;

  --dashboard-blue: #6F8791;
  --font-head: "Host Grotesk", system-ui, sans-serif;
  --font-body: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.75;
  letter-spacing: 0;
}

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

.case-study {
  min-height: 100vh;
  padding: 40px 20px 80px;
}

.shell {
  width: min(918px, 100%);
  margin: 0 auto;
}

/* MAIN NAV FOR CASE STUDY PAGES */
nav#nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  height: 64px;
  background: rgba(254, 251, 246, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

nav#nav.scrolled {
  border-color: var(--line);
}

.nav-logo img {
  height: 38px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 40px;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-resume {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 9px 22px;
  border-radius: 100px;
  font-weight: 600 !important;
}

.nav-hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: #111;
  transition: 0.3s ease;
}

.nav-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  z-index: 999;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: var(--bg);
  padding: 80px 30px;
  transition: 0.35s ease;
  z-index: 1000;
}

.nav-drawer.open {
  right: 0;
}

.nav-drawer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
}

.nav-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-drawer-links a {
  text-decoration: none;
  color: #111;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
}

@media (max-width: 768px) {
  nav#nav {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }
}

.page-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 0;
  background: rgba(6, 110, 97, 0.24);
  backdrop-filter: blur(14px);
}

.page-nav a {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 12px;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.page-nav a:hover,
.page-nav a.active {
  border-color: rgba(6, 110, 97, 0.24);
  color: var(--accent);
  background: rgba(6, 110, 97, 0.08);
}

.hero {
  border-bottom: 1px solid var(--line);
  padding: 48px 0 41px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 11px;
  color: var(--accent);
  font-size: 15px;
  line-height: 1.7;
}

.eyebrow span {
  width: 18px;
  height: 1px;
  background: var(--accent);
}

h1,
h2,
h3,
p,
dl {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -1px;
}

h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.11;
}

.lede {
  max-width: 910px;
  margin-top: 12px;
  padding-bottom: 21px;
  color: #344054;
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.75;
  letter-spacing: 0;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.project-meta div {
  min-height: 70px;
  padding: 12px 20px;
  border-right: 1px solid var(--muted-line);
  border-bottom: 1px solid var(--muted-line);
}

.project-meta div:nth-child(2n) {
  border-right: 0;
}

.project-meta div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.role-subtext {
  display: block;
  margin-top: 2px;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}

dt,
.section-kicker {
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.32px;
  line-height: 1.2;
  text-transform: uppercase;
}

dd {
  margin: 5px 0 0;
  color: var(--body);
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.2px;
}

.section {
  border-bottom: 1px solid var(--line);
  padding: 36px 0 21px;
}

.section h2,
.impact h2 {
  margin-top: 7px;
  font-size: 30px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1.1;
}

h2 strong {
  color: inherit;
  font-family: inherit;
  font-weight: inherit;
}

.section > p:not(.section-kicker) {
  margin-top: 13px;
  color: #344054;
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.75;
  letter-spacing: 0;
  
}

.section > p + p {
  margin-top: 18px;
}

.dashboard-shell {
  margin-top: 45px;
  border-radius: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
}

.dashboard-preview-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: contain;
  object-position: center;
}

.choice-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.choice-card {
  overflow: hidden;
  border: none;
  border-radius: 0;
  background: transparent;
}

.choice-card + .choice-card {
  margin-top: 36px;
}

.choice-body {
  display: block;
  padding: 0;
}

/* .choice-bullet
.choice-num
.choice-body {
  display: grid;
} */
.dot {
  display: none;
}

.choice-card h3 {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--accent);
  margin-bottom: 10px;
}

.choice-card p {
  margin-top: 16px;
  color: #344054;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.75;
  letter-spacing: -0.2px;
}

.choice-num {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #006E61;
  margin-right: 12px;
}

.choice-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.choice-title-row h3 {
  margin: 0;
}

.choice-note {
  display: block;
  margin-top: 16px;
  padding: 18px 24px 20px;
  border-top: none;
  background: rgba(242, 237, 228, 0.65);
}

.choice-note b {
  display: block;
  border: none;
  background: transparent;
  padding: 0;
  color: #344054;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
}

.choice-note p {
  margin-top: 4px;
  color: #344054;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.75;
  letter-spacing: -0.2px;
}

.choice-num,
.decision-num {
  display: block;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

.choice-note.accent b {
  color: #344054;
  background: transparent;
  border: none;
}

.impact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 466px;
  gap: 30px;
  align-items: stretch;
  padding-top: 36px;
}

.impact > div {
  display: flex;
  flex-direction: column;
}

.impact-copy {
  flex: 1;
  margin-top: 18px;
  border: 0.5px solid rgba(6, 110, 97, 0.22);
  border-radius: 8px;
  background: rgba(6, 110, 97, 0.08);
  padding: 20px 24px;
  color: var(--body);
  font-size: 20px;
  line-height: 1.75;
}

.photo-card,
.wide-photo {
  overflow: hidden;
  border-radius: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.photo-card {
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.photo-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.wide-photo {
  margin-top: 26px;
  overflow: hidden;
  border-radius: 8px;
}

.wide-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.reflection {
  margin-top: 0;
}

.quote-block {
  margin-top: 10px;
  border-left: 2px solid var(--accent);
  background: rgba(242, 237, 228, 0.65);
  padding: 0 16px;
}

.quote-block p {
  color: var(--body);
  font-size: 20px;
  line-height: 1.7;
}

.quote-block p + p {
  margin-top: 28px;
}

.image-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 38px;
  align-items: end;
  padding-top: 45px;
}

.image-pair figure,
.media-strip figure {
  margin: 0;
}

.image-pair img {
  width: 100%;
  border-radius: 8px;
}

.ux-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.ux-card,
.process-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 17px 19px;
}

.ux-card b,
.process-grid b {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 10px;
  letter-spacing: 1px;
}

.ux-card h3 {
  font-size: 13px;
  font-weight: 600;
}

.ux-card p {
  margin-top: 8px;
  color: var(--body);
  font-size: 12px;
  line-height: 1.75;
}

.evolution-box {
  margin-top: 22px;
  border: 1px solid rgba(6, 110, 97, 0.22);
  border-radius: 8px;
  background: rgba(6, 110, 97, 0.08);
  padding: 24px 25px 21px;
  
}

.evolution-box > p:not(.section-kicker) {
  /* margin-top: 12px; */
  color: var(--body);
  font-family: var(--font-head);
  font-size: 15px;
  line-height: 1.7;
  text-align: center;


}

.flow-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.flow-pills span,
.flow-pills strong {
  border: 1px solid var(--muted);
  border-radius: 5px;
  padding: 8px 15px;
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
}

.flow-pills strong {
  border-color: rgba(6, 110, 97, 0.22);;
  color: var(--accent);
  background: rgba(6, 110, 97, 0.08);
}

.flow-pills i {
  color: var(--muted);
  font-style: normal;
}

.media-strip {
  margin-top: 26px;
}

.wide-composite {
  display: grid;
  grid-template-columns: 0.62fr 1fr;
  overflow: hidden;
  border-radius: 8px;
}

.wide-composite.two-one {
  grid-template-columns: 0.58fr 1fr;
}

.wide-composite img {
  width: 100%;
  height: 431px;
  object-fit: cover;
}

.caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.8;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line); 
  border-radius: 8px;
}

.process-grid article {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  padding: 14px 16px;
}

.process-grid article:last-child {
  border-right: 0;
}

.process-grid strong,
.process-grid span {
  display: block;
}

.process-grid strong {
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.75;
}

.process-grid span {
  margin-top: 2px;
  color: #7a7670;
  font-size: 11px;
  line-height: 1.4;
}

.compact-choice .choice-body {
  padding: 17px 19px;
}

.physical-grid {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 14px;
  margin-top: 20px;
  overflow: hidden;
}

.physical-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center;
}

.physical-grid div:first-child img {
  aspect-ratio: 4 / 3;
}

.physical-grid div:first-child img + img {
  margin-top: 10px;
}

.physical-grid div:last-child img {
  width: 100%;
  height: 490px;
  object-fit: cover;
  object-position: center;
}

.wide-composite.rebrand {
  grid-template-columns: 1.58fr 1fr;
  gap: 16px;
  overflow: visible;
}

.wide-composite.rebrand img {
  border-radius: 8px;
}

.stacked-ui {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #f4f4f4;
  padding: 5px 25px 0;
}

.stacked-ui img {
  height: auto;
  object-fit: contain;
}

html {
  scroll-padding-top: 90px;
}

.case-toc {
  position: fixed;
  top: 96px;
  left: 26px;
  width: 270px;
  z-index: 40;

  background: rgba(252, 250, 244, 0.78);
  border: 1px solid rgba(216, 210, 198, 0.72);
  border-radius: 22px;
  padding: 24px;

  box-shadow:
    0 24px 70px rgba(31, 43, 51, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);

  backdrop-filter: blur(18px);
}

.case-toc-header {
  padding-bottom: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(216, 210, 198, 0.75);
}

.case-toc-project {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.case-toc-title {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}


.case-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.case-toc-link {
  position: relative;
  display: block;
  padding: 10px 14px 10px 30px;
  border-radius: 12px;

  color: #506461;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;

  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.case-toc-link::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;

  width: 6px;
  height: 6px;
  border-radius: 50%;

  background: rgba(80, 100, 97, 0.35);
  transform: translateY(-50%);
  transition:
    background 0.22s ease,
    transform 0.22s ease;
}

.case-toc-link:hover {
  color: var(--accent);
  background: rgba(6, 110, 97, 0.055);
  transform: translateX(2px);
}

.case-toc-link:hover::before {
  background: var(--accent);
}

.case-toc-link.is-active {
  color: var(--accent);
  background: rgba(6, 110, 97, 0.09);
}

.case-toc-link.is-active::before {
  background: var(--accent);
  transform: translateY(-50%) scale(1.25);
}

.case-toc-sub {
  margin: 4px 0 8px 30px;
  padding-left: 16px;
  border-left: 1px solid rgba(6, 110, 97, 0.14);
}

.case-toc-child {
  padding-left: 18px;
  font-size: 13px;
  font-weight: 500;
  color: #6B7A84;
}

.case-toc-child::before {
  display: none;
}

.problem-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
  margin-top: 20px;
}

.problem-table div {
  font-size: 20px;
  line-height: 1.65;
  color: var(--body);
  padding: 10px 0;
}

.problem-table-head {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 500;
  color: var(--accent); 
  margin-bottom: 12px;
}

.solution-flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
  margin: 28px 0 34px;
}

.flow-step {
  position: relative;
  min-height: 48px;
  border: 1px solid #344054;
  border-radius: 4px;
  padding: 8px 12px;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.05;
  color: var(--body);
  background: var(--bg);
}

.flow-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -22px;
  transform: translateY(-50%);
  color: #344054;
  font-size: 16px;
}

.shipped-screens {
  margin-top: 26px;
  overflow: hidden;
  border-radius: 8px;
}
.wide-photo.shipped-screens img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.wide-photo.shipped-screens {
  width: 100%;
  margin: 26px 0 0;
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

.metrics-note {
  margin-top: 24px;
  margin-bottom: 8px;
}

.section:has(.metrics-grid) {
  padding-bottom: 90px;
}

.metrics-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.metrics-grid-two .metric-card {
  min-height: 230px;
  padding: 30px 30px 30px;
}

/* Heat Pump only - 2 metric cards */
.metrics-grid.metrics-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metrics-grid.metrics-grid-two .metric-card {
  min-height: 220px;
  padding: 30px 30px 30px;
  display: flex;
}

@media (max-width: 900px) {
  .metrics-grid.metrics-grid-two {
    grid-template-columns: 1fr;
  }
}
/* ============================================
   ASTRA case-study additions
   Add at the bottom of styles2.css
   ============================================ */

.astra-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px 40px;
  align-items: stretch;
}

.astra-overview > .section-kicker,
.astra-overview > h2 {
  grid-column: 1 / -1;
}

.astra-overview-copy {
  grid-column: 1;
}

.astra-overview > p:not(.section-kicker) {
  grid-column: 1;
}

.astra-robot-card {
  grid-column: 2;
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #101010;
}
.astra-overview-copy p {
  color: var(--body);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.75;
}

.astra-overview-copy p + p {
  margin-top: 18px;
}

.astra-robot-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
}

.astra-flow {
  grid-template-columns: repeat(5, 1fr);
}

.astra-users-table {
  display: grid;
  grid-template-columns: 0.9fr 1.5fr;
  gap: 0 70px;
  margin-top: 22px;
}

.astra-users-table > div {
  padding: 8px 0;
  color: var(--body);
  font-size: 20px;
  line-height: 1.65;
}

.astra-users-table .table-head {
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 500;
}

.astra-confidential-note {
  margin-top: 0;
  text-align: center;
}

.astra-confidential-note > p:not(.section-kicker) {
  font-size: 14px;
  color: var(--accent);
}

.astra-screens-panel {
  margin: 34px 0 0;
  padding: 0px 0px;
  /* border: 1px solid rgba(6, 110, 97, 0.12); */
  /* background: var(--panel); */
}

.astra-screens-panel img {
  width: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.astra-wire-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 38px 56px;
  margin-top: 24px;
}

.astra-wire-grid article {
  min-width: 0;
}


.astra-wire-grid img {
  width: 100%;
  margin-top: 14px;
  border: 1px solid rgba(31, 43, 51, 0.15);
  background: #fff;
  object-fit: contain;
}

@media (max-width: 900px) {
  .astra-overview,
  .astra-wire-grid {
    grid-template-columns: 1fr;
  }

  /* .astra-flow {
    grid-template-columns: repeat(2, 1fr);
  } */

  .astra-screens-panel {
    padding: 24px;
  }
}

@media (max-width: 900px) {
  .astra-overview {
    gap: 24px;
  }

  .astra-robot-card img {
    min-height: auto;
  }

  .astra-users-table {
    gap: 0;
  }

  /* .astra-users-table .table-head:nth-child(2) {
    margin-top: 16px;
  } */

  .astra-screens-panel {
    padding: 16px;
  }
}

@media (max-width: 900px) {
  .solution-flow {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .flow-step {
    min-height: 56px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.25;
  }

  .flow-step:not(:last-child)::after {
    display: block;
    content: "↓";
    position: absolute;
    top: auto;
    right: auto;
    left: 50%;
    bottom: -24px;
    transform: translateX(-50%);
    color: #344054;
    font-size: 17px;
    line-height: 1;
  }
}



@media (max-width: 760px) {
  .physical-grid img {
    height: auto;
  }
}

.image-pair {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
  align-items: start;
}
.image-pair-note {
  grid-column: 1 / -1;
  margin-bottom: 22px;
}

.image-pair figure {
  margin: 0;
}

.image-pair img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.image-pair figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.7;
  font-style: italic;
  color: var(--muted);
}

.prototype-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 0;
}

.prototype-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-pair {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
  align-items: stretch;
}

.image-pair-note {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.image-pair figure {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.image-pair figure img {
  width: 100%;
  display: block;
}

/* Left image should stretch/zoom */
.image-pair figure:first-of-type img {
  flex: 1;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Right grouped image should not crop */
.image-pair figure:last-of-type img {
  height: auto;
  object-fit: contain;
}

/* Caption stays below image */
.image-pair figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.7;
  font-style: italic;
  color: var(--muted);
}

@media (max-width: 760px) {
  .image-pair {
    grid-template-columns: 1fr;
  }

  .image-pair figure:first-of-type img,
  .image-pair figure:last-of-type img {
    height: auto;
    object-fit: contain;
  }
}
.image-pair {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
  align-items: stretch;
}

.image-pair figure {
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* common */
.image-pair img {
  width: 100%;
  display: block;
}

/* LEFT image: extend / zoom to match right side height */
.image-pair figure:first-child img {
  flex: 1;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* RIGHT image: do not crop */
.image-pair figure:last-child img {
  height: auto;
  object-fit: contain;
}

/* captions */
.image-pair figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.7;
  font-style: italic;
  color: var(--muted);
}

@media (max-width: 760px) {
  .image-pair {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .image-pair figure:first-child img,
  .image-pair figure:last-child img {
    height: auto;
    object-fit: contain;
  }
}

@media (max-width: 760px) {
  .image-pair {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (min-width: 1280px) {
  .case-study {
    padding-left: 320px;
  }
}

@media (max-width: 1279px) {
  .case-toc {
    display: none;
  }
}

@media (max-width: 760px) {
  .case-study {
    padding: 34px 16px 54px;
  }

  .page-nav {
    overflow-x: auto;
    margin-bottom: 10px;
  }

  .page-nav a {
    flex: 0 0 auto;
  }

  .hero {
    padding-top: 28px;
  }

  .problem-table {
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 0 16px;
}

.problem-table div {
  font-size: 15px;
  line-height: 1.45;
  padding: 10px 0;
}

.problem-table-head {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.problem-table-head:nth-child(2) {
  margin-top: 0;
}

  .project-meta,
  .image-pair,
  .ux-grid,
  .physical-grid,
  .wide-composite,
  .wide-composite.two-one,
  .wide-composite.rebrand {
    grid-template-columns: 1fr;
  }

  .impact {
    grid-template-columns: 1fr;
    gap: 20px;
  }

   .impact > div {
    display: block;
  }

  .impact-copy {
    min-height: auto;
  }

  .photo-card {
    height: auto;
    min-height: auto;
  }

  .photo-card img {
    height: auto;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .process-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .process-grid article:last-child {
    border-bottom: 0;
  }

  .project-meta div,
  .project-meta div:nth-last-child(-n + 2),
  .project-meta div:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid var(--muted-line);
  }

  .project-meta div:last-child {
    border-bottom: 0;
  }

   .dashboard-preview-img {
    height: auto;
    object-fit: contain;
  }

  .dashboard-shell {
    margin-top: 28px;
    padding: 0;
  }

  .choice-note {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 18px;
  }

  .wide-photo,
  .physical-grid div:last-child img,
  .wide-composite img {
    height: auto;
  }

  .wide-photo img {
    height: auto;
  }
}

/* ============================================
   IMPACT / OUTCOME METRIC CARDS
   Same-size cards, existing portfolio typography
   ============================================ */

.metrics-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
  margin-top: 28px;
}

.metric-card,
.metric-card-featured {
  position: relative;
  z-index: 1;
  min-height: 240px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(216, 210, 198, 0.7);
  padding: 30px 30px 30px;
  text-align: center;
  /* display: flex; */
  flex-direction: column;
  justify-content: center;
  box-shadow:
    0 24px 70px rgba(31, 43, 51, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);

  transform: none;
}

/* number */
.metric-value {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* metric title */
.metric-card h3 {
  margin: 0px 0 0;
  min-height: 42px;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0px;
  text-transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* description */
.metric-card p:not(.metric-value) {
  margin-top: 0px;
  color: var(--body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .metrics-grid::before,
  .metrics-grid::after{
    display: none;
  }

  .section:has(.metrics-grid) {
    padding-bottom: 54px;
  }

  .metric-card,
  .metric-card-featured {
    min-height: auto;
    padding: 30px 20px 30px;
    transform: none;
  }

  .metric-value {
    font-size: 48px;
  }
}

/* Heat Pump metric cards — fixed 2-card layout */
.metrics-grid.metrics-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.metrics-grid.metrics-grid-two .metric-card {
  min-height: 230px;
  padding: 30px 30px 30px;
  display: grid;
  grid-template-rows: auto 42px 1fr;
  align-items: start;
}

.metrics-grid.metrics-grid-two .metric-value {
  margin: 0 0 0px;
}

.metrics-grid.metrics-grid-two .metric-card h3 {
  margin: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metrics-grid.metrics-grid-two .metric-card p:not(.metric-value) {
  margin-top: 0px;
}

@media (max-width: 900px) {
  .metrics-grid.metrics-grid-two {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   UVA MOBILE FINAL FIX
   Requires: <main class="case-study uva-case">
   ============================================ */

@media (max-width: 760px) {
  /* UVA flow: vertical with down arrows */
  .uva-case #research .solution-flow,
  main.uva-case #research .solution-flow {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    overflow: visible !important;
    margin: 24px 0 32px !important;
    padding: 0 !important;
  }

  .uva-case #research .solution-flow .flow-step,
  main.uva-case #research .solution-flow .flow-step {
    position: relative !important;
    width: 100% !important;
    min-height: 56px !important;
    padding: 13px 16px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
  }

  .uva-case #research .solution-flow .flow-step::before,
  main.uva-case #research .solution-flow .flow-step::before {
    display: none !important;
    content: none !important;
  }

  .uva-case #research .solution-flow .flow-step:not(:last-child)::after,
  main.uva-case #research .solution-flow .flow-step:not(:last-child)::after {
    display: block !important;
    content: "↓" !important;
    position: absolute !important;
    top: auto !important;
    right: auto !important;
    left: 50% !important;
    bottom: -25px !important;
    transform: translateX(-50%) !important;
    color: #344054 !important;
    font-size: 18px !important;
    line-height: 1 !important;
  }

  /* UVA problem table: keep as 2-column readable table */
  .uva-case #problem .problem-table,
  main.uva-case #problem .problem-table {
    display: grid !important;
    grid-template-columns: 118px minmax(0, 1fr) !important;
    gap: 0 16px !important;
    margin-top: 20px !important;
  }

  .uva-case #problem .problem-table > div,
  main.uva-case #problem .problem-table > div {
    padding: 10px 0 !important;
    border: 0 !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
    overflow-wrap: break-word !important;
  }

  .uva-case #problem .problem-table-head,
  main.uva-case #problem .problem-table-head {
    margin: 0 0 6px !important;
    color: var(--accent) !important;
    font-family: var(--font-head) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
  }

  .uva-case #problem .problem-table-head:nth-child(2),
  main.uva-case #problem .problem-table-head:nth-child(2) {
    margin-top: 0 !important;
  }
}

@media (max-width: 430px) {
  .uva-case #problem .problem-table,
  main.uva-case #problem .problem-table {
    grid-template-columns: 102px minmax(0, 1fr) !important;
    gap: 0 12px !important;
  }

  .uva-case #problem .problem-table > div,
  main.uva-case #problem .problem-table > div {
    font-size: 14.5px !important;
  }
}

/* ============================================
   CUSTOM CURSOR — CASE STUDY PAGES
   Paste at bottom of styles2.css
   ============================================ */

body,
a,
button {
  cursor: none;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  transition:
    width 0.18s ease,
    height 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

.custom-cursor.is-hovering {
  width: 30px;
  height: 30px;
  background: rgba(6, 110, 97, 0.08);
  border-color: rgba(6, 110, 97, 0.45);
}

.custom-cursor.is-hidden {
  opacity: 0;
}

/* Cursor contrast on accent/dark clickable areas */
body:has(.nav-resume:hover) .custom-cursor,
body:has(.nav-resume:hover) .custom-cursor.is-hovering {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

/* Hide custom cursor on mobile/tablet */
@media (max-width: 768px) {
  body,
  a,
  button {
    cursor: auto;
  }

  .custom-cursor {
    display: none;
  }
}
 /* ============================================
   ASTRA OVERVIEW MOBILE FIX
   Paste at the very bottom of styles2.css
   ============================================ */

@media (max-width: 900px) {
  .astra-overview {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .astra-overview > .section-kicker,
  .astra-overview > h2,
  .astra-overview-copy,
  .astra-overview > p:not(.section-kicker),
  .astra-robot-card {
    grid-column: 1 / -1 !important;
  }

  .astra-overview-copy {
    margin-top: 0 !important;
  }

  .astra-robot-card {
    width: 100% !important;
    height: auto !important;
    margin-top: 4px !important;
  }

  .astra-robot-card img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    object-fit: contain !important;
  }
}

/* ============================================
   MOBILE IMAGE SHARPNESS FIX — CASE STUDIES
   ============================================ */

@media (max-width: 768px) {
  img {
    image-rendering: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .dashboard-preview-img,
  .photo-card img,
  .wide-photo img,
  .image-pair img,
  .wide-composite img,
  .physical-grid img,
  .astra-robot-card img,
  .astra-screens-panel img,
  .astra-wire-grid img,
  .shipped-screens img {
    max-width: 100%;
    height: auto;
    filter: none !important;
  }
}

/* ============================================
   MOBILE IMAGE BLUR FIX — CASE STUDIES
   ============================================ */

@media (max-width: 768px) {
  .reveal,
  .reveal.in {
    transform: none !important;
  }

  img,
  figure,
  .photo-card,
  .wide-photo,
  .image-pair,
  .dashboard-shell,
  .astra-robot-card,
  .astra-screens-panel,
  .astra-wire-grid {
    transform: none !important;
    filter: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
  }
}

/* ============================================
   UVA PACKAGING — SAME HEIGHT FIX
   ============================================ */

.uva-packaging-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
  align-items: start;
  margin-top: 24px;
}

.uva-packaging-card {
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Equal image height */
.uva-packaging-card img {
  width: 100%;
  height: 600px !important;
  display: block;
  object-fit: cover;
  object-position: center;
  background: var(--panel-2);
}

/* Caption below image */
.uva-packaging-card .caption {
  margin-top: 14px;
}

/* Mobile */
@media (max-width: 760px) {
  .uva-packaging-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .uva-packaging-card img {
    height: auto !important;
    object-fit: contain;
  }
}

/* ============================================
   Pi-CADS — What usage revealed section
   ============================================ */

.before-after-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
}

.before-after-grid figure {
  margin: 0;
}

.before-after-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: contain;
}

.before-after-grid .caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  line-height: 1.7;
}

.picads-usage-list {
  margin-top: 32px;
}

.picads-usage-list .choice-card + .choice-card {
  margin-top: 28px;
}

.picads-usage-list .choice-card h3 {
  font-size: 22px;
}

@media (max-width: 760px) {
  .before-after-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .picads-usage-list {
    margin-top: 28px;
  }

  .picads-usage-list .choice-card h3 {
    font-size: 20px;
  }
}

/* ============================================
   LARGE MONITOR ONLY — CASE STUDIES
   Starts after normal laptop/desktop sizes
   ============================================ */

@media (min-width: 1700px) {
  .shell {
    width: min(1080px, 100%);
  }

  .case-study {
    padding-left: 360px;
    padding-right: 80px;
  }

  .case-toc {
    left: calc((100vw - 1500px) / 2);
  }

  .astra-overview {
    grid-template-columns: minmax(0, 1fr) 420px;
  }
}