/* ============================================================
   CASE STUDY — DecoraSync
   Layout + content styles specific to decorasync.html.
   This file is loaded ALONGSIDE style.css (which provides
   shared nav, fonts, colors, and grain texture).
   ============================================================ */

  /* CASE STUDY PAGE — 3-column layout
   LEFT  : sticky table of contents
   CENTER: long-form content
   RIGHT : sticky progress ticks (clickable scrubber)
   ============================================================ */
.case-wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 48px) 80px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 56px;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

/* ---- LEFT TOC ---- */
.case-toc {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
}
.case-toc::-webkit-scrollbar { width: 4px; }
.case-toc::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

.case-head { margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.case-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.case-title-side {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
  margin-top: 6px;
  letter-spacing: -0.3px;
}
.case-sub-side {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 4px;
}

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

.toc-section-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 10px;
}
.toc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
}

.toc-group ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 2px;
}
.toc-link {
  display: flex; align-items: center; gap: 11px;
  padding: 5px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 0.2s;
}
.toc-link:hover { color: var(--ink-soft); }
.toc-link.active { color: var(--ink); }
.toc-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-mute);
  background: transparent;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.toc-link:hover .toc-dot { border-color: var(--ink-soft); }
.toc-link.active .toc-dot {
  background: #2061E8;
  border-color: #2061E8;
  box-shadow: 0 0 0 4px rgba(32, 97, 232, 0.14);
}

/* ---- CENTER CONTENT ---- */
.case-content {
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
}

.case-hero {
  margin-bottom: 40px;
}
.case-eyebrow-main {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
/* full-width hero image, sits between hero text and the first section */
.case-hero-image {
  width: 100%;
  margin: 0 0 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(20,20,25,0.04);
}
.case-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}
.case-h1 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -1.2px;
  color: var(--ink);
  margin-bottom: 20px;
}
.case-lede {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.45;
  color: var(--ink-soft);
  margin-bottom: 36px;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 24px;
}
.meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.meta-value {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
}

.case-section {
  margin-bottom: 56px;
  scroll-margin-top: 100px;
}
.case-h2 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin-bottom: 18px;
}
.case-content p {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.case-content p strong { color: var(--ink); font-weight: 600; }
.case-content p em { font-style: italic; color: var(--ink); }
.muted-label {
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  color: var(--ink-mute) !important;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 22px !important;
  margin-bottom: 8px !important;
}

/* lists styled to feel like the reference: small circle bullets */
.case-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}
.case-list li {
  font-family: var(--font-ui);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  padding-left: 22px;
  position: relative;
  margin-bottom: 10px;
}
.case-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-mute);
  background: transparent;
}
.case-list li strong { color: var(--ink); font-weight: 600; }
.case-list li em { font-style: italic; color: var(--ink); }
ol.case-list { counter-reset: c; }
ol.case-list li { counter-increment: c; padding-left: 30px; }
ol.case-list li::before {
  content: counter(c);
  width: auto; height: auto;
  border: none;
  background: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  top: 0.35em;
}

.case-figure { margin: 28px 0 32px; }
.figure-placeholder {
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: 12px;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
  padding: 16px;
}
.figure-caption {
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  color: var(--ink-mute) !important;
  margin-top: 10px !important;
  text-align: center;
}

.case-foot {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.case-foot p {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.case-foot a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}
.case-foot a:hover { color: var(--ink-soft); }
.case-foot a:visited { color: var(--ink); }

/* ---- RIGHT PROGRESS TICKS ---- */
.case-progress {
  position: sticky;
  top: 15vh;
  height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.progress-ticks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  padding: 8px 0;
  margin-top: 10vh
}
.tick {
  width: 26px;
  height: 8px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}
.tick::before {
  content: '';
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--line);
  border-radius: 1px;
  transition: background 0.2s ease, width 0.2s ease;
}
.tick:hover::before {
  background: var(--ink-mute);
  width: 18px;
}
.tick.near::before {
  background: var(--ink-mute);
  width: 18px;
}
.tick.active::before {
  background: #2061E8;
  width: 24px;
}

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .case-wrap { grid-template-columns: 260px minmax(0, 1fr); }
  .case-progress { display: none; }
}
@media (max-width: 820px) {
  .case-wrap { grid-template-columns: 1fr; gap: 32px; }
  .case-toc {
    position: relative;
    top: 0;
    max-height: none;
    overflow: visible;
    border-bottom: 1px solid var(--line);
    padding-bottom: 24px;
  }
}
/* ---- real figures ---- */
.case-figure-img {
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.case-figure-img img { width: 100%; height: auto; display: block; }

/* ---- HMW challenge callout ---- */
.case-hmw {
  margin: 24px 0 8px;
  padding: 26px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.case-hmw .hmw-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 12px;
}
.case-hmw p {
  font-family: var(--font-body) !important;
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 26px) !important;
  line-height: 1.32 !important;
  letter-spacing: -0.4px;
  color: var(--ink) !important;
  margin: 0 !important;
}

/* ---- case-insight label ---- */
.insight-label { color: var(--ink-mute); }

/* ---- persona card: photo left, info blocks right ---- */
.persona-card {
  display: grid;
  grid-template-columns: minmax(240px, 380px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  margin: 28px 0 8px;
  align-items: stretch;
}
.persona-photo {
  position: relative;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.persona-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.persona-tag {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(20, 20, 25, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.persona-name {
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}
.persona-role {
  font-family: var(--font-ui);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}
.persona-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.persona-block {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 22px;
  flex: 1;
}
.persona-block-title {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
}
.persona-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.persona-list li {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  padding-left: 16px;
  position: relative;
  margin-bottom: 6px;
}
.persona-list li:last-child { margin-bottom: 0; }
.persona-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-mute);
}

@media (max-width: 720px) {
  .persona-card { grid-template-columns: 1fr; }
  .persona-photo { aspect-ratio: 4/3; }
}


/* ============================================================
   DEMO EMBED — sits between hero image and first section
   ============================================================ */
.case-demo {
  margin: 32px 0 80px;
}
.demo-embed {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(20,20,25,0.04);
}

/* placeholder — remove once real video is in */
.demo-placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 13px;
}
.demo-placeholder svg { opacity: 0.4; }

/* real video / iframe fills the container */
.demo-embed iframe,
.demo-embed video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: none;
}

.demo-caption {
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  color: var(--ink-mute) !important;
  margin-top: 10px !important;
  text-align: center;
}


/* ============================================================
   SCREEN SHOWCASE — alternating image + text blocks
   ============================================================ */
.screen-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 40px);
  align-items: center;
  margin: 36px 0;
}
.screen-showcase--reverse {
  direction: rtl;           /* flip column order */
}
.screen-showcase--reverse > * {
  direction: ltr;           /* reset text direction inside children */
}

.screen-showcase-img {
  border-radius: 12px;
  overflow: hidden;
}
.screen-showcase-img img {
  width: 100%;
  height: auto;
  display: block;
}

.screen-showcase-title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin: 0 0 10px;
}
.screen-showcase-text p {
  font-family: var(--font-ui) !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  color: var(--ink-soft) !important;
  margin: 0 !important;
}

@media (max-width: 640px) {
  .screen-showcase {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .screen-showcase--reverse {
    direction: ltr;
  }
  /* on mobile, always show image first */
  .screen-showcase-img { order: -1; }
}


/* ============================================================
   INSIGHT CARDS — testing metrics
   ============================================================ */

/* ---- banner above cards ---- */
.insights-banner {
  margin: 32px 0 28px;
}
.insights-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 16px;
}
.insights-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2061E8;
  flex-shrink: 0;
}
.insights-headline {
  font-family: var(--font-body) !important;
  font-weight: 400;
  font-size: clamp(22px, 2.8vw, 30px) !important;
  line-height: 1.3 !important;
  letter-spacing: -0.4px;
  color: var(--ink) !important;
  margin: 0 !important;
  max-width: 640px;
}
.insights-hl {
  color: #2061E8;
}

/* ---- 3-column card grid ---- */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0 24px;
}

/* ---- individual card ---- */
.insight-card {
  background: var(--paper-2, #f5f5f3);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* label row with colored underline */
.ic-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 20px;
}
.ic-bar {
  display: block;
  width: 32px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--bar-color, #2061E8);
  margin-top: 6px;
}

/* big number */
.ic-stat {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -1.5px;
  color: var(--ink);
  margin-bottom: 16px;
}
.ic-unit {
  font-size: 0.55em;
  letter-spacing: -0.5px;
  color: var(--ink-mute);
  margin-left: 1px;
}

/* vertical bar visualization */
.ic-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
  margin-bottom: 18px;
}
.ib {
  display: block;
  width: 4px;
  height: 100%;
  border-radius: 1.5px;
  background: var(--b, #2061E8);
  opacity: 0.85;
}
.ib-muted {
  background: var(--line) !important;
  opacity: 0.5;
}

/* description */
.ic-desc {
  font-family: var(--font-ui) !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: var(--ink-soft) !important;
  margin: 0 !important;
}

/* ---- closing line under cards ---- */
.insights-closing {
  font-family: var(--font-ui) !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  color: var(--ink-soft) !important;
  margin-top: 4px !important;
  max-width: 640px;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}

/* ---- insight cards responsive ---- */
@media (max-width: 720px) {
  .insights-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .insight-card {
    padding: 20px 18px 18px;
  }
  .ic-stat {
    font-size: 40px;
  }
  .insights-closing {
    text-align: left;
    margin-left: 0 !important;
  }
}
@media (min-width: 721px) and (max-width: 900px) {
  .insights-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .insight-card {
    padding: 20px 16px 18px;
  }
}
/* stacked variant — text above, full-width image below */
.screen-showcase--stacked {
  grid-template-columns: 1fr;
}

/* ---- annotated layout: image left, numbered list right ---- */
.screen-annotated {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 40px);
  align-items: start;
  margin-top: 8px;
  margin-bottom:32px;
}
.screen-annotated-img {
  border-radius: 12px;
  overflow: hidden;
}
.screen-annotated-img img {
  width: 100%;
  height: auto;
  display: block;
}

.screen-annotated-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 4px;
}
.annotation-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.annotation-num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #2061E8;
  flex-shrink: 0;
  line-height: 1.55;
}
.annotation-item strong {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}
.annotation-item p {
  font-family: var(--font-ui) !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: var(--ink-soft) !important;
  margin: 0 !important;
}

@media (max-width: 640px) {
  .screen-annotated {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .case-wrap { grid-template-columns: 1fr; gap: 32px; }
  .case-toc { display: none; }
}