/* ══════════════════════════════════════════════════════════════
   GREAT EAGLE DESIGNS — Homepage styles
   Tokens · Hero · Work · Logos · Craft · Testimonials · Contact (nav, footer and palette live in nav.css)
   ══════════════════════════════════════════════════════════════ */

/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  --bg:            #F6F4EF;
  --bg-secondary:  #EFEDE8;
  --bg-card:       #FFFFFF;
  --text-primary:  #14130F;
  --text-secondary:#4A4845;
  --text-tertiary: #6B6862;
  --border:        rgba(20,19,15,0.10);
  --accent:        #FF5A1F;
  --accent-hover:  #E04A10;
  --accent-dim:    rgba(255,90,31,0.10);
  --accent-text: #C23A0B; --btn-bg: #C23A0B; --btn-bg-hover: #A83009; --btn-fg: #FFFFFF;
  --shadow-card:   0 1px 3px rgba(20,19,15,0.08);
  --shadow-hover:  0 8px 24px rgba(20,19,15,0.12);
  --radius:        12px;
}

[data-theme="dark"] {
  --bg:            #0E0E0C;
  --bg-secondary:  #161614;
  --bg-card:       #1C1C1A;
  --text-primary:  #F2F0EA;
  --text-secondary:#A09D97;
  --text-tertiary: #8C8984;
  --border:        rgba(242,240,234,0.08);
  --accent:        #FF6B35;
  --accent-hover:  #FF5A1F;
  --accent-dim:    rgba(255,107,53,0.12);
  --accent-text: #FF7A4A; --btn-bg: #FF6B35; --btn-bg-hover: #FF8355; --btn-fg: #14130F;
  --shadow-card:   0 1px 3px rgba(0,0,0,0.3);
  --shadow-hover:  0 8px 24px rgba(0,0,0,0.4);
}

/* ─── Reset body::before ambient gradient from site.css ─── */
body::before { background: none !important; }

/* ─── Font stack override ────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
}

/* site.css caps every <section>; the homepage manages its own 1200px container. */
main > section { max-width: none; width: 100%; margin-left: 0; margin-right: 0; }

/* ─── Shared section styles ─────────────────────────────────── */
.section        { padding: 96px 24px; }
.section-sm     { padding: 48px 24px; }
.section-inner  { max-width: 1200px; margin: 0 auto; position: relative; }
.section-header { margin-bottom: 48px; }
.section-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}

/* ─── Reveal animations ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ─── Blueprint grid background (hero + contact) ────────────── */
/* Same 8px grid and the same grid colour tokens as the case studies (sketchbook.css), in both themes. */
:root { --sb-grid-size: 8px; --sb-grid: rgba(26, 26, 26, 0.028); }
[data-theme="dark"] { --sb-grid: rgba(255, 255, 255, 0.05); }
.blueprint-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--sb-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--sb-grid) 1px, transparent 1px);
  background-size: var(--sb-grid-size) var(--sb-grid-size);
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-text); }

.btn-lg { padding: 14px 28px; font-size: 16px; }


/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */

.hero-section {
  position: relative;
  padding: 120px 24px 80px;
  overflow: hidden;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
  flex-shrink: 0;
}

.hero-h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text-primary);
  margin-bottom: 24px;
}
.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 40px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.proof-row {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.proof-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.proof-num {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.proof-label {
  font-size: 13px;
  color: var(--text-secondary);
}

@media (max-width: 600px) {
  .proof-row { flex-direction: column; gap: 24px; }
  .hero-h1 { font-size: 2.5rem; }
  .section { padding: 64px 20px; }
  .section-sm { padding: 36px 20px; }
  .hero-section { padding: 96px 20px 60px; }
  .section-contact { padding: 80px 20px; }
}


/* ═══════════════════════════════════════════════════════════════
   WORK CARDS (shared by featured + more)
   ═══════════════════════════════════════════════════════════════ */

.work-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, box-shadow 0.25s;
  color: inherit;
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.work-card-media {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-secondary);
}
.work-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.work-card:hover .work-card-media img { transform: scale(1.03); }

.work-card-overlay {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(20,19,15,0.82);
  color: #fff;
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  pointer-events: none;
}
.work-card:hover .work-card-overlay {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.work-card-body { padding: 20px; }
.work-card-meta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.work-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.work-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}
.work-card-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.work-card-chip {
  /* Sketchbook "reading": mono, ruled, no pill, no emoji */
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 2px;
  /* Highlighted in the primary red-orange family (AA text on the tint) */
  background: rgba(255, 42, 0, 0.08);
  color: #A82A00;
  border: 1px solid rgba(194, 32, 0, 0.35);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .work-card-chip { background: rgba(255, 90, 60, 0.12); color: #FF8A66; border-color: rgba(255, 106, 71, 0.45); }

/* Status chip in the chip row, same colours as the case-study title blocks */
.work-card-status {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  padding: 2px 8px; border: 1.5px solid #C22000; color: #C22000;
  border-radius: 2px;
  background: transparent;
}
.work-card-status.is-live { color: #1E7A3C; border-color: #1E7A3C; }
.work-card-status.is-live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.work-card-status.is-concept { color: #8A6100; border-color: #B8860B; background: rgba(254, 249, 225, 0.95); }
[data-theme="dark"] .work-card-status { color: #FF5A3C; border-color: #FF5A3C; }
[data-theme="dark"] .work-card-status.is-live { color: #4ADE80; border-color: #4ADE80; }
[data-theme="dark"] .work-card-status.is-concept { color: #FACC15; border-color: #FACC15; background: rgba(250, 204, 21, 0.10); }


/* ═══════════════════════════════════════════════════════════════
   FEATURED WORK
   ═══════════════════════════════════════════════════════════════ */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: stretch;
}
/* Featured cards get a taller image */
/* All thumbnails are 16:10 (960x600), so 16:10 shows the whole image with no crop or stretch. */
#featuredGrid .work-card-media { aspect-ratio: 16/10; }
.work-card-media { aspect-ratio: 16/10; }
.work-card-media img { object-fit: cover; object-position: center; }

/* Equal-size cards: every card in a row has the same height, and the
   text area grows instead of the image, so content never gets cut. */
.featured-grid > *, .more-grid > * { height: 100%; }
.work-card { display: flex; flex-direction: column; height: 100%; }
.work-card-media { flex: 0 0 auto; }
.work-card-body { flex: 1 1 auto; display: flex; flex-direction: column; }
.work-card-body .work-card-link { margin-top: auto; padding-top: 12px; }
.work-card-title, .work-card-desc { overflow: visible; -webkit-line-clamp: unset; }

@media (max-width: 767px) { .featured-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .featured-grid { gap: 16px; } }


/* ═══════════════════════════════════════════════════════════════
   LOGO STRIP
   ═══════════════════════════════════════════════════════════════ */

.logos-section { background: var(--bg-secondary); }

.logos-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-align: center;
  margin-bottom: 28px;
}
.logos-grid {
  display: flex;
  flex-wrap: wrap;
  max-width: 940px;
  margin: 0 auto;
  gap: 32px 48px;
  align-items: center;
  justify-content: center;
}
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.logo-item {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: url(#logoSolidLight);
  opacity: 0.6;
  transition: opacity 0.2s, background-color 0.2s;
  box-sizing: border-box;
}
[data-theme="dark"] .logo-item { filter: url(#logoSolidDark); opacity: 0.7; }
/* Hover / focus: original colours (on a light chip in dark mode so every mark reads) */
.logo-item.logo-plain { filter: grayscale(1); opacity: 0.7; }
[data-theme="dark"] .logo-item.logo-plain { filter: grayscale(1) invert(1); opacity: 0.75; }
.logo-item:hover, .logo-item:focus-visible { filter: none; opacity: 1; }
[data-theme="dark"] .logo-item:hover, [data-theme="dark"] .logo-item:focus-visible { background: #F6F4EF; border-radius: 8px; padding: 6px 12px; height: 48px; filter: none; }


/* ═══════════════════════════════════════════════════════════════
   MORE WORK (filterable)
   ═══════════════════════════════════════════════════════════════ */

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.filter-btn {
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-color: var(--btn-bg);
}
.filter-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
/* More-work cards are slightly smaller — override title size */
#moreWorkGrid .work-card-title { font-size: 1rem; }

@media (max-width: 1000px) { .more-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* Cards injected by JS — simple stagger-in animation */
.work-card-anim {
  animation: cardIn 0.4s ease both;
}
.work-card-anim:nth-child(2) { animation-delay: 0.06s; }
.work-card-anim:nth-child(3) { animation-delay: 0.12s; }
.work-card-anim:nth-child(4) { animation-delay: 0.18s; }
.work-card-anim:nth-child(5) { animation-delay: 0.1s; }
.work-card-anim:nth-child(6) { animation-delay: 0.15s; }
.work-card-anim:nth-child(7) { animation-delay: 0.2s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .work-card-anim { animation: none; }
}

/* Staggered scroll reveal for project cards (set up in home.js observeCard) */
.work-card-rv {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--rv-delay, 0ms),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--rv-delay, 0ms);
}
.work-card-rv.is-in { opacity: 1; transform: none; }
.work-card-rv.is-in:hover { transition-delay: 0ms; }
@media (prefers-reduced-motion: reduce) {
  .work-card-rv { opacity: 1; transform: none; transition: none; }
}
@media print { .work-card-rv { opacity: 1 !important; transform: none !important; } }

/* Hidden cards during filter */
.work-card[hidden] { display: none; }


/* ═══════════════════════════════════════════════════════════════
   BUILT & SHIPPED
   ═══════════════════════════════════════════════════════════════ */

.built-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.built-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
.built-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

/* Built cards: tag left, status badge far right on the first line */
.built-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.built-card-top .built-card-tag { align-self: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.built-card-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 100px;
  align-self: flex-start;
}
.built-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.built-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
  margin: 0;
}
.built-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-text);
}

@media (max-width: 767px) { .built-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .built-grid { grid-template-columns: 1fr; } }


/* ═══════════════════════════════════════════════════════════════
   WHAT I DO & HOW I WORK
   ═══════════════════════════════════════════════════════════════ */

.craft-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.craft-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}
.craft-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
}
.craft-list li {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: baseline;
  gap: 4px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.craft-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}
.craft-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.craft-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  grid-column: 2;
}
.craft-quote {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-secondary);
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin-top: 32px;
}

.craft-process {
  list-style: none;
  padding: 0;
  margin: 0;
}
.process-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.process-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent-dim);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.process-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.process-body strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.process-body span {
  font-size: 13px;
  color: var(--text-tertiary);
}

@media (max-width: 767px) { .craft-grid { grid-template-columns: 1fr; gap: 48px; } }


/* ═══════════════════════════════════════════════════════════════
   TESTIMONIALS
   ═══════════════════════════════════════════════════════════════ */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.tstm {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 0;
}
.tstm blockquote {
  margin: 0 0 16px;
}
.tstm blockquote p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  font-style: italic;
  margin: 0;
}
.tstm blockquote p::before {
  content: '\201C';
  font-size: 3rem;
  color: var(--accent-text);
  line-height: 0;
  vertical-align: -0.4em;
  margin-right: 4px;
}
.tstm figcaption {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
}
.tstm-footer {
  margin-top: 32px;
  text-align: center;
}

@media (max-width: 767px) { .testimonials-grid { grid-template-columns: 1fr; } }


/* ═══════════════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════════════ */

.section-contact {
  text-align: center;
  padding: 120px 24px;
  position: relative;
  overflow: hidden;
}
.contact-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}
.contact-title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--text-primary);
  line-height: 1.1;
}
.contact-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
}
.contact-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Fixes from visual review ──────────────────────────────── */
.hero-h1, .section-title, .contact-title { text-wrap: balance; }
.hero-section .btn, .section-contact .btn { box-shadow: none; }
.hero-section .btn-primary:hover, .section-contact .btn-primary:hover { box-shadow: 0 4px 12px rgba(20,19,15,0.18); }
/* Blueprint grid fades out at the edges so it never shows a hard border */
.blueprint-grid {
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 40%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 90% at 50% 40%, #000 35%, transparent 100%);
}

/* ─── Body copy sizes (17-18px) ─────────────────────────────── */
.work-card-desc { font-size: 16px; }
.built-card p { font-size: 16px; }
.tstm blockquote p { font-size: 17px; }
.contact-sub { font-size: 1.125rem; }
.craft-name, .process-body strong { font-size: 17px; }
.craft-sub, .process-body span { font-size: 14px; }
.craft-quote { font-size: 1.15rem; }

/* ─── Featured cards: role line + visible link ──────────────── */
.work-card-role { margin-top: 14px; font-size: 14px; color: var(--text-secondary); }
.work-card-role span { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); margin-right: 6px; }
.work-card-link { display: inline-block; margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--accent-text); transition: transform 0.2s; }
.work-card:hover .work-card-link { transform: translateX(4px); }
#featuredGrid .work-card-overlay { display: none; }
@media (prefers-reduced-motion: reduce) { .work-card:hover .work-card-link { transform: none; } }


/* Card top line: category left, status badge far right */
.work-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.work-card-cat { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-card-status { flex-shrink: 0; white-space: nowrap; text-transform: uppercase; line-height: 1.4; }


/* More work on phones: two compact cards per row */
@media (max-width: 600px) {
  #moreWorkGrid .work-card-body { padding: 12px 12px 14px !important; gap: 6px; }
  #moreWorkGrid .work-card-title { font-size: 0.95rem; line-height: 1.25; }
  #moreWorkGrid .work-card-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.4; }
  #moreWorkGrid .work-card-meta { flex-wrap: wrap; row-gap: 4px; font-size: 10.5px; }
  #moreWorkGrid .work-card-cat { white-space: normal; }
  #moreWorkGrid .work-card-status { font-size: 10px; padding: 1px 6px; }
  #moreWorkGrid .work-card-chips { display: none; }
  #moreWorkGrid .work-card-media { aspect-ratio: 4 / 3; }
}


/* GIF cross-fade on phones (home.js fadeGif) */
.work-card-media { position: relative; }
.work-card-gif { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; pointer-events: none; }
.work-card-gif.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .work-card-gif { display: none; } }

/* More work on phones: one column of wide mini cards (image left, text right) */
@media (max-width: 600px) {
  #moreWorkGrid.more-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  #moreWorkGrid .work-card { display: grid !important; grid-template-columns: 38% minmax(0, 1fr); align-items: stretch; min-height: 0; }
  #moreWorkGrid .work-card-media { aspect-ratio: auto !important; height: 100%; min-height: 112px; }
  #moreWorkGrid .work-card-media img { height: 100%; object-fit: cover; }
  #moreWorkGrid .work-card-overlay { display: none; }
  #moreWorkGrid .work-card-body { padding: 10px 12px !important; gap: 4px !important; display: flex; flex-direction: column; justify-content: center; }
  #moreWorkGrid .work-card-meta { order: 0; flex-wrap: nowrap !important; font-size: 10.5px !important; gap: 6px; }
  #moreWorkGrid .work-card-cat { white-space: nowrap !important; }
  #moreWorkGrid .work-card-title { order: 1; font-size: 15px !important; line-height: 1.25; margin: 0; }
  #moreWorkGrid .work-card-desc { order: 2; -webkit-line-clamp: 2 !important; font-size: 12.5px !important; margin: 0; }
  #moreWorkGrid .work-card-chips { display: none !important; }
}


/* Filter must win over the mini-card layout (which sets display: grid !important) */
#moreWorkGrid .work-card[hidden], .work-card[hidden] { display: none !important; }


/* ═══ Phones in dark mode: pure black background for OLED screens (pixels switch off).
   Cards and the header stay a touch lighter so their edges still read. ═══ */
@media (max-width: 600px) {
  [data-theme="dark"] { --bg: #000000; --bg-secondary: #0B0B0A; --bg-card: #121211; --sb-grid: rgba(255, 255, 255, 0.035); }
  [data-theme="dark"] body, [data-theme="dark"] .hero, [data-theme="dark"] .section { background-color: #000000; }
  [data-theme="dark"] .site-header { background: rgba(10, 10, 9, 0.92) !important; }
}
