@import url("https://fonts.googleapis.com/css2?family=Anybody:wght@500;700;800&family=DM+Mono:wght@400;500&family=Lexend:wght@300;400;500;600;700&display=swap");

:root {
  --table-black: #121214;
  --clay-coral: #c4786a;
  --pegbar-blue: #4a6fa5;
  --onion-skin: #e8e0f0;
  --frame-paper: #f4f0e8;
  --tape-yellow: #e8c84a;
  --shadow-plum: #2a1f2e;
  --rig-aluminium: #a8a9ad;
  --marker-green: #5b8f6b;
  --ink: #1a181c;
  --muted: #6b6570;
  --shift-x: 0px;
  --shift-y: 0px;
  --overlay-x: 0px;
  --overlay-y: 0px;
  --font-display: "Anybody", sans-serif;
  --font-body: "Lexend", sans-serif;
  --font-mono: "DM Mono", monospace;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  overflow-x: hidden !important;
  max-width: 100vw;
  position: relative;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden !important;
  max-width: 100vw;
  position: relative;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 12% 8%, rgba(232, 224, 240, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 88% 18%, rgba(196, 120, 106, 0.08), transparent 50%),
    linear-gradient(165deg, #161418 0%, var(--table-black) 42%, #1a1520 100%);
  background-attachment: fixed;
  line-height: 1.65;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(196, 120, 106, 0.35) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 38%, rgba(91, 143, 107, 0.4) 0 2px, transparent 3px),
    radial-gradient(circle at 44% 70%, rgba(74, 111, 165, 0.3) 0 1.5px, transparent 3px),
    url("../images/table-surface.jpg");
  background-size: auto, auto, auto, 920px;
  background-blend-mode: soft-light;
  mix-blend-mode: soft-light;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.site-wrap {
  position: relative;
  z-index: 1;
  overflow-x: clip;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  background: rgba(18, 18, 20, 0.92);
  border-bottom: 1px solid rgba(168, 169, 173, 0.22);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(168, 169, 173, 0.35);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--frame-paper);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
}

.nav-desk {
  display: none;
  align-items: center;
  gap: 1.25rem;
}

.nav-desk a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--onion-skin);
  position: relative;
}

.nav-desk a:hover {
  color: var(--pegbar-blue);
}

.nav-desk a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--pegbar-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav-desk a:hover::after {
  transform: scaleX(1);
}

.header-meta {
  display: none;
  align-items: center;
  gap: 1rem;
}

.continuity-readout {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--marker-green);
  border: 1px solid rgba(91, 143, 107, 0.45);
  padding: 0.35rem 0.55rem;
  border-radius: 2px;
  background: rgba(42, 31, 46, 0.55);
}

.burger {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(168, 169, 173, 0.4);
  background: var(--table-black);
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.burger span {
  width: 18px;
  height: 2px;
  background: var(--frame-paper);
  display: block;
  transition: 0.25s var(--ease);
}

.burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  opacity: 0;
}

.burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--table-black);
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  z-index: 999;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav a {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--frame-paper);
  border-bottom: 1px solid rgba(168, 169, 173, 0.2);
  padding-bottom: 0.75rem;
}

body.nav-locked {
  overflow: hidden !important;
}

.btn-frame {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  background: var(--table-black);
  color: var(--frame-paper);
  border: 1px solid var(--clay-coral);
  border-left-width: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  position: relative;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.2s steps(2);
}

.btn-frame::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pegbar-blue);
  flex-shrink: 0;
}

.btn-frame::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--tape-yellow);
}

.btn-frame:hover {
  background: #1a1518;
  border-color: #d48a7a;
  transform: translateY(-2px);
}

.btn-frame:hover .btn-arc {
  width: 100%;
  opacity: 1;
}

.btn-frame .btn-arc {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 6px;
  height: 2px;
  width: 0;
  opacity: 0;
  background: linear-gradient(90deg, transparent, var(--clay-coral), transparent);
  transition: width 0.3s steps(3), opacity 0.2s;
}

.btn-frame.fill-coral {
  background: var(--clay-coral);
  color: var(--table-black);
  border-color: var(--clay-coral);
}

.btn-frame.fill-coral:hover {
  background: #d48a7a;
}

.btn-arc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--pegbar-blue);
  font-weight: 500;
  position: relative;
  padding-bottom: 0.35rem;
}

.btn-arc-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--pegbar-blue);
  transition: box-shadow 0.25s steps(2);
}

.btn-arc-link:hover::after {
  box-shadow:
    4px -3px 0 -1px rgba(74, 111, 165, 0.35),
    8px -5px 0 -1px rgba(74, 111, 165, 0.2);
}

.btn-arc-link::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--marker-green);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-arc-link:hover::before {
  opacity: 1;
}

section {
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease), transform 0.55s steps(4);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.hero {
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2.5rem) 3rem;
  color: var(--frame-paper);
  overflow-x: clip;
}

.hero-stage {
  position: relative;
  display: grid;
  gap: 1.25rem;
  min-height: min(78vh, 820px);
  background:
    linear-gradient(135deg, rgba(42, 31, 46, 0.92), rgba(18, 18, 20, 0.88)),
    url("../images/hero-frame-table.jpg") center / cover;
  border: 1px solid rgba(168, 169, 173, 0.28);
  padding: clamp(1rem, 3vw, 2rem);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 12px auto auto 18px;
  width: 120px;
  height: 18px;
  background:
    radial-gradient(circle at 10px 9px, transparent 5px, var(--rig-aluminium) 5.5px 7px, transparent 7.5px),
    radial-gradient(circle at 34px 9px, transparent 5px, var(--rig-aluminium) 5.5px 7px, transparent 7.5px),
    radial-gradient(circle at 58px 9px, transparent 5px, var(--rig-aluminium) 5.5px 7px, transparent 7.5px),
    radial-gradient(circle at 82px 9px, transparent 5px, var(--rig-aluminium) 5.5px 7px, transparent 7.5px);
  opacity: 0.7;
  pointer-events: none;
}

.frame-strips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-width: 34rem;
  align-self: start;
}

.frame-strips span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.55rem, 5.2vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  background: var(--frame-paper);
  color: var(--table-black);
  padding: 0.35rem 0.55rem;
  display: inline-block;
  transform: rotate(var(--r, 0deg)) translateY(var(--y, 0));
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.25);
  animation: stripIn 0.6s steps(3) both;
}

.frame-strips span:nth-child(1) { --r: -1.2deg; --y: 0; animation-delay: 0.05s; }
.frame-strips span:nth-child(2) { --r: 0.8deg; --y: 8px; animation-delay: 0.12s; }
.frame-strips span:nth-child(3) { --r: -0.5deg; --y: -4px; animation-delay: 0.18s; }
.frame-strips span:nth-child(4) { --r: 1.4deg; --y: 10px; animation-delay: 0.24s; }
.frame-strips span:nth-child(5) { --r: -0.9deg; --y: 2px; animation-delay: 0.3s; }

@keyframes stripIn {
  from { opacity: 0; transform: translateY(12px) rotate(var(--r, 0deg)); }
  to { opacity: 1; transform: translateY(var(--y, 0)) rotate(var(--r, 0deg)); }
}

.continuity-note {
  background: rgba(244, 240, 232, 0.94);
  color: var(--ink);
  padding: 1rem 1.1rem;
  max-width: 22rem;
  border-left: 3px solid var(--tape-yellow);
  box-shadow: 6px 8px 0 rgba(0, 0, 0, 0.2);
  font-size: 0.95rem;
  animation: noteIn 0.7s var(--ease) 0.35s both;
  position: relative;
  z-index: 2;
}

.continuity-note strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pegbar-blue);
  margin-bottom: 0.4rem;
}

@keyframes noteIn {
  from { opacity: 0; transform: translateX(24px) rotate(1deg); }
  to { opacity: 1; transform: none; }
}

.hero-visual {
  position: relative;
  min-height: 260px;
  border: 1px solid rgba(168, 169, 173, 0.35);
  overflow: hidden;
  background: #0d0d10;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 260px;
  transform: translate(calc(var(--shift-x) * 0.4), calc(var(--shift-y) * 0.4));
  transition: transform 0.15s linear;
}

.onion-layer {
  position: absolute;
  inset: 12% 18% 22% 12%;
  background: rgba(232, 224, 240, 0.28);
  border: 1px solid rgba(232, 224, 240, 0.45);
  mix-blend-mode: screen;
  transform: translate(var(--overlay-x), var(--overlay-y));
  animation: onionSettle 1.1s var(--ease) 0.4s both;
  pointer-events: none;
}

@keyframes onionSettle {
  from { opacity: 0; transform: translate(40px, -18px); }
  to { opacity: 1; transform: translate(var(--overlay-x), var(--overlay-y)); }
}

.ghost-object {
  position: absolute;
  width: 42px;
  height: 42px;
  border: 2px solid var(--clay-coral);
  border-radius: 4px;
  background: rgba(196, 120, 106, 0.15);
  opacity: 0;
  animation: ghostPop 0.4s steps(2) forwards;
}

.ghost-object:nth-child(1) { top: 38%; left: 28%; animation-delay: 0.7s; }
.ghost-object:nth-child(2) { top: 34%; left: 42%; animation-delay: 0.95s; opacity: 0; }
.ghost-object:nth-child(3) { top: 30%; left: 56%; animation-delay: 1.2s; border-color: var(--marker-green); background: rgba(91, 143, 107, 0.2); }

@keyframes ghostPop {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 0.85; transform: scale(1); }
}

.motion-arc-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.motion-arc-svg path {
  fill: none;
  stroke: var(--tape-yellow);
  stroke-width: 2;
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  animation: drawArc 1.2s var(--ease) 1.1s forwards;
}

@keyframes drawArc {
  to { stroke-dashoffset: 0; }
}

.frame-anchor {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2.2vw, 1.15rem);
  letter-spacing: 0.08em;
  color: var(--tape-yellow);
  background: rgba(18, 18, 20, 0.82);
  border: 1px solid rgba(232, 200, 74, 0.45);
  padding: 0.55rem 0.8rem;
  width: fit-content;
  animation: counterTick 1.4s steps(6) 0.5s both;
}

@keyframes counterTick {
  0% { opacity: 0; filter: blur(2px); }
  20% { opacity: 1; content: ""; }
  100% { opacity: 1; }
}

.frame-lock-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--tape-yellow);
  color: var(--table-black);
  padding: 0.45rem 0.65rem;
  transform: rotate(-1deg);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
  animation: tapeIn 0.45s steps(2) both;
}

.chip:nth-child(2) { transform: rotate(1.2deg); animation-delay: 0.15s; }
.chip:nth-child(3) { transform: rotate(-0.6deg); animation-delay: 0.28s; }

@keyframes tapeIn {
  from { opacity: 0; transform: translateY(-10px) rotate(-4deg); }
  to { opacity: 1; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.marker-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  padding: 1rem clamp(1rem, 3vw, 2.5rem) 2.5rem;
  overflow-x: clip;
}

.marker-item {
  background: var(--frame-paper);
  color: var(--ink);
  padding: 0.75rem 1rem;
  border-top: 3px solid var(--clay-coral);
  font-size: 0.88rem;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(168, 169, 173, 0.35);
}

.marker-item::before {
  content: attr(data-frame);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--pegbar-blue);
  display: block;
  margin-bottom: 0.25rem;
  letter-spacing: 0.08em;
}

.static-field {
  padding: 2.5rem clamp(1rem, 3vw, 2.5rem);
  color: var(--frame-paper);
  overflow-x: clip;
}

.static-grid {
  display: grid;
  gap: 1rem;
}

.table-panel {
  background:
    linear-gradient(160deg, rgba(42, 31, 46, 0.9), rgba(18, 18, 20, 0.92)),
    url("../images/motion-arc-marks.jpg") center / cover;
  min-height: 280px;
  border: 1px solid rgba(168, 169, 173, 0.3);
  padding: 1.5rem;
  position: relative;
}

.table-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.05;
  max-width: 14ch;
  margin: 0 0 1rem;
}

.note-cards {
  display: grid;
  gap: 0.75rem;
}

.note-card {
  background: rgba(244, 240, 232, 0.95);
  color: var(--ink);
  padding: 1rem;
  border-left: 3px solid var(--pegbar-blue);
  position: relative;
}

.note-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-family: var(--font-display);
}

.note-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.connector {
  display: none;
}

.outputs {
  padding: 2.5rem clamp(1rem, 3vw, 2.5rem);
  overflow-x: clip;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tape-yellow);
  margin-bottom: 0.75rem;
}

.outputs-plate {
  display: grid;
  gap: 1rem;
  position: relative;
}

.motion-locked {
  background: var(--shadow-plum);
  color: var(--frame-paper);
  padding: 1.25rem;
  border: 1px solid rgba(196, 120, 106, 0.45);
  display: grid;
  gap: 1rem;
}

.motion-locked img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border: 1px solid rgba(168, 169, 173, 0.3);
}

.frame-held {
  background: var(--frame-paper);
  color: var(--ink);
  padding: 1rem;
  border: 1px solid rgba(168, 169, 173, 0.4);
  display: grid;
  gap: 0.55rem;
  transition: transform 0.25s steps(2), box-shadow 0.25s;
}

.frame-held:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 0 rgba(196, 120, 106, 0.25);
}

.frame-held img {
  height: 120px;
  width: 100%;
  object-fit: cover;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.meta-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--onion-skin);
  color: var(--shadow-plum);
  padding: 0.25rem 0.4rem;
}

.shift-caption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--pegbar-blue);
}

.thesis {
  padding: 3rem clamp(1rem, 3vw, 2.5rem);
  background:
    linear-gradient(120deg, rgba(18, 18, 20, 0.94), rgba(42, 31, 46, 0.92)),
    url("../images/onion-skin-overlay.jpg") center / cover;
  color: var(--frame-paper);
  overflow-x: clip;
}

.thesis-inner {
  display: grid;
  gap: 1.25rem;
  position: relative;
}

.thesis h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 0.95;
  margin: 0;
  max-width: 16ch;
  background: linear-gradient(90deg, var(--frame-paper) 70%, transparent);
  -webkit-background-clip: text;
}

.thesis-card {
  background: var(--frame-paper);
  color: var(--ink);
  padding: 1.25rem;
  max-width: 34rem;
  border: 1px solid rgba(168, 169, 173, 0.35);
  box-shadow: 10px 12px 0 rgba(0, 0, 0, 0.25);
}

.float-annot {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--tape-yellow);
  border: 1px dashed rgba(232, 200, 74, 0.55);
  padding: 0.5rem 0.7rem;
  width: fit-content;
  transform: rotate(-2deg);
}

.services-frames {
  padding: 2.5rem clamp(1rem, 3vw, 2.5rem);
  overflow-x: clip;
  color: var(--frame-paper);
}

.service-table {
  position: relative;
  min-height: 420px;
  background:
    linear-gradient(160deg, rgba(18, 18, 20, 0.88), rgba(42, 31, 46, 0.85)),
    url("../images/sequence-table.jpg") center / cover;
  border: 1px solid rgba(168, 169, 173, 0.28);
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
}

.svc-frame {
  background: rgba(244, 240, 232, 0.94);
  color: var(--ink);
  padding: 1rem;
  border: 1px solid rgba(168, 169, 173, 0.4);
  position: relative;
}

.svc-frame.primary {
  background: rgba(232, 224, 240, 0.95);
  border-color: var(--clay-coral);
  border-width: 2px;
}

.svc-frame h3 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.svc-meta {
  display: grid;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.5rem 0;
}

.svc-meta span strong {
  color: var(--shadow-plum);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
}

.proof {
  padding: 2.5rem clamp(1rem, 3vw, 2.5rem);
  overflow-x: clip;
}

.proof-compare {
  display: grid;
  gap: 1rem;
}

.proof-static {
  background: #2a2528;
  color: var(--onion-skin);
  padding: 1.5rem;
  border: 1px dashed rgba(168, 169, 173, 0.4);
  opacity: 0.85;
}

.proof-sequence {
  background: var(--frame-paper);
  color: var(--ink);
  padding: 1.75rem;
  border: 2px solid var(--marker-green);
  transform: rotate(-0.4deg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.proof-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.proof-markers span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--onion-skin);
  padding: 0.35rem 0.5rem;
  color: var(--shadow-plum);
}

.about-method {
  padding: 2.5rem clamp(1rem, 3vw, 2.5rem);
  color: var(--frame-paper);
  overflow-x: clip;
}

.about-layout {
  display: grid;
  gap: 1rem;
}

.about-layout img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border: 1px solid rgba(168, 169, 173, 0.3);
}

.about-copy {
  background: rgba(244, 240, 232, 0.95);
  color: var(--ink);
  padding: 1.25rem;
}

.process {
  padding: 2.5rem clamp(1rem, 3vw, 2.5rem);
  overflow-x: clip;
  color: var(--frame-paper);
}

.process-board {
  display: grid;
  gap: 0.75rem;
}

.step-frame {
  background: var(--frame-paper);
  color: var(--ink);
  padding: 1rem 1rem 1rem 3.2rem;
  position: relative;
  border-left: 4px solid var(--pegbar-blue);
}

.step-frame::before {
  content: attr(data-step);
  position: absolute;
  left: 0.7rem;
  top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--clay-coral);
}

.step-frame h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
}

.step-frame p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.marquee-wrap {
  overflow: hidden;
  max-width: 100vw;
  padding: 1.5rem 0;
  background: var(--shadow-plum);
  border-top: 1px solid rgba(168, 169, 173, 0.25);
  border-bottom: 1px solid rgba(168, 169, 173, 0.25);
}

.marquee-row {
  display: flex;
  width: max-content;
  gap: 1.5rem;
  animation: marqueeL 38s linear infinite;
  will-change: transform;
}

.marquee-row.reverse {
  animation: marqueeR 42s linear infinite;
  margin-top: 0.75rem;
}

.marquee-row span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--frame-paper);
  white-space: nowrap;
  border: 1px solid rgba(232, 200, 74, 0.35);
  padding: 0.4rem 0.8rem;
  background: rgba(18, 18, 20, 0.55);
}

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

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

.final-cta {
  padding: 3rem clamp(1rem, 3vw, 2.5rem);
  overflow-x: clip;
}

.cta-card {
  background:
    linear-gradient(145deg, rgba(18, 18, 20, 0.9), rgba(42, 31, 46, 0.88)),
    url("../images/exposure-cards.jpg") center / cover;
  border: 2px solid rgba(196, 120, 106, 0.55);
  padding: clamp(1.5rem, 4vw, 3rem);
  color: var(--frame-paper);
  position: relative;
}

.cta-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(232, 224, 240, 0.35);
  pointer-events: none;
}

.cta-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  margin: 0 0 0.75rem;
  max-width: 14ch;
}

.contact-preview {
  padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem;
  overflow-x: clip;
}

.contact-preview-panel {
  background: var(--frame-paper);
  padding: 1.25rem;
  border: 1px solid rgba(168, 169, 173, 0.4);
  display: grid;
  gap: 0.5rem;
  color: var(--ink);
}

.contact-preview-panel .label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pegbar-blue);
}

.site-footer {
  background: var(--table-black);
  color: var(--onion-skin);
  padding: 2.5rem clamp(1rem, 3vw, 2.5rem);
  border-top: 1px solid rgba(168, 169, 173, 0.25);
  overflow-x: clip;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-grid h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tape-yellow);
  margin: 0 0 0.75rem;
}

.footer-grid a,
.footer-grid p {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  color: var(--onion-skin);
}

.footer-grid a:hover {
  color: var(--pegbar-blue);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(168, 169, 173, 0.2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--rig-aluminium);
}

.page-hero {
  padding: 2rem clamp(1rem, 3vw, 2.5rem) 1rem;
  color: var(--frame-paper);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.8rem);
  line-height: 0.98;
  margin: 0 0 0.75rem;
  max-width: 16ch;
}

.page-hero p {
  max-width: 40rem;
  color: var(--onion-skin);
}

.content-band {
  padding: 1rem clamp(1rem, 3vw, 2.5rem) 3rem;
  overflow-x: clip;
}

.prose-panel {
  background:
    linear-gradient(180deg, rgba(244, 240, 232, 0.96), rgba(244, 240, 232, 0.98)),
    url("../images/frame-paper-texture.jpg") top right / 280px auto no-repeat,
    var(--frame-paper);
  color: var(--ink);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(168, 169, 173, 0.35);
  max-width: 920px;
}

.prose-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin: 1.5rem 0 0.6rem;
}

.prose-panel p {
  margin: 0 0 1rem;
}

.prose-panel ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.image-led {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.image-led img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border: 1px solid rgba(168, 169, 173, 0.35);
}

.accordion {
  display: grid;
  gap: 0.65rem;
}

.acc-item {
  background: var(--frame-paper);
  border: 1px solid rgba(168, 169, 173, 0.4);
  overflow: hidden;
}

.acc-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 1rem 1.1rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.acc-btn::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--clay-coral);
}

.acc-item.is-open .acc-btn::after {
  content: "–";
}

.acc-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
  background: rgba(232, 224, 240, 0.45);
}

.acc-item.is-open .acc-panel {
  max-height: 640px;
}

.acc-panel-inner {
  padding: 0 1.1rem 1.1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.plate {
  background: rgba(42, 31, 46, 0.85);
  border: 1px solid rgba(168, 169, 173, 0.3);
  padding: 1rem;
  margin-bottom: 1.25rem;
  color: var(--frame-paper);
  display: grid;
  gap: 0.85rem;
}

.plate.alt {
  background: rgba(18, 18, 20, 0.88);
}

.plate.wide-feature {
  grid-template-columns: 1fr;
}

.plate img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.contact-layout {
  display: grid;
  gap: 1.25rem;
}

.exposure-form {
  background: var(--frame-paper);
  padding: 1.25rem;
  border: 2px solid rgba(196, 120, 106, 0.5);
  box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.2);
  position: relative;
}

.exposure-form::before {
  content: "CONTINUITY REQUEST";
  position: absolute;
  top: -0.65rem;
  left: 1rem;
  background: var(--tape-yellow);
  color: var(--table-black);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: var(--shadow-plum);
}

.form-group input,
.form-group textarea {
  width: 100%;
  border: 1px solid rgba(168, 169, 173, 0.55);
  background: #fffdf8;
  padding: 0.75rem 0.85rem;
  color: var(--ink);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--pegbar-blue);
  outline-offset: 1px;
}

.form-group input.is-invalid,
.form-group textarea.is-invalid {
  border-color: #b5473d;
  background: #fff5f3;
}

.form-group .error {
  display: none;
  font-size: 0.8rem;
  color: #b5473d;
  margin-top: 0.3rem;
}

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

.map-frame {
  border: 1px solid rgba(168, 169, 173, 0.4);
  overflow: hidden;
  min-height: 280px;
  background: var(--shadow-plum);
}

.map-frame iframe {
  width: 100%;
  height: 300px;
  border: 0;
  filter: grayscale(0.25) contrast(1.05);
}

.legal-page {
  padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem;
  overflow-x: clip;
}

.legal-shell {
  max-width: 900px;
  margin: 0 auto;
}

.legal-panel {
  background: var(--frame-paper);
  color: var(--ink);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid rgba(168, 169, 173, 0.35);
}

.legal-panel h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 1rem;
}

.legal-panel h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 1.75rem 0 0.65rem;
}

.legal-panel h3 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
}

.legal-panel p,
.legal-panel li {
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.legal-nav a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--onion-skin);
  color: var(--shadow-plum);
  padding: 0.35rem 0.55rem;
}

.thanks-panel {
  min-height: 60vh;
  display: grid;
  place-items: center;
  padding: 3rem 1rem;
}

.thanks-card {
  background: var(--frame-paper);
  padding: 2rem;
  max-width: 480px;
  border: 2px solid var(--marker-green);
  text-align: left;
  box-shadow: 12px 14px 0 rgba(0, 0, 0, 0.25);
}

.thanks-card h1 {
  font-family: var(--font-display);
  margin: 0 0 0.75rem;
}

.stat {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--clay-coral);
}

@media (min-width: 720px) {
  .marker-strip {
    grid-template-columns: repeat(5, 1fr);
  }

  .static-grid {
    grid-template-columns: 1.4fr 1fr;
  }

  .note-cards {
    align-content: start;
  }

  .outputs-plate {
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto;
  }

  .motion-locked {
    grid-row: span 2;
  }

  .proof-compare {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: stretch;
  }

  .about-layout {
    grid-template-columns: 1.1fr 1fr;
  }

  .process-board {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .service-table {
    grid-template-columns: 1.2fr 1fr 1fr;
    grid-template-areas:
      "a b c"
      "a d e"
      "f f e";
  }

  .svc-frame:nth-child(1) { grid-area: a; }
  .svc-frame:nth-child(2) { grid-area: b; }
  .svc-frame:nth-child(3) { grid-area: c; }
  .svc-frame:nth-child(4) { grid-area: d; }
  .svc-frame:nth-child(5) { grid-area: e; }
  .svc-frame:nth-child(6) { grid-area: f; }

  .contact-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .plate.wide-feature {
    grid-template-columns: 1.2fr 1fr;
  }

  .image-led {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1025px) {
  .nav-desk,
  .header-meta {
    display: flex;
  }

  .burger {
    display: none;
  }

  .hero-stage {
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-rows: auto auto auto 1fr auto;
    align-items: start;
  }

  .frame-strips {
    grid-column: 1;
  }

  .continuity-note {
    grid-column: 1;
    justify-self: start;
  }

  .hero-visual {
    grid-column: 2;
    grid-row: 1 / span 4;
    min-height: 100%;
  }

  .frame-anchor {
    grid-column: 1;
  }

  .frame-lock-chips {
    grid-column: 1 / -1;
  }

  .hero-actions {
    grid-column: 1 / -1;
  }

  .parallax-safe {
    transform: translateY(calc(var(--py, 0) * 1px));
  }

  .thesis-inner {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: end;
  }

  .float-annot {
    position: absolute;
    right: 8%;
    top: 12%;
  }
}

@media (max-width: 1024px) {
  .service-table {
    display: flex;
    flex-direction: column;
  }

  .svc-frame.primary {
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .marquee-row,
  .marquee-row.reverse {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
