/* ============================================
   GL Medical — Case Study Stylesheet
   Style: Magazine / Garamond · Mobile-first
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-900: #042C1E;
  --green-800: #085041;
  --green-700: #0F6E56;
  --green-500: #1D9E75;
  --green-300: #5DCAA5;
  --green-100: #E1F5EE;
  --green-50:  #F0FAF6;
  --off-white: #F9F8F6;
  --charcoal:  #2C2C2C;
  --mid-gray:  #6B6B6B;
  --light-gray:#E8E8E4;
  --border:    rgba(0,0,0,0.08);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;

  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:cubic-bezier(0.65, 0, 0.35, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

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

/* === CONTAINER === */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === REVEAL ANIMATION === */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === SHARED SECTION === */
.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}
.section:last-child { border-bottom: none; }

.section--green {
  background: var(--green-800);
  border-bottom: none;
}
.section--light {
  background: var(--green-50);
}
.section--hmw {
  background: var(--off-white);
}

.section__header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}
.section__num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-style: italic;
  color: var(--green-300);
  line-height: 1;
  flex-shrink: 0;
}
.section__num--light { color: rgba(255,255,255,0.3); }

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.15;
}
.section__title--light { color: #fff; }

.section__intro {
  font-size: 1rem;
  color: var(--mid-gray);
  max-width: 620px;
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.75;
}
.section__intro--light { color: rgba(255,255,255,0.65); }

/* === KICKER & CHIP === */
.kicker {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 1rem;
  font-weight: 500;
}

.chip {
  display: inline-block;
  font-size: 0.72rem;
  padding: 4px 12px;
  border: 1px solid var(--green-300);
  border-radius: 20px;
  color: var(--green-700);
  transition: background 0.2s, color 0.2s;
}
.chip:hover {
  background: var(--green-800);
  color: #fff;
  border-color: var(--green-800);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--charcoal);
  margin-bottom: 1.25rem;
}
.hero__title em {
  font-style: italic;
  color: var(--green-700);
}
.hero__desc {
  font-size: 1rem;
  color: var(--mid-gray);
  font-weight: 300;
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 2rem;
}
.hero__meta {
  margin-bottom: 1.75rem;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  gap: 1rem;
}
.meta-row:first-child { border-top: 1px solid var(--border); }
.meta-key { color: var(--mid-gray); font-weight: 300; flex-shrink: 0; }
.meta-val { font-weight: 500; text-align: right; }
.hero__chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* Hero right */
.hero__right { display: flex; flex-direction: column; gap: 2rem; }

.hero__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-100);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  min-height: 180px;
}
.hero__logo {
  max-height: 220px;
  width: auto;
  object-fit: contain;
}
.logo-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--green-800);
}

.hero__stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.hero__stat {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.25s;
}
.hero__stat:last-child { border-bottom: none; }
.hero__stat:hover { background: var(--green-100); }
.stat-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--green-800);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--mid-gray);
  font-weight: 300;
  line-height: 1.4;
}
.hero__stat-divider { display: none; }

/* ============================================
   OVERVIEW
   ============================================ */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.overview-card {
  background: var(--off-white);
  padding: 1.75rem;
  transition: background 0.25s var(--ease-out);
}
.overview-card:hover { background: var(--green-100); }
.ov-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 0.6rem;
  font-weight: 500;
}
.ov-text {
  font-size: 0.95rem;
  color: var(--charcoal);
  font-weight: 300;
  line-height: 1.7;
}

/* ============================================
   STATS (Quantitative Research)
   ============================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.stat-card {
  background: rgba(255,255,255,0.06);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: background 0.25s;
}
.stat-card:hover { background: rgba(255,255,255,0.12); }
.stat-big {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 600;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.75rem;
}
.stat-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  font-weight: 300;
  line-height: 1.55;
  max-width: 200px;
  margin: 0 auto;
}

/* ============================================
   PERSONA
   ============================================ */
.persona-wrap { max-width: 860px; }
.persona-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  background: #fff;
}
.persona__top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.persona__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--green-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--green-800);
  flex-shrink: 0;
}
.persona__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.persona__role {
  font-size: 0.85rem;
  color: var(--mid-gray);
  font-weight: 300;
}
.persona__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--green-800);
  line-height: 1.6;
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--green-100);
  border-left: 3px solid var(--green-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.persona__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.persona__col-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.persona__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.persona__list li {
  font-size: 0.875rem;
  color: var(--charcoal);
  font-weight: 300;
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}
.persona__list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--green-500);
}
.persona__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.ptag {
  font-size: 0.72rem;
  padding: 4px 10px;
  border: 1px solid var(--green-300);
  border-radius: 20px;
  color: var(--green-700);
  font-weight: 400;
  transition: all 0.2s;
}
.ptag:hover {
  background: var(--green-800);
  color: #fff;
  border-color: var(--green-800);
}

/* ============================================
   ASSUMPTIONS & HYPOTHESES
   ============================================ */
.ah-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
.ah-col-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 1.25rem;
  font-weight: 500;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.ah-list { display: flex; flex-direction: column; gap: 1rem; }
.ah-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}
.ah-item:hover {
  border-color: var(--green-300);
  transform: translateX(4px);
}
.ah-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green-300);
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.ah-num--h { color: var(--green-700); }
.ah-item p {
  font-size: 0.9rem;
  color: var(--charcoal);
  font-weight: 300;
  line-height: 1.6;
}

/* ============================================
   HMW
   ============================================ */
.hmw-block {
  background: var(--green-800);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
}
.hmw-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green-300);
  margin-bottom: 1rem;
  font-weight: 500;
}
.hmw-question {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: #fff;
  line-height: 1.45;
}
.hmw-sub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.hmw-sub {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: background 0.2s, border-color 0.2s;
}
.hmw-sub:hover {
  background: var(--green-100);
  border-color: var(--green-300);
}
.hmw-sub-icon {
  color: var(--green-500);
  font-style: normal;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.hmw-sub p {
  font-size: 0.9rem;
  color: var(--charcoal);
  font-weight: 300;
  line-height: 1.6;
}

/* ============================================
   EMPATHY MAP
   ============================================ */
.empathy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.empathy-card {
  background: var(--off-white);
  padding: 1.75rem;
  transition: background 0.25s;
}
.empathy-card:hover { background: #fff; }
.empathy-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 1rem;
  font-weight: 500;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.empathy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.empathy-list li {
  font-size: 0.875rem;
  color: var(--charcoal);
  font-weight: 300;
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}
.empathy-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--green-300);
}

/* ============================================
   SOLUTION
   ============================================ */
.solution-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.solution-card {
  background: rgba(255,255,255,0.06);
  padding: 2rem;
  transition: background 0.25s;
}
.solution-card:hover { background: rgba(255,255,255,0.12); }
.sol-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-style: italic;
  color: rgba(255,255,255,0.2);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.sol-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}
.sol-body {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  font-weight: 300;
  line-height: 1.65;
}

/* ============================================
   DESIGN SYSTEM
   ============================================ */
.ds-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.ds-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  background: #fff;
}
.ds-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 1.5rem;
  font-weight: 500;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.ds-font-pair { display: flex; flex-direction: column; gap: 1.5rem; }
.ds-font-name { font-size: 0.75rem; color: var(--mid-gray); margin-bottom: 6px; }
.ds-font-sample--display {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.2;
}
.ds-font-sample--italic { font-style: italic; color: var(--green-700); font-size: 1.4rem; margin-top: 4px; }
.ds-font-sample--body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--charcoal);
  font-weight: 400;
}
.ds-font-sample--light { font-weight: 300; color: var(--mid-gray); font-size: 0.9rem; margin-top: 4px; }

.ds-palette {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ds-swatch {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  transition: transform 0.2s var(--ease-out);
  cursor: default;
}
.ds-swatch:hover { transform: scale(1.04); }
.swatch-name { font-size: 0.7rem; font-weight: 500; line-height: 1; }
.swatch-hex { font-size: 0.65rem; opacity: 0.7; margin-top: 2px; font-family: monospace; }

.ds-principles { display: flex; flex-direction: column; gap: 1.25rem; }
.ds-principle {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--off-white);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.ds-principle:hover { background: var(--green-100); }
.dp-num {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--green-300);
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.dp-title { font-size: 0.9rem; font-weight: 500; margin-bottom: 3px; }
.dp-body { font-size: 0.82rem; color: var(--mid-gray); font-weight: 300; line-height: 1.55; }

/* ============================================
   FINAL DESIGNS
   ============================================ */
.screens-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
.screen-wrap { display: flex; flex-direction: column; gap: 0.5rem; }
.screen-wrap--large { grid-column: span 2; }

.screen-placeholder {
  background: var(--green-100);
  border-radius: var(--radius-md);
  border: 1px solid var(--green-300);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/9;
  gap: 0.5rem;
  transition: background 0.25s, transform 0.25s var(--ease-out);
  cursor: pointer;
}
.screen-placeholder:hover {
  background: var(--green-100);
  transform: translateY(-3px);
  border-color: var(--green-700);
}
.screen-placeholder--large { aspect-ratio: 16/7; }
.screen-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-800);
}
.screen-sub {
  font-size: 0.75rem;
  color: var(--green-700);
  font-weight: 300;
}
.screen-caption {
  font-size: 0.78rem;
  color: var(--mid-gray);
  font-weight: 300;
}

.live-link-wrap { text-align: center; padding-top: 1rem; }
.live-link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--green-800);
  text-decoration: none;
  border-bottom: 1px solid var(--green-300);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.live-link:hover {
  color: var(--green-500);
  border-color: var(--green-500);
}

/* ============================================
   LEARNINGS
   ============================================ */
.learnings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.learning-card {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  transition: border-color 0.25s, transform 0.25s var(--ease-out);
}
.learning-card:hover {
  border-color: var(--green-300);
  transform: translateY(-3px);
}
.learning-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-style: italic;
  color: var(--green-100);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.learning-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}
.learning-body {
  font-size: 0.875rem;
  color: var(--mid-gray);
  font-weight: 300;
  line-height: 1.65;
}

/* ============================================
   TABLET — 600px+
   ============================================ */
@media (min-width: 600px) {
  .overview-grid { grid-template-columns: repeat(3, 1fr); }
  .ah-grid { grid-template-columns: 1fr 1fr; }
  .empathy-grid { grid-template-columns: 1fr 1fr; }
  .solution-grid { grid-template-columns: 1fr 1fr; }
  .learnings-grid { grid-template-columns: 1fr 1fr; }
  .hmw-sub-grid { grid-template-columns: 1fr 1fr 1fr; }
  .ds-font-pair { flex-direction: row; }
}

/* ============================================
   DESKTOP — 900px+
   ============================================ */
@media (min-width: 900px) {
  .hero { padding: 7rem 0 6rem; }
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 5rem;
  }
  .hero__stats { flex-direction: column; }
  .hero__stat-divider { display: none; }

  .section { padding: 6rem 0; }

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

  .stats-row { grid-template-columns: repeat(4, 1fr); }

  .empathy-grid { grid-template-columns: repeat(4, 1fr); }

  .solution-grid { grid-template-columns: repeat(2, 1fr); }

  .ds-grid { grid-template-columns: 1fr 1fr; }
  .ds-block--principles { grid-column: span 2; }
  .ds-font-pair { flex-direction: row; gap: 3rem; }

  .screens-grid { grid-template-columns: repeat(4, 1fr); }
  .screen-wrap--large { grid-column: span 4; }
  .screen-placeholder--large { aspect-ratio: 16/6; }

  .learnings-grid { grid-template-columns: repeat(4, 1fr); }
  .ah-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   SCROLL ANIMATION JS HOOK
   ============================================ */
/* handled via IntersectionObserver in HTML script tag */