/* Portfolio additions to the Crosswell system. Tokens come from tokens.css. */

/* Project cards with a real screenshot */
.hc-card__media img { object-position: top left; }
.hc-project-card { text-decoration: none; color: inherit; }
.hc-project-card .hc-card__media { aspect-ratio: 16 / 10; }
.hc-project-card .hc-row { margin-top: auto; }
.hc-grid--projects { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }

/* Breadcrumb + view tabs on a project */
.hc-crumb { font-size: 14px; color: var(--ink-subtle); }
.hc-crumb a { color: var(--ink-subtle); }
.hc-crumb a:hover { color: var(--ink); }
.hc-tabs { display: flex; flex-wrap: wrap; gap: var(--space-8); border-bottom: 1px solid var(--line); margin-top: var(--space-2); }
.hc-tabs a { padding: var(--space-3) 0; font-weight: 700; color: var(--ink-muted); text-decoration: none; }
.hc-tabs a:hover { color: var(--ink); }
.hc-tabs a[aria-current] { color: var(--ink); box-shadow: 0 2px 0 var(--magenta); }
.hc-tabs a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Case study page */
.hc-case-head { padding: var(--space-12) clamp(16px, 4vw, 32px) 0; }
.hc-case-head h1 { margin: 0; max-width: 24ch; font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4vw, 52px); line-height: 1.12; color: var(--ink); }
.hc-case-head .hc-lede { margin: 0; max-width: 64ch; font-size: 20px; line-height: 1.6; color: var(--ink-muted); }
.hc-case { padding: var(--space-12) clamp(16px, 4vw, 32px) clamp(64px, 8vw, 96px); }
.hc-case__grid { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: flex-start; }
.hc-toc { flex: 1 1 200px; min-width: 0; position: sticky; top: calc(var(--nav-height) + 24px); display: flex; flex-direction: column; gap: 10px; }
.hc-toc a { color: var(--ink-muted); text-decoration: none; font-size: 15px; }
.hc-toc a:hover { color: var(--ink); }
.hc-case__body { flex: 999 1 640px; min-width: 0; max-width: var(--container-narrow); display: flex; flex-direction: column; gap: 56px; }
.hc-case__body > section { display: flex; flex-direction: column; gap: var(--space-4); }
.hc-case__body h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 32px; line-height: 1.2; color: var(--ink); }
.hc-case__body p, .hc-case__body li { font-size: 17px; line-height: 1.7; }
.hc-case__body p { margin: 0; }
.hc-case__body ul:not(.hc-deliverables), .hc-case__body ol:not(.hc-flow) { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.hc-case__body strong { color: var(--ink); }
.hc-quote { margin: 0; padding: 20px 24px; background: var(--surface-200); border: 1px solid var(--line); border-radius: var(--radius-md); font: 700 20px/1.45 var(--font-display); color: var(--ink); }
@media (max-width: 900px) { .hc-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px 16px; } }

/* Figures and the live-demo frame */
.hc-figure { margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.hc-figure img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-000); }
.hc-figure figcaption { font-size: 14px; color: var(--ink-subtle); }
.hc-figure-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }

.hc-live { padding: 0 clamp(16px, 4vw, 32px) var(--space-12); }
.hc-live__frame { display: flex; flex-direction: column; background: var(--surface-000); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.hc-live__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.hc-live__url { font-family: var(--font-mono); font-size: 13px; color: var(--ink-subtle); overflow-wrap: anywhere; }
.hc-live iframe { display: block; width: 100%; height: min(78vh, 820px); border: 0; background: var(--surface-000); }
.hc-live__mobile { display: none; padding: var(--space-6); flex-direction: column; gap: var(--space-4); }
@media (max-width: 720px) { .hc-live iframe { display: none; } .hc-live__mobile { display: flex; } }

/* Deliverables list */
.hc-deliverables { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.hc-deliverables li { display: flex; flex-direction: column; gap: 4px; padding: var(--space-4); background: var(--surface-200); border: 1px solid var(--line); border-radius: var(--radius-md); }
.hc-deliverables b { color: var(--ink); font-size: 16px; }
.hc-deliverables span { font-size: 15px; line-height: 1.55; }

.hc-flow ol, ol.hc-flow { list-style: none; margin: 0; }
.hc-note { font-size: 14px; color: var(--ink-subtle); }
.hc-next { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-4); }
.hc-next a { color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.hc-next a.hc-back { font-family: var(--font-body); font-size: 16px; color: var(--ink-muted); }
.hc-next a:hover { color: var(--accent); }
