/* ============================================
   REKAI PORTFOLIO — BENTO NEO-BRUTALIST STYLES
   ============================================ */

/* ── CSS Custom Properties ─────────────────── */
:root {
  color-scheme: dark;

  /* Bento Palette (Dark Mode Base) */
  --bg: #121214;
  /* dark canvas background */
  --ink: #FFFFFF;
  /* 4px borders, hard shadows, headings */
  --text: #FFFFFF;
  --card: #1E1E22;
  /* dark cells */
  --lime: #C5F04F;
  --purple: #6B4CF5;
  --pink: #FF7F9F;
  --yellow: #FFE14D;
  --blue: #4D8BFF;
  --green: #C5F04F;

  /* Design Tokens */
  --border-w: 4px;
  --sh: 6px 6px 0 var(--ink);
  --sh-lg: 8px 8px 0 var(--ink);
  --sh-sm: 3px 3px 0 var(--ink);

  /* Typography */
  --font-display: 'Archivo Black', Impact, sans-serif;
  --font-body: 'Space Mono', 'Courier New', Courier, monospace;

  /* Layout */
  --max-width: 1200px;

  /* Custom Cursor (hotspot: 0 0 for 25x32 px images/cursor-main-32.png) */
  --cursor-main: url("../images/cursor-main-32.png") 0 0, auto;
}

/* ── Dark Mode Selector (Keeps [data-theme="dark"] valid) ── */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121214;
  --ink: #FFFFFF;
  --text: #FFFFFF;
  --card: #1E1E22;
}

/* ── Light Mode (toggled via data-theme="light") ── */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F4F2EC;
  /* cream canvas background */
  --ink: #000000;
  /* 4px borders, hard shadows, headings */
  --text: #000000;
  --card: #FFFFFF;
  /* white cells */
}

/* ── Theme Switch Transition (Temporary 200ms ease crossfade) ── */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 200ms ease !important;
}

/* ── Reset ─────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 36px;
  -webkit-text-size-adjust: 100%;
}

/* ── In-Page Anchor Targets ─────────────────── */
[id] {
  scroll-margin-top: 36px;
}

[tabindex="-1"]:focus {
  outline: none;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding: 24px 16px 48px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: var(--cursor-main);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: var(--cursor-main);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

[role="button"],
[role="tab"],
.btn,
.icon-btn,
.nav__link,
.theme-toggle,
.bento-header__cta,
.carousel-btn,
.carousel-dot,
.filter-btn,
.card,
.category-card,
.contact-card,
.tool-card,
.lightbox__close,
.lightbox__nav-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ── Focus States ──────────────────────────── */
:focus-visible {
  outline: 4px solid var(--purple);
  outline-offset: 3px;
}

/* ── Custom Text Selection ─────────────────── */
::selection {
  background: var(--lime);
  color: #000000;
}

.bento-header__logo::selection,
.bento-header__logo *::selection,
.bento-featured__ai::selection,
.bento-featured__ai *::selection,
.bento-footer__logo::selection,
.bento-footer__logo *::selection,
.bento-filters-row::selection,
.bento-filters-row *::selection,
.btn--lime::selection,
.btn--lime *::selection {
  background: var(--purple);
  color: #FFFFFF;
}

/* ── Custom Scrollbar (WebKit: Chrome, Edge, Safari) ── */
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: var(--card);
  border-left: 4px solid var(--ink);
}

:root[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--card);
  border-left: 4px solid var(--ink);
}

:root[data-theme="light"] ::-webkit-scrollbar-track {
  background: var(--bg);
  border-left: 4px solid var(--ink);
}

::-webkit-scrollbar-thumb {
  background: var(--lime);
  border: 4px solid var(--ink);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--pink);
}

::-webkit-scrollbar-corner {
  background: var(--card);
}

:root[data-theme="dark"] ::-webkit-scrollbar-corner {
  background: var(--card);
}

:root[data-theme="light"] ::-webkit-scrollbar-corner {
  background: var(--bg);
}

/* ── Custom Scrollbar (Firefox only) ───────── */
@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-width: auto;
    scrollbar-color: var(--lime) var(--card);
  }

  :root[data-theme="dark"] {
    scrollbar-color: var(--lime) var(--card);
  }

  :root[data-theme="light"] {
    scrollbar-color: var(--lime) var(--bg);
  }
}

/* ── Accessibility: Screen Reader Only ─────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--lime);
  color: #000000;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-size: 14px;
  text-transform: uppercase;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh);
  z-index: 10000;
  transition: top 120ms ease;
}

.skip-link:focus {
  top: 20px;
}

/* ── Faint Grid Backgrounds ────────────────── */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

:root[data-theme="dark"] .bg-grid {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
}

:root[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
}

.bg-grid-purple {
  background-color: var(--purple);
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── Bento Container ───────────────────────── */
.bento-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh-lg);
  background: var(--card);
}

.bento-row {
  border-bottom: var(--border-w) solid var(--ink);
}

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

/* ── Interactive Buttons ───────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  text-transform: uppercase;
  padding: 12px 22px;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh-sm);
  cursor: var(--cursor-main);
  text-decoration: none;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translate(3px, 3px);
    box-shadow: 0 0 0 var(--ink);
  }
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.btn--lime {
  background: var(--lime);
  color: #000000;
}

.btn--pink {
  background: var(--pink);
  color: #000000;
}

.btn--purple {
  background: var(--purple);
  color: #FFFFFF;
}

.btn--white {
  background: var(--card);
  color: var(--text);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--card);
  border: var(--border-w) solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--text);
  font-size: 18px;
  text-decoration: none;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
  cursor: var(--cursor-main);
}

@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
  }
}

.icon-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.icon-btn__img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.icon-btn__img--dark {
  display: block;
}

.icon-btn__img--light {
  display: none;
}

:root[data-theme="dark"] .icon-btn__img--light {
  display: none;
}

:root[data-theme="dark"] .icon-btn__img--dark {
  display: block;
}

:root[data-theme="light"] .icon-btn__img--light {
  display: block;
}

:root[data-theme="light"] .icon-btn__img--dark {
  display: none;
}

/* ────────────────────────────────────────────
   ROW 1: HEADER
   ──────────────────────────────────────────── */
.bento-header {
  display: grid;
  grid-template-columns: 240px 1fr auto;
}

.bento-header__logo {
  background: var(--lime);
  color: #000000;
  border-right: var(--border-w) solid var(--ink);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 20px;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.bento-header__nav {
  background: var(--card);
  border-right: var(--border-w) solid var(--ink);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bento-header__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
}

.nav__link {
  color: var(--text);
  text-decoration: none;
  position: relative;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .nav__link:hover {
    color: var(--purple);
  }
}

.nav__link:active {
  color: var(--purple);
}

.nav__link--active {
  background: var(--lime);
  color: #000000;
  padding: 4px 8px;
  border: 2px solid var(--ink);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--card);
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh-sm);
  font-size: 18px;
  cursor: var(--cursor-main);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
  }
}

.theme-toggle:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.bento-header__cta {
  background: var(--purple);
  color: #FFFFFF;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 120ms ease, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .bento-header__cta:hover {
    filter: brightness(1.1);
  }
}

.bento-header__cta:active {
  filter: brightness(0.95);
  transform: translate(2px, 2px);
}

/* ────────────────────────────────────────────
   ROW 2: HERO
   ──────────────────────────────────────────── */
.bento-hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
}

.bento-hero__left {
  background: var(--card);
  border-right: var(--border-w) solid var(--ink);
  padding: clamp(28px, 4vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--purple);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh-sm);
  margin-bottom: 22px;
}

.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 4.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
  font-weight: 400;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.hero__mark {
  background: var(--pink);
  color: #000000;
  padding: 0 0.16em;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh);
  display: inline-block;
  transform: rotate(-2deg);
  white-space: nowrap;
}

.hero__subtext {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 28px;
  max-width: 540px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.connect-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.connect-row__label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
}

.connect-row__icons {
  display: flex;
  gap: 10px;
}

.bento-hero__right {
  background: var(--pink);
  padding: clamp(32px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.hero-frame-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
}

.hero-lime-frame {
  background: var(--blue);
  border: var(--border-w) solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 12px;
}

.hero-lime-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border: var(--border-w) solid var(--ink);
  display: block;
}

.hero-spec-card {
  position: absolute;
  bottom: -24px;
  right: -20px;
  background: var(--purple);
  color: #FFFFFF;
  border: var(--border-w) solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 16px 20px;
  z-index: 2;
  font-family: var(--font-body);
  min-width: 250px;
}

.hero-spec-card__title {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-bottom: 8px;
  font-weight: 700;
}

.hero-spec-card__list {
  list-style: none;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 700;
}

.hero-spec-card__list li {
  margin-bottom: 2px;
}

/* ────────────────────────────────────────────
   ROW 3: STRIP ("WHAT I MAKE →")
   ──────────────────────────────────────────── */
.bento-strip {
  display: grid;
  grid-template-columns: 220px 1fr;
}

.bento-strip__label {
  background: var(--purple);
  color: #FFFFFF;
  border-right: var(--border-w) solid var(--ink);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 16px;
  text-transform: uppercase;
  white-space: nowrap;
}

.bento-strip__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: var(--card);
}

.strip__item {
  border-right: var(--border-w) solid var(--ink);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.strip__item:last-child {
  border-right: none;
}

.strip__item-icon {
  font-size: 24px;
  line-height: 1;
}

.strip__item-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.3;
}

/* ────────────────────────────────────────────
   ROW 4: FEATURED WORK & CATEGORIES
   ──────────────────────────────────────────── */
.bento-featured {
  --featured-cols: 5fr 7fr;
  --featured-frame-ratio: 4 / 5;
  display: grid;
  grid-template-columns: var(--featured-cols);
  align-items: stretch;
}

.bento-featured__work {
  background: var(--card);
  border-right: var(--border-w) solid var(--ink);
  padding: clamp(24px, 3.5vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: visible;
}

.featured-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 24px;
}

.featured-heading {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  text-transform: uppercase;
  margin: 0;
  letter-spacing: -0.01em;
  width: 100%;
}

.featured-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}

.featured-actions .btn {
  margin-right: auto;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: var(--pink);
  color: #000000;
  border: var(--border-w) solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: var(--cursor-main);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
  flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
  .carousel-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
  }
}

.carousel-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.featured-slide-container {
  min-height: 420px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  align-items: start;
  overflow: hidden;
  padding-right: 8px;
  padding-bottom: 8px;
  flex: 1;
  touch-action: pan-y;
  position: relative;
}

.featured-slide {
  grid-column: 1;
  grid-row: 1;
  overflow: visible;
  display: flex;
  flex-direction: column;
  width: 100%;
  will-change: transform, opacity;
}

/* ── Featured Slide Animations (350ms ease-out) ── */
@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.featured-slide--slide-out-left {
  animation: slideOutLeft 350ms cubic-bezier(0.16, 1, 0.3, 1) both;
  pointer-events: none;
}

.featured-slide--slide-in-right {
  animation: slideInRight 350ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.featured-slide--slide-out-right {
  animation: slideOutRight 350ms cubic-bezier(0.16, 1, 0.3, 1) both;
  pointer-events: none;
}

.featured-slide--slide-in-left {
  animation: slideInLeft 350ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.featured-slide__frame {
  background: var(--pink);
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh);
  border-radius: 0;
  aspect-ratio: var(--featured-frame-ratio);
  width: 100%;
  max-width: 512px;
  max-width: calc(640px * (var(--featured-frame-ratio)));
  max-height: 640px;
  padding: clamp(16px, 3vw, 24px);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  box-sizing: border-box;
}

.featured-slide__frame--yellow {
  background: var(--yellow);
}

.featured-slide__frame--pink {
  background: var(--pink);
}

.featured-slide__frame--blue {
  background: var(--blue);
}

.featured-slide__frame--green {
  background: var(--lime);
}

.featured-slide__img {
  max-width: calc(100% - 8px);
  max-height: calc(100% - 8px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: auto;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  border-radius: 0;
}

.featured-slide__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.featured-slide__meta {
  width: 100%;
}

.featured-slide__cat {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 8px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  color: #000000;
  margin-bottom: 8px;
}

.featured-slide__cat--pink {
  background: var(--pink);
}

.featured-slide__cat--blue {
  background: var(--blue);
}

.featured-slide__cat--green {
  background: var(--lime);
}

.featured-slide__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  text-transform: uppercase;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.featured-slide__desc {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}

.featured-slide__body .btn--details {
  align-self: flex-start;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.carousel-dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--ink);
  cursor: var(--cursor-main);
  padding: 0;
  transition: background-color 120ms ease-out, transform 120ms ease-out;
}

.carousel-dot.is-active {
  background: var(--ink);
  transform: scale(1.2);
}

@media (hover: hover) and (pointer: fine) {
  .carousel-dot:hover:not(.is-active) {
    transform: scale(1.15);
  }
}

.carousel-dot:active {
  transform: scale(0.9);
}

/* ── AI Transparency Cell ────────────────── */
.bento-featured__ai {
  --ai-pad: 24px;
  /* Box fills: swap values to invert callout vs lists fills */
  --ai-callout-bg: var(--pink);
  --ai-lists-bg: var(--blue);
  background: var(--lime);
  color: #000000;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  overflow: visible;
}

#ai-section {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  flex: 1;
  padding: var(--ai-pad) var(--ai-pad) 0;
  box-sizing: border-box;
}

.ai-header {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 14px;
  position: relative;
  margin-bottom: 16px;
}

.ai-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  text-transform: uppercase;
  color: #000000;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.05;
  display: inline-block;
}

.ai-sticker {
  display: inline-block;
  background: var(--pink);
  color: #000000;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border: var(--border-w) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-4deg);
  position: relative;
  top: -6px;
  margin-left: -4px;
  white-space: nowrap;
  z-index: 1;
  transition: transform 120ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .ai-sticker:hover {
    transform: rotate(-2deg) scale(1.03);
  }
}

.ai-intro {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.55;
  color: #000000;
  margin: 0 0 16px;
}

/* Grid-paper texture shared across AI callout and AI lists boxes */
.ai-callout,
.ai-box {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 24px 24px;
}

.ai-callout {
  background-color: var(--ai-callout-bg);
  color: #000000;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh);
  border-radius: 0;
  padding: 16px 20px;
  box-sizing: border-box;
  margin-bottom: 20px;
}

.ai-callout__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-transform: uppercase;
  color: #000000;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.ai-callout__text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.5;
  color: #000000;
  margin: 0;
}

.ai-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  flex: 1;
  align-items: stretch;
  margin-bottom: 20px;
  min-height: 0;
}

.ai-columns__image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.ai-image-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.ai-image {
  width: 100%;
  max-width: 380px;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  transform: rotate(-3deg);
  filter: drop-shadow(6px 6px 0 var(--ink));
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;
  transition: transform 150ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .ai-image:hover {
    transform: rotate(0deg) scale(1.02);
  }
}

.ai-caption {
  display: inline-block;
  background: #FFFFFF;
  color: #000000;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  margin: 0;
  text-align: center;
  max-width: 100%;
  line-height: 1.35;
  box-sizing: border-box;
  transform: none;
}

.ai-columns__lists {
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  width: 100%;
  height: 100%;
}

.ai-box {
  background-color: var(--ai-lists-bg);
  color: #000000;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh);
  border-radius: 0;
  padding: clamp(18px, 2vw, 24px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  height: 100%;
  flex: 1;
}

.ai-box__group {
  margin-bottom: 0;
}

.ai-box__heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-transform: uppercase;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #000000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-box__heading--ai,
.ai-box__heading--me {
  color: #000000;
}

.ai-box__marker {
  display: inline-block;
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  border: 3px solid #000000;
  box-sizing: border-box;
  flex-shrink: 0;
}

.ai-box__marker--ai {
  background-color: var(--pink);
}

.ai-box__marker--me {
  background-color: var(--lime);
}

.ai-box__list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: #000000;
}

.ai-box__list li {
  margin-bottom: 5px;
  color: #000000;
}

.ai-box__list li:last-child {
  margin-bottom: 0;
}

.ai-box__list li::before {
  content: "→ ";
  font-weight: 700;
  color: #000000;
}

.ai-closing {
  background: #000000;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  text-align: center;
  padding: 18px 20px;
  border-top: var(--border-w) solid var(--ink);
  letter-spacing: 0.5px;
  margin-left: calc(-1 * var(--ai-pad));
  margin-right: calc(-1 * var(--ai-pad));
  margin-top: auto;
  box-sizing: border-box;
}

/* ────────────────────────────────────────────
   ROW 5: PROCESS ("HOW I WORK" + TIMELINE + CTA)
   ──────────────────────────────────────────── */
.bento-process {
  display: grid;
  grid-template-columns: 200px 1.4fr 1.1fr;
}

.bento-process__label {
  background: var(--pink);
  color: #000000;
  border-right: var(--border-w) solid var(--ink);
  padding: clamp(28px, 4vw, 40px) 24px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 32px);
  text-transform: uppercase;
  display: flex;
  align-items: flex-start;
  line-height: 1.1;
}

.bento-process__timeline {
  background: var(--card);
  border-right: var(--border-w) solid var(--ink);
  padding: clamp(28px, 4vw, 44px) clamp(24px, 3.5vw, 40px);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  padding-left: 36px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 11px;
  width: 4px;
  background: var(--ink);
}

.timeline-item {
  position: relative;
}

.timeline-item__dot {
  position: absolute;
  left: -36px;
  top: 2px;
  width: 26px;
  height: 26px;
  background: var(--lime);
  border: 4px solid var(--ink);
  border-radius: 50%;
}

.timeline-item__header {
  font-family: var(--font-display);
  font-size: 16px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.timeline-item__desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.bento-process__cta {
  background-color: var(--purple);
  color: #FFFFFF;
  padding: clamp(32px, 4vw, 48px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 36px);
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0 0 24px;
  color: #FFFFFF;
  position: relative;
  z-index: 2;
}

.starburst {
  width: 100px;
  height: 100px;
  background: var(--ink);
  clip-path: polygon(50% 0%, 63% 15%, 81% 6%, 85% 26%, 100% 35%, 91% 52%,
      100% 65%, 85% 74%, 81% 94%, 63% 85%, 50% 100%, 37% 85%,
      19% 94%, 15% 74%, 0% 65%, 9% 52%, 0% 35%, 15% 26%,
      19% 6%, 37% 15%);
  position: absolute;
  bottom: -24px;
  right: -24px;
  pointer-events: none;
  z-index: 1;
}

:root[data-theme="dark"] .starburst {
  background: #FFFFFF;
}

:root[data-theme="light"] .starburst {
  background: #000000;
}

/* ────────────────────────────────────────────
   ROW 5.5: TOOLS ("WHAT I USE" + LOGO CELL + TEXT CELL)
   ──────────────────────────────────────────── */
.bento-tools {
  display: grid;
  grid-template-columns: 200px 1.15fr 1.35fr;
}

.bento-tools__label {
  background: var(--yellow);
  color: #000000;
  border-right: var(--border-w) solid var(--ink);
  padding: clamp(28px, 4vw, 40px) 24px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 32px);
  text-transform: uppercase;
  display: flex;
  align-items: flex-start;
  line-height: 1.1;
}

.bento-tools__logos {
  background-color: #F4F2EC;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  border-right: var(--border-w) solid var(--ink);
  padding: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 36px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.tool-card {
  background: #FFFFFF;
  color: #000000;
  border: 4px solid #000000;
  box-shadow: var(--sh);
  padding: 16px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 100%;
  box-sizing: border-box;
  text-decoration: none;
  cursor: var(--cursor-main);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .tool-card:hover {
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0 var(--ink);
  }
}

.tool-card:active {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--ink);
}

.tool-card:focus:not(:focus-visible) {
  outline: none;
}

.tool-card:focus-visible {
  outline: 4px solid var(--purple);
  outline-offset: 3px;
}

.tool-card__logo {
  height: 72px;
  width: 72px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.tool-card__name {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  text-transform: uppercase;
  color: #000000;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}

.tool-card__wordmark {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

.bento-tools__text {
  background-color: #121214;
  color: #FFFFFF;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 3.5vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bento-tools__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 32px);
  text-transform: uppercase;
  line-height: 1.1;
  color: #FFFFFF;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.bento-tools__desc {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 16px;
  overflow-wrap: break-word;
}

.bento-tools__ai-link {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  align-self: flex-start;
  margin-bottom: 16px;
  cursor: var(--cursor-main);
  transition: color 120ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .bento-tools__ai-link:hover {
    color: var(--yellow);
  }
}

.bento-tools__disclaimer {
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  overflow-wrap: break-word;
}

@media (max-width: 899.98px) {
  .bento-tools {
    grid-template-columns: 1fr;
  }

  .bento-tools__label,
  .bento-tools__logos {
    border-right: none;
    border-bottom: var(--border-w) solid var(--ink);
  }
}

/* ────────────────────────────────────────────
   ROW 6: CONTACT & CONTACT FORM
   ──────────────────────────────────────────── */
.bento-contact {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  background: var(--card);
}

.bento-contact__form-cell {
  background: var(--card);
  border-right: var(--border-w) solid var(--ink);
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
}

.bento-contact__links-cell {
  background: var(--card);
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
}

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 32px);
  text-transform: uppercase;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.contact-heading--form {
  text-align: left;
}

.contact-heading--links {
  text-align: left;
}

.contact-sticker {
  display: inline-block;
  align-self: flex-start;
  background: var(--pink);
  color: #000000;
  font-family: var(--font-display);
  font-size: clamp(12px, 1.3vw, 15px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border: var(--border-w) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-2deg);
  margin-bottom: 16px;
  line-height: 1.2;
  transition: transform 120ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .contact-sticker:hover {
    transform: rotate(0deg) scale(1.02);
  }
}

/* Stacked Email and Discord Cards Column */
.bento-contact__links-cell .contact__grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: none;
  margin: 0;
  flex: 1;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 3.5vw, 40px) 24px;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh);
  text-decoration: none;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
  text-align: center;
  color: #000000;
  flex: 1;
}

@media (hover: hover) and (pointer: fine) {
  a.contact-card:hover {
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 var(--ink);
  }
}

a.contact-card:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* Email Card Internal Link, Address & Copy Button */
.contact-card__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #000000;
  cursor: var(--cursor-main);
  transition: transform 120ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .contact-card__link:hover {
    transform: scale(1.05);
  }
}

.contact-card__link:active {
  transform: scale(0.96);
}

.contact-card__address {
  font-family: var(--font-body);
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 700;
  color: #000000;
  user-select: text;
  -webkit-user-select: text;
  word-break: break-all;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.4;
  margin: 12px 0 16px;
  padding: 0 4px;
  cursor: text;
}

.contact-card__copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--card);
  color: var(--text);
  border: var(--border-w) solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: var(--cursor-main);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
  white-space: nowrap;
  box-sizing: border-box;
}

@media (hover: hover) and (pointer: fine) {
  .contact-card__copy-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
  }
}

.contact-card__copy-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.contact-card:nth-child(1) {
  background: var(--yellow);
}

.contact-card:nth-child(2) {
  background: var(--blue);
}

.contact-card__icon {
  font-size: 40px;
  margin-bottom: 12px;
  line-height: 1;
}

.contact-card__img {
  height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 12px;
  display: block;
}

.contact-card__label {
  font-family: var(--font-display);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #000000;
  font-weight: 400;
}

/* Responsive layout: on <= 900px everything stacks with form first */
@media (max-width: 900px) {
  .bento-contact {
    grid-template-columns: 1fr;
  }

  .bento-contact__form-cell {
    border-right: none;
    border-bottom: var(--border-w) solid var(--ink);
  }
}

/* ────────────────────────────────────────────
   CONTACT FORM COMPONENTS
   ──────────────────────────────────────────── */
.contact-form {
  display: block;
  width: 100%;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.form-label-row,
.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.form-label {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
}

.form-required {
  color: var(--pink);
  margin-left: 4px;
}

:root[data-theme="light"] .form-required {
  color: var(--ink);
}

.form-optional {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
  text-transform: uppercase;
  margin-left: 6px;
}

.char-counter {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text);
  opacity: 0.7;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background-color: var(--card);
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh-sm);
  border-radius: 0;
  padding: 12px 14px;
  min-height: 48px;
  box-sizing: border-box;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease, color 150ms ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text);
  opacity: 0.45;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

/* Custom select dropdown */
.select-wrap {
  position: relative;
  width: 100%;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  background-color: var(--card);
}

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 11px;
  color: var(--text);
}

/* Focus styles (thick purple focus ring visible in both light & dark modes) */
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.form-status-panel:focus-visible,
.form-success-panel:focus-visible {
  outline: 4px solid var(--purple);
  outline-offset: 2px;
}

/* Error states */
.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--pink) !important;
  box-shadow: 3px 3px 0 var(--pink) !important;
}

.form-error {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--pink);
  margin-top: 6px;
  display: none;
}

.form-error.is-visible {
  display: block;
}

/* Actions & Submit Button */
.form-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
}

.form-submit {
  min-height: 48px;
  font-size: 15px;
  letter-spacing: 0.5px;
  width: 100%;
}

@media (min-width: 640px) {
  .form-submit {
    width: auto;
    min-width: 220px;
  }
}

.form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: var(--sh-sm) !important;
}

/* Disclaimer text below form */
.form-disclaimer {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  opacity: 0.75;
  margin-top: 18px;
  line-height: 1.5;
}

/* ── Error Status Panel ── */
.form-status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh-sm);
  margin-bottom: 20px;
}

.form-status-panel--error {
  background: var(--card);
  border-color: var(--pink);
  color: var(--text);
}

:root[data-theme="dark"] .form-status-panel--error {
  border-color: var(--pink);
  background: #25161D;
}

:root[data-theme="light"] .form-status-panel--error {
  border-color: var(--pink);
  background: #FFF0F4;
}

.form-status-panel__content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-status-panel__icon {
  font-size: 20px;
  flex-shrink: 0;
}

.form-status-panel__text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--pink);
}

.form-status-panel__close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text);
  padding: 4px 8px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: var(--cursor-main);
}

/* ── Success Panel ── */
.form-success-panel {
  background: var(--pink);
  color: #000000;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh-lg);
  padding: clamp(32px, 5vw, 48px) 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  min-height: 420px;
}

.success-panel__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 32px);
  text-transform: uppercase;
  color: #000000;
  letter-spacing: -0.01em;
  margin: 0;
}

.success-panel__text {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: #000000;
  max-width: 440px;
  margin: 0;
}

.success-panel__btn {
  margin-top: 8px;
  min-height: 44px;
}

/* Black starburst sticker on success panel */
.success-starburst {
  width: 90px;
  height: 90px;
  background: #000000;
  color: #FFFFFF;
  clip-path: polygon(50% 0%, 58.5% 13%, 71.7% 5%, 73.7% 20.3%, 89.1% 18.8%, 84.2% 33.5%, 98.7% 38.9%,
      88% 50%, 98.7% 61.1%, 84.2% 66.5%, 89.1% 81.2%, 73.7% 79.7%, 71.7% 95%, 58.5% 87%,
      50% 100%, 41.5% 87%, 28.3% 95%, 26.3% 79.7%, 10.9% 81.2%, 15.8% 66.5%, 1.3% 61.1%,
      12% 50%, 1.3% 38.9%, 15.8% 33.5%, 10.9% 18.8%, 26.3% 20.3%, 28.3% 5%, 41.5% 13%);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-6deg);
  user-select: none;
  animation: stickerBobbing 3.8s ease-in-out infinite;
}

.success-starburst__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.success-starburst__icon {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 2px;
}

.success-starburst__label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1px;
}

/* Text cursor on inputs, custom cursor on buttons */
@media (hover: hover) and (pointer: fine) {

  .form-input,
  .form-textarea {
    cursor: text !important;
  }

  .form-select,
  .form-submit,
  .form-status-panel__close,
  .success-panel__btn {
    cursor: var(--cursor-main) !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .success-starburst {
    animation: none !important;
  }
}

/* ────────────────────────────────────────────
   ROW 7: FOOTER
   ──────────────────────────────────────────── */
.bento-footer {
  display: grid;
  grid-template-columns: 240px 1fr auto;
}

.bento-footer__logo {
  background: var(--lime);
  color: #000000;
  border-right: var(--border-w) solid var(--ink);
  padding: 16px 24px;
  font-family: var(--font-display);
  font-size: 18px;
  display: flex;
  align-items: center;
}

.bento-footer__copy {
  background: var(--card);
  border-right: var(--border-w) solid var(--ink);
  padding: 16px 24px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.bento-footer__icons {
  background: var(--card);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ────────────────────────────────────────────
   WORK PAGE STYLES (work.html)
   ──────────────────────────────────────────── */
.bento-work-hero {
  background: var(--card);
  padding: clamp(32px, 4vw, 56px);
  text-align: center;
}

.work-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  text-transform: uppercase;
  margin: 12px 0 16px;
  letter-spacing: -0.02em;
}

.work-hero__subtext {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  max-width: 600px;
  margin: 0 auto;
}

.bento-filters-row {
  background: var(--lime);
  padding: 20px 24px;
  min-height: 85px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.filter-btn {
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  padding: 10px 18px;
  background: var(--card);
  color: var(--text);
  border: var(--border-w) solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: var(--cursor-main);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .filter-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
  }
}

.filter-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.filter-btn--active {
  background: var(--purple);
  color: #FFFFFF;
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.bento-work-gallery {
  background: var(--card);
  padding: clamp(24px, 4vw, 44px);
  min-height: 650px;
}

/* ── Masonry Grid Layout (Without Cropping) ── */
.gallery {
  column-count: 3;
  column-gap: 24px;
}

.gallery--full {
  column-count: 3;
}

.card {
  break-inside: avoid;
  margin-bottom: 24px;
  background: var(--card);
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh);
  cursor: var(--cursor-main);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: rotate(-1.2deg) translateY(-4px);
  }
}

.card:active {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--ink);
}

.card__image-wrap {
  width: 100%;
  border-bottom: var(--border-w) solid var(--ink);
  background: #16151A;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

:root[data-theme="dark"] .card__image-wrap {
  background: #16151A;
}

:root[data-theme="light"] .card__image-wrap {
  background: #E8E5DD;
}

.card__image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card__category {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border: 2px solid var(--ink);
  color: #000000;
}

.card__category--yellow {
  background: var(--yellow);
}

.card__category--pink {
  background: var(--pink);
}

.card__category--blue {
  background: var(--blue);
}

.card__category--green {
  background: var(--lime);
}

.card__title {
  font-family: var(--font-display);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}

.card__desc {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}

.gallery-empty {
  text-align: center;
  font-family: var(--font-display);
  font-size: 20px;
  padding: 60px 20px;
  color: var(--text);
}

/* ────────────────────────────────────────────
   WORK PAGE CTA ROW (work.html)
   Two-cell row: pink content cell + purple graphic cell
   ──────────────────────────────────────────── */
.bento-work-cta {
  display: grid;
  grid-template-columns: 2fr 1fr;
  background: var(--card);
}

.bento-work-cta__content {
  background-color: var(--pink);
  color: #000000;
  border-right: var(--border-w) solid var(--ink);
  padding: clamp(36px, 4.5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
}

:root[data-theme="dark"] .bento-work-cta__content,
:root[data-theme="light"] .bento-work-cta__content {
  background-color: var(--pink);
  color: #000000;
}

.work-cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  text-transform: uppercase;
  color: #000000;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  word-break: break-word;
}

:root[data-theme="dark"] .work-cta__title,
:root[data-theme="light"] .work-cta__title {
  color: #000000;
}

.work-cta__text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: #000000;
  margin: 0 0 28px;
  max-width: 540px;
}

:root[data-theme="dark"] .work-cta__text,
:root[data-theme="light"] .work-cta__text {
  color: #000000;
}

.work-cta__btn {
  background-color: var(--blue);
  color: #000000;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh);
  min-height: 48px;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 14px;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 150ms ease, color 150ms ease;
}

:root[data-theme="dark"] .work-cta__btn,
:root[data-theme="light"] .work-cta__btn {
  background-color: var(--blue);
  color: #000000;
  border: var(--border-w) solid var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .work-cta__btn:hover {
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0 var(--ink);
    background-color: var(--blue);
    color: #000000;
  }
}

.work-cta__btn:active {
  transform: translate(6px, 6px);
  box-shadow: 0 0 0 var(--ink);
}

.bento-work-cta__graphic {
  background-color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 44px);
  box-sizing: border-box;
}

:root[data-theme="dark"] .bento-work-cta__graphic,
:root[data-theme="light"] .bento-work-cta__graphic {
  background-color: var(--purple);
}

.work-cta__starburst {
  width: clamp(140px, 14vw, 180px);
  height: clamp(140px, 14vw, 180px);
  background: #000000;
  color: #FFFFFF;
  clip-path: polygon(50% 0%, 58.5% 13%, 71.7% 5%, 73.7% 20.3%, 89.1% 18.8%, 84.2% 33.5%, 98.7% 38.9%,
      88% 50%, 98.7% 61.1%, 84.2% 66.5%, 89.1% 81.2%, 73.7% 79.7%, 71.7% 95%, 58.5% 87%,
      50% 100%, 41.5% 87%, 28.3% 95%, 26.3% 79.7%, 10.9% 81.2%, 15.8% 66.5%, 1.3% 61.1%,
      12% 50%, 1.3% 38.9%, 15.8% 33.5%, 10.9% 18.8%, 26.3% 20.3%, 28.3% 5%, 41.5% 13%);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-6deg);
  filter: drop-shadow(4px 4px 0 var(--ink));
  user-select: none;
  flex-shrink: 0;
}

.work-cta__starburst-text {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 5vw, 4.5rem);
  line-height: 1;
  color: #FFFFFF;
  display: block;
  user-select: none;
}

/* Responsive: below 900px stack with pink cell first and 120px purple strip */
@media (max-width: 899.98px) {
  .bento-work-cta {
    grid-template-columns: 1fr;
  }

  .bento-work-cta__content {
    border-right: none;
    border-bottom: var(--border-w) solid var(--ink);
    padding: clamp(28px, 5vw, 40px) 24px;
  }

  .bento-work-cta__graphic {
    height: 120px;
    min-height: 120px;
    padding: 0;
  }

  .work-cta__starburst {
    width: 76px;
    height: 76px;
    filter: drop-shadow(3px 3px 0 var(--ink));
  }

  .work-cta__starburst-text {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .bento-work-cta__content {
    padding: 24px 18px;
  }

  .work-cta__btn {
    width: 100%;
  }
}

/* ────────────────────────────────────────────
   LIGHTBOX
   ──────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 120ms ease, visibility 120ms ease;
}

.lightbox--open {
  opacity: 1;
  visibility: visible;
}

.lightbox__inner {
  background: var(--card);
  border: var(--border-w) solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  background: var(--pink);
  color: #000000;
  border: var(--border-w) solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: var(--cursor-main);
  z-index: 10;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .lightbox__close:hover {
    transform: translate(2px, 2px);
  }
}

.lightbox__close:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.lightbox__image-wrap {
  width: 100%;
  background: #16151A;
  border-bottom: var(--border-w) solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 280px;
}

:root[data-theme="dark"] .lightbox__image-wrap {
  background: #16151A;
}

:root[data-theme="light"] .lightbox__image-wrap {
  background: #E8E5DD;
}

.lightbox__image {
  max-width: 100%;
  max-height: 55vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox__body {
  padding: 24px;
}

.lightbox__category {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  color: #000000;
  margin-bottom: 10px;
}

.lightbox__title {
  font-family: var(--font-display);
  font-size: 24px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--text);
}

.lightbox__desc {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.lightbox__nav {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: var(--border-w) solid var(--ink);
  background: var(--card);
}

.lightbox__nav-btn {
  font-family: var(--font-display);
  font-size: 14px;
  text-transform: uppercase;
  padding: 10px 18px;
  background: var(--lime);
  color: #000000;
  border: var(--border-w) solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: var(--cursor-main);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .lightbox__nav-btn:hover:not(:disabled) {
    transform: translate(2px, 2px);
  }
}

.lightbox__nav-btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

/* ────────────────────────────────────────────
   RESPONSIVE DESIGN (< 960px & < 640px)
   ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .bento-header {
    grid-template-columns: 1fr auto;
  }

  .bento-header__cta {
    display: none;
    /* Accessible in nav links / hero */
  }

  .bento-hero {
    grid-template-columns: 1fr;
  }

  .bento-hero__left {
    border-right: none;
    border-bottom: var(--border-w) solid var(--ink);
  }

  .hero-spec-card {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 16px;
    width: 100%;
  }

  .bento-process {
    grid-template-columns: 1fr;
  }

  .bento-process__label,
  .bento-process__timeline {
    border-right: none;
    border-bottom: var(--border-w) solid var(--ink);
  }

  .bento-footer {
    grid-template-columns: 1fr;
  }

  .bento-footer__logo,
  .bento-footer__copy {
    border-right: none;
    border-bottom: var(--border-w) solid var(--ink);
    justify-content: center;
  }

  .bento-footer__icons {
    justify-content: center;
  }

  .gallery,
  .gallery--full {
    column-count: 2;
  }
}

/* ────────────────────────────────────────────
   ROW 4: RESPONSIVE (< 900px)
   ──────────────────────────────────────────── */
@media (max-width: 899.98px) {
  .bento-featured {
    grid-template-columns: 1fr;
  }

  .bento-featured__work {
    border-right: none;
    border-bottom: var(--border-w) solid var(--ink);
  }

  .featured-slide__frame {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .bento-featured__ai {
    min-height: auto;
    height: auto;
  }

  #ai-section {
    min-height: auto;
    height: auto;
  }

  .ai-closing {
    margin-top: 24px;
  }

  /* ── Row 3: Strip (2-Column Grid Below 900px) ── */
  .bento-strip {
    grid-template-columns: 1fr;
    border-bottom: none;
  }

  .bento-strip__label {
    border-right: none;
    border-bottom: var(--border-w) solid var(--ink);
  }

  .bento-strip__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 0;
  }

  .strip__item {
    border-top: none;
    border-left: none;
    border-right: var(--border-w) solid var(--ink);
    border-bottom: var(--border-w) solid var(--ink);
  }

  .strip__item:nth-child(2n) {
    border-right: none;
  }
}

/* ────────────────────────────────────────────
   TOUCH TARGET SIZING (< 900px)
   Ensure all tappable controls are at least 44x44px
   ──────────────────────────────────────────── */
@media (max-width: 900px) {

  /* Carousel arrows */
  .carousel-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  /* Carousel dots: hit area at least 44x44px via ::after while keeping 14px visual dot */
  .carousel-dot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  /* Theme toggle */
  .theme-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  /* Small square Email and Discord icon buttons */
  .icon-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  /* Filter buttons */
  .filter-btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
  }

  /* Lightbox close button */
  .lightbox__close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  /* Lightbox previous and next buttons */
  .lightbox__nav-btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
  }
}

/* Phone width */
@media (max-width: 640px) {
  body {
    padding: 12px 8px 32px;
  }

  .bento-header {
    grid-template-columns: 1fr;
  }

  .bento-header__logo {
    border-right: none;
    border-bottom: var(--border-w) solid var(--ink);
    justify-content: center;
  }

  .bento-header__nav {
    border-right: none;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
  }

  .bento-header__links {
    gap: 14px;
    font-size: 13px;
  }

  .hero__headline {
    font-size: clamp(1.75rem, 7vw, 2.4rem);
    line-height: 1.1;
    text-wrap: balance;
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }

  /* Row 4 AI transparency cell on phones */
  .bento-featured__ai {
    --ai-pad: 16px;
  }

  .ai-header {
    gap: 8px 10px;
    margin-bottom: 14px;
  }

  .ai-title {
    font-size: clamp(2rem, 8.5vw, 2.5rem);
  }

  .ai-sticker {
    font-size: 0.9rem;
    padding: 5px 10px;
    top: -4px;
  }

  .ai-intro {
    font-size: 1rem;
    margin-bottom: 14px;
  }

  .ai-callout {
    padding: 14px 16px;
    margin-bottom: 16px;
  }

  .ai-callout__title {
    font-size: 1rem;
  }

  .ai-callout__text {
    font-size: 0.95rem;
  }

  .ai-columns {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }

  .ai-image-wrap {
    max-width: 280px;
  }

  .ai-caption {
    font-size: 0.8rem;
    padding: 4px 8px;
  }

  .ai-box {
    padding: 16px;
  }

  .ai-box__heading {
    font-size: 1.15rem;
  }

  .ai-box__list {
    font-size: 0.95rem;
  }

  .ai-closing {
    padding: 14px 16px;
    font-size: 0.95rem;
  }

  .contact-sticker {
    font-size: 12px;
    padding: 5px 12px;
    margin-bottom: 14px;
  }

  .bento-filters-row {
    min-height: 209px;
  }

  .gallery,
  .gallery--full {
    column-count: 1;
  }

  [id] {
    scroll-margin-top: 20px;
  }
}

/* ────────────────────────────────────────────
   PREFERS-REDUCED-MOTION
   ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  .featured-slide {
    animation: none !important;
    opacity: 1 !important;
  }

  .featured-slide--slide-out-left,
  .featured-slide--slide-out-right,
  .featured-slide--slide-in-right,
  .featured-slide--slide-in-left {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  html.theme-transition,
  html.theme-transition *,
  html.theme-transition *::before,
  html.theme-transition *::after {
    transition: none !important;
  }
}

/* ────────────────────────────────────────────
   CUSTOM CURSOR (HOVER & FINE POINTER ONLY)
   ──────────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {

  html,
  body,
  a,
  a:any-link,
  button,
  [role="button"],
  [role="tab"],
  summary,
  label[for],
  select,
  .btn,
  .icon-btn,
  .theme-toggle,
  .carousel-btn,
  .carousel-dot,
  .filter-btn,
  .contact-card,
  .tool-card,
  .lightbox__close,
  .lightbox__nav-btn,
  .card,
  .skip-link,
  .bento-header__cta {
    cursor: var(--cursor-main);
  }

  input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
  textarea,
  [contenteditable="true"] {
    cursor: text;
  }

  :disabled,
  [disabled],
  [aria-disabled="true"],
  button:disabled,
  .btn:disabled,
  .carousel-btn:disabled,
  .filter-btn:disabled {
    cursor: var(--cursor-main);
  }
}

@media (hover: none) and (pointer: coarse) {
  :root {
    --cursor-main: auto;
  }
}

/* ============================================
   PAGE LOADER — SQUARE ACCORDION
   Inspiration: "Square Accordion" loader by Loading UI / shaah1d
   ============================================ */

.page-loader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--bg);
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 200ms ease-out;
  cursor: default;
}

html.has-loader {
  overflow: hidden !important;
}

html.has-loader .page-loader {
  display: flex;
}

.page-loader--fading {
  opacity: 0 !important;
  pointer-events: none;
}

/* Centered square card */
.loader__card {
  background-color: var(--card);
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--sh-lg);
  border-radius: 0;
  padding: 28px 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(280px, 86vw);
  box-sizing: border-box;
}

/* 7x7 Perimeter Grid Ring */
.loader__ring {
  width: 175px;
  height: 175px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  background-color: var(--lime);
  border: var(--border-w) solid var(--ink);
  box-sizing: border-box;
  position: relative;
  user-select: none;
}

/* Inner 5x5 center cutout */
.loader__center {
  grid-column: 2 / 7;
  grid-row: 2 / 7;
  background-color: var(--card);
  border: var(--border-w) solid var(--ink);
  box-sizing: border-box;
}

/* Monospace ASCII block cells */
.loader__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  color: var(--ink);
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(0, 0, 0, 0.9);
  user-select: none;
  box-sizing: border-box;
}

.loader__cell--head {
  color: var(--ink);
  opacity: 1;
}

.loader__cell--trail-1 {
  color: var(--ink);
  opacity: 0.9;
}

.loader__cell--trail-2 {
  color: var(--ink);
  opacity: 0.7;
}

.loader__cell--trail-3 {
  color: var(--ink);
  opacity: 0.5;
}

.loader__cell--track {
  color: var(--ink);
  opacity: 0.3;
}

:root[data-theme="dark"] .loader__cell {
  color: var(--ink);
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(0, 0, 0, 0.9);
}

:root[data-theme="light"] .loader__cell {
  color: var(--ink);
  text-shadow: none;
}

/* Labels below ring */
.loader__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  gap: 4px;
}

.loader__brand {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.5px;
  color: var(--text);
  line-height: 1.2;
}

.loader__status {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text);
  opacity: 0.75;
  line-height: 1.2;
}

/* Accessibility: Skip loader entirely if reduced motion is requested */
@media (prefers-reduced-motion: reduce) {
  .page-loader {
    display: none !important;
  }

  html.has-loader {
    overflow: visible !important;
  }
}