/* ==========================================================================
   Round 3 Studios — public site
   Order: tokens → base → shared components (nav, buttons, footer) → pages.
   Page-specific blocks are appended in phase 1, each under its own banner.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* Backgrounds run edge to edge; --gutter keeps the content on the 1440 column (tokens.css). */
main {
  overflow: hidden;
}

/* Type scale ------------------------------------------------------------- */

.h1 {
  margin: 0;
  font-size: var(--fs-h1);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.h2 {
  margin: 0;
  font-size: var(--fs-h2);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.lead {
  margin: 0;
  font-size: var(--fs-lead);
  font-weight: 300;
  line-height: 1.45;
  color: var(--text-2);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--text-3);
}

/* Section rhythm --------------------------------------------------------- */

.sec {
  padding: var(--sec-y) var(--gutter);
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Buttons & chips
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding: 0 22px;
  border: 1px solid var(--line-3);
  background: transparent;
  color: var(--text);
  font: 700 14px/1 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  flex: none;
  transition: box-shadow var(--t-med) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.btn:hover {
  border-color: var(--text);
  box-shadow: 0 0 18px var(--red-glow-soft);
}

.btn--red {
  background: var(--red-ui);
  border-color: var(--red-ui);
  color: #fff;
}

.btn--red:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  box-shadow: 0 0 22px rgba(237, 29, 43, 0.45);
}

.btn--sm { height: 44px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--chip-h);
  padding: 0 12px;
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  flex: none;
}

@media (max-width: 600px) {
  .btn {
    padding: 0 16px;
    font-size: 12px;
    letter-spacing: 0.06em;
  }

  .chip {
    padding: 0 9px;
    font-size: 10px;
  }
}

/* Status dot ------------------------------------------------------------- */

@keyframes glow {
  0%,
  100% { opacity: 1; box-shadow: 0 0 6px 2px rgba(237, 29, 43, 0.55); }
  50% { opacity: 0.7; box-shadow: 0 0 14px 6px rgba(237, 29, 43, 0.25); }
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot--red {
  background: var(--red);
  animation: glow 2.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .dot--red { animation: none; }
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 var(--edge, var(--gutter));
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand__logo {
  width: 40px;
  height: 40px;
  transition: filter var(--t-fast) var(--ease);
}

.brand:hover .brand__logo {
  filter: drop-shadow(0 0 10px rgba(237, 29, 43, 0.45));
}

.brand__rule {
  display: inline-block;
  width: 1px;
  height: 24px;
  background: var(--line-2);
}

.brand__word {
  color: var(--text-2);
  letter-spacing: 0.22em;
}

.brand:hover .brand__word {
  color: var(--text);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__link {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--t-fast) var(--ease), text-shadow var(--t-fast) var(--ease);
}

.nav__link:hover,
.nav__link.is-on {
  color: var(--red-text);
  text-shadow: 0 0 14px var(--red-glow);
}

.nav__cta {
  height: 44px;
  padding: 0 20px;
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line-2);
  flex: none;
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
}

.burger:hover {
  border-color: var(--red);
  box-shadow: 0 0 14px rgba(237, 29, 43, 0.25);
}

@media (max-width: 900px) {
  .nav { height: 68px; }
  .nav__links { gap: 12px; }
  .nav__link,
  .brand__rule,
  .brand__word { display: none; }
  .burger { display: inline-flex; }
}

@media (max-width: 600px) {
  .nav { height: 60px; }
  .nav__cta { display: none; }
  .burger { width: 40px; height: 40px; }
}

/* --------------------------------------------------------------------------
   Menu (phones / tablets) — :target overlay, no JS needed
   -------------------------------------------------------------------------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 0 var(--gutter) 28px;
  overflow-y: auto;
  background: var(--ink);
}

.menu:target { display: flex; }

.menu__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
  margin: 0 calc(-1 * var(--gutter)) 24px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
}

.menu__bar .burger { display: inline-flex; }

.burger--x span:first-child { transform: translateY(7px) rotate(45deg); }
.burger--x span:nth-child(2) { opacity: 0; }
.burger--x span:last-child { transform: translateY(-7px) rotate(-45deg); }

.menu__links {
  display: flex;
  flex-direction: column;
}

.menu__link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  transition: color var(--t-fast) var(--ease), text-shadow var(--t-fast) var(--ease);
}

.menu__link:hover {
  color: var(--red-text);
  text-shadow: 0 0 14px var(--red-glow);
}

.menu__num {
  font-size: 11px;
  color: var(--red-text);
}

.menu__foot {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.menu__cta {
  align-self: stretch;
  height: 52px;
}

.menu__soc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.menu__soc-head { width: 100%; }

.menu__soc a {
  font-size: 14px;
  color: var(--text-2);
}

.menu__line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.menu__line .mono { color: var(--text-4); }

@media (max-width: 600px) {
  .menu__bar { height: 60px; }
  .menu__link { padding: 18px 0; font-size: 40px; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--ink-3);
  border-top: 1px solid var(--line);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto;
  gap: 32px;
  padding: 64px var(--gutter) 48px;
}

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

.footer__brand img {
  width: 200px;
  height: 200px;
}

.footer__tag {
  max-width: 32ch;
  font-size: 14px;
  color: var(--text-2);
}

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

.fcol__head {
  margin-bottom: 6px;
}

.fcol a {
  font-size: 15px;
  color: var(--text-2);
  transition: color var(--t-fast) var(--ease), text-shadow var(--t-fast) var(--ease);
}

.fcol a:hover {
  color: var(--red-text);
  text-shadow: 0 0 14px var(--red-glow);
}

.footer__top {
  align-self: start;
  height: 48px;
}

.footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 20px var(--gutter);
  border-top: 1px solid var(--line);
}

.footer__bar .mono {
  color: var(--text-4);
}

.footer__build {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer__sep {
  color: var(--line-3);
}

.allin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--red-text);
  font-weight: 700;
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
    padding-top: 48px;
    padding-bottom: 40px;
  }

  .footer__brand {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }

  .footer__brand img {
    width: 120px;
    height: 120px;
    flex: none;
  }

  .fcol--follow {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 18px;
  }

  .fcol--follow .fcol__head {
    width: 100%;
    margin-bottom: 0;
  }

  .footer__top {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 600px) {
  .footer__grid {
    gap: 28px 20px;
    padding-top: 40px;
    padding-bottom: 32px;
  }

  .footer__brand { gap: 16px; }
  .footer__brand img { width: 72px; height: 72px; }
  .footer__tag { font-size: 13px; max-width: none; }
  .fcol { gap: 8px; }
  .fcol a { font-size: 14px; }

  .fcol--follow a {
    padding: 6px 10px;
    border: 1px solid var(--line);
    font-size: 13px;
  }

  .footer__top {
    justify-self: stretch;
    height: 46px;
  }

  .footer__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 16px;
    padding-bottom: 20px;
  }

  .footer__bar .mono { font-size: 10px; }
}

/* --------------------------------------------------------------------------
   Shared components
   -------------------------------------------------------------------------- */

/* Section header: title left, meta right ------------------------------- */

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0 0 40px;
}

.sec-head--tight {
  margin-bottom: 28px;
}

.sec--alt {
  background: var(--ink-2);
}

.sec--flush {
  border-top: 0;
}

.mono--light { color: var(--text); }
.mono--live { display: inline-flex; align-items: center; gap: 8px; color: #7fd9a8; }

a.mono--link {
  color: var(--text);
  transition: color var(--t-fast) var(--ease), text-shadow var(--t-fast) var(--ease);
}

a.mono--link:hover {
  color: var(--red-text);
  text-shadow: 0 0 14px var(--red-glow);
}

/* Chips ------------------------------------------------------------------ */

.chip--sm { height: 28px; }
.chip--red { border-color: var(--red); color: var(--red-text); }
.chip--teal { border-color: var(--mls-teal); color: var(--mls-teal); }
.chip--patch { border-color: #f5c542; color: #f5c542; }
.chip--update { border-color: var(--mls-peach); color: var(--mls-peach); }
.chip--devlog { border-color: var(--mls-teal); color: var(--mls-teal); }
.chip--studio { border-color: var(--red); color: var(--red-text); }

.chip--live {
  height: 36px;
  padding: 0 14px;
  border: 0;
  background: var(--mls-pink);
  color: var(--ink);        /* dark label: white on pink is only 2.4:1 */
}

.chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.18);
}

/* Filter chip (button) */

.chip--filter {
  height: 34px;
  border-color: var(--line-3);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.chip--filter:hover { border-color: var(--text); }

.chip--filter.is-on {
  background: var(--text);
  border-color: var(--text);
  color: var(--ink);
}

.chip--dim { color: var(--text-4); }

/* Store lockups (MLS palette) ------------------------------------------- */

.store {
  display: inline-flex;
  align-items: center;
  height: var(--btn-h);
  padding: 0 18px;
  background: rgba(1, 62, 89, 0.55);
  border: 1px solid rgba(127, 227, 201, 0.35);
  white-space: nowrap;
  flex: none;
  transition: border-color var(--t-fast) var(--ease);
}

.store:hover { border-color: var(--mls-teal); }

.store img {
  height: 20px;
  width: auto;
}

.btn--teal {
  border-color: var(--mls-teal);
  color: var(--mls-teal);
}

@media (max-width: 600px) {
  .store { padding: 0 12px; }
  .store img { height: 16px; }
}

/* Live dot (green) -------------------------------------------------------- */

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(127, 217, 168, 0.6); }
  50% { opacity: 0.45; box-shadow: 0 0 0 6px rgba(127, 217, 168, 0); }
}

.dot--live {
  width: 9px;
  height: 9px;
  background: #7fd9a8;
  animation: pulse 2.2s ease-in-out infinite;
}

/* Dotted pattern surface -------------------------------------------------- */

.pattern {
  background-image: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 1.5px);
  background-size: 28px 28px;
}

/* Post card (build log) --------------------------------------------------- */

.post:target { outline: 2px solid var(--red); outline-offset: 4px; }

.post {
  scroll-margin-top: 104px; /* clear the sticky nav when opened from Home (/log#log-12) */
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-med) var(--ease);
}

.post:hover {
  border-color: var(--line-3);
  box-shadow: 0 0 24px rgba(237, 29, 43, 0.14);
}

.post__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post__body--pad { padding-top: 20px; }
.post__title--md { font-size: 22px; }

.post__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 0 22px 22px;
}

.post__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.post__title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.post__source {
  margin-top: auto;
  padding-top: 4px;
}

@media (max-width: 1200px) {
  .post__title { font-size: 20px; }
}

@media (max-width: 900px) {
  .post__body { gap: 6px; padding: 0 16px 16px; }
  .post__title { font-size: 17px; }
  .post .chip { height: 24px; font-size: 10px; }
  .post .mono { font-size: 10px; letter-spacing: 0.1em; }
}

/* Card (join the lab, contact) -------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 260px;
  padding: 32px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-med) var(--ease);
}

.card:hover {
  border-color: var(--line-3);
  box-shadow: 0 0 24px rgba(237, 29, 43, 0.14);
}

.card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card__title {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.card__text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
}

.card__cta {
  align-self: flex-start;
  margin-top: auto;
}

@media (max-width: 900px) {
  .card { min-height: 0; padding: 24px 28px; gap: 10px; }
  .card__title { font-size: 26px; }
  .card__cta { margin-top: 14px; }
}

@media (max-width: 600px) {
  .card { padding: 20px; }
  .card__title { font-size: 22px; }
  .card__cta { width: 100%; margin-top: 12px; }
}

/* Crew member ------------------------------------------------------------- */

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

.crew__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  outline: 1px solid transparent;
  filter: grayscale(1) contrast(1.05);
  transition: box-shadow var(--t-med) var(--ease), outline-color var(--t-med) var(--ease);
}

.crew__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  font-size: 48px;
  font-weight: 900;
  color: var(--line-2);
}

.crew:hover .crew__photo {
  outline-color: var(--red);
  box-shadow: 0 0 26px rgba(237, 29, 43, 0.3);
}

.crew__name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.crew__in {
  opacity: 0.45;
  transition: opacity var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.crew:hover .crew__in {
  opacity: 1;
  color: var(--red-text);
}

/* 6-up grid on desktop, 3-up on laptop/tablet, swipe row on phones (.snap-sm). */

.crewgrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.crewgrid--wide { gap: 20px; }

@media (max-width: 1200px) {
  .crewgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .crew__name { font-size: 14px; }
  .crewgrid { gap: 12px; }
  .crewgrid > .crew { flex: 0 0 150px; }
}

/* Horizontal snap scrollers --------------------------------------------------
   .snap-md turns a grid into a swipeable row at ≤900px, .snap-sm at ≤600px.
   Children set their own flex-basis in the page stylesheet. The doubled
   selector outranks the page-level `display: grid` without !important. */

@media (max-width: 900px) {
  .snap-md.snap-md {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter);
  }

  .snap-md::-webkit-scrollbar { display: none; }
  .snap-md > * { scroll-snap-align: start; }
  .snap-md > :last-child { margin-right: var(--gutter); }
}

@media (max-width: 600px) {
  .snap-sm.snap-sm {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter);
  }

  .snap-sm::-webkit-scrollbar { display: none; }
  .snap-sm > * { scroll-snap-align: start; }
  .snap-sm > :last-child { margin-right: var(--gutter); }
}

/* Section-head variants ---------------------------------------------------- */

.sec-head--end { align-items: flex-end; }

.sec-head__lead {
  margin: 0;
  max-width: 52ch;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-2);
  text-align: right;
}

.sec--tight { padding-top: 0; }

.mono--dim { color: var(--text-4); }

.crumbs a { transition: color var(--t-fast) var(--ease); }
.crumbs a:hover { color: var(--text); }
.crumbs__sep { opacity: 0.5; }

@media (max-width: 900px) {
  .sec-head--end { align-items: flex-start; }
  .sec-head__lead { max-width: none; text-align: left; }
}

@media (max-width: 600px) {
  .sec-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 24px; }
  .sec-head__lead { font-size: 16px; }
}

/* Page head (sub-pages): breadcrumb + h1, lead on the right or below ---- */

.phead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 32px;
  padding: 88px var(--gutter) 48px;
}

.phead--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 28px;
  padding-bottom: 64px;
}

.phead__title {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.phead__lead {
  max-width: 42ch;
  text-align: right;
}

.phead--stack .phead__lead {
  max-width: none;
  font-size: 24px;
  text-align: left;
}

.block {
  padding: 0 var(--gutter) var(--sec-y);
}

.block .sec-head { margin-bottom: 32px; }

.ulink {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tone--red { color: var(--red-text); }
.tone--ok { color: #7fd9a8; }

@media (max-width: 1200px) {
  .phead--stack .phead__lead { font-size: 20px; }
}

@media (max-width: 900px) {
  .phead { flex-direction: column; align-items: flex-start; gap: 20px; padding-bottom: 32px; }
  .phead__lead { max-width: 52ch; font-size: 18px; text-align: left; }
}

@media (max-width: 600px) {
  .phead { padding-top: 56px; }
  .phead__lead,
  .phead--stack .phead__lead { font-size: 16px; }
}

/* Marquee (sub-pages, above the footer) ----------------------------------- */

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marq {
  overflow: hidden;
  padding: 32px 0 24px;
  border-top: 1px solid var(--line);
  background: var(--ink);
  font-size: 96px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #1f1e20;
  pointer-events: none;
}

.marq__track {
  display: inline-block;
  animation: marquee 40s linear infinite;
}

.marq span {
  display: inline-block;
  padding-right: 0.45em;
}

@media (prefers-reduced-motion: reduce) { .marq__track { animation: none; } }
@media (max-width: 1200px) { .marq { font-size: 80px; } }
@media (max-width: 900px) { .marq { font-size: 64px; padding: 24px 0 18px; } }
@media (max-width: 600px) { .marq { font-size: 40px; padding: 18px 0 12px; } }

/* --------------------------------------------------------------------------
   Error and holding pages (404, 405, 403, 500, maintenance)
   A lab creature with a specimen tag beside the copy.
   -------------------------------------------------------------------------- */

@keyframes oops-bob {
  0%,
  100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-14px) rotate(1.5deg); }
}

.oops {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 56px;
  min-height: 72vh;
  padding: var(--sec-y) var(--gutter);
  overflow: hidden;
}

.oops--bare { min-height: calc(100vh - 88px); }

.oops__copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.oops__code {
  font-size: clamp(120px, 17vw, 240px);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 2px var(--line-3);
  user-select: none;
}

.oops__kicker { color: var(--red-text); }

.oops__title { max-width: 12ch; }

.oops__lead { max-width: 52ch; }

.oops__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.oops__copy .debug {
  width: 100%;
  max-height: 320px;
  margin: 12px 0 0;
}

.oops__specimen {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 22px;
  margin: 0;
}

.oops__halo {
  position: absolute;
  top: 4%;
  left: 50%;
  width: min(420px, 92%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--red-glow-soft) 0%, rgba(237, 29, 43, 0.06) 45%, transparent 70%);
  transform: translateX(-50%);
}

.oops__creature {
  position: relative;
  width: min(100%, 360px);
  height: auto;
  filter: drop-shadow(0 28px 24px rgba(0, 0, 0, 0.55));
  animation: oops-bob 4.8s ease-in-out infinite;
}

.oops__tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  background: var(--ink-2);
  color: var(--text-2);
  transform: rotate(-2deg);
}

.oops__stripes {
  flex: none;
  width: 30px;
  height: 12px;
  background: repeating-linear-gradient(-45deg, var(--mls-gold) 0 6px, var(--ink-3) 6px 12px);
}

@media (prefers-reduced-motion: reduce) {
  .oops__creature { animation: none; }
}

@media (max-width: 900px) {
  .oops {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    min-height: 0;
  }

  .oops__specimen { order: -1; }
  .oops__creature { width: min(60%, 240px); }
  .oops__halo { width: min(300px, 80%); top: 0; }
  .oops__code { font-size: clamp(88px, 26vw, 140px); }
}

.debug {
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  font: 12px/1.5 var(--font-mono);
  color: var(--text-2);
  text-transform: none;
  white-space: pre;
}

/* Bare shell: logo bar only (500, 403, maintenance) */

.bare__head { padding: 24px var(--gutter); }

.bare__home {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.bare__logo {
  width: 40px;
  height: 40px;
}

.bare__main { min-height: calc(100vh - 88px); }

/* Admin-only notice while maintenance mode is on */
.maint {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 8px var(--gutter);
  background: var(--red-ui);
  font: 600 12px/1.4 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
}

/* Text for screen readers and search engines only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
