/* ==========================================================
   MAGAZINE HUB · editorial grid + filter chips
   ========================================================== */

/* keep every nav label on a single line */
.topribbon nav a { white-space: nowrap; }

/* Collapse the full nav to the hamburger earlier than the global 768px:
   8 links + Cases dropdown + CTA don't fit below ~1050px, which caused
   horizontal overflow + a clipped CTA in the 769–1024px band. */
@media (max-width: 1080px) {
  .topribbon { position: relative; }
  .topribbon nav { display: none; }
  .topribbon .ribbon-burger { display: inline-flex; }
  .topribbon .pill-cta { display: none; }
}

/* ============ NAV · Cases dropdown (mirrors "Over Hypergraph") ============ */
.topribbon nav .nav-dd {
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.topribbon nav .nav-dd-trigger {
  font-family: inherit; font-size: inherit; font-weight: 500;
  color: var(--ink-3);
  background: none; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  position: relative;
  transition: color 0.15s;
}
.topribbon nav .nav-dd.active .nav-dd-trigger,
.topribbon nav .nav-dd:hover .nav-dd-trigger { color: var(--ink-1); }
.topribbon nav .nav-dd-caret {
  transition: transform 0.18s ease;
  margin-top: 1px;
  color: var(--brand-purple, #6D28D9);
}
.topribbon nav .nav-dd.open .nav-dd-caret { transform: rotate(180deg); }
/* active underline like the reference */
.topribbon nav .nav-dd.active .nav-dd-trigger::after,
.topribbon nav .nav-dd.open .nav-dd-trigger::after {
  content: ""; position: absolute; left: 0; right: 14px; bottom: -6px;
  height: 2px; border-radius: 2px;
  background: var(--brand-purple, #6D28D9);
}

.topribbon nav .nav-dd-menu {
  position: absolute; top: calc(100% + 14px); left: -16px;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.12);
  padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
  z-index: 80;
}
.topribbon nav .nav-dd.open .nav-dd-menu { opacity: 1; visibility: visible; transform: translateY(0); }
/* little bridge so the hover gap doesn't close the menu */
.topribbon nav .nav-dd-menu::before {
  content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px;
}
.topribbon nav .nav-dd-menu a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; border-radius: 9px;
  text-decoration: none;
  transition: background 0.12s;
}
.topribbon nav .nav-dd-menu a:hover { background: #FAFAF8; }
.topribbon nav .nav-dd-menu a .dd-label {
  font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink-1);
  letter-spacing: -0.005em;
}
.topribbon nav .nav-dd-menu a .dd-sub {
  font-family: var(--font-display); font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.02em;
}
.topribbon nav .nav-dd-menu a.dd-active { background: #FAFAF8; }
.topribbon nav .nav-dd-menu a.dd-active .dd-label {
  color: transparent;
  -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(90deg, #FB993F, #F83C72);
}

/* ============ HERO · single "Cases" wordmark (split pages) ============ */
.cases-hero {
  background: #FAFAF8;
  padding: clamp(56px, 7vw, 96px) clamp(20px, 4vw, 56px) clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--hairline);
}
.cases-hero .ch-inner {
  max-width: 880px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
}
.cases-hero .ch-orn {
  position: relative;
  width: min(520px, 96%);
  height: clamp(56px, 8vw, 84px);
  margin-bottom: 4px;
  pointer-events: none;
}
.cases-hero .ch-word {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(40px, 8.5vw, 104px); line-height: 0.98; letter-spacing: -0.04em;
  color: var(--ink-1); margin: 0;
  text-align: center; text-wrap: balance;
  max-width: 12ch;
}
.cases-hero .ch-label {
  font-family: var(--font-display);
  font-size: clamp(10px, 1.1vw, 12px); font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3);
  margin-top: 18px; padding-top: 12px;
  border-top: 1px solid var(--ink-1);
}

/* bubbles · shared on both pages */
.cases-hero .stat-chip {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(11px, 1.2vw, 13px); font-weight: 600;
  background: #fff;
  border: 1px solid var(--hairline);
  padding: 5px 12px 6px;
  border-radius: 999px;
  color: var(--ink-1);
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 5px;
}
.cases-hero .stat-chip .qm {
  font-family: var(--font-serif, 'Source Serif Pro', Georgia, serif);
  font-style: italic; color: #FB993F; font-size: 1.4em; line-height: 0;
  vertical-align: -0.18em; margin: 0 1px;
}
.cases-hero .stat-chip.s1 { top: 20%; left: 2%;  transform: rotate(-7deg); }
.cases-hero .stat-chip.s2 { top: -6%; left: 46%; transform: rotate(4deg); }
.cases-hero .stat-chip.s3 { top: 30%; right: 0;  transform: rotate(6deg); }
.cases-hero .stat-chip.play { padding-left: 5px; }
.cases-hero .stat-chip.play .play-ico {
  width: 18px; height: 18px; border-radius: 999px;
  background: linear-gradient(135deg, #FB993F 0%, #F83C72 60%, #A78BFA 100%);
  display: inline-flex; align-items: center; justify-content: center;
}
.cases-hero .stat-chip.play .play-ico svg { margin-left: 1px; }

@media (max-width: 480px) {
  .cases-hero .ch-orn { width: 100%; height: 64px; }
  .cases-hero .stat-chip { font-size: 11px; padding: 4px 10px 5px; }
  .cases-hero .stat-chip.s1 { left: -2%; }
  .cases-hero .stat-chip.s3 { right: -2%; }
}

/* ============ ROW · use-case preview tile ============ */
.mag-row.has-preview {
  grid-template-columns: 116px 1fr 200px 24px;
  gap: 26px;
}
.mag-row-preview { width: 116px; }
.uc-prev {
  position: relative;
  width: 116px; height: 74px;
  border-radius: 10px;
  overflow: hidden;
  background: #FAFAF8;
  border: 1px solid var(--hairline);
}
.uc-prev .uc-prev-scene {
  position: absolute; inset: 0;
  padding: 8px 9px;
  display: flex; flex-direction: column; gap: 6px;
  /* the frosted look — monochrome */
  filter: blur(1.3px);
  opacity: 0.95;
  transition: filter 0.22s, opacity 0.22s, transform 0.22s;
}
/* subtle light veil only — no colour */
.uc-prev::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(255,255,255,0.42), transparent 58%);
  pointer-events: none;
}
.mag-row.has-preview:hover .uc-prev .uc-prev-scene {
  filter: blur(0.4px);
  opacity: 1; transform: scale(1.03);
}

.uc-prev-bar { display: flex; gap: 3px; margin-bottom: 1px; }
.uc-prev-bar span { width: 5px; height: 5px; border-radius: 999px; background: rgba(0,0,0,0.16); }

/* doc archetype */
.uc-prev .uc-prev-body { display: flex; flex-direction: column; gap: 5px; }
.uc-prev .ln { height: 6px; border-radius: 3px; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.uc-prev .ln.w90 { width: 90%; } .uc-prev .ln.w80 { width: 80%; }
.uc-prev .ln.w70 { width: 70%; } .uc-prev .ln.w50 { width: 50%; }
.uc-prev .ln.dark { background: var(--ink-1); opacity: 0.82; box-shadow: none; }

/* chat archetype */
.uc-prev .bub { display: block; height: 12px; border-radius: 7px; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.uc-prev .bub.in { width: 64%; align-self: flex-start; }
.uc-prev .bub.out { width: 70%; align-self: flex-end; background: var(--ink-1); opacity: 0.82; box-shadow: none; }
.uc-prev .bub.short { width: 44%; }

/* grid archetype */
.uc-prev .uc-prev-body.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.uc-prev .cardlet { height: 19px; border-radius: 5px; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.uc-prev .cardlet.dark { background: var(--ink-1); opacity: 0.82; box-shadow: none; }

/* small green "active" dot · replaces the play badge */
.uc-prev-dot {
  position: absolute; right: 7px; bottom: 7px; z-index: 2;
  width: 7px; height: 7px; border-radius: 999px;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.16);
}
.uc-prev.no-demo .uc-prev-scene { filter: blur(2.2px); opacity: 0.6; }
.uc-prev.no-demo::after { background: linear-gradient(0deg, rgba(255,255,255,0.66), rgba(255,255,255,0.2)); }

@media (max-width: 720px) {
  .mag-row.has-preview {
    grid-template-columns: 84px 1fr 18px;
    grid-template-areas: "prev main arr" "prev meta arr";
    gap: 6px 14px;
  }
  .mag-row.has-preview .mag-row-preview { grid-area: prev; width: 84px; align-self: start; margin-top: 2px; }
  .mag-row-preview { width: 84px; }
  .uc-prev { width: 84px; height: 56px; }
}

/* ============ ROW · client logo tile ============ */
.mag-row.has-logo {
  grid-template-columns: 104px 1fr 200px 24px;
  gap: 26px;
}
.mag-row-logo {
  width: 104px; height: 68px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.mag-row-logo img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.72;
  transition: filter 0.18s, opacity 0.18s;
}
.mag-row.has-logo:hover .mag-row-logo img { filter: grayscale(0); opacity: 1; }
.mag-row-logo-fallback {
  width: 60px; height: 60px; border-radius: 12px;
  background: #F4F1ED; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif, Georgia, serif); font-style: italic; font-weight: 600;
  font-size: 26px;
}
@media (max-width: 720px) {
  .mag-row.has-logo {
    grid-template-columns: 60px 1fr 18px;
    grid-template-areas: "logo main arr" "logo meta arr";
    gap: 6px 14px;
  }
  .mag-row.has-logo .mag-row-logo { grid-area: logo; width: 60px; height: 50px; align-self: start; margin-top: 2px; }
}


/* ============ HERO · V5 ampersand variant ============ */
.mag-hero.v5 {
  background: #FAFAF8;
  padding: clamp(48px, 6vw, 88px) clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--hairline);
  position: relative;
}
.mag-hero.v5 .mag-hero-inner {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.mag-hero.v5 .v5-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(16px, 2.2vw, 36px);
  align-items: end;
}
/* Each side: ornament on top, word in middle, label as caption */
.mag-hero.v5 .side {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 0;
  position: relative;
}
.mag-hero.v5 .word {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(36px, 6.4vw, 76px); line-height: 1; letter-spacing: -0.035em;
  color: var(--ink-1);
  margin-top: 4px;
}
.mag-hero.v5 .label {
  font-family: var(--font-display);
  font-size: clamp(9px, 1vw, 11px); font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3);
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--ink-1);
  white-space: nowrap;
}
.mag-hero.v5 .amp {
  font-family: var(--font-serif, 'Source Serif Pro', Georgia, serif);
  font-style: italic; font-weight: 400;
  font-size: clamp(72px, 11vw, 140px); line-height: 1;
  color: transparent;
  -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(135deg, #FB993F 0%, #F83C72 50%, #A78BFA 100%);
  padding: 0 clamp(4px, 0.8vw, 12px);
  align-self: end;
  /* nudge the & up to optically sit on the word baseline */
  margin-bottom: clamp(18px, 2.5vw, 32px);
}

/* ============ ORNAMENT · Cases · quote stickers ============ */
.mag-hero.v5 .hero-orn {
  position: relative;
  height: clamp(56px, 7vw, 88px);
  width: 100%;
  margin-bottom: 6px;
  pointer-events: none;
}
.mag-hero.v5 .cases-orn .stat-chip {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(10px, 1.1vw, 12px); font-weight: 600;
  background: #fff;
  border: 1px solid var(--hairline);
  padding: 4px 10px 5px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-1);
  box-shadow: 0 6px 14px rgba(0,0,0,0.04);
  white-space: nowrap;
  opacity: 0;
  animation: chip-in 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.mag-hero.v5 .cases-orn .stat-chip .qm {
  font-family: var(--font-serif, 'Source Serif Pro', Georgia, serif);
  font-style: italic;
  color: #FB993F;
  font-size: 1.4em;
  line-height: 0;
  vertical-align: -0.18em;
  margin: 0 1px;
}
.mag-hero.v5 .cases-orn .stat-chip small {
  font-size: 0.78em; color: var(--ink-3); font-weight: 500;
}
.mag-hero.v5 .cases-orn .s1 { top: 14%; left: 8%; transform: rotate(-6deg); animation-delay: 0.05s; }
.mag-hero.v5 .cases-orn .s2 { top: 0;   left: 42%; transform: rotate(4deg);  animation-delay: 0.18s; }
.mag-hero.v5 .cases-orn .s3 { bottom: 6%; right: 6%; transform: rotate(-3deg); animation-delay: 0.32s; }

@keyframes chip-in {
  0%   { opacity: 0; transform: var(--tx, none) translateY(8px); }
  100% { opacity: 1; }
}
.mag-hero.v5 .cases-orn .s1 { animation-name: chip-in-1; }
.mag-hero.v5 .cases-orn .s2 { animation-name: chip-in-2; }
.mag-hero.v5 .cases-orn .s3 { animation-name: chip-in-3; }
@keyframes chip-in-1 { from { opacity: 0; transform: rotate(-6deg) translateY(10px); } to { opacity: 1; transform: rotate(-6deg) translateY(0); } }
@keyframes chip-in-2 { from { opacity: 0; transform: rotate(4deg)  translateY(10px); } to { opacity: 1; transform: rotate(4deg)  translateY(0); } }
@keyframes chip-in-3 { from { opacity: 0; transform: rotate(-3deg) translateY(10px); } to { opacity: 1; transform: rotate(-3deg) translateY(0); } }

/* ============ ORNAMENT · Demo's · pulsing play + cursor ============ */
.mag-hero.v5 .demo-orn {
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.mag-hero.v5 .demo-orn .player {
  position: relative;
  width: clamp(36px, 4.5vw, 48px);
  height: clamp(36px, 4.5vw, 48px);
}
.mag-hero.v5 .demo-orn .play-btn {
  position: absolute; inset: 0; z-index: 2;
  border-radius: 999px;
  background: linear-gradient(135deg, #FB993F 0%, #F83C72 50%, #A78BFA 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(248, 60, 114, 0.22);
}
.mag-hero.v5 .demo-orn .play-btn svg { margin-left: 2px; }
.mag-hero.v5 .demo-orn .pulse {
  position: absolute; inset: 0;
  border-radius: 999px;
  background: rgba(248, 60, 114, 0.30);
  animation: demo-pulse 2.2s ease-out infinite;
}
@keyframes demo-pulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  100% { transform: scale(2.1); opacity: 0; }
}
.mag-hero.v5 .demo-orn .cursor {
  position: absolute;
  top: 22%;
  left: calc(50% + 24px);
  animation: cursor-orbit 3s ease-in-out infinite;
  transform-origin: -22px 8px;
}
@keyframes cursor-orbit {
  0%, 100% { transform: translate(0, 0); }
  40%      { transform: translate(-8px, 6px); }
  60%      { transform: translate(-8px, 6px); }
}

/* Very narrow phones */
@media (max-width: 420px) {
  .mag-hero.v5 .label { font-size: 9px; letter-spacing: 0.14em; }
  .mag-hero.v5 .word { font-size: clamp(28px, 8vw, 40px); }
  .mag-hero.v5 .amp { font-size: clamp(56px, 14vw, 80px); margin-bottom: 12px; }
  .mag-hero.v5 .hero-orn { height: 48px; }
  .mag-hero.v5 .cases-orn .stat-chip { font-size: 9px; padding: 3px 8px 4px; }
  .mag-hero.v5 .demo-orn .player { width: 32px; height: 32px; }
}

/* ============ HERO · legacy (kept for fallback) ============ */
.mag-hero {
  background: linear-gradient(180deg, #FAFAF8 0%, #F4F1ED 100%);
  padding: 100px 56px 64px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
}
.mag-hero-inner { max-width: 1320px; margin: 0 auto; position: relative; }

.mag-eyebrow {
  display: inline-block;
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
  padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--hairline);
  margin-bottom: 28px;
}

.mag-hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(48px, 6.5vw, 84px); line-height: 1.0; letter-spacing: -0.035em;
  color: var(--ink-1); margin: 0 0 26px;
}
.mag-hero h1 .grad,
.mag-hero h1 .grad-alt {
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: italic;
  font-family: var(--font-serif, 'Source Serif Pro', Georgia, serif);
  font-weight: 500;
}
.mag-hero h1 .grad { background-image: linear-gradient(90deg, #FB993F, #F83C72); }
.mag-hero h1 .grad-alt { background-image: linear-gradient(90deg, #A78BFA, #4D01B4); }

.mag-lede {
  font-size: 19px; line-height: 1.55; color: var(--ink-3);
  max-width: 760px; margin: 0 0 40px;
}

.mag-stat-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-display); font-size: 14px; color: var(--ink-3);
  align-items: center;
}
.mag-stat-row strong {
  color: var(--ink-1); font-weight: 600;
  font-size: 18px; margin-right: 4px;
  font-variant-numeric: tabular-nums;
}

/* ============ GRID SECTION ============ */
.mag-grid-section {
  padding: 28px 56px 120px;
  background: #fff;
}
.mag-wrap { max-width: 1320px; margin: 0 auto; }

.mag-section-head { margin-bottom: 32px; }
.mag-section-head .section-h {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; letter-spacing: -0.018em;
  color: var(--ink-1); margin: 6px 0 0;
}

/* ============ FILTERS · segmented control (split pages) ============ */
.seg-filterbar {
  display: flex; flex-direction: row; flex-wrap: wrap;
  align-items: center; gap: 14px 32px;
  padding: 4px 0 0;
  margin-bottom: 28px;
  border: 0;
}
.seg-group { display: flex; align-items: center; gap: 16px; min-width: 0; max-width: 100%; }
.seg-label {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3);
  width: 64px; flex: 0 0 auto;
}
.seg {
  display: inline-flex;
  background: #F1EEEA;
  border-radius: 999px;
  padding: 3px; gap: 2px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 500;
  color: var(--ink-2);
  background: transparent; border: 0;
  padding: 7px 14px; border-radius: 999px;
  cursor: pointer; white-space: nowrap; flex: 0 0 auto;
  transition: color 0.15s, background 0.15s;
}
.seg button:hover:not(.on) { color: var(--ink-1); }
.seg button.on {
  background: #fff; color: var(--ink-1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
  font-weight: 600;
}
@media (max-width: 720px) {
  /* keep label beside the pill and let the pill keep its own width;
     groups simply wrap onto separate lines, pill scrolls if too wide */
  .seg-filterbar { gap: 12px 24px; }
  .seg-group { gap: 12px; }
}

/* ============ FILTERS · matches client-case-page filterbar ============ */
.mag-filterbar {
  /* Inherit base from .filterbar in case.css; just adjust spacing for hub */
  margin-bottom: 24px;
  padding: 0;
  border: 0;
}

/* chip-strip is a no-op container on desktop · just lets children flex */
.filter-group .chip-strip {
  display: contents;
}

/* ============ LIST · editorial rows · current ============ */
.mag-section-head-row {
  display: flex; justify-content: space-between; align-items: end; gap: 32px;
  margin-bottom: 28px;
}
.mag-section-head .section-h em {
  font-family: var(--font-serif, 'Source Serif Pro', Georgia, serif);
  font-weight: 500; font-style: italic;
  color: transparent;
  -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(90deg, #FB993F, #F83C72);
}
.mag-count {
  font-family: var(--font-display); font-size: 13px;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mag-count b { color: var(--ink-1); font-weight: 600; }
.mag-live-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 999px;
  background: #10B981; vertical-align: middle;
  margin: 0 1px 1px 1px;
}

.mag-list { display: flex; flex-direction: column; }
.mag-row {
  display: grid;
  grid-template-columns: 1fr 220px 24px;
  gap: 28px;
  padding: 22px 6px;
  border-top: 1px solid var(--hairline);
  text-decoration: none; color: inherit;
  align-items: center;
  transition: background 0.12s, padding-left 0.12s;
}
.mag-row:last-child { border-bottom: 1px solid var(--hairline); }
.mag-row:hover { background: #FAFAF8; padding-left: 16px; }
.mag-row.not-clickable { cursor: default; }
.mag-row.not-clickable:hover { padding-left: 6px; background: transparent; }

.mag-row-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mag-row-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 22px; line-height: 1.2; color: var(--ink-1);
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: pretty;
}
.mag-row-one {
  font-size: 13.5px; line-height: 1.5; color: var(--ink-3);
  margin: 0;
  max-width: 720px;
  text-wrap: pretty;
}
.mag-row-meta {
  display: flex; flex-direction: column; gap: 6px;
  align-items: flex-end; text-align: right;
  font-family: var(--font-display); font-size: 11px;
}
.mag-row-path {
  color: var(--ink-3); font-weight: 500;
  letter-spacing: 0.04em;
}
.mag-row-status {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--ink-2); font-weight: 500;
}
.mag-row-status b { color: var(--ink-1); font-weight: 600; }
.mag-row-status.demo {
  color: #059669;
  font-weight: 600;
}
.mag-demo-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 999px;
  background: #10B981; vertical-align: middle;
  margin: 0 1px 1px 1px;
}
.mag-row-status.concept,
.mag-row-status.pending,
.mag-row-pending {
  color: var(--ink-4);
  font-weight: 500;
}
.mag-row-arr { color: var(--ink-3); text-align: right; font-size: 16px; }
.mag-row:hover .mag-row-arr { color: var(--ink-1); }

/* mobile · stack meta below content */
@media (max-width: 720px) {
  .mag-row {
    grid-template-columns: 1fr 18px;
    grid-template-areas: "main arr" "meta arr";
    gap: 8px 14px;
    padding: 18px 4px;
  }
  .mag-row-main { grid-area: main; }
  .mag-row-meta { grid-area: meta; align-items: flex-start; text-align: left; flex-direction: row; gap: 12px; flex-wrap: wrap; }
  .mag-row-arr { grid-area: arr; align-self: start; }
  .mag-row-title { font-size: 19px; }
  .mag-row-one { font-size: 13px; }
  .mag-row:hover { padding-left: 4px; }
  .mag-section-head-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ============ GRID · legacy (no longer used, kept for fallback) ============ */
.mag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ============ CARD ============ */
.mag-card {
  display: flex; flex-direction: column; gap: 12px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 22px 24px;
  text-decoration: none; color: inherit;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 220px;
}
.mag-card:hover:not(.not-clickable) {
  border-color: var(--ink-3);
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}
.mag-card.not-clickable { cursor: default; }

/* CASE vs USE CASE · subtle: case has slightly warmer fill, use case has plain white */
.mag-card.mag-case {
  background: #FEFBF7;
}
.mag-card.mag-pattern {
  background: #fff;
}

/* Path: industry × domain */
.mag-path {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 11px;
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-4);
}
.mag-path-ind { color: var(--ink-3); }
.mag-path-sep { color: var(--ink-4); opacity: 0.5; }
.mag-path-dom { color: var(--ink-3); }

/* Title */
.mag-card-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 20px; line-height: 1.25; letter-spacing: -0.012em;
  color: var(--ink-1);
  margin: 0;
  text-wrap: pretty;
}

/* Oneliner */
.mag-card-one {
  font-size: 14px; line-height: 1.55; color: var(--ink-3);
  margin: 0;
  flex: 1;
}

/* Footer */
.mag-card-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-top: 12px; margin-top: auto;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-display); font-size: 12px;
}
.mag-card.mag-case .mag-card-foot {
  border-top-color: rgba(0,0,0,0.06);
}
.mag-card-kind { color: var(--ink-4); font-weight: 500; }
.mag-card.mag-case .mag-card-kind {
  color: var(--ink-2); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.mag-card.mag-case .mag-card-kind::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ind-color, var(--brand-orange));
}
.mag-card-arr { color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.mag-card:hover:not(.not-clickable) .mag-card-arr { color: var(--ink-1); }

/* Status label inside client-case kind footer */
.mag-card-status {
  font-weight: 600; letter-spacing: 0.02em;
}
.mag-card-status.live { color: #059669; }
.mag-card-status.building { color: #B86A1C; }
.mag-card-status.concept { color: #6D49C5; }

/* Empty state */
.mag-empty {
  padding: 60px 24px; text-align: center;
  font-size: 15px; color: var(--ink-3);
  background: #FAFAF8; border-radius: 14px;
  border: 1px dashed var(--hairline);
}

.link-btn {
  background: none; border: 0; padding: 0;
  color: var(--brand-purple);
  font-family: var(--font-display); font-weight: 600; font-size: inherit;
  text-decoration: none; cursor: pointer;
}
.link-btn:hover { color: var(--brand-orange); }

/* Responsive */
@media (max-width: 1100px) {
  .mag-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .mag-hero, .mag-grid-section { padding-left: 20px; padding-right: 20px; }
  .mag-hero { padding-top: 56px; padding-bottom: 40px; }
  .mag-hero h1, .mag-hero .lede { font-size: clamp(30px, 7.8vw, 38px); line-height: 1.05; }
  .mag-lede { font-size: 16px; line-height: 1.5; }
  .mag-grid { grid-template-columns: 1fr; gap: 14px; }
  .mag-card { padding: 22px; }
  .mag-card-title { font-size: 19px; line-height: 1.2; }
  .mag-card-one { font-size: 14px; }

  /* filter bar · stacked label + horizontally scrolling chip strip */
  .filterbar.mag-filterbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px 0;
    margin-bottom: 24px;
  }
  .mag-filterbar .filter-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
  }
  .mag-filterbar .filter-group .label {
    margin: 0;
    font-size: 10px;
    color: var(--ink-3);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .mag-filterbar .chip-strip {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-width: 0;
    max-width: 100vw;
    /* allow chips to spill past the section's left padding so the strip
       feels like it lives at the edge of the screen */
    margin: 0 -20px;
    padding: 2px 20px;
  }
  .mag-filterbar .chip-strip::-webkit-scrollbar { display: none; }
  .mag-filterbar .chip-strip .filter-chip {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 12px;
    padding: 6px 12px;
  }

  /* mag list rows · tighter on mobile */
  .mag-row { padding: 18px 4px; gap: 8px 14px; }
  .mag-section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}
