/* Marcela Macedo, Portfolio
   Direction: dark, editorial, matches the Framer draft (see README).
   Near-black background, cream type, heavy display grotesk, indigo accent
   pulled from the Moody's palette. Plain CSS, no build step. */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0e0e0d;
  --bg-alt: #171715;
  --bg-alt-2: #1e1e1b;
  --fg: #f3efe4;
  --fg-dim: #a8a496;
  --fg-faint: #6f6c61;
  --border: rgba(243, 239, 228, 0.14);
  --accent: #3a45a8;
  --accent-2: #5865c9;
  --lilac: #c3aef0;
  --lilac-dim: rgba(195, 174, 240, 0.14);
  --periwinkle: #a9bdf2;
  --periwinkle-dim: rgba(169, 189, 242, 0.14);
  --radius: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.display {
  font-family: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.mono { font-family: ui-monospace, "SF Mono", "Roboto Mono", monospace; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }

/* ---------------- nav ---------------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px;
  position: sticky; top: 0; z-index: 20;
  background: rgba(14, 14, 13, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-name {
  font-size: 14px; font-weight: 700; letter-spacing: -0.01em;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--fg-dim);
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--fg); }

/* ---------------- hero ---------------- */
.hero { padding: 96px 28px 56px; }
.hero-inner { max-width: 1240px; margin: 0 auto; }

.hero h1 {
  font-size: clamp(48px, 9vw, 108px); line-height: 0.94; margin: 0 0 28px;
  text-transform: lowercase;
}
.hero .tagline {
  font-size: clamp(17px, 2vw, 22px); line-height: 1.5; color: var(--fg-dim);
  max-width: 46ch; margin: 0;
}

/* ---------------- companies marquee ---------------- */
.companies { padding: 64px 0 40px; text-align: center; }
.companies .label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-faint); margin: 0 0 26px;
}
.marquee-wrap {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  overflow: hidden; padding: 20px 0;
}
.marquee-track { display: flex; width: max-content; gap: 56px; }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: scroll 28s linear infinite; }
  .footer-marquee-track { animation: scroll 22s linear infinite; }
}
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-track span {
  font-family: 'Archivo', sans-serif; font-weight: 700;
  font-size: 22px; letter-spacing: -0.01em; white-space: nowrap; color: var(--fg-dim);
}

/* ---------------- work ---------------- */
.work { padding: 40px 28px 120px; }
.work-head { max-width: 720px; margin: 0 auto 12px; text-align: center; }
.work-head h2 {
  font-size: clamp(40px, 7vw, 76px); line-height: 0.98; margin: 0 0 18px;
  text-transform: lowercase;
}
.work-sub { font-size: 15.5px; color: var(--fg-dim); margin: 0 0 36px; }

.filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 0 auto 48px; max-width: 1240px;
}
.filter-btn {
  border: 1px solid var(--border); background: transparent; color: var(--fg-dim);
  border-radius: 999px; padding: 8px 18px; font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all 0.15s ease; font-family: inherit;
}
.filter-btn:hover { color: var(--fg); border-color: var(--fg-dim); }
.filter-btn.active { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 700; }

.work-grid {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px;
}
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } }

.proj {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-alt); display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.proj[href]:hover, a.proj:hover {
  transform: translateY(-4px); box-shadow: 0 20px 44px rgba(0,0,0,0.4); border-color: var(--fg-faint);
}

.proj-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-alt-2); }
.proj-media img { width: 100%; height: 100%; object-fit: cover; }
.proj-media.placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--fg-faint); text-align: center; padding: 24px;
}
.proj-media.placeholder svg { opacity: 0.55; color: var(--lilac); }
.proj-media.placeholder span { font-size: 12px; font-weight: 600; max-width: 26ch; }

/* Tag colour rule: .tag-pill is metadata (industry / tool / status) and stays
   neutral everywhere it appears, homepage cards and case-study hero alike,
   so the same label always reads the same way. Colour (lilac / indigo) is
   reserved for .case-chip, which summarizes narrative content inside a case
   study body, not metadata. Don't tint .tag-pill; add a new chip variant
   instead if a new narrative category needs its own colour. */
.proj-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 22px 24px 0; }
.tag-pill {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em; color: var(--fg-dim);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; background: var(--bg-alt-2);
}
.tag-pill.mono { font-family: ui-monospace, "SF Mono", "Roboto Mono", monospace; }
.tag-pill.status { color: var(--fg-faint); border-style: dashed; }

.proj-title {
  font-family: 'Archivo', sans-serif; font-weight: 800; letter-spacing: -0.01em;
  font-size: 22px; margin: 16px 24px 0; line-height: 1.15;
}
.proj-title .proj-sub { font-weight: 500; color: var(--fg-dim); font-family: 'Inter', sans-serif; }
.proj-desc { font-size: 14.5px; line-height: 1.55; color: var(--fg-dim); margin: 10px 24px 0; }

.proj-link {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700;
  margin: 20px 24px 24px;
}
.proj-link .arrow-circle {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; transition: transform 0.18s ease;
}
.proj:hover .proj-link .arrow-circle { transform: translate(2px, -2px); background: var(--fg); color: var(--bg); }

/* ---------------- about ---------------- */
.about { padding: 40px 28px 120px; border-top: 1px solid var(--border); }
.about-inner { max-width: 1240px; margin: 0 auto; }
.about-lead {
  font-size: clamp(24px, 3.4vw, 40px); line-height: 1.28; letter-spacing: -0.01em;
  max-width: 22ch; margin: 0;
}

.about-top {
  display: flex; align-items: flex-start; justify-content: flex-start; gap: 56px;
  margin-bottom: 64px;
}
@media (max-width: 760px) { .about-top { flex-direction: column-reverse; align-items: flex-end; gap: 24px; } }

.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

.photo-strip {
  flex: none; width: 150px;
  background: #050504; border-radius: 8px; padding: 8px;
  border: 1px solid var(--border); box-shadow: 0 20px 40px rgba(0,0,0,0.45);
  transform: rotate(-1.5deg);
}
.photo-strip img {
  width: 100%; height: auto; display: block; border-radius: 2px;
  filter: grayscale(1) contrast(1.05);
}

.about-col .eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-faint); margin: 0 0 14px;
}
.about-col p {
  font-size: 15px; line-height: 1.65; color: var(--fg-dim); margin: 0 0 24px;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--fg); color: var(--bg); border-radius: 999px; padding: 12px 22px;
  font-size: 14px; font-weight: 700; border: none; cursor: pointer;
}

/* ---------------- footer ---------------- */
.footer { border-top: 1px solid var(--border); padding-top: 40px; position: relative; overflow: hidden; }
.footer-marquee { padding: 30px 0 60px; overflow: hidden; }
.footer-marquee-track { display: flex; width: max-content; gap: 64px; }
.footer-marquee-track span {
  font-family: 'Archivo', sans-serif; font-weight: 900; font-size: clamp(48px, 9vw, 110px);
  letter-spacing: -0.03em; color: var(--accent); white-space: nowrap; text-transform: lowercase;
}

.footer-meta { padding: 0 28px 48px; }
.footer-meta-grid {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr; gap: 40px;
}
@media (max-width: 760px) { .footer-meta-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-meta p { font-size: 14.5px; color: var(--fg-dim); margin: 0 0 10px; }
.footer-meta p strong { color: var(--fg); font-weight: 600; }
.footer-meta p a { color: var(--fg-dim); text-decoration: underline; text-underline-offset: 2px; }
.footer-meta p a:hover { color: var(--fg); }
.footer-col-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-faint); margin: 0 0 14px;
}
.footer-col a {
  display: block; font-size: 14.5px; font-weight: 600; color: var(--fg-dim);
  margin-bottom: 10px; transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--fg); }

.footer-word {
  padding: 0 28px; max-width: 1240px; margin: 0 auto;
}
.footer-word h2 {
  font-size: clamp(44px, 11vw, 130px); line-height: 0.9; margin: 0; text-transform: lowercase;
}
.footer-bottom {
  border-top: 1px solid var(--border); margin-top: 32px; padding: 20px 28px 32px;
  display: flex; justify-content: space-between; max-width: 1240px; margin-left: auto; margin-right: auto;
  font-size: 13px; color: var(--fg-faint);
}

/* ---------------- case study pages ---------------- */
.case-hero { padding: 64px 28px 0; max-width: 1000px; margin: 0 auto; }
.case-back {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600;
  color: var(--fg-dim); margin-bottom: 40px;
}
.case-back:hover { color: var(--fg); }
.case-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.case-hero h1 {
  font-size: clamp(36px, 6vw, 64px); line-height: 1; margin: 0 0 18px; text-transform: lowercase;
}
.case-role { font-size: 15px; color: var(--fg-faint); margin: 0 0 40px; }
.case-role a { color: var(--periwinkle); text-decoration: underline; text-underline-offset: 2px; }
.case-role a:hover { color: var(--fg); }

.case-meta-grid {
  display: flex; flex-wrap: wrap; gap: 10px 32px;
  font-size: 14.5px; color: var(--fg-dim); margin: 0 0 22px;
}
.case-meta-grid div span {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-faint); margin-bottom: 4px;
}
.case-nda {
  font-size: 13px; color: var(--fg-faint); font-style: italic;
  border-left: 2px solid var(--border); padding-left: 14px; margin: 0 0 40px; max-width: 60ch;
}

.case-hero-media {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  margin: 0 0 64px; background: var(--bg-alt-2);
}
.case-hero-media img { width: 100%; height: auto; display: block; }

/* --- at-a-glance: tldr, stats, chips, pullquote --- */
.case-glance-sub { font-size: 15px; color: var(--fg-dim); margin: -8px 0 28px; max-width: 62ch; }

.case-tldr {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 26px; font-size: 16px; line-height: 1.7; color: var(--fg-dim); margin: 0 0 32px;
}
.case-tldr strong { color: var(--fg); font-weight: 700; }

.case-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px; margin: 0 0 32px; align-items: stretch;
}
@media (max-width: 640px) { .case-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px) { .case-stats { grid-template-columns: 1fr; } }
.case-stat {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 16px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.case-stat .num {
  font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 27px; color: var(--fg);
  display: block; margin-bottom: 6px;
}
.case-stat .label { font-size: 12.5px; color: var(--fg-dim); line-height: 1.4; }

/* .case-chip is the colour-coded half of the tag rule (see .tag-pill comment
   above). Both variants get the same treatment (tinted fill + border + text)
   so the two groups carry equal visual weight, colour tells them apart,
   not intensity: periwinkle = problems/goals ("what we were solving for"),
   lilac = tensions/decisions (.b, "key trade-offs"). */
.case-chip-group { margin: 0 0 28px; }
.case-chip-group .gtitle {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-faint);
  margin: 0 0 12px; font-weight: 600;
}
.case-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.case-chip {
  font-size: 13px; padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  color: var(--periwinkle); background: var(--periwinkle-dim); border: 1px solid rgba(169, 189, 242, 0.4);
}
.case-chip.b { border-color: var(--lilac); color: var(--lilac); background: var(--lilac-dim); }

.case-pullquote {
  border-left: 3px solid var(--lilac); padding: 6px 0 6px 22px; margin: 8px 0 8px;
  font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 19px; line-height: 1.5;
  color: var(--fg);
}
.case-pullquote span {
  display: block; font-family: 'Inter', sans-serif; font-weight: 500; font-size: 13px;
  color: var(--fg-faint); margin-top: 10px;
}

.case-divider {
  display: flex; align-items: center; gap: 14px; color: var(--fg-faint); font-size: 13px;
  margin: 40px 0 12px;
}
.case-divider::before, .case-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* --- detail accordion --- */
.case-accordion { margin-top: 8px; }
.case-accordion details { border-bottom: 1px solid var(--border); }
.case-accordion details:first-of-type { border-top: 1px solid var(--border); }
.case-accordion summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 2px; font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 19px;
  color: var(--fg);
}
.case-accordion summary::-webkit-details-marker { display: none; }
.case-accordion summary .idx {
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 12px; color: var(--lilac);
  margin-right: 12px;
}
.case-accordion summary .plus {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border);
  position: relative;
}
.case-accordion summary .plus::before, .case-accordion summary .plus::after {
  content: ""; position: absolute; background: var(--fg); top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.case-accordion summary .plus::before { width: 10px; height: 1.5px; }
.case-accordion summary .plus::after { width: 1.5px; height: 10px; transition: transform 0.2s ease, opacity 0.2s ease; }
.case-accordion details[open] summary .plus::after { opacity: 0; transform: translate(-50%, -50%) rotate(90deg); }
.case-accordion details[open] summary { padding-bottom: 10px; }

.case-accordion .acc-body { padding: 0 2px 28px; font-size: 15.5px; color: var(--fg-dim); max-width: 70ch; }
.case-accordion .acc-body p { margin: 0 0 16px; }
.case-accordion .acc-body ul { margin: 0 0 16px; padding-left: 20px; }
.case-accordion .acc-body li { margin-bottom: 10px; }
.case-accordion .acc-body strong { color: var(--fg); font-weight: 700; }
.case-accordion .acc-body h4 {
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700; color: var(--fg); margin: 0 0 8px;
}
.case-accordion .acc-block { margin-bottom: 22px; }

.case-body { max-width: 860px; margin: 0 auto; padding: 0 28px 100px; }
.case-body h2 {
  font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 24px; letter-spacing: -0.01em;
  margin: 56px 0 18px;
}
.case-body h2:first-child { margin-top: 0; }
.case-body h3 {
  font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -0.005em;
  color: var(--fg); margin: 36px 0 14px;
}
.case-body h3:first-of-type { margin-top: 8px; }
.case-body .lead-in {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-faint);
  font-weight: 600; margin: 22px 0 10px;
}
.case-body p { font-size: 16px; line-height: 1.7; color: var(--fg-dim); margin: 0 0 18px; }
.case-body p a, .case-init-body p a, .case-init-body li a {
  color: var(--periwinkle); text-decoration: underline; text-underline-offset: 2px;
}
.case-body p a:hover, .case-init-body p a:hover, .case-init-body li a:hover { color: var(--fg); }
.case-body code, .case-init-body code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9em; color: var(--periwinkle); background: var(--periwinkle-dim);
  padding: 2px 6px; border-radius: 5px;
}
.case-body ul { margin: 0 0 18px; padding-left: 20px; }
.case-body li { font-size: 16px; line-height: 1.7; color: var(--fg-dim); margin-bottom: 10px; }
/* Expandable initiative rows: reuses the .case-accordion interaction
   pattern (native <details>, same plus-icon affordance) instead of a card
   grid, so "more to explore" content stays consistent across case studies.
   Weight tiers, heaviest to lightest: icon chip > title > eyebrow tag >
   body copy > bullet list. */
.case-init-list { margin: 8px 0 32px; }
.case-init { border-bottom: 1px solid var(--border); }
.case-init:first-of-type { border-top: 1px solid var(--border); }
.case-init summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 2px;
}
.case-init summary::-webkit-details-marker { display: none; }
.case-init-lead { display: flex; align-items: center; gap: 16px; min-width: 0; }
.case-init-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  background: var(--periwinkle-dim); border: 1px solid rgba(169, 189, 242, 0.35);
  display: flex; align-items: center; justify-content: center; color: var(--periwinkle);
}
.case-init-icon svg { width: 21px; height: 21px; }
.case-init-heading { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.case-init-tag {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--periwinkle);
}
.case-init-title {
  font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 19px; color: var(--fg); line-height: 1.3;
}
.case-init .plus {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); position: relative;
}
.case-init .plus::before, .case-init .plus::after {
  content: ""; position: absolute; background: var(--fg); top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.case-init .plus::before { width: 10px; height: 1.5px; }
.case-init .plus::after { width: 1.5px; height: 10px; transition: transform 0.2s ease, opacity 0.2s ease; }
.case-init[open] .plus::after { opacity: 0; transform: translate(-50%, -50%) rotate(90deg); }
.case-init[open] summary { padding-bottom: 8px; }
.case-init-body { padding: 0 2px 26px 58px; }
.case-init-body p { font-size: 15.5px; line-height: 1.7; color: var(--fg-dim); margin: 0 0 14px; max-width: 64ch; }
.case-init-body ul { margin: 0; padding-left: 18px; max-width: 62ch; }
.case-init-body li { font-size: 14.5px; line-height: 1.6; color: var(--fg-dim); margin-bottom: 8px; }
@media (max-width: 560px) {
  .case-init-body { padding-left: 2px; }
  .case-init-lead { gap: 12px; }
  .case-init-icon { width: 36px; height: 36px; }
  .case-init-title { font-size: 17px; }
}

/* Featured variant: the handful of flagship initiatives get a bordered,
   spaced-out card instead of the flat hairline-divided row, so the primary
   work reads as heavier/more important than the "other initiatives" list
   below it, while still sharing the same accordion mechanics. */
.case-init-featured {
  border: 1px solid var(--border) !important; border-radius: 18px;
  margin-bottom: 18px; padding: 4px 24px; background: var(--bg-alt);
}
.case-init-featured:last-of-type { margin-bottom: 8px; }
.case-init-featured summary { padding: 24px 0; }
.case-init-featured .case-init-icon {
  width: 46px; height: 46px; border-radius: 13px;
}
.case-init-featured .case-init-icon svg { width: 23px; height: 23px; }
.case-init-featured .case-init-title { font-size: 20px; }
.case-init-featured .case-init-body { padding: 0 0 30px 62px; }
.case-init-featured .case-init-body p,
.case-init-featured .case-init-body ul { max-width: none; }
@media (max-width: 560px) {
  .case-init-featured { padding: 4px 16px; }
  .case-init-featured .case-init-body { padding-left: 2px; }
}

.case-body .note {
  font-size: 13.5px; color: var(--fg-faint); border-left: 2px solid var(--border);
  padding-left: 16px; margin: 32px 0;
}
/* Screenshot cards: a padded gradient frame plus a shadow under the image
   itself, rather than a flat border, so dense app screenshots read as
   intentionally presented artifacts instead of raw crops floating on the
   page background. */
.case-media {
  border-radius: 18px; overflow: hidden; margin: 32px 0; padding: 24px;
  background: linear-gradient(155deg, var(--bg-alt) 0%, var(--bg-alt-2) 100%);
  box-shadow: inset 0 0 0 1px rgba(243, 239, 228, 0.06);
}
.case-media img {
  width: 100%; height: auto; display: block; border-radius: 10px;
  box-shadow: 0 24px 56px -24px rgba(0, 0, 0, 0.6);
}
@media (max-width: 560px) { .case-media { padding: 14px; } }

.case-media-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 32px 0;
  align-items: start;
}
.case-media-row .case-media { margin: 0; }
@media (max-width: 640px) { .case-media-row { grid-template-columns: 1fr; } }

/* Sits directly under a .case-media / .case-media-row to cite a public
   source (e.g. a shipped feature announcement) backing the claim above it. */
.case-media-caption {
  font-size: 12.5px; color: var(--fg-faint); text-align: center; margin: -22px 0 28px;
}
.case-media-caption a { color: var(--periwinkle); text-decoration: underline; text-underline-offset: 2px; }
.case-media-caption a:hover { color: var(--fg); }

/* Highlighted aside within a case-init-body, for a specific problem or
   complication worth calling out on its own, distinct from the surrounding
   narrative. Reuses the periwinkle = "problems/goals" color convention
   from .case-chip above. */
.case-callout {
  border-left: 3px solid var(--periwinkle); background: var(--periwinkle-dim);
  border-radius: 0 14px 14px 0; padding: 22px 24px; margin: 24px 0;
}
.case-callout .case-callout-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--periwinkle); margin: 0 0 10px;
}
.case-callout p { color: var(--fg); font-size: 15px; line-height: 1.7; margin: 0 0 12px; max-width: none; }
.case-callout p:last-child { margin-bottom: 0; }
.case-callout strong { color: var(--fg); }

/* Native UI-anatomy diagram: a lightweight on-brand stand-in for a
   labeled interface map (which regions come from the existing system vs.
   which are new), built from real markup instead of a screenshotted
   image so it inherits the theme rather than fighting it. */
.ui-anatomy {
  border-radius: 18px; padding: 24px; margin: 28px 0;
  background: linear-gradient(155deg, var(--bg-alt) 0%, var(--bg-alt-2) 100%);
  box-shadow: inset 0 0 0 1px rgba(243, 239, 228, 0.06);
}
.ui-anatomy .ui-anatomy-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-faint); margin: 0 0 14px; max-width: none;
}
.ui-anatomy-grid {
  display: grid; grid-template-columns: 1fr 2fr; grid-template-rows: auto auto auto; gap: 10px;
}
.ui-anatomy-header { grid-column: 1 / -1; grid-row: 1; }
.ui-anatomy-history { grid-column: 1; grid-row: 2 / 4; }
.ui-anatomy-thread { grid-column: 2; grid-row: 2; }
.ui-anatomy-composer { grid-column: 2; grid-row: 3; }
.ui-anatomy-region { border-radius: 12px; padding: 14px 16px; border: 1px solid; }
.ui-anatomy-header { background: var(--periwinkle-dim); border-color: rgba(169, 189, 242, 0.35); }
.ui-anatomy-history { background: rgba(195, 174, 240, 0.1); border-color: rgba(195, 174, 240, 0.3); }
.ui-anatomy-thread { background: rgba(243, 239, 228, 0.04); border-color: var(--border); }
.ui-anatomy-composer { background: rgba(243, 239, 228, 0.03); border-color: var(--border); }
.ui-anatomy .ui-anatomy-region-title {
  font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 14px; color: var(--fg); margin: 0 0 3px;
}
.ui-anatomy .ui-anatomy-region-desc { font-size: 12px; color: var(--fg-dim); margin: 0 0 10px; max-width: none; }
.ui-anatomy-tag {
  display: inline-block; font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  margin: 0 4px 4px 0;
}
.ui-anatomy-tag-system { color: var(--periwinkle); background: rgba(169, 189, 242, 0.16); }
.ui-anatomy-tag-new { color: var(--lilac); background: var(--lilac-dim); }
.ui-anatomy-tag-row { display: flex; flex-wrap: wrap; gap: 0; }
.ui-anatomy .ui-anatomy-legend {
  font-size: 11.5px; color: var(--fg-faint); margin: 16px 0 0; display: flex; align-items: center; gap: 18px;
  max-width: none;
}
.ui-anatomy-legend .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle;
}
.dot-system { background: var(--periwinkle); }
.dot-new { background: var(--lilac); }
@media (max-width: 640px) {
  .ui-anatomy-grid { grid-template-columns: 1fr; }
  .ui-anatomy-header, .ui-anatomy-history, .ui-anatomy-thread, .ui-anatomy-composer { grid-column: 1; }
  .ui-anatomy-history, .ui-anatomy-thread, .ui-anatomy-composer { grid-row: auto; }
}

.case-placeholder {
  aspect-ratio: 16 / 9; border-radius: 16px; border: 1px dashed var(--border);
  background: var(--bg-alt-2); margin: 32px 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--fg-faint); text-align: center; padding: 24px;
}
.case-placeholder svg { opacity: 0.55; color: var(--lilac); }
.case-placeholder span { font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; max-width: 32ch; }

.case-next {
  border-top: 1px solid var(--border); padding: 48px 28px; text-align: center;
}
.case-next a {
  font-family: 'Archivo', sans-serif; font-size: clamp(28px, 5vw, 44px); font-weight: 800;
  text-transform: lowercase;
}
.case-next a:hover { color: var(--accent-2); }
.case-next .label { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 14px; font-family: 'Inter', sans-serif; font-weight: 600; }

/* Jargon tooltips: an underlined term shows a short definition on hover
   (desktop), keyboard focus, or tap (touch, toggled via JS in the page
   script). Used for platform/product names and team tools that a
   first-time reader wouldn't otherwise recognize. */
.term {
  border-bottom: 1px dotted var(--fg-faint); cursor: help; position: relative;
  color: inherit;
}
.term:hover, .term:focus, .term.is-open { color: var(--periwinkle); outline: none; }
.term .tip {
  position: absolute; left: 50%; bottom: calc(100% + 9px); transform: translateX(-50%);
  width: max-content; max-width: 260px; background: var(--bg-alt-2); color: var(--fg);
  font-size: 12.5px; font-weight: 400; line-height: 1.5; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  opacity: 0; visibility: hidden; transition: opacity 0.15s ease; pointer-events: none;
  z-index: 20; text-align: left; text-transform: none; letter-spacing: normal;
}
.term:hover .tip, .term:focus .tip, .term.is-open .tip { opacity: 1; visibility: visible; }
.term .tip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--bg-alt-2);
}
@media (max-width: 480px) {
  .term .tip { left: 0; transform: none; max-width: 220px; }
  .term .tip::after { left: 20px; transform: none; }
}
