/*
Theme Name: MM Racing Build Journal
Theme URI: https://mmracing.co.uk
Author: MM Revival Co.
Author URI: https://mmracing.co.uk
Description: A motorsport-inspired dark dashboard theme for MM Racing / MM Revival Co. build journal.
Version: 1.4.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mm-racing
Tags: dark, one-page, motorsport, portfolio
*/

/* ============================================================
   MM RACING — BUILD JOURNAL
   motorsport dashboard aesthetic
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:         #0d0d0e;
  --bg-2:       #111214;
  --bg-3:       #18191c;
  --panel:      #141517;
  --panel-2:    #1c1d20;
  --border:     rgba(255,255,255,0.08);
  --border-2:   rgba(255,255,255,0.14);

  --text:       #f0f0f0;
  --text-2:     #a0a3a8;
  --text-3:     #5c5f66;

  --red:        #eefa14;
  --red-dim:    rgba(238,250,20,0.15);
  --orange:     #ff6600;
  --orange-dim: rgba(255,102,0,0.15);
  --green:      #00c853;
  --green-dim:  rgba(0,200,83,0.12);

  --font-head:  'Barlow Condensed', 'Inter', sans-serif;
  --font-body:  'Inter', sans-serif;
  --font-mono:  'JetBrains Mono', monospace;

  --radius:     4px;
  --radius-md:  6px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.desktop-only {
  display: none;
}

@media (min-width: 900px) {
  .desktop-only { display: inline; }
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13,13,14,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(13,13,14,0.98);
  box-shadow: 0 1px 0 var(--border-2);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex-shrink: 0;
}

.nav__brand-mark {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--red);
  line-height: 1;
}

.nav__brand-name {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.nav__brand-sub {
  font-size: 9px;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  line-height: 1;
}

.nav__links {
  display: none;
  gap: 4px;
  margin-left: auto;
  list-style: none;
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
}

/* wp_nav_menu wraps items in <li> — strip list defaults */
.nav__links > li {
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 768px) {
  .nav__links { display: flex; }
}

.nav__link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav__link:hover {
  color: var(--text);
  background: var(--panel-2);
}

.nav__link--cta {
  background: var(--red);
  color: #000 !important;
  font-weight: 400;
  padding: 6px 14px;
  border-radius: var(--radius);
}

.nav__link--cta:hover {
  background: #fff;
  color: #000 !important;
}

/* Hide the CTA button on mobile — the hamburger flyout includes a copy */
.nav__cta {
  display: none;
}
@media (min-width: 768px) {
  .nav__cta { display: inline-flex; align-items: center; }
}

/* ─── NAV DROPDOWN ─────────────────────────────────────────── */

/* Parent items need relative positioning for the panel */
.nav__links > li {
  position: relative;
}

/* Dropdown arrow indicator (WP adds .menu-item-has-children automatically) */
.nav__links > li.menu-item-has-children > a.nav__link::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 5px;
  vertical-align: middle;
  opacity: 0.5;
  transition: transform var(--transition);
}

.nav__links > li.dropdown--open > a.nav__link::after {
  transform: rotate(180deg);
  opacity: 1;
}

/* Dropdown panel */
.nav__links .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  list-style: none;
  margin: 0;
  z-index: 300;
  flex-direction: column;
  gap: 2px;
}

.nav__links > li:hover > .sub-menu,
.nav__links > li.dropdown--open > .sub-menu {
  display: flex;
}

.nav__links .sub-menu li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav__links .sub-menu a {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: calc(var(--radius) - 2px);
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}

.nav__links .sub-menu a:hover {
  color: var(--text);
  background: var(--panel-2);
}

/* Mobile flyout: sub-items shown indented below parent */
.mobile-menu a.mobile-sub-item {
  padding-left: 28px;
  font-size: 10px;
  opacity: 0.65;
  border-bottom-style: dashed;
}

.nav__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
  cursor: pointer;
}

@media (min-width: 768px) {
  .nav__hamburger { display: none; }
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-2);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.nav__hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 16px 24px 24px;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}

.mobile-menu a:hover { color: var(--text); }

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

@media (max-width: 600px) {
  .hero { padding: 100px 0 60px; }
}

/* Inner container keeps content boxed, stacking vertically like the hero flex did */
.hero > .container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Category page hero: self-contained, boxed, immune to Customizer style injection */
.hero.hero--cat {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.hero.hero--cat .hero__inner {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
}

.hero__bg-grid {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

/* Focus panel */
.focus-panel {
  display: inline-flex;
  flex-direction: column;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-top: 40px;
  margin-bottom: 0;
  max-width: 100%;
}

@media (min-width: 900px) {
  .focus-panel {
    flex-direction: row;
    align-items: center;
    gap: 0;
  }
}

.focus-panel__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-right: 20px;
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .focus-panel__label {
    border-right: 1px solid var(--border);
    margin-right: 20px;
  }
}

.focus-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.focus-panel__grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 900px) {
  .focus-panel__grid {
    flex-direction: row;
    align-items: center;
    gap: 0;
  }
}

.focus-panel__item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

@media (min-width: 900px) {
  .focus-panel__item {
    padding: 0 20px;
  }
}

.focus-panel__divider {
  display: none;
}

@media (min-width: 900px) {
  .focus-panel__divider {
    display: block;
    width: 1px;
    height: 32px;
    background: var(--border);
    flex-shrink: 0;
  }
}

.focus-panel__key {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.focus-panel__val {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.status-in-progress {
  color: var(--orange);
}

/* Hero content */
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}

.hero__title {
  font-family: var(--font-head);
  font-size: clamp(52px, 10vw, 120px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 24px;
}

.hero__title-accent {
  color: var(--red);
}

.hero__sub {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero stats bar */
.hero__stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
  flex-wrap: wrap;
  gap: 24px;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero__stat-num {
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.hero__stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.hero__stat-sep {
  width: 1px;
  height: 40px;
  background: var(--border);
  display: none;
}

@media (min-width: 600px) {
  .hero__stat-sep { display: block; }
  .hero__stats { gap: 0; }
  .hero__stat { padding: 0 40px; }
  .hero__stat:first-child { padding-left: 0; }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--red);
  color: #000;
  border: 1px solid var(--red);
}

.btn--primary:hover {
  background: transparent;
  color: var(--red);
}

.btn--red {
  background: #e8192c;
  color: #fff;
  border: 1px solid #e8192c;
}

.btn--red:hover {
  background: transparent;
  color: #e8192c;
}

.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-2);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--border-2);
  background: var(--panel);
}

.btn--outline {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-2);
}

.btn--outline:hover {
  color: var(--text);
  border-color: var(--text-3);
  background: var(--panel-2);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 10px;
}

/* ============================================================
   SECTION COMMON
   ============================================================ */

.section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.section__header {
  margin-bottom: 56px;
}

.section__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 12px;
}

.section__desc {
  font-size: 14px;
  color: var(--text-2);
  max-width: 500px;
  line-height: 1.7;
}

/* ============================================================
   BADGES & CHIPS
   ============================================================ */

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge--progress {
  background: var(--orange-dim);
  color: var(--orange);
  border: 1px solid rgba(255,102,0,0.3);
}

.badge--planned {
  background: rgba(255,255,255,0.04);
  color: var(--text-3);
  border: 1px solid var(--border);
}

.badge--complete {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(0,200,83,0.25);
}

.badge--track {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(238,250,20,0.25);
}

.badge--restoration {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(0,200,83,0.25);
}

.badge--fabrication {
  background: rgba(138,90,255,0.12);
  color: #8a5aff;
  border: 1px solid rgba(138,90,255,0.25);
}

.badge--ongoing {
  background: rgba(0,180,255,0.1);
  color: #29b6f6;
  border: 1px solid rgba(0,180,255,0.25);
}

.badge--articles {
  background: rgba(245,158,11,0.1);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.25);
}

.badge--upgrade {
  background: rgba(255,255,255,0.04);
  color: var(--text-3);
  border: 1px solid var(--border);
}

.meta-chip {
  display: inline-block;
  padding: 4px 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ============================================================
   BUILD CARDS
   ============================================================ */

.builds__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .builds__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .builds__grid { grid-template-columns: repeat(3, 1fr); }
}

.build-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition);
}

.build-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.build-card--featured {
  border-color: rgba(238,250,20,0.2);
}

.build-card--featured:hover {
  border-color: rgba(238,250,20,0.4);
}

.build-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}

.build-card__badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.build-card__year {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.05em;
}

.build-card__img-wrap {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.build-card__img {
  height: 180px;
  background: var(--bg-3);
  transition: transform 0.4s ease;
}

.build-card:hover .build-card__img {
  transform: scale(1.03);
}

.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--bg-3);
  background-image:
    linear-gradient(135deg,
      rgba(255,255,255,0.015) 25%,
      transparent 25%,
      transparent 50%,
      rgba(255,255,255,0.015) 50%,
      rgba(255,255,255,0.015) 75%,
      transparent 75%,
      transparent
    );
  background-size: 20px 20px;
}

.placeholder-img::after {
  content: attr(data-label);
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 2px;
  background: var(--panel);
}

.build-card__body {
  padding: 20px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.build-card__title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.1;
}

.build-card__desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  flex: 1;
}

.build-card__meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.build-card__footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ============================================================
   BUILD LOG / TIMELINE
   ============================================================ */

.log__timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.log-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.log-entry:last-child {
  border-bottom: none;
}

@media (min-width: 700px) {
  .log-entry {
    grid-template-columns: 90px 1fr;
    gap: 32px;
  }
}

.log-entry__side {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

@media (min-width: 700px) {
  .log-entry__side {
    flex-direction: column;
    align-items: center;
  }
}

.log-entry__date {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  flex-shrink: 0;
}

@media (min-width: 700px) {
  .log-entry__date {
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
  }
}

.log-entry__day {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.log-entry__month {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

.log-entry__year {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-3);
}

.log-entry__line {
  display: none;
}

@media (min-width: 700px) {
  .log-entry__line {
    display: block;
    width: 1px;
    flex: 1;
    background: var(--border);
    min-height: 40px;
  }
}

.log-entry__card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition);
}

@media (min-width: 600px) {
  .log-entry__card {
    flex-direction: row;
  }
}

.log-entry__card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
}

/* Featured image — left column on desktop, top on mobile */
.log-entry__img {
  display: block;
  position: relative;
  height: 200px;
  flex-shrink: 0;
  background: var(--bg-3);
  background-size: cover;
  background-position: center;
  text-decoration: none;
  overflow: hidden;
}

@media (min-width: 600px) {
  .log-entry__img {
    width: 220px;
    height: auto;
    min-height: 160px;
  }
}

.log-entry__img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,13,14,0);
  transition: background var(--transition);
}

.log-entry__card:hover .log-entry__img-overlay {
  background: rgba(13,13,14,0.25);
}

/* Vertical separator between image and body on desktop */
@media (min-width: 600px) {
  .log-entry__img {
    border-right: 1px solid var(--border);
  }
}

/* Padded content area */
.log-entry__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.log-entry__badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.log-entry__title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.2;
}

.log-entry__summary {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  flex: 1;
}

/* Footer row: read time + CTA */
.log-entry__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.log-entry__readtime {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.log-entry__cta {
  flex-shrink: 0;
}

/* ============================================================
   GALLERY
   ============================================================ */

.gallery__strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  margin-top: 40px;
}

@media (min-width: 768px) {
  .gallery__strip {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
  }
}

@media (min-width: 1000px) {
  .gallery__strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery__item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-3);
  cursor: pointer;
}

@media (min-width: 768px) {
  .gallery__item { aspect-ratio: auto; }
  .gallery__item--tall { grid-row: span 2; }
}

.gallery__placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-3);
  background-image:
    linear-gradient(135deg,
      rgba(255,255,255,0.018) 25%,
      transparent 25%,
      transparent 50%,
      rgba(255,255,255,0.018) 50%,
      rgba(255,255,255,0.018) 75%,
      transparent 75%,
      transparent
    );
  background-size: 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease;
}

.gallery__item:hover .gallery__placeholder {
  transform: scale(1.05);
}

.gallery__placeholder::after {
  content: attr(data-label);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.gallery__real-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery__item:hover .gallery__real-img {
  transform: scale(1.05);
}

.about__text-wrap p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about__text-wrap h2,
.about__text-wrap h3 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
  margin-top: 24px;
}

.about__text-wrap ul,
.about__text-wrap ol {
  padding-left: 20px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about__text-wrap a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   HERO BACKGROUND IMAGE
   ============================================================ */

/* Hero background image — absolute so it's clipped to the hero only,
   but uses 100vw so it fills the full viewport even within a max-width container */
.hero__bg-image {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  z-index: -2;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* Dark overlay + fade to background colour at the bottom */
.hero__bg-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, var(--hero-overlay, 0.45)) 0%,
    rgba(0, 0, 0, 0.60)                       55%,
    rgba(10, 10, 10, 1)                        100%
  );
}

/* ============================================================
   BUILD CATEGORY PAGE — cinematic hero + editorial layout
   ============================================================ */

/* ── Hero ── */
.cat-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
}

.cat-hero__bg {
  position: absolute;
  inset: 0;
  background-color: var(--bg-3);
  background-size: cover;
  background-position: center top;
}

/* subtle grid pattern when no image */
.cat-hero__bg:not([style*="background-image"]) {
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 40px 40px;
}

.cat-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13,13,14,1)   0%,
    rgba(13,13,14,0.82) 35%,
    rgba(13,13,14,0.35) 70%,
    rgba(13,13,14,0.1)  100%
  );
}

.cat-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  align-items: stretch;
}

.cat-hero__container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 100px;
  padding-bottom: 52px;
  width: 100%;
}

.cat-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  align-self: flex-start;
  transition: color var(--transition);
}

.cat-hero__back:hover { color: #fff; }

.cat-hero__bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cat-hero__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-hero__title {
  font-family: var(--font-head);
  font-size: clamp(48px, 9vw, 100px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.95;
  color: #fff;
  margin: 0;
}

.cat-hero__statsbar {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.cat-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cat-hero__stat-key {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
}

.cat-hero__stat-val {
  font-family: var(--font-mono);
  font-size: 15px;
  color: rgba(255,255,255,0.85);
}

.cat-hero__stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}

/* ── Content section ── */
.cat-content {
  padding: 0 0 72px;
}

.cat-content__accent {
  height: 3px;
  background: var(--red);
  width: 100%;
}

.cat-content__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-top: 52px;
}

@media (min-width: 900px) {
  .cat-content__grid {
    grid-template-columns: 1fr 280px;
    gap: 60px;
  }
}

/* Main description */
.cat-content__desc {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.9;
}

.cat-content__desc p { margin-bottom: 20px; }
.cat-content__desc p:last-child { margin-bottom: 0; }

.cat-content__desc h2,
.cat-content__desc h3,
.cat-content__desc h4 {
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-top: 36px;
  margin-bottom: 12px;
  line-height: 1.1;
}

.cat-content__desc h2 { font-size: clamp(20px, 2.5vw, 28px); }
.cat-content__desc h3 { font-size: 20px; }
.cat-content__desc h4 { font-size: 14px; letter-spacing: 0.1em; }

.cat-content__desc strong,
.cat-content__desc b { color: var(--text); font-weight: 600; }

.cat-content__desc em,
.cat-content__desc i { font-style: italic; }

.cat-content__desc ul,
.cat-content__desc ol { padding-left: 22px; margin-bottom: 20px; }
.cat-content__desc ul { list-style: disc; }
.cat-content__desc ol { list-style: decimal; }
.cat-content__desc li { margin-bottom: 6px; }

.cat-content__desc a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cat-content__desc a:hover { color: var(--text); }

.cat-content__desc blockquote {
  border-left: 3px solid var(--red);
  padding: 14px 22px;
  margin: 28px 0;
  background: var(--panel);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-2);
}

.cat-content__desc code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px 7px;
  color: var(--red);
}

.cat-content__desc pre {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  overflow-x: auto;
  margin-bottom: 20px;
  color: var(--text-2);
}

.cat-content__desc img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: 20px 0;
  display: block;
}

.cat-content__desc hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* Sidebar */
.cat-content__sidebar-inner {
  position: sticky;
  top: 88px;
}

.cat-content__sidebar-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.cat-content__facts {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cat-content__fact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.cat-content__fact:last-child { border-bottom: none; }

.cat-content__fact-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

.cat-content__fact-val {
  font-size: 13px;
  color: var(--text);
  text-align: right;
}

.cat-content__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Log section top spacing */
.cat-log { border-top: 1px solid var(--border); }

/* ── Page template ── */

/* Slightly shorter hero on pages vs category */
.cat-hero--page {
  min-height: 55vh;
}

/* Allow long page titles to be a touch smaller */
.cat-hero__title--page {
  font-size: clamp(36px, 7vw, 80px);
}

/* Excerpt/subtitle below the page title in the hero */
.page-hero__excerpt {
  max-width: 640px;
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin: 0;
}

/* Layout wrapper — single column by default, two-col with sidebar */
.page-content__layout {
  padding-top: 52px;
  padding-bottom: 72px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
}

.page-content__layout--sidebar {
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .page-content__layout--sidebar {
    grid-template-columns: 1fr 260px;
  }
}

.page-content__body {
  min-width: 0;
}

/* Sub-page cards grid */
.page-subpages {
  margin-top: 52px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.page-subpages__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.page-subpages__card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  background: var(--panel);
  transition: border-color var(--transition), transform var(--transition);
}

.page-subpages__card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
}

.page-subpages__img {
  height: 130px;
  background: var(--bg-3);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
}

.page-subpages__img--empty {
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 28px 28px;
}

.page-subpages__label {
  padding: 14px 16px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.3;
}

/* Sidebar section navigation */
.page-sidenav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-sidenav__link {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  border: 1px solid transparent;
}

.page-sidenav__link:hover {
  background: var(--panel-2);
  color: var(--text);
}

.page-sidenav__link--active {
  background: var(--panel);
  border-color: var(--border);
  color: var(--text);
  font-weight: 600;
}

/* ── Post prev/next navigation ── */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
  .post-nav { grid-template-columns: 1fr; }
}

.post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition);
}

.post-nav__item:hover {
  border-color: var(--red);
  background: var(--panel-2);
}

.post-nav__item--next {
  text-align: right;
}

.post-nav__dir {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.post-nav__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.gallery__overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,13,14,0.65);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery__item:hover .gallery__overlay {
  opacity: 1;
}

.gallery__overlay span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

/* ============================================================
   INSTAGRAM CTA
   ============================================================ */

.insta-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 24px;
  gap: 20px;
}

.insta-cta__icon {
  color: var(--text-3);
  margin-bottom: 4px;
}

.insta-cta__sub {
  font-size: 14px;
  color: var(--text-3);
  max-width: 440px;
  line-height: 1.7;
  margin: 0;
}

.insta-cta__btn {
  margin-top: 8px;
}

.btn--outline {
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid var(--border-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.btn--outline:hover {
  border-color: var(--red);
  color: var(--red);
}

/* ============================================================
   ABOUT
   ============================================================ */

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 900px) {
  .about__grid { grid-template-columns: 1fr 360px; }
}

.about__text {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.about__stat-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  position: sticky;
  top: 80px;
}

.about__panel-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
}

.about__stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.about__stat-row:last-child {
  border-bottom: none;
}

.about__stat-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.about__stat-val {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.about__panel-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
  background: var(--bg-2);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

@media (min-width: 640px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.footer__tagline {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.8;
  font-style: italic;
}

.footer__nav {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer__nav-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__nav-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}

/* wp_nav_menu list wrapper inside footer columns */
.footer__nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__nav-list > li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__nav-link {
  font-size: 13px;
  color: var(--text-2);
  transition: color var(--transition);
  text-decoration: none;
}

.footer__nav-link:hover { color: var(--text); }

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer__copy {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.footer__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  font-style: italic;
}

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: modal-in 0.2s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.modal__close {
  position: sticky;
  top: 0;
  float: right;
  margin: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
  z-index: 1;
  transition: all var(--transition);
}

.modal__close:hover {
  background: var(--red-dim);
  border-color: rgba(238,250,20,0.3);
  color: var(--red);
}

.modal__content {
  padding: 24px 28px 28px;
  clear: both;
}

.modal__title {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}

.modal__meta {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.modal__label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
  margin-top: 20px;
}

.modal__text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 12px;
}

.modal__spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 8px;
}

.modal__spec {
  background: var(--bg-3);
  padding: 12px 14px;
}

.modal__spec-key {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}

.modal__spec-val {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
