/* ═══════════════════════════════════════════════════════════════
   NEST THERMOSTAT REDESIGN — CASE STUDY
   project-one.css
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;1,400;1,500&display=swap');

/* ─── NAV INTEGRATION ───────────────────────────────────────── */
/* Offset body so fixed nav doesn't cover content */
body { padding-top: 0; }

/* Back breadcrumb link */
.case-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  color: var(--text-muted, #919191);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.2s;
}

.case-back-link:hover { color: var(--text, #D3D4D2); }


/* ─── DESIGN TOKENS ─── */
:root {
  --bg:              #040C26;
  --card:            #08143A;
  --accent:          #6C77A1;
  --text:            #D3D4D2;
  --text-muted:      #919191;
  --text-mid:        #919191;
  --border-card:     rgba(255,255,255,0.12);
  --border-light:    rgba(255,255,255,0.08);
  --border-pill:     rgba(255,255,255,0.20);
  --placeholder-bg:  #08143A;
  --placeholder-alt: #061030;
  --placeholder-lbl: #919191;
  --max-w:           860px;
  --gap:             90px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: #D3D4D2;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  font-weight: 400;
}

/* Explicit text colour — prevents bleed-through from style.css */
.content-col,
.content-col p,
.content-col li,
.content-col span:not(.accent-italic):not(.phase-sub):not(.brief-accent),
.content-col h2,
.content-col h3 {
  color: #D3D4D2;
}

/* ─── CONTAINER ─── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ─── SECTION SPACING ─── */
.section        { padding-top: var(--gap); }
.section-hook   { padding-top: 72px; }
.section-showcase {
  padding: 100px 0;
}

/* ─── PILL LABEL ─── */
.pill-wrap {
  text-align: center;
  margin-bottom: 36px;
}

.pill {
  display: inline-block;
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.04em;
  background: transparent;
  border: 0.5px solid var(--border-pill);
  border-radius: 999px;
  padding: 5px 16px;
  line-height: 1;
}

/* ─── ACCENT ITALIC ─── */
.accent-italic {
  font-style: italic;
  color: var(--accent);
  font-weight: inherit;
}

/* ─── IMAGE PLACEHOLDER (standard) ─── */
.img-placeholder {
  background: var(--placeholder-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--placeholder-lbl);
  font-size: 16px;
  font-weight: 400;
  padding: 16px;
  margin-top: 28px;
  width: 100%;
}

/* ─── WHITE CARD ─── */
.card {
  background: var(--card);
  border: 0.5px solid var(--border-card);
  border-radius: 16px;
  padding: 28px 32px;
  margin-top: 28px;
}

/* ════════════════════════════════════════════════════════
   SECTION 1 — HOOK
════════════════════════════════════════════════════════ */
.hook-headline {
  font-size: 45px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text);
  text-align: center;
  max-width: 720px;
  margin: 0 auto 14px;
}

.hook-subline {
  text-align: center;
  color: var(--text-muted);
  font-size: 18px;
  letter-spacing: 0.01em;
}

/* ════════════════════════════════════════════════════════
   SECTION 2 — CONTEXT CARD
════════════════════════════════════════════════════════ */
.context-card { margin-top: 0; }

.context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 0 32px;
}

.col-header {
  font-size: 14px;
  font-weight: 500;
  color: #919191;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 10px;
  line-height: 1;
  text-align: center;
}

.context-col p:not(.col-header) {
  font-size: 17px;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 3px;
  text-align: center;
}

/* ════════════════════════════════════════════════════════
   SECTION 3 — CREATIVE BRIEF
════════════════════════════════════════════════════════ */
.section-headline {
  font-size: 41px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 20px;
}

.section-headline--34 { font-size: 37px; }

.section-headline.centered { text-align: center; }

.body-center {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 32px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.75;
}

.hmw-block {
  border-top: 0.5px solid var(--border-card);
  margin-top: 32px;
  padding-top: 28px;
}

.hmw-text {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

/* ════════════════════════════════════════════════════════
   SECTION 4 — VISUAL RESEARCH
════════════════════════════════════════════════════════ */
.section-heading-left {
  font-size: 35px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.section-subtext {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.section-body {
  font-size: 18px;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 28px;
}

/* Stat blocks — border-left accent, no card */
.stats-row {
  display: flex;
  gap: 48px;
  margin-bottom: 36px;
}

.stat-block {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

.stat-num {
  display: block;
  font-size: 35px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 5px;
}

.stat-label {
  display: block;
  font-size: 16px;
  color: var(--text-muted);
}

/* Attribute grid — 2 columns, 5 rows each */
.attr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: column;
  grid-template-rows: repeat(5, auto);
  column-gap: 48px;
  margin-top: 32px;
}

.attr-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 0.5px solid var(--border-light);
  gap: 12px;
}

.attr-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.attr-value {
  font-size: 16px;
  color: var(--text-muted);
  text-align: right;
}

/* ════════════════════════════════════════════════════════
   SECTION 5 — TIMELINE
════════════════════════════════════════════════════════ */
.timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: 8px;
  padding-bottom: 8px;
}

/* Horizontal connecting line — calibrated to center of dots */
.timeline::before {
  content: '';
  position: absolute;
  top: 50px; /* node-date(36px) + margin-bottom(8px) + half-dot(6px) */
  left: calc(100% / 10);
  right: calc(100% / 10);
  height: 0.5px;
  background: var(--border-pill);
}

.timeline-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.node-date {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-bottom: 8px;
  height: 36px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  padding: 0 4px;
}

.node-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.node-content { text-align: center; }

.phase-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 2px;
}

.phase-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
}

.phase-sub {
  display: block;
  font-size: 14px;
  font-style: italic;
  color: var(--accent);
  margin-top: 3px;
}

/* ════════════════════════════════════════════════════════
   SECTION 6 — CORE DECISION (TWO-COLUMN CARD)
════════════════════════════════════════════════════════ */
.two-col-card {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.two-col-side {
  flex: 1;
  padding: 0 8px;
}

.two-col-divider {
  width: 0.5px;
  background: var(--border-card);
  margin: 0 20px;
  flex-shrink: 0;
}

.two-col-heading {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.two-col-side p {
  font-size: 17px;
  color: var(--text-mid);
  line-height: 1.75;
}

/* ════════════════════════════════════════════════════════
   SECTION 7 — USER FLOWS
════════════════════════════════════════════════════════ */
.subsection { margin-top: 56px; }

.subsection-heading {
  font-size: 27px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

/* ════════════════════════════════════════════════════════
   SECTION 8 — WIREFRAMES (2×2 GRID)
════════════════════════════════════════════════════════ */
.wireframe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.wf-placeholder {
  background: var(--placeholder-alt);
  border: 0.5px dashed var(--border-pill);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--placeholder-lbl);
  font-size: 16px;
  padding: 20px;
}

/* ════════════════════════════════════════════════════════
   SECTION 9 — TESTING & REFINEMENTS
════════════════════════════════════════════════════════ */
.process-strip {
  display: flex;
  gap: 40px;
  margin: 32px 0;
}

.process-step { flex: 1; }

.process-num {
  display: block;
  font-size: 31px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.process-label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.process-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

.divider {
  border: none;
  border-top: 0.5px solid var(--border-card);
  margin: 32px 0;
}

/* Stat callouts — large number row */
.stat-callouts {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
}

.stat-callout {
  flex: 1;
  padding-right: 32px;
}

.stat-callout:not(:last-child) {
  border-right: 0.5px solid var(--border-light);
  margin-right: 32px;
}

.stat-callout-num {
  display: block;
  font-size: 39px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-callout-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Refinements card */
.refinements-card {
  border-left: 3px solid var(--accent);
  border-radius: 0 16px 16px 0;
}

.refinements-heading {
  font-size: 21px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 18px;
}

.refinements-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.refinement-item {
  font-size: 18px;
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 14px;
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════
   SECTION 10 — FINAL DESIGN: 3 KEY FLOWS
════════════════════════════════════════════════════════ */
.flow-section { margin-top: 64px; }

.flow-section:first-of-type { margin-top: 48px; }

.flow-heading {
  font-size: 31px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

/* Annotated mockup: callouts | phone | callouts */
.mockup-annotated {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 36px 0 24px;
}

.callouts {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 40px;
  align-self: stretch;
}

.callouts--left  { align-items: flex-end; }
.callouts--right { align-items: flex-start; }

.callout { max-width: 170px; }

.callout--left {
  text-align: right;
  border-right: 0.5px solid #bbb;
  padding-right: 14px;
}

.callout--right {
  text-align: left;
  border-left: 0.5px solid #bbb;
  padding-left: 14px;
}

.callout-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 3px;
}

.callout-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

.mockup-phone-wrap {
  flex-shrink: 0;
  width: 240px;
}

.mockup-phone {
  margin-top: 0;
  border-radius: 20px;
  width: 100%;
  min-height: 480px;
}

/* ════════════════════════════════════════════════════════
   SECTION 11 — FINAL SHOWCASE
════════════════════════════════════════════════════════ */
.showcase-image {
  border-radius: 0;
  margin-top: 0;
}

.showcase-caption {
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 20px;
  padding: 0 28px;
}

/* ════════════════════════════════════════════════════════
   SECTION 12 — REFLECTION
════════════════════════════════════════════════════════ */
.reflection-card {
  border-left: 3px solid var(--accent);
  border-radius: 0 16px 16px 0;
}

.reflection-card p {
  font-size: 18px;
  color: var(--text);
  line-height: 1.85;
}

.forward-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
  padding-bottom: 90px;
}

.forward-tag {
  font-size: 15px;
  color: var(--accent);
  background: #eef0f7;
  border-radius: 999px;
  padding: 6px 16px;
  line-height: 1;
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE — SINGLE COLUMN ≤ 640px
════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root { --gap: 64px; }

  .hook-headline    { font-size: 31px; }
  .section-headline { font-size: 29px; }
  .section-headline--34 { font-size: 27px; }
  .section-heading-left { font-size: 27px; }
  .hmw-text         { font-size: 19px; }

  /* Context card — 2 col on mobile */
  .context-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px 20px;
  }
  .context-col--wide { grid-column: 1 / -1; }

  /* Stats */
  .stats-row { gap: 24px; flex-wrap: wrap; }

  /* Timeline — vertical stack */
  .timeline {
    flex-direction: column;
    padding-left: 28px;
    gap: 0;
  }

  .timeline::before {
    top: 6px;
    left: 5px;
    right: auto;
    width: 0.5px;
    height: calc(100% - 12px);
  }

  .timeline-node {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 14px;
    padding-bottom: 24px;
    position: relative;
  }

  .node-date { display: none; }

  .node-dot {
    flex-shrink: 0;
    margin-bottom: 0;
    margin-top: 3px;
    position: absolute;
    left: -22px;
    top: 3px;
  }

  .node-content { text-align: left; }

  /* Two-col card */
  .two-col-card { flex-direction: column; }
  .two-col-divider { width: auto; height: 0.5px; margin: 16px 0; }

  /* Process strip */
  .process-strip  { flex-direction: column; gap: 24px; }

  /* Stat callouts */
  .stat-callouts  { flex-direction: column; gap: 24px; }
  .stat-callout   { padding-right: 0; border-right: none !important; margin-right: 0 !important; }

  /* Attr grid */
  .attr-grid {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-template-rows: none;
  }

  /* Wireframe grid */
  .wireframe-grid { grid-template-columns: 1fr; }

  /* Annotated mockup — stack vertically */
  .mockup-annotated { flex-direction: column; gap: 20px; }

  .callouts--left,
  .callouts--right {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
  }

  .callout { max-width: none; flex: 1; min-width: 130px; }

  .callout--left {
    text-align: left;
    border-right: none;
    border-left: 0.5px solid #bbb;
    padding-right: 0;
    padding-left: 12px;
  }

  .mockup-phone-wrap { width: 100%; }
  .mockup-phone { min-height: 360px; }

  /* Cards */
  .card { padding: 20px; }

  .forward-tags { gap: 8px; }
}


/* ════════════════════════════════════════════════════════
   TWO-COLUMN PAGE LAYOUT SYSTEM
   (Overrides single-column centering above)
════════════════════════════════════════════════════════ */

/* ─── FULL-WIDTH PAGE HEADER ─────────────────────────── */
.page-header {
  background: var(--bg);
  padding-top: 52px;
}

.page-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.page-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 20px;
}

.project-label {
  color: var(--accent);
  font-weight: 500;
}

.meta-sep { color: #a3a3a3; }

.meta-muted { color: var(--text-muted); }

.page-header-headline {
  font-size: 45px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 780px;
  margin-bottom: 14px;
}

.page-header-sub {
  font-size: 17px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* Hero image — edge-to-edge within header, no side radius */
.page-hero-image {
  border-radius: 0;
  margin-top: 0;
  width: 100%;
}


/* ─── TWO-COLUMN PAGE LAYOUT ─────────────────────────── */
.page-layout {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 20px 0 16px;
  display: flex;
  gap: 88px;             /* wider gap between sidebar & content */
  align-items: flex-start;
  box-sizing: border-box;
}


/* ─── SIDEBAR ────────────────────────────────────────── */
.sidebar {
  width: 100px;
  flex-shrink: 0;
  position: sticky;
  top: 48px; /* no nav — 48px breathing room */
}

.sidebar-back {
  display: block;
  background: #08143A;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 16px;
  color: #D3D4D2;
  text-decoration: none;
  margin-bottom: 12px;
  transition: color 0.2s, border-color 0.2s;
}

.sidebar-back:hover {
  color: #D3D4D2;
  border-color: rgba(255,255,255,0.25);
}

.sidebar-nav-card {
  background: #08143A;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 8px 20px;
  display: flex;
  flex-direction: column;
}

.sidebar-nav-link {
  display: block;
  font-size: 16px;
  color: #919191;
  text-decoration: none;
  padding: 10px 0 10px 16px;
  margin-left: -20px;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  line-height: 1.4;
}

.sidebar-nav-link:hover { color: #D3D4D2; }

.sidebar-nav-link.is-active {
  font-weight: 600;
  color: #D3D4D2;
  border-left-color: var(--accent);
}


/* ─── CONTENT COLUMN ─────────────────────────────────── */
.content-col {
  flex: 1;
  max-width: 1000px;
  min-width: 0; /* prevent flex overflow */
}

/* Strip inner container constraints — column provides containment */
.content-col .container {
  max-width: none;
  padding: 0;
}

/* First section: reduced top gap (header already provides space) */
.content-col .section:first-child {
  padding-top: 52px;
}


/* ─── LEFT-ALIGNMENT OVERRIDES ───────────────────────── */
.content-col .pill-wrap          { text-align: left; }
.content-col .section-headline   { text-align: left; }
.content-col .hook-headline      { text-align: left; margin-left: 0; margin-right: 0; }
.content-col .forward-tags       { justify-content: flex-start; }

.content-col .body-center,
.content-col .body-copy {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  font-size: 18px;
  line-height: 1.75;
  margin-bottom: 0;
}

.content-col .hmw-text {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

/* Section showcase within right column */
.content-col .section-showcase {
  padding: 80px 0;
}

.content-col .showcase-caption {
  text-align: left;
  padding: 0;
}

/* Standalone body-copy class */
.body-copy {
  font-size: 18px;
  color: var(--text);
  line-height: 1.75;
}


/* ─── MOBILE ≤ 768px — sidebar collapses ─────────────── */
@media (max-width: 768px) {
  .page-header-inner    { padding: 0 20px 32px; }
  .page-header-headline { font-size: 31px; }

  .page-layout {
    flex-direction: column;
    padding: 0 20px;
  }

  .sidebar { display: none; }

  .content-col {
    max-width: 100%;
    width: 100%;
  }

  .content-col .section:first-child { padding-top: 36px; }
}


/* ════════════════════════════════════════════════════════
   FIXES — all 6 overrides (cascade wins over rules above)
════════════════════════════════════════════════════════ */

/* FIX 6 — Tighter spacing */
:root { --gap: 72px; }
.pill-wrap          { margin-bottom: 20px; }
.section-headline   { margin-bottom: 12px; }
.section-heading-left { margin-bottom: 6px; }

/* FIX 1 — Sidebar size & gap */
.page-layout        { gap: 28px; }
.sidebar            { width: 140px; }
.sidebar-back       { border-radius: 12px; }

/* FIX 2 — Nav card: flush left border, no horizontal pad on card */
.sidebar-nav-card {
  padding: 8px 0;
  overflow: hidden; /* clips border-radius so border sits flush */
  margin-top: 25px;
}

.sidebar-nav-link {
  padding: 10px 20px;
  margin-left: 0;
  border-left: 3px solid transparent;
  color: #D3D4D2;
  font-weight: 400;
  transition: color 0.18s ease, border-left-color 0.18s ease;
}

.sidebar-nav-link:hover { color: #D3D4D2; }

.sidebar-nav-link.is-active {
  font-weight: 600;
  color: #D3D4D2;
  border-left-color: var(--accent);
  background: transparent; /* no highlight — border only */
}

/* FIX 3 — Content column transparent */
.content-col { background: transparent; }

/* FIX 4 — Flow containers (#EEF1F8 bubble) */
.flow-section { margin-top: 40px; }
.flow-section:first-of-type { margin-top: 32px; }

.flow-container {
  background: #EEF1F8;
  border-radius: 20px;
  padding: 40px 48px;
  position: relative;
  overflow: visible; /* allows device to bleed outside left edge */
}

/* FIX 5 — Feature label row (inline bold name + regular desc) */
.flow-label-row {
  margin-bottom: 24px;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}

.flow-label-name {
  font-size: 19px;
  font-weight: 700;
  color: #D3D4D2;
  flex-shrink: 0;
}

.flow-label-desc {
  font-size: 17px;
  font-weight: 400;
  color: #919191;
}

.flow-link {
  color: #6C77A1;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Callout links inside containers */
.callout-desc a,
.callout-desc .flow-link {
  color: #6C77A1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* FIX 4a — Device column (Flow A: thermostat overlap) */
.device-col {
  justify-content: center;
  align-items: flex-start;
}

.device-overlap-wrap {
  margin-left: -68px; /* 48px container padding + 20px bleed */
  margin-bottom: 14px;
}

.device-circle {
  width: 160px;
  min-width: 160px;
  min-height: 160px !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1;
  margin-top: 0;
}

.callout--device {
  text-align: left;
  border: none;
  padding: 0;
  max-width: 160px;
}

/* Mobile: collapse device overlap */
@media (max-width: 768px) {
  .device-overlap-wrap { margin-left: 0; }
  .flow-container { padding: 24px 20px; }
  .flow-label-row { flex-direction: column; gap: 6px; }
}


/* ════════════════════════════════════════════════════════
   REFERENCE-LAYOUT ADDITIONS
   (showcase hero at top + plain case-heading sections)
════════════════════════════════════════════════════════ */

/* Full-bleed showcase hero (before two-column layout) */
.showcase-hero {
  width: 100%;
}

.showcase-hero-img {
  border-radius: 0;
  margin-top: 0;
  color: #919191; /* placeholder label color on dark bg */
  background: #111118;
}

/* Two-column layout now starts flush below the hero */
.page-layout {
  padding-top: 0;
}

/* ─── CASE INTRO (metadata + headline in right column) ── */
.case-intro {
  padding: 48px 0 40px;
  border-bottom: 0.5px solid var(--border-light);
  margin-bottom: 0;
}

.case-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  margin-bottom: 18px;
}

.case-headline {
  font-size: 72px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
  max-width: 880px;
}

/* ─── CASE SECTIONS ─────────────────────────────────── */
.case-section {
  padding-top: 140px;
}

/* Pill-chip section title — matches reference: soft bg, muted text, fully rounded */
.case-heading {
  display: inline-block;
  background: rgba(255,255,255,0.07);
  color: #919191;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.01em;
  border-radius: 100px;          /* full pill */
  padding: 13px 32px;
  margin-bottom: 36px;
  line-height: 1.2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.case-subheading {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-top: 36px;
  margin-bottom: 10px;
}

.case-body {
  font-size: 18px;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 14px;
}

/* ─── ROLES ───────────────────────────────────────────── */
.roles-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.role-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.role-desc {
  font-size: 17px;
  color: var(--text-mid);
  line-height: 1.65;
}

/* ─── AWARDS ──────────────────────────────────────────── */
.award-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 14px;
}

.award-icon {
  font-size: 29px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.award-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.award-source {
  font-size: 16px;
  color: var(--text-muted);
}

/* ─── MOBILE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .case-headline { font-size: 29px; }
  .case-heading  { font-size: 18px; padding: 11px 24px; }
  .case-intro    { padding: 28px 0 24px; }
  .case-section  { padding-top: 36px; }
}



/* ════════════════════════════════════════════════════════
   FLOATING BACK BUTTON — slides from top-right (hero)
   to top-left (above sidebar) on scroll
════════════════════════════════════════════════════════ */

.back-btn-float {
  position: fixed;
  top: 28px;
  left: 16px;
  right: auto;
  z-index: 300;
  background: rgba(9, 23, 76, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 400;
  color: #D3D4D2;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.14);
  /* transition for both horizontal + vertical movement */
  transition: top 0.4s cubic-bezier(0.4,0,0.2,1),
              right 0.4s cubic-bezier(0.4,0,0.2,1),
              left 0.4s cubic-bezier(0.4,0,0.2,1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

/* Phase 2: scrolled past hero — button slides down to sit above sidebar */
.back-btn-float.sidebar-mode {
  top: 48px;
  left: 16px;
  right: auto;
  background: #08143A;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

/* Placeholder keeps sidebar layout stable (same height as sidebar-back used to be) */
.sidebar-back-placeholder {
  height: 48px; /* approx height of the removed sidebar-back button + gap */
}

/* Equal left and right padding on content column
   Right is 30px (not 50px) to offset the page-layout's 20px right padding,
   so total right gap = 30 + 20 = 50px, matching the left. */
.content-col {
  padding-left: 50px;
  padding-right: 30px;
}


/* ════════════════════════════════════════════════════════
   FULL CASE STUDY REDESIGN — new visual system
   Font: Inter  |  BG: #f0ede6  |  Accent: #6C77A1
════════════════════════════════════════════════════════ */

/* Use Inter throughout the case study content */
.content-col,
.content-col * {
  font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
}

/* ── SECTION PILL LABELS (centered, white, bordered) ── */
.section-pill-wrap {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 70px;
}

.section-pill {
  display: inline-block;
  background: transparent;
  border: 0.5px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  padding: 9px 24px;
  font-size: 15px;
  font-weight: 500;
  color: #919191;
  letter-spacing: 0.05em;
}

/* ── CREATIVE BRIEF ─────────────────────────────────── */
.brief-headline {
  font-size: 37px;
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.016em;
  color: #D3D4D2;
  margin-bottom: 48px;
}

.brief-accent {
  font-style: italic;
  color: #6C77A1;
  font-weight: 500;
}

.hmw-block {
  border-top: 0.5px solid rgba(255,255,255,0.12);
  padding-top: 32px;
}

.hmw-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #919191;
  margin-bottom: 12px;
}

.hmw-text {
  font-size: 23px;
  font-weight: 500;
  color: #D3D4D2;
  line-height: 1.55;
}

/* ── CONTEXT CARD (3 columns) ───────────────────────── */
.context-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.col-header {
  font-size: 14px;
  font-weight: 600;
  color: #919191;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 12px;
  text-align: center;
}

.context-col p:not(.col-header) {
  font-size: 17px;
  color: #D3D4D2;
  line-height: 1.9;
  text-align: center;
}

/* ── PROCESS TIMELINE ───────────────────────────────── */
.timeline-wrap {
  position: relative;
  margin-top: 16px;
}

/* Horizontal connector line — aligned with dot centers */
.timeline-line {
  position: absolute;
  top: 43px;     /* node-date min-height(28) + margin-bottom(10) + dot-center(5) */
  left: 10%;
  right: 10%;
  height: 1px;
  background: rgba(255,255,255,0.12);
  z-index: 0;
}

.timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.timeline-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.node-date {
  font-size: 15px;
  color: #919191;
  text-align: center;
  line-height: 1.4;
  min-height: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 10px;
}

.node-dot {
  width: 10px;
  height: 10px;
  background: #6C77A1;
  border-radius: 50%;
  flex-shrink: 0;
}

.node-content {
  margin-top: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.phase-num {
  font-size: 15px;
  font-weight: 700;
  color: #D3D4D2;
  letter-spacing: 0.06em;
}

.phase-name {
  font-size: 16px;
  font-weight: 700;
  color: #D3D4D2;
  letter-spacing: 0.07em;
}

.phase-sub {
  font-size: 16px;
  font-style: italic;
  color: #6C77A1;
}

/* ── AUDIENCE ───────────────────────────────────────── */
.section-title-centered {
  font-size: 39px;
  font-weight: 500;
  text-align: center;
  color: #D3D4D2;
  letter-spacing: -0.018em;
  line-height: 1.2;
  margin-bottom: 52px;
}

.audience-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: start;
}

.audience-traits {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.trait-title {
  font-size: 18px;
  font-weight: 600;
  color: #D3D4D2;
  margin-bottom: 8px;
}

.trait-body {
  font-size: 17px;
  color: #D3D4D2;
  line-height: 1.75;
}

.audience-img {
  border-radius: 16px;
  position: sticky;
  top: 48px;
}

/* ── FULL-WIDTH CONTENT PLACEHOLDERS ────────────────── */
.cs-placeholder {
  width: 100%;
  border-radius: 16px;
}

/* ── DESIGN SYSTEM CENTERED STATEMENT ───────────────── */
.centered-statement {
  font-size: 25px;
  font-weight: 500;
  text-align: center;
  color: #D3D4D2;
  line-height: 1.6;
  margin-bottom: 30px;
}

/* ── DECISIONS ──────────────────────────────────────── */
.decisions-intro {
  text-align: center;
  margin-bottom: 56px;
}

.decisions-goal {
  font-size: 29px;
  font-weight: 700;
  color: #D3D4D2;
  line-height: 1.35;
  margin-bottom: 10px;
}

.decisions-goal em {
  font-style: italic;
  color: #6C77A1;
}

.decisions-solution {
  font-size: 20px;
  font-weight: 400;
  color: #919191;
  line-height: 1.6;
}

.decisions-layout {
  display: grid;
  grid-template-columns: 1fr 1.7fr 1fr;
  gap: 18px;
  align-items: start;
}

.decision-option {
  background: #08143A;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 22px;
}

.decision-chosen {
  background: #08143A;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 22px;
}

.option-tag {
  font-size: 14px;
  font-weight: 600;
  color: #919191;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

.chosen-tag {
  color: #6C77A1;
}

.option-critique {
  font-size: 16px;
  color: #919191;
  line-height: 1.65;
  margin-top: 14px;
}

/* ── MOBILE RESPONSIVE ──────────────────────────────── */
@media (max-width: 768px) {
  .context-grid        { grid-template-columns: 1fr 1fr; gap: 20px; }
  .audience-split      { grid-template-columns: 1fr; }
  .decisions-layout    { grid-template-columns: 1fr; }
  .section-title-centered { font-size: 27px; }
  .brief-headline      { font-size: 27px; }
  .hmw-text            { font-size: 19px; }
  .decisions-goal      { font-size: 23px; }

  /* Stack timeline vertically on mobile */
  .timeline            { flex-direction: column; gap: 28px; }
  .timeline-line       { top: 0; bottom: 0; left: 20px; right: auto; width: 1px; height: auto; }
  .timeline-node       { flex-direction: row; align-items: flex-start; gap: 16px; }
  .node-date           { min-height: auto; margin-bottom: 0; text-align: left; justify-content: flex-start; }
  .node-content        { text-align: left; align-items: flex-start; margin-top: 0; }
}


/* ── TRAIT CARDS ────────────────────────────────────────── */
.trait-card {
  background: #040C26;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.trait-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at bottom center,
    rgba(108, 119, 161, 0.18) 0%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.trait-card:hover {
  border-color: var(--accent);
}

.trait-card:hover::after {
  opacity: 1;
}

/* ════════════════════════════════════════════════════════
   ANIMATIONS
════════════════════════════════════════════════════════ */

/* Hero: slow fade on page load */
.showcase-hero-img {
  animation: cs-heroFade 1.2s ease both;
}

@keyframes cs-heroFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Back button: drops in on page load */
.back-btn-float {
  animation: cs-backDrop 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

@keyframes cs-backDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scroll-triggered: base hidden states */
.anim-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.anim-fade-in {
  opacity: 0;
  transition: opacity 0.7s ease;
}

/* Scale-up: for large headlines — subtle scale + fade */
.anim-scale-up {
  opacity: 0;
  transform: scale(0.97) translateY(12px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Revealed state */
.anim-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-fade-in.is-visible {
  opacity: 1;
}

.anim-scale-up.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Timeline node dots: pop in when parent reveals */
.timeline-node .node-dot {
  transform: scale(0);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-node.is-visible .node-dot {
  transform: scale(1);
}

/* Hover: cards get a subtle shadow lift */
.card {
  transition: box-shadow 0.25s ease;
}
.card:hover {
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.09);
}

/* Hover: carousel prev/next buttons scale */
.card button {
  transition: transform 0.15s ease, opacity 0.15s ease !important;
}
.card button:hover {
  transform: scale(1.25);
  opacity: 1 !important;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .showcase-hero-img,
  .back-btn-float             { animation: none; }
  .anim-fade-up,
  .anim-fade-in               { opacity: 1; transform: none; transition: none; }
  .timeline-node .node-dot    { transform: scale(1); transition: none; }
}
