/* ============================================================
   Dark Mode — Christofer Ramos Portfolio
   Applied via: html[data-theme="dark"]
   System fallback: @media (prefers-color-scheme: dark)
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   SELF-HOSTED INTER 4.0 — Optical sizes
   Source: assets/Fonts/ (Inter_18pt-* and Inter_28pt-*)
   Inter Display (28pt) → large headings, hero titles
   Inter         (18pt) → body text, UI, labels, captions
   ───────────────────────────────────────────────────────────── */

/* Inter Display — optimised for display/heading sizes ≥ 32px */
@font-face {
  font-family: 'Inter Display';
  src: url('../Fonts/Inter_28pt-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Display';
  src: url('../Fonts/Inter_28pt-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Display';
  src: url('../Fonts/Inter_28pt-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Display';
  src: url('../Fonts/Inter_28pt-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Inter — optimised for body text, UI, captions, labels */
@font-face {
  font-family: 'Inter';
  src: url('../Fonts/Inter_18pt-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../Fonts/Inter_18pt-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../Fonts/Inter_18pt-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../Fonts/Inter_18pt-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Base font declaration (unconditional — applies to all themes) ── */
body,
.nav-link,
.case-caption,
.screen-legend-text,
.screen-legend-label,
.project-details-wrapper,
input, button, select, textarea {
  font-family: 'Inter', sans-serif;
}

/* ── Inter Display for large headings ────────────────────────────── */
h1,
h2,
.heading.extra-large,
.heading.large,
.heading.medium,
.heading.regular {
  font-family: 'Inter Display', sans-serif;
}

/* ── Token map ──────────────────────────────────────────────── */
:root {
  --bg:            #ffffff;
  --bg-subtle:     #f7f7f7;
  --bg-muted:      #f0f0f0;
  --bg-hover:      #ebebeb;
  --border:        #f0f0f0;
  --border-strong: #e0e0e0;
  --text-1:        #000000;
  --text-2:        #333333;
  --text-3:        #525252;
  --text-4:        #757575;
  --logo-filter:   none;
}

/* System preference: dark tokens (when no manual override) */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg:            #111111;  /* body — deepest layer                        */
    --bg-subtle:     #202020;  /* cards, section fills                        */
    --bg-muted:      #2e2e2e;  /* buttons, interactive elements               */
    --bg-hover:      #3a3a3a;  /* hover / pressed states                      */
    --border:        #3c3c3c;  /* card outlines (decorative)                  */
    --border-strong: #666666;  /* separators — 3.29:1 vs #111 (WCAG 1.4.11)  */
    --text-1:        #f2f2f2;  /* primary headings & body  — 16.87:1 on #111  */
    --text-2:        #d4d4d4;  /* secondary text           — 12.74:1 on #111  */
    --text-3:        #b0b0b0;  /* muted / supporting text  —  8.71:1 on #111  */
    --text-4:        #909090;  /* placeholders, meta       —  6.22:1 on #111  */
    --accent:        #7c84f5;  /* accent on dark surfaces  —  5.82:1 on #111  */
    --logo-filter:   invert(1);
  }
}

/* Manual override: dark tokens */
html[data-theme="dark"] {
  --bg:            #111111;
  --bg-subtle:     #202020;
  --bg-muted:      #2e2e2e;
  --bg-hover:      #3a3a3a;
  --border:        #3c3c3c;
  --border-strong: #666666;
  --text-1:        #f2f2f2;
  --text-2:        #d4d4d4;
  --text-3:        #b0b0b0;
  --text-4:        #909090;
  --accent:        #7c84f5;
  --logo-filter:   invert(1);
}

/* ── Base ───────────────────────────────────────────────────── */
html[data-theme="dark"] body {
  background-color: var(--bg);
  color: var(--text-1);
}

/* headings */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
  color: var(--text-1);
}

html[data-theme="dark"] p {
  color: var(--text-3);
}

html[data-theme="dark"] a {
  color: var(--text-1);
}

/* system fallback for headings */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) h1,
  html:not([data-theme="light"]) h2,
  html:not([data-theme="light"]) h3,
  html:not([data-theme="light"]) h4,
  html:not([data-theme="light"]) h5,
  html:not([data-theme="light"]) h6 { color: var(--text-1); }
  html:not([data-theme="light"]) p  { color: var(--text-3); }
  html:not([data-theme="light"]) a  { color: var(--text-1); }
  html:not([data-theme="light"]) body {
    background-color: var(--bg);
    color: var(--text-1);
  }
}

/* ── Logo SVG ───────────────────────────────────────────────── */
html[data-theme="dark"] .image,
html[data-theme="dark"] .logo img {
  filter: var(--logo-filter);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .image,
  html:not([data-theme="light"]) .logo img { filter: invert(1); }
}

/* ── Navigation ─────────────────────────────────────────────── */
html[data-theme="dark"] .nav,
html[data-theme="dark"] .style-guide-nav {
  background-color: var(--bg);
}

/* Mobile slide-in menu drawer */
html[data-theme="dark"] .nav-menu {
  background-color: var(--bg);
  border-right-color: var(--border);
}

html[data-theme="dark"] .nav-link {
  color: var(--text-3);
}

html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.w--current,
html[data-theme="dark"] .nav-link.w--current:hover {
  background-color: var(--bg-muted);
  color: var(--text-1);
}

/* Hamburger lines */
html[data-theme="dark"] .menu-icon-line-top,
html[data-theme="dark"] .menu-icon-line-middle,
html[data-theme="dark"] .menu-icon-line-bottom,
html[data-theme="dark"] .menu-icon-line-middle-inner {
  background-color: var(--text-2);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .nav,
  html:not([data-theme="light"]) .style-guide-nav { background-color: var(--bg); }
  html:not([data-theme="light"]) .nav-menu { background-color: var(--bg); border-right-color: var(--border); }
  html:not([data-theme="light"]) .nav-link { color: var(--text-3); }
  html:not([data-theme="light"]) .nav-link:hover,
  html:not([data-theme="light"]) .nav-link.w--current { background-color: var(--bg-muted); color: var(--text-1); }
  html:not([data-theme="light"]) .menu-icon-line-top,
  html:not([data-theme="light"]) .menu-icon-line-middle,
  html:not([data-theme="light"]) .menu-icon-line-bottom,
  html:not([data-theme="light"]) .menu-icon-line-middle-inner { background-color: var(--text-2); }
}

/* ── Sections ───────────────────────────────────────────────── */
html[data-theme="dark"] .section {
  background-color: var(--bg);
}

html[data-theme="dark"] .section.banner {
  background-color: var(--bg-subtle);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .section { background-color: var(--bg); }
  html:not([data-theme="light"]) .section.banner { background-color: var(--bg-subtle); }
}

/* ── Buttons ────────────────────────────────────────────────── */
html[data-theme="dark"] .button {
  /* Reset the warm gradient — it looks wrong on dark backgrounds */
  background-image: none;
  background-color: var(--bg-muted);
  color: var(--text-1);
}

html[data-theme="dark"] .button:hover {
  background-color: var(--bg-hover);
  opacity: 1;
}

html[data-theme="dark"] .button.w--current {
  background-image: none;
  background-color: var(--bg-muted);
}

html[data-theme="dark"] .button-secondary {
  background-color: var(--bg-subtle);
  color: var(--text-1);
}

html[data-theme="dark"] .button-secondary:hover {
  background-color: var(--bg-muted);
}

html[data-theme="dark"] .button-secondary:active {
  background-color: var(--bg-hover);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .button {
    background-image: none;
    background-color: var(--bg-muted);
    color: var(--text-1);
  }
  html:not([data-theme="light"]) .button:hover { background-color: var(--bg-hover); opacity: 1; }
  html:not([data-theme="light"]) .button.w--current { background-image: none; background-color: var(--bg-muted); }
  html:not([data-theme="light"]) .button-secondary { background-color: var(--bg-subtle); color: var(--text-1); }
  html:not([data-theme="light"]) .button-secondary:hover { background-color: var(--bg-muted); }
}

/* ── Text color utilities ───────────────────────────────────── */
html[data-theme="dark"] .text-color-1 { color: var(--text-1); }
html[data-theme="dark"] .text-color-2 { color: var(--text-2); }
html[data-theme="dark"] .text-color-3 { color: var(--text-3); }
html[data-theme="dark"] .text-color-4 { color: var(--text-4); }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .text-color-1 { color: var(--text-1); }
  html:not([data-theme="light"]) .text-color-2 { color: var(--text-2); }
  html:not([data-theme="light"]) .text-color-3 { color: var(--text-3); }
  html:not([data-theme="light"]) .text-color-4 { color: var(--text-4); }
}

/* ── Dividers & borders ─────────────────────────────────────── */
/* Use --border-strong (#666) for visible separators — meets WCAG 1.4.11 (3:1 non-text) */
html[data-theme="dark"] .list-item-tight {
  border-bottom-color: var(--border-strong);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .list-item-tight { border-bottom-color: var(--border-strong); }
}

/* ── Accent colour ───────────────────────────────────────────── */
/* #4951f0 is only 3.34:1 on dark — swap to #7c84f5 (5.82:1) */
html[data-theme="dark"] .text-color-accent {
  color: var(--accent);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .text-color-accent { color: var(--accent); }
}

/* ── Work / project cards ────────────────────────────────────── */
html[data-theme="dark"] .work-item {
  background-color: var(--bg-subtle);
  /* Subtle border lifts cards off the dark body */
  outline: 1px solid var(--border);
}

html[data-theme="dark"] .work-item:hover {
  background-color: var(--bg-subtle);
  outline-color: var(--border-strong);
}

/* ── Inset cards ─────────────────────────────────────────────── */
html[data-theme="dark"] .inset-card {
  background-color: var(--bg-subtle);
  outline: 1px solid var(--border);
}

html[data-theme="dark"] .inset-card.background-gradient {
  background-color: var(--bg-subtle);
  background-image: linear-gradient(135deg, #1a1a1a, #2e2e2e);
  outline: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .work-item {
    background-color: var(--bg-subtle);
    outline: 1px solid var(--border);
  }
  html:not([data-theme="light"]) .work-item:hover {
    background-color: var(--bg-subtle);
    outline-color: var(--border-strong);
  }
  html:not([data-theme="light"]) .inset-card {
    background-color: var(--bg-subtle);
    outline: 1px solid var(--border);
  }
  html:not([data-theme="light"]) .inset-card.background-gradient {
    background-color: var(--bg-subtle);
    background-image: linear-gradient(135deg, #1a1a1a, #2e2e2e);
    outline: 1px solid var(--border);
  }
}

/* ── Other boxes ────────────────────────────────────────────── */
html[data-theme="dark"] .visible-text-box {
  background-color: var(--bg-muted);
}

html[data-theme="dark"] .project-image {
  background-color: var(--bg-subtle);
}

html[data-theme="dark"] .background-gradient {
  background-image: linear-gradient(135deg, #1a1a1a, #2e2e2e);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .visible-text-box { background-color: var(--bg-muted); }
  html:not([data-theme="light"]) .project-image { background-color: var(--bg-subtle); }
  html:not([data-theme="light"]) .background-gradient { background-image: linear-gradient(135deg, #1a1a1a, #2e2e2e); }
}

/* ── Page load cover (Webflow animation) ────────────────────── */
html[data-theme="dark"] .page-load-cover {
  background-color: var(--bg);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .page-load-cover { background-color: var(--bg); }
}

/* ── Dark mode toggle button ────────────────────────────────── */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin-right: 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #525252;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 200ms ease, color 200ms ease;
}

.theme-toggle-btn:hover {
  background-color: #f0f0f0;
  color: #000;
}

html[data-theme="dark"] .theme-toggle-btn {
  color: #a0a0a0;
}

html[data-theme="dark"] .theme-toggle-btn:hover {
  background-color: #222222;
  color: #ebebeb;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle-btn { color: #a0a0a0; }
  html:not([data-theme="light"]) .theme-toggle-btn:hover { background-color: #222; color: #ebebeb; }
}

/* Show sun in dark mode, moon in light mode */
.theme-toggle-btn .sun-icon { display: none; }
.theme-toggle-btn .moon-icon { display: block; }

html[data-theme="dark"] .theme-toggle-btn .sun-icon { display: block; }
html[data-theme="dark"] .theme-toggle-btn .moon-icon { display: none; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle-btn .sun-icon { display: block; }
  html:not([data-theme="light"]) .theme-toggle-btn .moon-icon { display: none; }
}

/* ── Focus-visible styles (keyboard navigation) ─────────────── */
/* WCAG 2.1 SC 2.4.7 — Focus Visible                             */
/* WCAG 2.2 SC 2.4.11 — Focus Appearance (enhanced)             */

/* Light mode: dark ring on white */
:focus-visible {
  outline: 3px solid #4951f0;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Dark mode: bright ring on dark */
html[data-theme="dark"] :focus-visible {
  outline: 3px solid #7c84f5;
  outline-offset: 3px;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) :focus-visible {
    outline: 3px solid #7c84f5;
    outline-offset: 3px;
  }
}

/* Nav links get rounded focus ring matching their border-radius */
.nav-link:focus-visible,
.theme-toggle-btn:focus-visible {
  border-radius: 6px;
}

/* Work item cards: full-radius ring */
.work-item:focus-visible,
.work-link:focus-visible {
  border-radius: 16px;
}

/* Skip-to-content link */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background: #4951f0;
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: top 150ms ease;
}

.skip-to-content:focus {
  top: 16px;
}

html[data-theme="dark"] .skip-to-content {
  background: #7c84f5;
  color: #111;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .skip-to-content {
    background: #7c84f5;
    color: #111;
  }
}

/* ═══════════════════════════════════════════════════════════════
   LANGUAGE TOGGLE BUTTON
   ═══════════════════════════════════════════════════════════ */
.lang-toggle-btn {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 10px;
  margin-right: 4px;
  margin-left: 6px;              /* prevents nav-menu overlap on the left */
  border: 1.5px solid #d8d8d8;
  border-radius: 20px;          /* pill shape */
  background: transparent;
  cursor: pointer;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  line-height: 1;
  flex-shrink: 0;
  position: relative;            /* ensures border renders above nav-menu bg */
  z-index: 1;
  transition: background-color 200ms ease, border-color 200ms ease;
  white-space: nowrap;
  height: 32px;
}

.lang-toggle-btn:hover {
  background-color: #f4f4f4;
  border-color: #b0b0b0;
  color: #111;
}

.lang-opt-en,
.lang-opt-pt {
  opacity: 0.4;
  transition: opacity 150ms ease;
  letter-spacing: 0.02em;
}

.lang-opt-active {
  opacity: 1;
  font-weight: 700;
  color: #111;
}

.lang-divider {
  opacity: 0.2;
  font-size: 10px;
  margin: 0 2px;
}

/* Dark mode overrides */
html[data-theme="dark"] .lang-toggle-btn {
  border: 1.5px solid #555555;
  color: #999;
  background: transparent;
}

html[data-theme="dark"] .lang-toggle-btn:hover {
  background-color: #2a2a2a;
  border-color: #777;
  color: #e0e0e0;
}

html[data-theme="dark"] .lang-opt-active {
  color: #f2f2f2;
}

html[data-theme="dark"] .lang-divider {
  opacity: 0.3;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .lang-toggle-btn {
    border: 1.5px solid #555555;
    color: #999;
    background: transparent;
  }
  html:not([data-theme="light"]) .lang-toggle-btn:hover {
    background-color: #2a2a2a;
    border-color: #777;
    color: #e0e0e0;
  }
  html:not([data-theme="light"]) .lang-opt-active {
    color: #f2f2f2;
  }
  html:not([data-theme="light"]) .lang-divider {
    opacity: 0.3;
  }
}

/* ── About me CTA link ───────────────────────────────────────── */
.about-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: Inter, sans-serif;
  font-size: inherit;
  font-weight: 600;
  color: #111111;
  text-decoration: none;
  border-bottom: 2px solid #111111;
  padding-bottom: 2px;
  transition: opacity 200ms ease;
}

.about-cta:hover {
  opacity: 0.6;
}

html[data-theme="dark"] .about-cta {
  color: var(--text-1);
  border-bottom-color: var(--text-1);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .about-cta {
    color: var(--text-1);
    border-bottom-color: var(--text-1);
  }
}

/* ── Stat cards (Results / metrics section) ──────────────────── */
.stat-grid {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 0;
}

@media screen and (max-width: 991px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 479px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}

.stat-card {
  background: #ffffff;
  border: 1px solid #ebebeb;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow 200ms ease;
}

.stat-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.stat-card-label {
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin: 0;
}

.stat-card-number {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: Inter, sans-serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111;
  line-height: 1;
  margin: 4px 0;
}

.stat-card-arrow {
  color: #22c55e;
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.stat-card-desc {
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  margin: 0;
}

/* Dark mode stat cards */
html[data-theme="dark"] .stat-card {
  background: var(--bg-subtle);
  border-color: var(--border);
}
html[data-theme="dark"] .stat-card-label,
html[data-theme="dark"] .stat-card-number { color: var(--text-1); }
html[data-theme="dark"] .stat-card-desc   { color: var(--text-3); }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .stat-card {
    background: var(--bg-subtle);
    border-color: var(--border);
  }
  html:not([data-theme="light"]) .stat-card-label,
  html:not([data-theme="light"]) .stat-card-number { color: var(--text-1); }
  html:not([data-theme="light"]) .stat-card-desc   { color: var(--text-3); }
}

/* ── Rich-text container — base paragraph typography ─────────── */
/* Root cause: legacy pages use i18n.js with plain-text values    */
/* (no <p> wrapper). Text nodes inherit the div's font-size       */
/* instead of p { font-size: 20px } from style.css.              */
/* This rule makes the container itself carry paragraph-level     */
/* typography so both plain-text content and <p>-wrapped content  */
/* (fulfillment.html) render identically.                         */
.rich-text,
.w-richtext {
  font-size: 20px;
  color: #525252;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

@media screen and (max-width: 479px) {
  .rich-text,
  .w-richtext {
    font-size: 18px;
  }
}

html[data-theme="dark"] .rich-text,
html[data-theme="dark"] .w-richtext {
  color: var(--text-3);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .rich-text,
  html:not([data-theme="light"]) .w-richtext {
    color: var(--text-3);
  }
}

/* ── Rich-text inner heading scale ───────────────────────────── */
/* h2/h3/h4 inside body copy should be smaller than section headings */
.rich-text.w-richtext h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 32px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.rich-text.w-richtext h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 24px;
  margin-bottom: 6px;
  line-height: 1.3;
}

.rich-text.w-richtext h2.heading.regular {
  font-size: 20px;
}

html[data-theme="dark"] .rich-text.w-richtext h2,
html[data-theme="dark"] .rich-text.w-richtext h3 { color: var(--text-1); }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .rich-text.w-richtext h2,
  html:not([data-theme="light"]) .rich-text.w-richtext h3 { color: var(--text-1); }
}

/* ── Blockquote highlight block ──────────────────────────────── */
html[data-theme="dark"] blockquote {
  background-image: none;
  background-color: var(--bg-muted);
  color: var(--text-1);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) blockquote {
    background-image: none;
    background-color: var(--bg-muted);
    color: var(--text-1);
  }
}

/* ── Case study placeholder blocks ──────────────────────────── */
.placeholder-block {
  width: 100%;
  min-height: 280px;
  border: 2px dashed var(--border-strong);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 8px;
  box-sizing: border-box;
  background-color: var(--bg-subtle);
  text-align: center;
}
.placeholder-block-label {
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-4);
}
.placeholder-block-desc {
  font-family: Inter, sans-serif;
  font-size: 14px;
  color: var(--text-4);
  max-width: 420px;
}

/* ── Hero heading — slightly smaller so longer text wraps less ── */
#home .heading.large {
  font-size: 52px;
}

@media screen and (max-width: 991px) {
  #home .heading.large { font-size: 40px; }
}

@media screen and (max-width: 479px) {
  #home .heading.large { font-size: 32px; }
}

/* ── Nav: prevent container from clipping the lang-toggle pill ── */
.nav.w-nav,
.nav-container.w-container {
  overflow: visible;
}

/* ── Footer copyright ────────────────────────────────────────── */
.footer-copyright {
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: var(--text-4, #757575);
  margin: 0;
  padding-top: 16px;
}

html[data-theme="dark"] .footer-copyright {
  color: var(--text-4);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .footer-copyright {
    color: var(--text-4);
  }
}

/* ── Case study microcopy elements ───────────────────────────── */

/* Hero subtitle — below H1 in left column */
.case-hero-subtitle {
  font-family: Inter, sans-serif;
  font-size: 15px;
  color: var(--text-3);
  line-height: 1.55;
  margin: 12px 0 0;
  font-style: italic;
}

/* Transition caption between sections */
.case-caption {
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-4);
  font-style: italic;
  text-align: left;
  margin: 0;
  padding: 0;
  max-width: none;
}

/* List item font consistency — match paragraph size/color */
.w-richtext li {
  font-size: 20px;
  color: #525252;
  letter-spacing: -0.01em;
}
@media screen and (max-width: 767px) {
  .w-richtext li { font-size: 18px; }
}
html[data-theme="dark"] .w-richtext li {
  color: var(--text-3);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .w-richtext li { color: var(--text-3); }
}

/* Caption section — compressed vertical padding */
.section.case-caption-section .container {
  padding-top: 32px;
  padding-bottom: 32px;
}

@media screen and (max-width: 991px) {
  .section.case-caption-section .container {
    padding-top: 24px;
    padding-bottom: 24px;
  }
}

@media screen and (max-width: 479px) {
  .section.case-caption-section .container {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

/* Section sub-heading (below H2) */
.case-subheading {
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 6px 0 0;
  padding: 0;
}

/* Pull quote */
.pull-quote {
  border-left: 3px solid var(--text-1);
  padding: 10px 20px;
  margin: 28px 0;
  font-family: Inter, sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text-1);
  font-style: normal;
  background: transparent;
  background-image: none;
}

html[data-theme="dark"] .pull-quote {
  border-left-color: var(--text-1);
  color: var(--text-1);
  background: transparent;
  background-image: none;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .pull-quote {
    border-left-color: var(--text-1);
    color: var(--text-1);
    background: transparent;
    background-image: none;
  }
}

/* Screen legend group below placeholder blocks */
.screen-legend-group {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.screen-legend {
  border-left: 2px solid var(--border-strong);
  padding-left: 16px;
}

.screen-legend-label {
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-4);
  margin: 0 0 4px;
}

.screen-legend-text {
  font-family: Inter, sans-serif;
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.55;
  margin: 0;
}

/* ── Case study page title — restore to full h1 size ────────── */
/* style.css .heading.extra-large sets 80px, but base h1 is 96px */
/* This override brings case study titles up to the intended size  */
.heading.extra-large {
  font-size: 96px;
}

@media screen and (max-width: 991px) {
  .heading.extra-large { font-size: 64px; }
}

@media screen and (max-width: 767px) {
  .heading.extra-large { font-size: 52px; }
}

@media screen and (max-width: 479px) {
  .heading.extra-large { font-size: 42px; }
}

/* ── Work card tag pills ─────────────────────────────────────── */
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.work-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.06);
  color: #525252;
  white-space: nowrap;
}

html[data-theme="dark"] .work-tag {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-3);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .work-tag {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-3);
  }
}

/* ── Card Sorting Hierarchy Chart — profile.html ───────────── */
.cs-chart {
  width: 100%;
  padding: 8px 0 0;
}
.cs-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.cs-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cs-star {
  display: block;
  color: #F5C000;
  line-height: 1;
  margin-bottom: 6px;
}
.cs-star-sm { font-size: 22px; }
.cs-star-md { font-size: 30px; }
.cs-star-lg { font-size: 40px; }
.cs-bar {
  width: 100%;
  background-color: #2B9FDE;
  border-radius: 3px 3px 0 0;
}
.cs-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-1, #1a1a1a);
  text-align: center;
  margin-top: 10px;
  margin-bottom: 2px;
  line-height: 1.3;
}
.cs-votes {
  font-size: 11px;
  color: var(--text-3, #888);
  text-align: center;
  margin: 0;
}

html[data-theme="dark"] .cs-bar { background-color: #3aaee8; }
html[data-theme="dark"] .cs-label { color: var(--text-1); }
html[data-theme="dark"] .cs-votes { color: var(--text-3); }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .cs-bar { background-color: #3aaee8; }
}

@media (max-width: 479px) {
  .cs-bars { gap: 6px; }
  .cs-label { font-size: 10px; }
  .cs-votes { font-size: 10px; }
  .cs-star-sm { font-size: 18px; }
  .cs-star-md { font-size: 24px; }
  .cs-star-lg { font-size: 32px; }
}

/* ── Key Design Challenges — compact block spacing ─────────── */
.challenge-sub .container {
  padding-top: 40px;
  padding-bottom: 40px;
}
.challenge-sub .container.no-vertical-padding {
  padding-top: 0;
  padding-bottom: 0;
}

/* ── Work grid — mobile: coluna única ───────────────────── */
@media screen and (max-width: 991px) {
  .work-grid {
    flex-direction: column;
    gap: 0;
  }

  .work-col-left,
  .work-col-right {
    flex: none;
    width: 100%;
  }

  .work-col-left {
    margin-bottom: 32px;
  }
}
