/* ============================================================
   LUNA — case study skin + phone frames + screen UI
   Loaded LAST. Re-skins the shared Despegar narrative chrome
   (base + narrative + skin) to Luna's calm-violet identity, and
   adds the mobile device frame + the reconstructed app screens.
   Scope: everything is under .case so it never touches the
   portfolio shell.
   ============================================================ */

/* ---- Luna accent + warmer neutrals override the case tokens ---- */
.case {
  overflow: clip;                /* was hidden — clip keeps sticky tabs working */
  --accent: #7B0593;              /* magenta — matches the portfolio + Cocos/Despegar */
  --ink: #221033;                 /* deep plum text + dark sections */
  --slate-700: #3a2e49;
  --slate-600: #574a67;
  --slate-500: #756686;
  --slate-400: #9b88af;
  --slate-300: #c6bad4;
  --line: #ece4f1;
  --line-soft: #f6f0f9;
  --bg: #fbf7fc;
  --tw-page-bg: #ffffff;

  /* hormonal phase hues — used across the reconstructed screens */
  --ph-menstrual: #E06B86;
  --ph-follicular: #5FAE92;
  --ph-ovulatory: #E59A5B;
  --ph-luteal:    #9B82CC;

  --lilac-50: color-mix(in srgb, var(--accent) 6%, #fff);
  --lilac-100: color-mix(in srgb, var(--accent) 14%, #fff);
  --lilac-200: color-mix(in srgb, var(--accent) 30%, #fff);

  --luna-screen-bg: #ffffff;
}

/* ============================================================
   SECTION TABS (sticky shortcuts under the portfolio nav — like Cocos)
   ============================================================ */
body { padding-top: 72px; }
.case .case-hero { padding-top: 58px; }
.nav__logo { white-space: nowrap; }
.case .topbar {
  position: sticky; top: 72px; z-index: 40;
  background: color-mix(in srgb, #fff 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.case .topbar-in {
  max-width: var(--maxw); margin: 0 auto; padding: 11px 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.case .topbar-mark {
  display: inline-flex; align-items: center; gap: 9px; flex: none;
  font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: var(--ink); text-decoration: none;
}
.case .topbar-mark .moon { width: 22px; height: 22px; }
.case .topbar-mark .moon::after { width: 15px; height: 15px; top: 1.5px; right: 1px; }
.case .secnav { display: flex; align-items: center; gap: 2px; }
.case .secnav a {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--slate-500);
  padding: 7px 11px; border-radius: 8px; letter-spacing: .04em; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: color .2s, background .2s;
}
.case .secnav a .sn-num { color: var(--slate-400); font-size: 11px; }
.case .secnav a:hover { color: var(--ink); background: color-mix(in srgb, var(--accent) 8%, #fff); }
.case .secnav a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff); }
.case .secnav a.active .sn-num { color: var(--accent); }
@media (max-width: 1080px) {
  .case .topbar-in { justify-content: flex-start; gap: 16px; overflow-x: auto; scrollbar-width: none; }
  .case .topbar-in::-webkit-scrollbar { display: none; }
}
@media (max-width: 680px) {
  .case .topbar-mark span:last-child { display: none; }
}

/* dark narrative blocks (problem-quote, ia-section) read as deep plum */
.case .problem-quote { background: linear-gradient(150deg, #2c2046, #1c1430); }
/* Process (07) — shared plum panel across all case studies */
.case .ia-section { background: linear-gradient(160deg,#2E0537,#150019); }

/* the case hero is fully white — no wash (matches Cocos / Loop) */
.case .case-hero::before { background: none; }

/* keep the narrative bar/eyebrow on accent (skin already maps these);
   warm the anno left border a touch */
.case .anno { border-left-color: var(--accent); }

/* techniques tiles on faint lilac */
.case .tech { background: var(--lilac-50); border-color: var(--line-soft); }

/* ============================================================
   FLOATING SCREEN LABEL  (re-declared so we don't pull the whole
   despegar-app.css browser stylesheet just for this)
   ============================================================ */
.case .screen-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  color: var(--slate-500); margin-bottom: 18px;
}
.case .screen-label .lnum {
  background: var(--accent); color: #fff; font-weight: 600;
  border-radius: 7px; padding: 3px 9px; font-size: 11.5px;
}
.case .screen-label .lname { font-weight: 600; color: var(--ink); font-family: var(--font-sans); font-size: 14px; }
.case .screen-label .lhint { color: var(--slate-400); }

/* ============================================================
   SOLUTION STAGE — phone beside annotated design decisions
   ============================================================ */
.case .sol-stage {
  display: grid; grid-template-columns: 360px 1fr; gap: 48px; align-items: center;
  background:
    radial-gradient(120% 130% at 12% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 56%),
    linear-gradient(160deg, #fbf8fe, #f4eefb);
  border: 1px solid var(--line); border-radius: 26px; padding: 46px 50px;
  box-shadow: var(--sh-sm);
}
.case .sol-stage.flip { grid-template-columns: 1fr 360px; }
.case .sol-stage.flip .phone-wrap { order: 2; }
.case .phone-wrap { display: flex; justify-content: center; }

.case .decisions { display: flex; flex-direction: column; gap: 16px; }
.case .decision {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 22px; box-shadow: var(--sh-sm);
  transition: transform .2s, box-shadow .2s;
}
.case .decision:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.case .decision .dh { display: flex; align-items: center; gap: 11px; margin-bottom: 8px; }
.case .decision .dn {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  display: grid; place-items: center;
}
.case .decision h4 { font-size: 16px; letter-spacing: -.01em; }
.case .decision p { font-size: 14px; color: var(--slate-600); line-height: 1.55; }

/* ============================================================
   PHONE FRAME
   ============================================================ */
.case .phone {
  width: 320px; flex: none; background: #1b1430; border-radius: 46px; padding: 11px;
  box-shadow: 0 36px 80px rgba(38,27,58,.30), 0 12px 30px rgba(38,27,58,.18);
  position: relative;
}
.case .phone .scr {
  background: var(--luna-screen-bg); border-radius: 36px; overflow: hidden; position: relative;
  height: 690px; display: flex; flex-direction: column;
}
.case .phone .notch {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 104px; height: 24px; background: #1b1430; border-radius: 0 0 15px 15px; z-index: 20;
}
.case .phone .status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 22px 4px; font-size: 12.5px; font-weight: 700; color: var(--ink); z-index: 5;
}
.case .phone .status .sig { display: flex; align-items: center; gap: 5px; }
.case .phone .status .sig i { width: 15px; height: 10px; border-radius: 2px; background: var(--ink); opacity: .8; }
.case .phone .body { flex: 1; overflow: hidden; padding: 6px 16px 12px; }
.case .phone .body.flush { padding: 0; }

/* phone tab bar */
.case .ltab {
  display: flex; justify-content: space-around; align-items: center;
  padding: 10px 8px 16px; background: #fff; border-top: 1px solid var(--line);
}
.case .ltab .t { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--slate-400); }
.case .ltab .t svg { width: 22px; height: 22px; }
.case .ltab .t span { font-size: 9.5px; font-weight: 600; }
.case .ltab .t.on { color: var(--accent); }

/* ============================================================
   SHARED SCREEN UI BITS
   ============================================================ */
.case .l-greet { display: flex; align-items: center; justify-content: space-between; margin: 5px 2px 12px; }
.case .l-greet .gt { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.case .l-greet .gs { font-size: 11.5px; font-weight: 600; color: var(--slate-500); margin-top: 1px; }
.case .l-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--ph-luteal), var(--accent)); color: #fff; font-weight: 800; font-size: 14px; }

.case .l-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-sm); }
.case .sect-h { font-size: 12.5px; font-weight: 800; letter-spacing: -.01em; color: var(--ink);
  margin: 0 2px 9px; display: flex; align-items: center; justify-content: space-between; }
.case .sect-h .more { font-size: 10.5px; font-weight: 700; color: var(--accent); }

/* phase chip */
.case .phase-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  padding: 5px 11px; border-radius: 999px;
}
.case .phase-chip .pd { width: 7px; height: 7px; border-radius: 50%; }
.case .phase-chip.menstrual { background: color-mix(in srgb, var(--ph-menstrual) 15%, #fff); color: #b03c57; }
.case .phase-chip.menstrual .pd { background: var(--ph-menstrual); }
.case .phase-chip.follicular { background: color-mix(in srgb, var(--ph-follicular) 16%, #fff); color: #2f7a60; }
.case .phase-chip.follicular .pd { background: var(--ph-follicular); }
.case .phase-chip.ovulatory { background: color-mix(in srgb, var(--ph-ovulatory) 18%, #fff); color: #b06a1f; }
.case .phase-chip.ovulatory .pd { background: var(--ph-ovulatory); }
.case .phase-chip.luteal { background: color-mix(in srgb, var(--ph-luteal) 16%, #fff); color: #6a539e; }
.case .phase-chip.luteal .pd { background: var(--ph-luteal); }

/* ---- 4.2 HOME · phase ring hero ---- */
.case .phase-hero {
  background: linear-gradient(160deg, #fff, #faf6ff);
  border: 1px solid var(--line); border-radius: 22px; padding: 13px 18px 15px;
  box-shadow: var(--sh-sm); margin-bottom: 12px;
}
.case .ring-wrap { position: relative; width: 146px; height: 146px; margin: 6px auto 10px; }
.case .ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.case .ring-wrap .rc { fill: none; stroke-width: 13; stroke-linecap: round; }
.case .ring-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.case .ring-center .rday { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--slate-500); letter-spacing: .12em; text-transform: uppercase; }
.case .ring-center .rphase { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-top: 2px; }
.case .ring-center .rsub { font-size: 11px; font-weight: 600; color: var(--ph-follicular); margin-top: 3px; }
.case .ring-dot { position: absolute; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 3px solid var(--ph-follicular); box-shadow: 0 2px 6px rgba(38,27,58,.2); top: 6px; left: 50%; transform: translateX(-50%); }

/* insight banner */
.case .insight {
  display: flex; gap: 11px; align-items: flex-start; padding: 11px 13px; border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 7%, #fff); border: 1px solid var(--lilac-100); margin-bottom: 12px;
}
.case .insight .ii { width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: var(--accent); color: #fff; }
.case .insight .ii svg { width: 15px; height: 15px; }
.case .insight .it { font-size: 12px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.case .insight .id { font-size: 10.5px; color: var(--slate-600); margin-top: 2px; line-height: 1.35; }

/* today metric cards */
.case .today-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.case .tcard { padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.case .tcard .tl { font-size: 10.5px; font-weight: 700; color: var(--slate-500); display: flex; align-items: center; gap: 7px; }
.case .tcard .tl svg { width: 15px; height: 15px; color: var(--accent); }
.case .tcard .tv { font-size: 14px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.case .tcard .tbar { display: none; }

/* ---- 4.1 ONBOARDING ---- */
.case .ob { display: flex; flex-direction: column; height: 100%; padding: 4px 22px 26px; }
.case .ob .ob-logo { display: flex; align-items: center; gap: 9px; margin: 8px 0 auto; }
.case .moon { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 68% 34%, var(--lilac-200), var(--accent) 78%); position: relative; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent); }
.case .moon::after { content: ""; position: absolute; top: 2px; right: 1px; width: 21px; height: 21px; border-radius: 50%; background: var(--luna-screen-bg); }
.case .ob .ob-name { font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.case .ob .ob-eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.case .ob h3 { font-size: 27px; line-height: 1.1; letter-spacing: -.03em; color: var(--ink); margin-bottom: 12px; }
.case .ob h3 b { color: var(--accent); }
.case .ob .ob-sub { font-size: 13px; color: var(--slate-600); line-height: 1.5; margin-bottom: 20px; }
.case .ob .priv { display: flex; flex-direction: column; gap: 11px; margin-bottom: 22px; }
.case .ob .priv .pr { display: flex; gap: 12px; align-items: flex-start; }
.case .ob .priv .pr .pi { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: var(--lilac-50); color: var(--accent); }
.case .ob .priv .pr .pi svg { width: 16px; height: 16px; }
.case .ob .priv .pr .pt { font-size: 13px; font-weight: 700; color: var(--ink); }
.case .ob .priv .pr .pp { font-size: 11px; color: var(--slate-500); margin-top: 1px; line-height: 1.4; }
.case .ob .ob-cta { background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; border: none; border-radius: 14px; padding: 14px; width: 100%; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 34%, transparent); }
.case .ob .ob-alt { text-align: center; font-size: 12px; font-weight: 700; color: var(--slate-500); margin-top: 13px; }
.case .ob .ob-alt b { color: var(--accent); }

/* ---- 4.3 CONVERSATIONAL LOGGING ---- */
.case .chat { display: flex; flex-direction: column; height: 100%; padding: 2px 4px 4px; }
.case .chat-top { display: flex; align-items: center; gap: 10px; padding: 6px 6px 14px; }
.case .chat-top .ct-back { color: var(--slate-400); }
.case .chat-top .ct-prog { flex: 1; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.case .chat-top .ct-prog i { display: block; height: 100%; width: 50%; border-radius: 3px; background: var(--accent); }
.case .chat-top .ct-step { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--slate-500); }
.case .chat-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 6px 8px; overflow: hidden; }
.case .bubble { max-width: 84%; font-size: 13px; line-height: 1.45; padding: 12px 15px; border-radius: 18px; }
.case .bubble.ask { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; color: var(--ink); font-weight: 600; box-shadow: var(--sh-sm); }
.case .bubble.ans { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; font-weight: 600; }
.case .qmeta { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 700; color: var(--accent); background: var(--lilac-50); padding: 4px 10px; border-radius: 999px; }
.case .chip-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 8px 4px; }
.case .lchip { font-size: 12px; font-weight: 700; color: var(--slate-700); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; display: inline-flex; align-items: center; gap: 7px; }
.case .lchip .e { font-size: 14px; }
.case .lchip.on { border-color: var(--accent); color: var(--accent); background: var(--lilac-50); }
.case .chat-send { display: flex; align-items: center; gap: 10px; padding: 10px 8px 4px; }
.case .chat-send .ci { flex: 1; height: 42px; border-radius: 13px; border: 1.5px solid var(--line); background: #fff; display: flex; align-items: center; padding: 0 14px; font-size: 12px; color: var(--slate-400); }
.case .chat-send .cb { width: 42px; height: 42px; flex: none; border-radius: 13px; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
.case .chat-send .cb svg { width: 18px; height: 18px; }

/* ---- 4.4 INSIGHTS ---- */
.case .ins-head { margin: 6px 2px 14px; }
.case .ins-head .ih-k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-400); }
.case .ins-head .ih-t { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-top: 3px; }
.case .ins-hero { padding: 16px 16px 18px; margin-bottom: 12px; background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 92%, #000), #4b3580); color: #fff; border: none; }
.case .ins-hero .ih-lead { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--accent) 30%, #fff); }
.case .ins-hero .ih-q { font-size: 16px; font-weight: 700; line-height: 1.32; letter-spacing: -.01em; margin-top: 8px; }
.case .ins-hero .ih-q b { color: #ffe07a; }

/* phase timeline bar */
.case .ptl { display: flex; height: 30px; border-radius: 9px; overflow: hidden; margin: 4px 0 6px; }
.case .ptl span { display: block; height: 100%; }
.case .ptl .s-m { background: var(--ph-menstrual); }
.case .ptl .s-f { background: var(--ph-follicular); }
.case .ptl .s-o { background: var(--ph-ovulatory); }
.case .ptl .s-l { background: var(--ph-luteal); }
.case .ptl-legend { display: flex; flex-wrap: wrap; gap: 9px 14px; margin-top: 9px; }
.case .ptl-legend .lg { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; color: var(--slate-500); }
.case .ptl-legend .lg i { width: 8px; height: 8px; border-radius: 50%; }

/* correlation row */
.case .corr { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.case .corr .cico { width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center; background: var(--lilac-50); color: var(--accent); }
.case .corr .cico svg { width: 17px; height: 17px; }
.case .corr .ct { font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.case .corr .cs { font-size: 10.5px; color: var(--slate-500); margin-top: 2px; }

/* ============================================================
   DIAGNOSIS · the "typical period app" before-mock (calendar)
   ============================================================ */
.case .typ { display: flex; flex-direction: column; height: 100%; padding: 4px 18px 18px; }
.case .typ .typ-h { text-align: center; margin: 6px 0 14px; }
.case .typ .typ-h .th-k { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #b9476a; }
.case .typ .typ-count { text-align: center; margin-bottom: 4px; }
.case .typ .typ-count .big { font-size: 46px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); line-height: 1; }
.case .typ .typ-count .lbl { font-size: 12px; font-weight: 700; color: var(--slate-500); margin-top: 6px; }
.case .typ .typ-ring { width: 150px; height: 150px; margin: 8px auto 16px; position: relative; }
.case .typ .typ-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.case .typ .typ-ring .rc { fill: none; stroke-width: 12; stroke-linecap: round; }
.case .typ .typ-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 2px; }
.case .typ .typ-cal .d { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; font-size: 10px; font-weight: 600; color: var(--slate-500); background: #fff; border: 1px solid var(--line-soft); }
.case .typ .typ-cal .d.p { background: color-mix(in srgb, var(--ph-menstrual) 18%, #fff); color: #b03c57; border-color: transparent; }
.case .typ .typ-cal .d.t { outline: 2px solid var(--accent); color: var(--accent); }
.case .typ .typ-foot { margin-top: auto; font-size: 10.5px; color: var(--slate-400); text-align: center; font-family: var(--font-mono); }

/* ============================================================
   BEFORE / AFTER  — two phones, side by side
   ============================================================ */
.case .ba-compare {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px;
  background:
    radial-gradient(110% 130% at 0% 0%, color-mix(in srgb, var(--ph-menstrual) 9%, transparent), transparent 52%),
    radial-gradient(110% 130% at 100% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 52%),
    linear-gradient(160deg, #fbf8fe, #f4eefb);
  border: 1px solid var(--line); border-radius: 26px; padding: 40px 36px;
}
.case .ba-side { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.case .ba-side .ba-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700;
  padding: 7px 15px; border-radius: 999px; letter-spacing: .01em;
}
.case .ba-side.before .ba-tag { background: color-mix(in srgb, var(--ph-menstrual) 14%, #fff); color: #b03c57; }
.case .ba-side.after  .ba-tag { background: color-mix(in srgb, var(--accent) 13%, #fff); color: var(--accent); }
.case .ba-side .ba-tag .pd { width: 7px; height: 7px; border-radius: 50%; }
.case .ba-side.before .ba-tag .pd { background: var(--ph-menstrual); }
.case .ba-side.after  .ba-tag .pd { background: var(--accent); }
.case .ba-arrow {
  width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--accent); box-shadow: var(--sh-sm); flex: none;
}
.case .ba-arrow svg { width: 20px; height: 20px; }
.case .ba-metric .bm-after { color: var(--accent); }
.case .ba-metric .bm-after.txt { font-size: 17px; }

/* Before/After — Cocos-style numeric before→after cards */
.case .ba-metric { background: #FFFFFF; border: 1px solid #ECE4F1; box-shadow: var(--sh-sm); transition: transform .2s ease, box-shadow .2s ease; }
.case .ba-metric:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.case .ba-mlabel { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--slate-500); margin-top: 32px; }
.case .ba-metric .bm-k { font-size: 13px; color: var(--slate-500); font-weight: 600; letter-spacing: 0; margin-bottom: 16px; line-height: 1.4; min-height: 36px; }
.case .ba-metric .bm-row { display: flex; align-items: center; gap: 12px; }
.case .ba-metric .bm-before { font-family: var(--font-mono); font-size: 2rem; font-weight: 500; color: #C4B5D4; text-decoration: none; line-height: 1; }
.case .ba-metric .bm-arrow { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500; color: #C4B5D4; }
.case .ba-metric .bm-after { font-family: var(--font-mono); font-size: 3rem; font-weight: 700; letter-spacing: -.03em; color: #7B0593; line-height: 1; }

/* Process — closing reflection (dark section) */
.case .ia-close { max-width: 60ch; margin-top: 46px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,.16); font-size: 19px; line-height: 1.6; font-weight: 400; color: rgba(255,255,255,.78); text-wrap: pretty; }
.case .ia-close b { color: #fff; font-weight: 700; }

/* ============================================================
   INTERACTIVE PROTOTYPE — one phone, navigable views + guide
   ============================================================ */
.case .proto-stage {
  display: grid; grid-template-columns: 360px 1fr; gap: 48px; align-items: stretch;
  background: #ffffff;
  border: 1px solid var(--line); border-radius: 26px; padding: 46px 50px;
}
.case .proto-stage .phone-wrap { align-self: center; }

/* the live phone holds stacked views */
.case .phone.live .scr { cursor: default; }
.case .lviews { flex: 1; position: relative; overflow: hidden; display: flex; }
.case .lview { display: none; flex-direction: column; width: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.case .lview::-webkit-scrollbar { width: 0; }
.case .lview.on { display: flex; animation: lfade .32s ease; }
@keyframes lfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.case .lview .body { flex: 1 0 auto; }
/* tappable affordances inside the live phone */
.case .phone.live .ltab .t,
.case .phone.live .ob-cta,
.case .phone.live .ob-alt b,
.case .phone.live .lchip,
.case .phone.live .sect-h .more,
.case .phone.live .chat-top .ct-back,
.case .phone.live .you-row { cursor: pointer; }
.case .phone.live .ltab .t { transition: color .18s; }
.case .phone.live .lchip { transition: border-color .15s, color .15s, background .15s; }
.case .phone.live .lchip:active { transform: scale(.97); }
.case .phone.live .ob-cta { transition: transform .15s, box-shadow .2s; }
.case .phone.live .ob-cta:active { transform: translateY(1px); }
.case .tap-hint {
  position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%);
  font-size: 10.5px; font-weight: 700; color: #fff; background: rgba(38,27,58,.82);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap; z-index: 30;
  display: inline-flex; align-items: center; gap: 6px; pointer-events: none;
  animation: hintpulse 2.4s ease-in-out infinite;
}
.case .tap-hint svg { width: 12px; height: 12px; }
@keyframes hintpulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* guide / chapters on the right */
.case .proto-guide { display: flex; flex-direction: column; }
.case .proto-guide .pg-k {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); display: inline-flex; align-items: center; gap: 9px; margin-bottom: 10px;
}
.case .proto-guide .pg-k .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ph-follicular); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ph-follicular) 22%, transparent); }
.case .proto-guide .pg-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-bottom: 6px; }
.case .proto-guide .pg-sub { font-size: 14px; color: var(--slate-600); line-height: 1.55; margin-bottom: 22px; max-width: 46ch; }
.case .chapters { display: flex; flex-direction: column; gap: 10px; }
.case .chapter {
  text-align: left; font-family: inherit; background: #fff; border: 1px solid var(--line);
  border-radius: 15px; padding: 16px 18px; cursor: pointer; display: flex; gap: 14px; align-items: flex-start;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.case .chapter:hover { transform: translateX(3px); box-shadow: var(--sh-sm); }
.case .chapter .ch-n {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, #fff); width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; flex: none;
}
.case .chapter .ch-t { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.case .chapter .ch-d { font-size: 13px; color: var(--slate-600); line-height: 1.5; margin-top: 4px; display: none; }
.case .chapter.on { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 9%, #fff), var(--sh-sm); }
.case .chapter.on .ch-n { background: var(--accent); color: #fff; }
.case .chapter.on .ch-d { display: block; }
.case .ch-pts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.case .ch-pts i { font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, #fff); border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 999px; padding: 4px 10px; }

/* ---- CYCLE tab view ---- */
.case .cyc-head { font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 6px 2px 4px; }
.case .cyc-sub { font-size: 11.5px; font-weight: 600; color: var(--slate-500); margin: 0 2px 14px; }
.case .cyc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.case .cyc-grid .wd { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--slate-400); text-align: center; padding-bottom: 2px; }
.case .cyc-grid .cd { aspect-ratio: 1; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--slate-600); background: #fff; border: 1px solid var(--line-soft); position: relative; }
.case .cyc-grid .cd.m { background: color-mix(in srgb, var(--ph-menstrual) 20%, #fff); color: #a93b56; border-color: transparent; }
.case .cyc-grid .cd.f { background: color-mix(in srgb, var(--ph-follicular) 20%, #fff); color: #2f7a60; border-color: transparent; }
.case .cyc-grid .cd.o { background: color-mix(in srgb, var(--ph-ovulatory) 22%, #fff); color: #a8631d; border-color: transparent; }
.case .cyc-grid .cd.l { background: color-mix(in srgb, var(--ph-luteal) 20%, #fff); color: #65509a; border-color: transparent; }
.case .cyc-grid .cd.now { outline: 2px solid var(--accent); outline-offset: 1px; color: var(--accent); }
.case .cyc-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 16px; }
.case .cyc-legend .lg { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; color: var(--slate-500); }
.case .cyc-legend .lg i { width: 9px; height: 9px; border-radius: 50%; }

/* ---- YOU tab view ---- */
.case .you-head { display: flex; align-items: center; gap: 13px; margin: 8px 2px 18px; }
.case .you-head .ya { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(150deg, var(--ph-luteal), var(--accent)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 19px; }
.case .you-head .yn { font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.case .you-head .ye { font-size: 11.5px; font-weight: 600; color: var(--slate-500); margin-top: 1px; }
.case .you-list { display: flex; flex-direction: column; gap: 8px; }
.case .you-row { display: flex; align-items: center; gap: 13px; padding: 13px 15px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.case .you-row .yi { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--lilac-50); color: var(--accent); }
.case .you-row .yi svg { width: 16px; height: 16px; }
.case .you-row .yt { font-size: 13px; font-weight: 700; color: var(--ink); }
.case .you-row .ys { font-size: 10.5px; color: var(--slate-500); margin-top: 1px; }
.case .you-row .ygo { margin-left: auto; color: var(--slate-300); }
.case .you-row .ytog { margin-left: auto; width: 38px; height: 22px; border-radius: 999px; background: var(--accent); position: relative; flex: none; }
.case .you-row .ytog::after { content: ""; position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }

/* ============================================================
   BENCHMARK MATRIX (03)
   ============================================================ */
.case .bench { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--sh-sm); overflow: hidden; }
.case .bench-grid { display: grid; grid-template-columns: 1.7fr repeat(4, 1fr); }
.case .bench-cell { padding: 17px 14px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: center; }
.case .bench-grid > .bench-cell:nth-last-child(-n+5) { border-bottom: none; }
.case .bench-cell.crit { justify-content: flex-start; gap: 11px; font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.case .bench-cell.crit .ci { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--lilac-50); color: var(--accent); }
.case .bench-cell.crit .ci svg { width: 16px; height: 16px; }
.case .bench-cell.luna { background: color-mix(in srgb, var(--accent) 6%, #fff); }
.case .bench-head .bench-cell { border-bottom: 1px solid var(--line); padding: 18px 14px; }
.case .bench-app { font-size: 13.5px; font-weight: 800; letter-spacing: -.01em; color: var(--slate-600); }
.case .bench-head .bench-cell.luna { background: var(--accent); }
.case .bench-head .bench-cell.luna .bench-app { color: #fff; display: inline-flex; align-items: center; gap: 7px; }
.case .bench-head .bench-cell.luna .bench-app .moon { width: 18px; height: 18px; }
.case .bench-head .bench-cell.luna .bench-app .moon::after { background: var(--accent); top: 1px; right: 1px; width: 13px; height: 13px; }
.case .mk { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.case .mk svg { width: 15px; height: 15px; }
.case .mk.yes { background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent); }
.case .bench-cell.luna .mk.yes { background: #fff; color: var(--accent); box-shadow: var(--sh-sm); }
.case .mk.no { color: var(--slate-300); }
.case .mk.part { color: var(--ph-ovulatory); background: color-mix(in srgb, var(--ph-ovulatory) 16%, #fff); }
.case .bench-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; font-size: 12.5px; color: var(--slate-500); font-weight: 600; }
.case .bench-legend span { display: inline-flex; align-items: center; gap: 7px; }
.case .bench-legend .mk { width: 20px; height: 20px; }
.case .bench-legend .mk svg { width: 11px; height: 11px; }

/* ============================================================
   DESIGN SYSTEM (05)
   ============================================================ */
.case .ds-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; }
.case .ds-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px 30px; box-shadow: var(--sh-sm); }
.case .ds-card.span { grid-column: 1 / -1; }
.case .ds-k { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.case .ds-card h4 { font-size: 20px; letter-spacing: -.02em; color: var(--ink); margin-bottom: 20px; }
.case .ds-card h4 .sub { font-size: 13px; font-weight: 500; color: var(--slate-500); letter-spacing: 0; }

/* color swatches */
.case .sw-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-400); margin: 4px 0 12px; }
.case .sw-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.case .sw-row:last-child { margin-bottom: 0; }
.case .sw { display: flex; flex-direction: column; gap: 8px; width: 84px; }
.case .sw .chip { height: 58px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); box-shadow: var(--sh-sm); }
.case .sw .nm { font-size: 11.5px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.case .sw .hex { font-family: var(--font-mono); font-size: 10px; color: var(--slate-400); margin-top: 1px; }

/* type scale */
.case .ty-list { display: flex; flex-direction: column; }
.case .ty-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.case .ty-row:last-child { border-bottom: none; }
.case .ty-row .ty-spec { font-family: var(--font-mono); font-size: 10.5px; color: var(--slate-400); white-space: nowrap; }
.case .ty-d { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.case .ty-h { font-size: 21px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.case .ty-b { font-size: 15px; font-weight: 400; color: var(--slate-700); }
.case .ty-m { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

/* component gallery */
.case .ds-comp { display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start; }
.case .ds-comp .cg { display: flex; flex-direction: column; gap: 10px; }
.case .ds-comp .cg-l { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-400); }
.case .ds-btn { background: var(--accent); color: #fff; font-weight: 700; font-size: 13.5px; border: none; border-radius: 12px; padding: 11px 20px; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent); }
.case .ds-mini-card { width: 150px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-sm); }
.case .ds-mini-card .mc-t { font-size: 12px; font-weight: 800; color: var(--ink); }
.case .ds-mini-card .mc-d { font-size: 10.5px; color: var(--slate-500); margin-top: 3px; line-height: 1.4; }
.case .ds-tab { display: inline-flex; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 9px 16px; box-shadow: var(--sh-sm); }
.case .ds-tab .t { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--slate-400); font-size: 9px; font-weight: 600; }
.case .ds-tab .t svg { width: 19px; height: 19px; }
.case .ds-tab .t.on { color: var(--accent); }

/* brand lockup */
.case .ds-brand { display: flex; align-items: center; gap: 16px; }
.case .ds-brand .moon { width: 48px; height: 48px; }
.case .ds-brand .moon::after { width: 33px; height: 33px; top: 3px; right: 2px; }
.case .ds-brand .bn { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.case .ds-brand-note { font-size: 13px; color: var(--slate-600); line-height: 1.55; margin-top: 16px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .case .sol-stage, .case .sol-stage.flip { grid-template-columns: 1fr; gap: 32px; }
  .case .sol-stage.flip .phone-wrap { order: 0; }
  .case .proto-stage { grid-template-columns: 1fr; gap: 36px; }
  .case .ba-compare { grid-template-columns: 1fr; gap: 26px; }
  .case .ba-arrow { transform: rotate(90deg); margin: 0 auto; }
  .case .ds-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .case .bench-cell.crit { font-size: 12px; }
  .case .bench-cell { padding: 13px 8px; }
  .case .bench-app { font-size: 11px; }
}

/* ============================================================
   BENCH/DS CORRECTIONS (two-grid header + alignment)
   ============================================================ */
/* the shared nth-last-child reset also lands on the 5 header cells;
   re-assert the divider beneath the header row */
.case .bench-head.bench-grid > .bench-cell { border-bottom: 1px solid var(--line); }
/* crit column header reads as a quiet mono label, left aligned */
.case .bench-head .bench-cell.crit { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-400); }
/* component gallery: give each spec column its own breathing room */
.case .ds-comp .cg { min-width: 150px; }

/* ============================================================
   ACCENT FIXES + COCOS-STYLE SECTION SUBLABELS
   ============================================================ */
/* "Design goal" line still inherited the Despegar blue (--tw-primary);
   pull it back onto the portfolio accent */
.case .case-hero .impact-line .ik { color: var(--accent); }
.case .case-hero .impact-line .iv b { color: var(--accent); }

/* section sublabels (benchmark, techniques) — match the Cocos "// Redesign"
   treatment: muted mono, wider tracking, leading "// " */
.case .techs-label,
.case .bench-intro .ds-k { color: var(--slate-500); letter-spacing: .16em; }
.case .techs-label::before,
.case .bench-intro .ds-k::before { content: "// "; }

/* ============================================================
   FOOTER — dark disclaimer block, Cocos structure
   ============================================================ */
.case .luna-foot { background: #1A0A2E; color: #fff; padding: 80px 0 60px; margin-top: 64px; border-top: 1px solid rgba(255,255,255,.12); }
.case .luna-foot .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.case .luna-foot-mark { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-sans); font-weight: 800; font-size: 32px; line-height: 1; letter-spacing: -.025em; color: #fff; }
.case .luna-foot-moon { width: 30px; height: 30px; flex: none; }
.case .luna-foot-moon::after { background: #1A0A2E; }
.case .luna-foot-note { font-size: 14px; color: #A89BB5; max-width: 560px; margin: 0; line-height: 1.65; }
.case .luna-foot-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .16em; color: #A89BB5; }
