/* JSL Construction - futuristic theme
   Brand: black / white / signal red #E30613 / slate. Fonts: Space Grotesk + JetBrains Mono. */

:root {
  --bg: #060708;
  --bg-2: #0c0e11;
  --panel: rgba(12, 14, 18, 0.62);
  --panel-solid: #0d0f13;
  --line: rgba(144, 161, 185, 0.16);
  --line-strong: rgba(144, 161, 185, 0.32);
  --text: #f3f5f8;
  --muted: #9aa7b8;
  --steel: #90a1b9;
  --steel-dim: #6e809a;
  --red: #e30613;
  --red-text: #f2303c;   /* small red text: brand red nudged to pass WCAG AA contrast */
  --red-hot: #ff2a36;
  --red-glow: rgba(227, 6, 19, 0.45);
  --bg-rgb: 6, 7, 8;          /* used for translucent overlays of the page color */
  --tint-rgb: 255, 255, 255;  /* subtle overlays (scanlines, ghost buttons, inputs) */
  --panel-soft: rgba(12, 14, 18, 0.5);
  --outline-ink: rgba(243, 245, 248, 0.9);

  --font: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

/* Light theme: same red + slate, on the off-white of the current site */
:root[data-theme="light"] {
  --bg: #f2f3f5;
  --bg-2: #e9ecf0;
  --bg-rgb: 242, 243, 245;
  --tint-rgb: 15, 23, 42;
  --panel: rgba(255, 255, 255, 0.74);
  --panel-soft: rgba(255, 255, 255, 0.6);
  --panel-solid: #ffffff;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.22);
  --text: #0b0c0e;
  --muted: #45556c;
  --steel: #45556c;
  --steel-dim: #5a6b84;
  --red-text: #cc0511;
  --red-glow: rgba(227, 6, 19, 0.22);
  --outline-ink: rgba(11, 12, 14, 0.85);
}
body { transition: background-color 0.5s, color 0.5s; }
[data-theme="light"] .veil {
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb),0.9) 0%, rgba(var(--bg-rgb),0.5) 32%, rgba(var(--bg-rgb),0) 58%),
    radial-gradient(rgba(15,23,42,0.07) 1px, transparent 1.4px) 0 0 / 22px 22px;
}
@media (max-width: 960px) {
  [data-theme="light"] .veil { background: linear-gradient(180deg, rgba(var(--bg-rgb),0.6), rgba(var(--bg-rgb),0.8)), radial-gradient(rgba(15,23,42,0.07) 1px, transparent 1.4px) 0 0 / 22px 22px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 0.95; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
::selection { background: var(--red); color: #fff; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--red); color: #fff; padding: 8px 14px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- 3D canvas + overlays ---------- */
#scene {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh; height: 100lvh;
  z-index: 0;
  display: block;
}
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb),0.88) 0%, rgba(var(--bg-rgb),0.55) 34%, rgba(var(--bg-rgb),0) 62%),
    linear-gradient(0deg, rgba(var(--bg-rgb),0.7) 0%, rgba(var(--bg-rgb),0) 30%),
    repeating-linear-gradient(0deg, rgba(var(--tint-rgb),0.018) 0 1px, transparent 1px 3px);
}
.no-webgl #scene { display: none; }
.no-webgl body {
  background:
    radial-gradient(60% 50% at 75% 45%, rgba(227,6,19,0.18), transparent 70%),
    linear-gradient(rgba(144,161,185,0.06) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(144,161,185,0.06) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
}

main, .footer, .nav { position: relative; z-index: 2; }

/* ---------- HUD ---------- */
.hud { position: fixed; inset: 0; z-index: 3; pointer-events: none; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--muted); }
.hud__corner { position: absolute; width: 22px; height: 22px; border: 0 solid var(--line-strong); }
.hud__corner--tl { top: 84px; left: 14px; border-top-width: 1px; border-left-width: 1px; }
.hud__corner--tr { top: 84px; right: 14px; border-top-width: 1px; border-right-width: 1px; }
.hud__corner--bl { bottom: 14px; left: 14px; border-bottom-width: 1px; border-left-width: 1px; }
.hud__corner--br { bottom: 14px; right: 14px; border-bottom-width: 1px; border-right-width: 1px; }

.hud__phases { position: absolute; right: 44px; bottom: 18px; text-align: right; opacity: 0; transform: translateY(6px); transition: opacity 0.35s, transform 0.35s var(--ease); }
.hud.is-building .hud__phases { opacity: 1; transform: none; }
.hud__label { display: block; color: var(--steel-dim); margin-bottom: 6px; }
.hud__phases ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }
.hud__phases li { transition: color 0.4s; }
.hud__phases li b { color: var(--steel-dim); font-weight: 500; transition: color 0.4s; }
.hud__phases li.is-active { color: var(--text); }
.hud__phases li.is-active b { color: var(--red-text); text-shadow: 0 0 8px var(--red-glow); }
.hud__bar { margin-top: 8px; height: 2px; background: var(--line); }
.hud__bar span { display: block; height: 100%; width: 0; background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 32px;
  height: 72px; padding: 0 var(--gutter);
  transition: background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(var(--bg-rgb),0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { height: 34px; width: auto; filter: drop-shadow(0 0 10px rgba(227,6,19,0.35)); }
.brand__name { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; white-space: nowrap; }
.brand__name b { color: var(--red); }
.nav nav { margin-left: auto; }
.nav__links { list-style: none; display: flex; gap: clamp(16px, 2vw, 30px); margin: 0; padding: 0; }
.nav__links a { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); transition: color 0.2s; }
.nav__links a span { color: var(--red); }
.nav__links a:hover { color: var(--text); }
.nav__toggle { display: none; }

.theme-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  background: rgba(var(--tint-rgb), 0.04); border: 1px solid var(--line-strong); color: var(--text); cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.theme-toggle:hover { border-color: var(--red); color: var(--red); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: block; }
[data-theme="light"] .theme-toggle .i-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
  --cut: 10px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 15px 26px;
  font-family: var(--mono); font-weight: 700; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase;
  border: 0; cursor: pointer; color: #fff;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
}
.btn--solid { background: var(--red); box-shadow: 0 0 0 rgba(227,6,19,0); }
.btn--solid:hover { background: var(--red-hot); box-shadow: 0 0 30px var(--red-glow); transform: translateY(-2px); }
.btn--ghost { background: rgba(var(--tint-rgb),0.04); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); }
.btn--ghost:hover { background: rgba(var(--tint-rgb),0.09); transform: translateY(-2px); }
.btn--block { width: 100%; }
.arrow { width: 14px; height: 1.5px; background: currentColor; position: relative; transition: width 0.25s var(--ease); }
.arrow::after { content: ""; position: absolute; right: 0; top: -3.5px; width: 7px; height: 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
.btn:hover .arrow { width: 22px; }
.nav__cta { padding: 12px 20px; }

/* ---------- Shared type ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.24em; color: var(--red-text); text-transform: uppercase; }
.eyebrow__tick { width: 28px; height: 1px; background: var(--red); box-shadow: 0 0 8px var(--red); }
.mono-note { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; color: var(--steel-dim); }
.accent { color: var(--red); text-shadow: 0 0 30px var(--red-glow); }
.outline { color: transparent; -webkit-text-stroke: 1.5px var(--text); }

.section-head { margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2.6rem, 6.5vw, 5.6rem); margin: 16px 0 12px; }
.section-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; position: relative; padding: 110px 0 90px; }
.hero__inner { max-width: var(--wrap); }
.hero__title { font-size: clamp(3.6rem, 11vw, 10rem); margin: 22px 0 28px; }
.hero__title .line { display: block; }
.line--outline { position: relative; color: transparent; -webkit-text-stroke: 1.5px var(--outline-ink); }
.line--outline::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  color: transparent; -webkit-text-stroke: 1.5px var(--red);
  background: linear-gradient(100deg, transparent 40%, var(--red) 50%, transparent 60%) no-repeat;
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-mask: linear-gradient(100deg, transparent 38%, #000 50%, transparent 62%) no-repeat;
          mask: linear-gradient(100deg, transparent 38%, #000 50%, transparent 62%) no-repeat;
  -webkit-mask-size: 250% 100%; mask-size: 250% 100%;
  animation: sweep 5s var(--ease) infinite 1.2s;
  filter: drop-shadow(0 0 12px var(--red-glow));
}
@keyframes sweep { from { -webkit-mask-position: 120% 0; mask-position: 120% 0; background-position: 120% 0; } 60%, to { -webkit-mask-position: -20% 0; mask-position: -20% 0; background-position: -20% 0; } }
.hero__lede { max-width: 470px; color: var(--muted); font-size: 1.12rem; }
.hero__ctas { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero__specs { display: flex; gap: 40px; margin: 56px 0 0; flex-wrap: wrap; }
.hero__specs div { border-left: 1px solid var(--red); padding-left: 14px; }
.hero__specs dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; color: var(--steel-dim); text-transform: uppercase; }
.hero__specs dd { margin: 4px 0 0; font-family: var(--mono); font-weight: 700; font-size: 18px; letter-spacing: 0.04em; }

.scroll-cue { position: absolute; right: var(--gutter); bottom: 44px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.24em; color: var(--muted); }
.scroll-cue i { width: 1px; height: 44px; background: linear-gradient(var(--red), transparent); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: -1px; top: -12px; width: 3px; height: 12px; background: var(--text); box-shadow: 0 0 8px var(--text); animation: drop 1.8s var(--ease) infinite; }
@keyframes drop { to { top: 48px; } }

/* ---------- Marquee ---------- */
.marquee { position: relative; z-index: 2; background: var(--red); overflow: hidden; padding: 18px 0; box-shadow: 0 0 60px rgba(227,6,19,0.35); }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee span { font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: 0.3em; white-space: nowrap; padding: 0 28px; display: inline-flex; align-items: center; gap: 56px; }
.marquee span::after { content: "+"; font-size: 16px; opacity: 0.7; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Panels ---------- */
.panel {
  position: relative;
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--line);
  padding: clamp(24px, 3.5vw, 40px);
}
.panel::before, .panel::after { content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--red); }
.panel::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.panel::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

/* ---------- Services ---------- */
.services { padding: 140px 0 0; }
.step { min-height: 100vh; display: flex; align-items: center; }
.step .panel { max-width: 500px; }
.panel__index { font-family: var(--mono); font-weight: 700; font-size: 64px; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--red); opacity: 0.9; margin-bottom: 18px; }
.step h3 { font-size: clamp(2rem, 3.6vw, 2.8rem); text-transform: uppercase; margin-bottom: 16px; }
.step p { color: var(--muted); }
.specs { list-style: none; margin: 26px 0; padding: 0; border-top: 1px solid var(--line); }
.specs li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.specs li span:first-child { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--steel-dim); padding-top: 3px; }
.specs li span:last-child { text-align: right; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tags span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; padding: 6px 10px; border: 1px solid var(--line-strong); color: var(--steel); }

/* ---------- Glass sections (scene stays faintly visible behind) ---------- */
.glass-section {
  padding: 140px 0;
  background: linear-gradient(180deg, rgba(var(--bg-rgb),0.55), rgba(var(--bg-rgb),0.82) 30%, rgba(var(--bg-rgb),0.82));
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  border-top: 1px solid var(--line);
}

/* ---------- About ---------- */
.about__lede { max-width: 760px; font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.45; color: var(--text); margin-bottom: 72px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.stat { padding: 40px 32px; display: flex; flex-direction: column; gap: 12px; position: relative; background: var(--panel-soft); }
.stat + .stat { border-left: 1px solid var(--line); }
.stat::before { content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 2px; background: var(--red); box-shadow: 0 0 10px var(--red); }
.stat__label, .stat__note { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--steel-dim); }
.stat__value { font-size: clamp(2.8rem, 5.5vw, 4.6rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }

/* ---------- Story ---------- */
.timeline { list-style: none; margin: 0 0 88px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: linear-gradient(90deg, var(--red), var(--line-strong) 70%, var(--red)); }
.timeline li { position: relative; padding-top: 34px; display: flex; flex-direction: column; gap: 6px; }
.timeline li::before { content: ""; position: absolute; top: 0; left: 0; width: 15px; height: 15px; background: var(--bg); border: 1px solid var(--red); transform: rotate(45deg) scale(0.75); }
.timeline li.is-now::before { background: var(--red); box-shadow: 0 0 14px var(--red); }
.timeline__year { font-family: var(--mono); font-weight: 700; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1; letter-spacing: -0.02em; }
.timeline__label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--steel-dim); padding-right: 16px; }

.history { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; margin-bottom: 88px; }
.history__text { display: grid; gap: 18px; color: var(--muted); }
.history__lead { font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.35; color: var(--text); font-weight: 500; }
.history__figure { margin: 0; padding: 18px; }
.history__img { display: grid; place-items: center; padding: 3%; background: radial-gradient(closest-side, rgba(var(--tint-rgb), 0.09), transparent); }
.history__img img { width: 100%; height: auto; }
.history__figure figcaption { display: flex; justify-content: space-between; margin-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--steel-dim); }
.history__figure figcaption span:first-child { color: var(--red-text); }

.mission { margin-bottom: 72px; padding: clamp(32px, 6vw, 72px); }
.mission h3 { font-size: clamp(2.4rem, 6vw, 5rem); margin: 18px 0 24px; }
.mission p:last-child { max-width: 760px; font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--muted); }


.sabbath { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(28px, 5vw, 72px); }
.sabbath h3 { font-size: clamp(2rem, 4.2vw, 3.4rem); margin: 18px 0 14px; }
.sabbath__body { display: grid; gap: 16px; color: var(--muted); }
.sabbath__body p:first-child { color: var(--text); font-size: 1.15rem; font-weight: 500; }
.sabbath__body strong { color: var(--text); }

/* ---------- Work ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1100px) { .projects { grid-template-columns: repeat(2, 1fr); } }
.project { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--line); background: var(--panel-solid); transform-style: preserve-3d; transition: transform 0.3s var(--ease), border-color 0.3s; }
.project img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.85) contrast(1.1) brightness(0.7); transform: scale(1.04); transition: filter 0.6s, transform 0.8s var(--ease); }
.project::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(var(--bg-rgb),0.6) 50%, rgba(var(--bg-rgb),0.95) 85%); pointer-events: none; }
.project:hover { border-color: var(--red); }
.project:hover img { filter: grayscale(0) contrast(1.05) brightness(0.85); transform: scale(1.1); }
.project__meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; z-index: 1; }
.project__id { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--red-text); }
.project h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.05; margin: 8px 0 10px; text-transform: uppercase; }
.project p { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; line-height: 1.5; }
.project__loc { color: var(--text) !important; display: flex; align-items: center; gap: 8px; }
.project__gc { color: var(--text) !important; opacity: 0.85; }
.project__gc span { color: var(--steel-dim); margin-right: 6px; }
.project__loc::before { content: ""; width: 6px; height: 6px; background: var(--red); box-shadow: 0 0 8px var(--red); transform: rotate(45deg); flex: none; }

.work__cta { margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.work__cta-text { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 700; margin-top: 10px; letter-spacing: -0.01em; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.channels { list-style: none; margin: 0; padding: 0; }
.channels li { display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.channels li > span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--red-text); }
.channels a, .channels address { font-style: normal; font-size: clamp(1.05rem, 2vw, 1.4rem); font-weight: 600; word-break: break-word; }
.channels a:hover { color: var(--red); }

.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--steel-dim); }
.form input, .form textarea {
  font: inherit; font-family: var(--font); font-size: 16px; letter-spacing: 0; text-transform: none;
  color: var(--text); background: rgba(var(--tint-rgb),0.03);
  border: 1px solid var(--line-strong); border-radius: 0; padding: 13px 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--red); background: rgba(227,6,19,0.05); box-shadow: 0 0 0 3px rgba(227,6,19,0.15); }
.form__status { font-family: var(--mono); font-size: 12px; color: var(--steel); min-height: 1em; }
.form__status[data-state="success"] { color: var(--text); }
.form__status[data-state="success"]::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; background: var(--red); box-shadow: 0 0 8px var(--red); transform: rotate(45deg); }
.form__status[data-state="error"] { color: var(--red-text); }
.form__status a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.form__status a:hover { color: var(--red-text); }
.form button:disabled { opacity: 0.6; cursor: progress; transform: none; }
/* spam trap: off-screen for people, still in the form for bots */
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg); padding: 32px 0 100px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer .brand__mark { height: 28px; }
.footer a.mono-note:hover { color: var(--red); }

/* ---------- Intro loader ---------- */
html.js-loading, html.js-loading body { overflow: hidden; }
.loader { display: none; }
html.js-loading .loader { display: block; position: fixed; inset: 0; z-index: 100; }
.loader__panel {
  position: absolute; left: 0; right: 0; height: 50.5%;
  background:
    linear-gradient(rgba(var(--tint-rgb), 0.035) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(var(--tint-rgb), 0.035) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
  transition: transform 0.95s cubic-bezier(0.76, 0, 0.18, 1) 0.4s;
}
.loader__panel--top { top: 0; background-position: 0 0; }
.loader__panel--bottom { bottom: 0; background-position: 0 100%; }
/* the red seam the screen splits along */
.loader__panel::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--red); box-shadow: 0 0 18px var(--red), 0 0 40px var(--red-glow); transform: scaleX(0); transition: transform 0.4s var(--ease); }
.loader__panel--top::after { bottom: 0; }
.loader__panel--bottom::after { top: 0; }

.loader__content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; transition: opacity 0.3s, transform 0.4s var(--ease), filter 0.3s; }
/* glow lives on the wrapper so the image's clip-path (the build-up reveal) can't cut it into a box */
.loader__mark { filter: drop-shadow(0 0 14px rgba(227, 6, 19, 0.35)); animation: loader-glow 2.4s ease-in-out 1.1s infinite; }
.loader__mark img { display: block; height: clamp(84px, 13vh, 120px); width: auto; clip-path: inset(100% 0 0 0); animation: loader-stack 0.9s steps(4, jump-end) 0.15s forwards; }
@keyframes loader-stack { to { clip-path: inset(0 0 0 0); } }
@keyframes loader-glow { 50% { filter: drop-shadow(0 0 22px rgba(227, 6, 19, 0.55)); } }
.loader__name { font-weight: 700; font-size: clamp(1.25rem, 3vw, 1.6rem); letter-spacing: 0.5em; opacity: 0; margin-right: -0.5em; animation: loader-name 0.9s var(--ease) 0.75s forwards; white-space: nowrap; }
.loader__name b { color: var(--red); }
@keyframes loader-name { to { opacity: 1; letter-spacing: 0.04em; margin-right: -0.04em; } }
.loader__bar { width: min(260px, 64vw); height: 2px; background: var(--line); overflow: hidden; margin-top: 10px; }
.loader__bar span { display: block; height: 100%; background: var(--red); box-shadow: 0 0 10px var(--red); transform: scaleX(0); transform-origin: left; }
.loader__meta { width: min(260px, 64vw); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; color: var(--steel-dim); }
.loader__meta [data-loader-pct] { color: var(--text); font-variant-numeric: tabular-nums; }

/* opening sequence */
.loader.is-opening { pointer-events: none; }
.loader.is-opening .loader__content { opacity: 0; transform: scale(0.94); filter: blur(4px); }
.loader.is-opening .loader__panel::after { transform: scaleX(1); }
.loader.is-opening .loader__panel--top { transform: translateY(-101%); }
.loader.is-opening .loader__panel--bottom { transform: translateY(101%); }

@media (prefers-reduced-motion: reduce) {
  .loader__mark, .loader__mark img { clip-path: none; animation: none; }
  .loader__name { animation: none; opacity: 1; letter-spacing: 0.04em; margin-right: 0; }
  .loader.is-opening { opacity: 0; transition: opacity 0.3s; }
  .loader.is-opening .loader__panel { transform: none; }
}

/* ---------- Reveal + scramble ---------- */
.reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .marquee__track, .line--outline::after, .scroll-cue i::after { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .veil { background: linear-gradient(180deg, rgba(var(--bg-rgb),0.35), rgba(var(--bg-rgb),0.75)), repeating-linear-gradient(0deg, rgba(var(--tint-rgb),0.018) 0 1px, transparent 1px 3px); }
  .nav { gap: 16px; }
  .nav nav { position: fixed; inset: 72px 0 auto 0; background: rgba(var(--bg-rgb),0.96); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); transform: translateY(calc(-100% - 80px)); visibility: hidden; transition: transform 0.4s var(--ease), visibility 0s 0.4s; z-index: -1; }
  .nav.is-open nav { transform: none; visibility: visible; transition: transform 0.4s var(--ease); }
  .nav__links { flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px; }
  .nav__links a { display: block; padding: 14px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
  .theme-toggle { margin-left: auto; }
  .nav__toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 44px; background: none; border: 1px solid var(--line-strong); cursor: pointer; padding: 0 11px; }
  .nav__toggle span { height: 1.5px; background: var(--text); transition: transform 0.3s; }
  .nav.is-open .nav__toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .hud__corner { display: none; }
  .hud__phases {
    top: 72px; bottom: auto; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px var(--gutter);
    background: rgba(var(--bg-rgb), 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(-6px); transition: opacity 0.35s, transform 0.35s var(--ease);
  }
  .hud.is-building .hud__phases { opacity: 1; transform: none; }
  .hud__label { margin: 0; font-size: 10px; }
  .hud__bar { position: absolute; left: 0; right: 0; bottom: -1px; margin: 0; background: transparent; }
  .timeline { grid-template-columns: 1fr; gap: 28px; margin-bottom: 64px; }
  .timeline::before { top: 0; bottom: 0; left: 7px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, var(--red), var(--line-strong) 70%, var(--red)); }
  .timeline li { padding: 0 0 0 40px; }
  .history { grid-template-columns: 1fr; margin-bottom: 64px; }
  .history__figure { max-width: 420px; }
  .sabbath { grid-template-columns: 1fr; }
  .step { min-height: 0; display: block; padding: 58vh 0 6vh; }
  .step:first-of-type { padding-top: 30vh; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__cta { display: none; }
  .brand__name { font-size: 16px; }
  .projects { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .hero__specs { gap: 22px; }
  .hud__phases ol { gap: 10px; font-size: 10px; }
  /* bigger tap targets */
  .channels a { display: inline-block; padding: 9px 0; margin: -9px 0; }
  .footer a.mono-note { display: inline-block; padding: 13px 0; margin: -13px 0; }
  .nav .brand { min-height: 44px; }
  /* smallest labels up to 11px */
  .hero__specs dt, .tags span { font-size: 11px; }
  /* compact stats */
  .stat { padding: 26px 24px; gap: 8px; }
  .about__lede { margin-bottom: 48px; }
  /* footer no longer needs room for the desktop build-sequence readout */
  .footer { padding-bottom: 40px; }
  .hud__label { display: none; }
  .scroll-cue { display: none; }
  .glass-section { padding: 100px 0; }
}
