/* ============================================================
   Worx | service-detail.css
   The service module pages (services/*.html, not the hub). Every
   service is a module of the mission:
     - the bay: a full-screen HUD frame, the service's headline rising
       in word by word, and its own live instrument (a simulation of
       the work, built by service-detail.js), over the About sky;
     - the systems: the capabilities as HUD panels that boot in,
       charge up and light under the pointer;
     - the mission logs: the related work on film, the portfolio's
       screens, graded for Mars until you point at them;
     - the open channel: a transmission console, and the doors to the
       neighbouring modules.
   Brand palette only (base.css tokens), calm motion, one hover
   language: the gradient hairline.
   ============================================================ */

@property --hov {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.sd {
  --sd-line: rgba(254, 238, 207, 0.1);
  --sd-panel: rgba(12, 5, 3, 0.72);
  --sd-ease: cubic-bezier(0.135, 0.9, 0.15, 1);
  position: relative;
  isolation: isolate;
  overflow-x: clip;
}

/* ---- shared bits ------------------------------------------------ */
.sd-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.sd-kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(250, 167, 25, 0.14), 0 0 10px rgba(250, 167, 25, 0.8);
}

.sd-kicker span { color: rgba(254, 238, 207, 0.4); letter-spacing: 0.18em; }

.sd-head { margin-bottom: clamp(36px, 5vw, 72px); }

.sd-head h2,
.sd-console h2 {
  max-width: 18ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.03em;
  color: var(--text);
  text-wrap: balance;
}

.sd-rec {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4a32;
  box-shadow: 0 0 8px rgba(255, 74, 50, 0.8);
  animation: sd-blink 1.2s steps(2, jump-none) infinite;
}

@keyframes sd-blink { 50% { opacity: 0.15; } }

/* things that boot in as they come into view */
[data-sd-in] {
  opacity: 0;
  translate: 0 40px;
  transition: opacity 0.9s ease calc(var(--k, 0) * 0.07s), translate 1.2s var(--sd-ease) calc(var(--k, 0) * 0.07s);
}

[data-sd-in].is-in { opacity: 1; translate: 0 0; }

/* ---- buttons ---------------------------------------------------- */
.sd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 30px;
  margin-top: 34px;
}

.sd-actions--center { justify-content: center; }

.sd-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.sd-ghost span {
  background: linear-gradient(var(--accent-2), var(--accent-2)) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--sd-ease);
}

.sd-ghost svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 1.8;
  transition: transform 0.4s var(--sd-ease);
}

.sd-ghost:hover span,
.sd-ghost:focus-visible span { background-size: 100% 1px; }
.sd-ghost:hover svg,
.sd-ghost:focus-visible svg { transform: translate(3px, 3px); }

/* ================================================================
   THE BAY
   ================================================================ */
.sd-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: max(100svh, 720px);
  padding: clamp(120px, 16vh, 170px) 0 clamp(90px, 12vh, 140px);
  overflow: hidden;
}

/* the HUD frame: four corners and the readouts in them */
.sd-frame-hud {
  --c: rgba(254, 238, 207, 0.35);
  position: absolute;
  inset: clamp(84px, 11vh, 96px) clamp(16px, 3vw, 44px) clamp(22px, 4vh, 40px);
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: rgba(254, 238, 207, 0.5);
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 18px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 0 / 1px 18px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 18px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 1px 18px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 18px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 1px 18px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 18px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 1px 18px no-repeat;
  opacity: 0;
  animation: sd-fade 1.2s ease 0.3s forwards;
}

.sd-frame-hud > span { position: absolute; white-space: nowrap; }
.sd-frame-hud b { font-weight: 500; color: var(--accent-2); }
.sd-hud-tl { left: 14px; top: 10px; }
.sd-hud-tr { right: 14px; top: 10px; }
.sd-hud-bl { left: 14px; bottom: 10px; }
.sd-hud-br { right: 14px; bottom: 10px; display: flex; align-items: center; gap: 10px; }

.sd-hud-br i {
  position: relative;
  width: 1px;
  height: 30px;
  overflow: hidden;
  background: rgba(254, 238, 207, 0.2);
}

.sd-hud-br i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient);
  transform: translateY(-100%);
  animation: sd-drip 2.2s var(--sd-ease) infinite;
}

@keyframes sd-drip { 60%, 100% { transform: translateY(100%); } }
@keyframes sd-fade { to { opacity: 1; } }

/* ---- the bay's backdrop ------------------------------------------
   A motif of its own per service on the canvas (service-detail.js),
   fading out toward the copy on the left and into the page ink below;
   warm light moving over it like a slow lens flare; film grain; a
   vignette. The bay opens like a film: letterbox bars part on load. */
.sd-hero { isolation: isolate; background: #110704; }

.sd-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.55) 38%, #000 70%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.55) 38%, #000 70%);
  opacity: 0;
  animation: sd-fade 2.4s ease 0.3s forwards;
}

.sd-bg-light {
  position: absolute;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 34% 30% at 78% 30%, rgba(229, 125, 35, 0.26), transparent 70%),
    radial-gradient(ellipse 30% 26% at 20% 85%, rgba(192, 69, 39, 0.22), transparent 70%),
    radial-gradient(ellipse 22% 18% at 60% 70%, rgba(250, 167, 25, 0.12), transparent 70%);
  mix-blend-mode: screen;
  animation: sd-drift 22s ease-in-out infinite alternate;
}

@keyframes sd-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-4%, 3%, 0) scale(1.06); }
  100% { transform: translate3d(3%, -2%, 0) scale(1.02); }
}

/* grain, vignette, and the fade into the page below */
.sd-bg-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(21, 9, 5, 0.7) 0%, transparent 18%, transparent 72%, #150905 100%),
    radial-gradient(ellipse 90% 80% at 55% 45%, transparent 55%, rgba(8, 3, 2, 0.75) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .9  0 0 0 0 .8  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: sd-grain 0.9s steps(4) infinite;
}

@keyframes sd-grain {
  0% { background-position: 0 0, 0 0, 0 0; }
  25% { background-position: 0 0, 0 0, -40px 30px; }
  50% { background-position: 0 0, 0 0, 30px -20px; }
  75% { background-position: 0 0, 0 0, -20px -40px; }
}

/* the letterbox: two bars part as the bay opens */
.sd-hero::before,
.sd-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  height: 50%;
  background: #080302;
  pointer-events: none;
  animation: sd-bars 1.5s cubic-bezier(0.7, 0, 0.2, 1) 0.1s forwards;
}

.sd-hero::before { top: 0; transform-origin: top; }
.sd-hero::after { bottom: 0; transform-origin: bottom; }

@keyframes sd-bars { to { transform: scaleY(0); } }

.sd-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(36px, 5vw, 90px);
}

/* ---- the mission panel --------------------------------------------
   The About page's HUD recipe (about.css .hud-story): one smoked-glass
   panel at About's left-hand angle, facing the instrument across the
   bay. Its head (the crumb), the log (dash-marked rows), then on the
   same glass the story: status line, the title at About's caption size,
   the lede, and the call. The glass lives on ::before and fades at its
   edges, so the panel reads as projected, not boxed; text stays crisp. */
.sd-hud {
  position: relative;
  isolation: isolate;
  width: min(100%, clamp(300px, 25vw, 400px));
  padding: 0.9em 1.15em 1em 1em;
  font-family: var(--font-mono);
  color: var(--text);
  transform: perspective(900px) rotateY(20deg) rotateX(2deg);
  /* the angle pivots level with the log, so its rows stay in line */
  transform-origin: left 30%;
  animation: sd-hud-boot 0.9s steps(1, end) 0.35s both;
}

.sd-hud::before {
  content: "";
  position: absolute;
  inset: -30px -48px;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(254, 238, 207, 0.03) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 120% 110% at 20% 40%, rgba(20, 9, 5, 0.72), rgba(20, 9, 5, 0.38) 60%, rgba(20, 9, 5, 0) 100%);
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.55) 10%, #000 24%, #000 70%, rgba(0, 0, 0, 0.5) 86%, transparent 100%),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 6%, #000 14%, #000 86%, rgba(0, 0, 0, 0.6) 94%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.55) 10%, #000 24%, #000 70%, rgba(0, 0, 0, 0.5) 86%, transparent 100%),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 6%, #000 14%, #000 86%, rgba(0, 0, 0, 0.6) 94%, transparent 100%);
  mask-composite: intersect;
}

@keyframes sd-hud-boot {
  0%   { opacity: 0; }
  12%  { opacity: 0.8; }
  20%  { opacity: 0.1; }
  34%  { opacity: 1; }
  100% { opacity: 1; }
}

.sd-hud-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, rgba(254, 238, 207, 0.3), transparent) 1;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: rgba(254, 238, 207, 0.7);
}

.sd-crumb {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  color: var(--text);
}

.sd-crumb a { color: rgba(254, 238, 207, 0.55); transition: color 0.3s ease; }
.sd-crumb a:hover,
.sd-crumb a:focus-visible { color: var(--accent-2); }
.sd-crumb > span[aria-hidden] { color: rgba(254, 238, 207, 0.3); }

.sd-hud-mod { font-variant-numeric: tabular-nums; color: var(--accent-2); }

/* the log: About's dash markers, label left, value right, booting in */
.sd-hud-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sd-hud-rows li {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0.34em 0 0.34em 1.25em;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(254, 238, 207, 0.62);
  opacity: 0;
  transform: translateX(10px);
  animation: sd-row-in 0.5s var(--sd-ease) forwards;
}

.sd-hud-rows li:nth-child(1) { animation-delay: 0.8s; }
.sd-hud-rows li:nth-child(2) { animation-delay: 0.95s; }
.sd-hud-rows li:nth-child(3) { animation-delay: 1.1s; }
.sd-hud-rows li:nth-child(4) { animation-delay: 1.25s; }

.sd-hud-rows li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 1px;
  background: currentColor;
}

.sd-hud-rows b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}

.sd-hud-rows b.is-on { display: flex; align-items: center; gap: 8px; color: var(--accent-2); }
.sd-hud-rows b.is-on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: sd-blink 1.6s ease-in-out infinite; }

@keyframes sd-row-in { to { opacity: 1; transform: none; } }

/* the story, on the same glass */
.sd-hud-caption {
  text-shadow: 0 1px 14px rgba(21, 9, 5, 0.65), 0 0 2px rgba(21, 9, 5, 0.5);
}

.sd-hud-caption::before {
  content: "";
  display: block;
  height: 1px;
  margin-top: 14px;
  background: linear-gradient(90deg, rgba(254, 238, 207, 0.3), transparent);
}

/* About's status line: a lit dot, then a one-shot scan sweep */
.sd-hud-status {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 10px;
  padding-bottom: 2px;
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.sd-hud-status::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 6px 1px rgba(250, 167, 25, 0.65);
}

.sd-hud-status::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, rgba(254, 238, 207, 0.5), transparent);
  animation: sd-scan 0.6s ease-out 1.35s;
}

@keyframes sd-scan {
  from { width: 0; opacity: 1; }
  to { width: 100%; opacity: 0; }
}

/* the title at About's caption size: a line of the log, not a poster */
.sd-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.9vw, 1.95rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: balance;
}

/* word by word, out of a mask (service-detail.js wraps the words) */
.sd-w {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
  vertical-align: top;
}

.sd-w > span {
  display: inline-block;
  translate: 0 108%;
  transition: translate 1s var(--sd-ease) calc(0.9s + var(--w, 0) * 0.06s);
}

.sd-title.is-in .sd-w > span { translate: 0 0; }

.sd-lede {
  margin: 10px 0 0;
  font-family: var(--font-body);
  font-size: clamp(0.86rem, 1vw, 0.98rem);
  line-height: 1.6;
  color: rgba(254, 238, 207, 0.74);
}

.sd-lede,
.sd-hero-actions {
  opacity: 0;
  translate: 0 12px;
  animation: sd-up 0.9s var(--sd-ease) forwards;
}

.sd-lede { animation-delay: 1.4s; }
.sd-hero-actions { animation-delay: 1.6s; gap: 14px 24px; }
/* the call sits on the panel's glass, below the story, as on the Services
   page's title card: same angle, a hairline to set it apart */
.sd-hud .sd-hero-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, rgba(254, 238, 207, 0.26), transparent) 1;
}

@keyframes sd-up { to { opacity: 1; translate: 0 0; } }

/* ---- the call: Quick Enquiry ----------------------------------
   A comms key, not a sticker: the brand gradient lit from inside, a
   voice line that listens (and speaks up under the pointer), a status
   that flips from "channel open" to "connecting you", a slow light pass
   across the glass, and the viewfinder brackets that open out round it. */
.sd-cta {
  --hov: 0;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 62px;
  padding: 0 12px 0 18px;
  border-radius: 14px;
  color: var(--on-accent);
  background: var(--gradient);
  box-shadow:
    0 18px 40px -18px rgba(229, 125, 35, 0.85),
    0 0 0 1px rgba(250, 167, 25, 0.35),
    inset 0 1px 0 rgba(254, 238, 207, 0.45),
    inset 0 -10px 22px -12px rgba(66, 29, 15, 0.55);
  transition: --hov 0.5s var(--sd-ease), box-shadow 0.4s ease, transform 0.5s var(--sd-ease);
}

/* scanlines and the light pass, inside the key */
.sd-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(105deg, transparent 38%, rgba(254, 238, 207, 0.55) 50%, transparent 62%) -160% 0 / 60% 100% no-repeat,
    repeating-linear-gradient(0deg, rgba(66, 29, 15, 0.1) 0 1px, transparent 1px 3px);
  animation: sd-cta-pass 5.5s ease-in-out 2.4s infinite;
}

@keyframes sd-cta-pass {
  0% { background-position: -160% 0, 0 0; }
  22%, 100% { background-position: 260% 0, 0 0; }
}

/* the voice line */
.sd-cta-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding-right: 14px;
  border-right: 1px solid rgba(66, 29, 15, 0.28);
}

.sd-cta-wave i {
  width: 2px;
  height: 100%;
  border-radius: 2px;
  background: rgba(26, 10, 4, 0.82);
  transform: scaleY(calc(0.25 + var(--hov) * 0.35));
  animation: sd-cta-talk 1.3s ease-in-out infinite;
}

.sd-cta-wave i:nth-child(2) { animation-delay: -0.2s; }
.sd-cta-wave i:nth-child(3) { animation-delay: -0.45s; }
.sd-cta-wave i:nth-child(4) { animation-delay: -0.7s; }
.sd-cta-wave i:nth-child(5) { animation-delay: -0.95s; }

@keyframes sd-cta-talk {
  0%, 100% { transform: scaleY(calc(0.22 + var(--hov) * 0.3)); }
  50% { transform: scaleY(calc(0.55 + var(--hov) * 0.45)); }
}

.sd-cta-txt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
}

.sd-cta-txt small {
  position: relative;
  display: block;
  height: 1.1em;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(26, 10, 4, 0.66);
}

.sd-cta-txt small span {
  display: block;
  transform: translateY(calc(var(--hov) * -100%));
}

.sd-cta-txt small span + span { position: absolute; left: 0; top: 100%; }

.sd-cta-txt b {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.sd-cta-arrow {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: 6px;
  border-radius: 10px;
  background: rgba(21, 9, 5, 0.9);
  box-shadow: inset 0 0 0 1px rgba(250, 167, 25, 0.3);
}

.sd-cta-arrow svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 1.9;
  transform: translateX(calc(var(--hov) * 3px));
}

/* the viewfinder brackets: sit on the key, open out under the pointer */
.sd-cta-vf {
  --c: rgba(254, 238, 207, 0.7);
  --o: calc(4px + var(--hov) * 6px);
  position: absolute;
  inset: calc(var(--o) * -1);
  pointer-events: none;
  opacity: calc(0.35 + var(--hov) * 0.65);
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 12px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 0 / 1px 12px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 12px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 1px 12px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 12px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 1px 12px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 12px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 1px 12px no-repeat;
}

.sd-cta:hover,
.sd-cta:focus-visible {
  --hov: 1;
  box-shadow:
    0 24px 50px -18px rgba(229, 125, 35, 0.95),
    0 0 0 1px rgba(250, 167, 25, 0.6),
    0 0 36px -6px rgba(250, 167, 25, 0.45),
    inset 0 1px 0 rgba(254, 238, 207, 0.55),
    inset 0 -10px 22px -12px rgba(66, 29, 15, 0.55);
}

.sd-cta:active { transform: scale(0.985); }
.sd-cta:focus-visible { outline: none; }

/* ---- the instrument window --------------------------------------- */
.sd-scene {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border: 1px solid rgba(254, 238, 207, 0.14);
  border-radius: 22px;
  background:
    radial-gradient(ellipse 80% 70% at 80% 0%, rgba(229, 125, 35, 0.14), transparent 65%),
    radial-gradient(ellipse 70% 60% at 0% 100%, rgba(192, 69, 39, 0.12), transparent 70%),
    rgba(10, 4, 2, 0.82);
  box-shadow: 0 60px 120px -60px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(254, 238, 207, 0.06);
  transform: perspective(1400px) rotateY(-9deg) rotateX(3deg);
  transform-origin: 100% 50%;
  opacity: 0;
  animation: sd-scene-in 1.6s var(--sd-ease) 0.5s forwards;
}

@keyframes sd-scene-in {
  from { opacity: 0; transform: perspective(1400px) rotateY(-22deg) rotateX(6deg) translateX(60px); }
  to { opacity: 1; transform: perspective(1400px) rotateY(-9deg) rotateX(3deg); }
}

/* scanlines over the glass */
.sd-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(254, 238, 207, 0.025) 0 1px, transparent 1px 3px);
}

.sd-scene-bar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 18px;
  border-bottom: 1px solid var(--sd-line);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(254, 238, 207, 0.55);
}

.sd-scene-file { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sd-scene-live { color: var(--accent-2); }

.sd-scene-stage {
  position: absolute;
  inset: 40px 0 0;
  font-family: var(--font-mono);
  color: var(--text);
}

.sd-scene-vf {
  --c: rgba(254, 238, 207, 0.4);
  position: absolute;
  inset: 54px 14px 14px;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 0 / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 1px 14px no-repeat;
}

/* scene building blocks, shared by the instruments */
.sc-panel {
  position: absolute;
  border: 1px solid var(--sd-line);
  border-radius: 12px;
  background: rgba(21, 9, 5, 0.75);
}

.sc-label {
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(254, 238, 207, 0.45);
}

.sc-bar {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: rgba(254, 238, 207, 0.12);
}

.sc-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
  transition: transform 0.9s var(--sd-ease);
}

.sc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: rgba(21, 9, 5, 0.8);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(254, 238, 207, 0.75);
  transition: border-color 0.4s ease, color 0.4s ease, background 0.4s ease;
}

.sc-chip i { width: 6px; height: 6px; border-radius: 50%; background: rgba(254, 238, 207, 0.3); transition: background 0.4s ease, box-shadow 0.4s ease; }
.sc-chip.is-on { border-color: rgba(250, 167, 25, 0.45); color: var(--text); }
.sc-chip.is-on i { background: var(--accent-2); box-shadow: 0 0 8px rgba(250, 167, 25, 0.8); }

.sc-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* ---- web: code on the left, the page building itself on the right -- */
.sc-web .sc-code {
  left: 4%; top: 6%; width: 50%; bottom: 30%;
  padding: 14px 14px;
  overflow: hidden;
  font-size: clamp(0.5rem, 0.78vw, 0.68rem);
  line-height: 1.75;
  white-space: pre;
  color: rgba(254, 238, 207, 0.78);
}

.sc-code .k { color: var(--brand-orange); }
.sc-code .s { color: var(--accent-2); }
.sc-code .c { color: rgba(254, 238, 207, 0.35); }
.sc-code .ln { display: inline-block; width: 2.2ch; margin-right: 1.2ch; color: rgba(254, 238, 207, 0.25); text-align: right; }

.sc-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: linear-gradient(180deg, var(--brand-amber), var(--brand-orange) 45%, var(--brand-ember));
  animation: sd-blink 1s steps(1, end) infinite;
}

.sc-web .sc-page {
  right: 4%; top: 6%; width: 38%; bottom: 30%;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-page > i {
  display: block;
  border-radius: 6px;
  background: rgba(254, 238, 207, 0.06);
  border: 1px dashed rgba(254, 238, 207, 0.14);
  opacity: 0.35;
  transform: scale(0.94);
  transition: opacity 0.6s ease, transform 0.8s var(--sd-ease), background 0.6s ease, border-color 0.6s ease;
}

.sc-page > i.is-on { opacity: 1; transform: none; border-style: solid; border-color: rgba(250, 167, 25, 0.25); }
.sc-page .pg-nav { height: 10%; }
.sc-page .pg-hero { flex: 1; }
.sc-page .pg-hero.is-on { background: linear-gradient(135deg, rgba(192, 69, 39, 0.55), rgba(250, 167, 25, 0.35)); }
.sc-page .pg-row { height: 16%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; border: 0; background: none; opacity: 1; transform: none; }
.sc-page .pg-row b { border-radius: 5px; background: rgba(254, 238, 207, 0.06); border: 1px dashed rgba(254, 238, 207, 0.14); opacity: 0.35; transition: opacity 0.6s ease, background 0.6s ease; }
.sc-page .pg-row b.is-on { opacity: 1; background: rgba(254, 238, 207, 0.14); border-style: solid; }
.sc-page .pg-cta { height: 9%; width: 45%; align-self: flex-start; border-radius: 999px; }
.sc-page .pg-cta.is-on { background: var(--gradient); border-color: transparent; }

.sc-web .sc-lh {
  left: 4%; right: 4%; bottom: 5%; height: 20%;
  display: flex;
  align-items: center;
  gap: 5%;
  padding: 0 16px;
}

.sc-ring { position: relative; flex: none; width: auto; height: 76%; aspect-ratio: 1; }
.sc-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sc-ring circle { fill: none; stroke-width: 6; }
.sc-ring .tr { stroke: rgba(254, 238, 207, 0.1); }
.sc-ring .fl { stroke: url(#sc-grad); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0)); transition: stroke-dashoffset 0.25s linear; }
.sc-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(0.7rem, 1.1vw, 0.95rem); font-weight: 500; color: var(--text); }

.sc-metrics { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.sc-metrics div { display: grid; gap: 4px; }

/* ---- platform / erp: a core and its satellites -------------------- */
.sc-net .sc-node circle { fill: rgba(21, 9, 5, 0.95); stroke: rgba(254, 238, 207, 0.25); stroke-width: 1; transition: stroke 0.3s ease; }
.sc-net .sc-node.is-hot circle { stroke: var(--accent-2); }
.sc-net .sc-node text { font-family: var(--font-mono); font-size: 8px; letter-spacing: 1px; fill: rgba(254, 238, 207, 0.75); text-anchor: middle; dominant-baseline: middle; }
.sc-net .sc-link { stroke: rgba(254, 238, 207, 0.14); stroke-width: 1; stroke-dasharray: 3 5; }
.sc-net .sc-core circle.o { fill: none; stroke: rgba(250, 167, 25, 0.5); stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: sc-pulse 2.4s ease-out infinite; }
.sc-net .sc-core circle.c { fill: url(#sc-grad); }
.sc-net .sc-core text { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 2px; fill: #1a0a04; text-anchor: middle; dominant-baseline: middle; }
.sc-net .sc-pk { fill: var(--accent-2); filter: drop-shadow(0 0 4px rgba(250, 167, 25, 0.9)); }
.sc-net .sc-pk.b { fill: var(--text); }

@keyframes sc-pulse { from { transform: scale(0.8); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }

.sc-net .sc-kpi {
  left: 4%; right: 4%; bottom: 5%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 12px 16px;
}

.sc-kpi div { display: grid; gap: 6px; min-width: 0; }
.sc-kpi b { font-size: clamp(0.72rem, 1.1vw, 0.95rem); font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---- mobile: a phone, turning, its app flipping through screens --- */
.sc-mobile { perspective: 900px; }

.sc-phone {
  position: absolute;
  left: 50%;
  top: 8%;
  height: 84%;
  aspect-ratio: 9 / 18.5;
  margin-left: calc(84% * 9 / 18.5 / -2);
  transform: translateX(-50%) rotateY(-16deg) rotateX(4deg);
  translate: 50% 0;
  border: 2px solid rgba(254, 238, 207, 0.22);
  border-radius: 26px;
  background: #0b0503;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 6px rgba(21, 9, 5, 0.9);
  overflow: hidden;
  animation: sc-sway 7s ease-in-out infinite;
}

@keyframes sc-sway {
  0%, 100% { transform: translateX(-50%) rotateY(-16deg) rotateX(4deg); }
  50% { transform: translateX(-50%) rotateY(10deg) rotateX(2deg); }
}

.sc-phone::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  z-index: 3;
  width: 30%;
  height: 14px;
  margin-left: -15%;
  border-radius: 999px;
  background: #000;
}

.sc-track {
  position: absolute;
  inset: 0;
  display: flex;
  transition: transform 0.9s var(--sd-ease);
}

.sc-app {
  flex: none;
  width: 100%;
  height: 100%;
  padding: 36px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-app .a-hd { height: 7%; width: 60%; border-radius: 4px; background: rgba(254, 238, 207, 0.2); }
.sc-app .a-img { height: 32%; border-radius: 12px; }
.sc-app .a-row { height: 9%; border-radius: 8px; background: rgba(254, 238, 207, 0.07); display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.sc-app .a-row::before { content: ""; width: 18%; aspect-ratio: 1; border-radius: 6px; background: rgba(250, 167, 25, 0.5); }
.sc-app .a-row::after { content: ""; flex: 1; height: 26%; border-radius: 3px; background: rgba(254, 238, 207, 0.18); }
.sc-app .a-tab { margin-top: auto; height: 8%; border-radius: 12px; background: rgba(254, 238, 207, 0.08); display: flex; justify-content: space-around; align-items: center; }
.sc-app .a-tab i { width: 12%; aspect-ratio: 1; border-radius: 50%; background: rgba(254, 238, 207, 0.25); }
.sc-app .a-tab i.on { background: var(--accent-2); }

.sc-toast {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 30px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(254, 238, 207, 0.92);
  color: #1a0a04;
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  translate: 0 -160%;
  transition: translate 0.7s var(--sd-ease);
}

.sc-toast i { width: 16px; height: 16px; flex: none; border-radius: 5px; background: var(--gradient); }
.sc-toast.is-on { translate: 0 0; }

.sc-mobile .sc-side {
  position: absolute;
  display: grid;
  gap: 8px;
  justify-items: start;
}

.sc-mobile .sc-side--l { left: 5%; top: 18%; }
.sc-mobile .sc-side--r { right: 5%; bottom: 14%; justify-items: end; width: 30%; }
.sc-mobile .sc-side--r .sc-bar { width: 100%; }

/* ---- design: wireframe to finished, the cursor doing the work ------ */
.sc-board {
  left: 4%; top: 6%; width: 64%; bottom: 6%;
  padding: 12px;
  display: grid;
  grid-template-rows: 9% 38% 1fr 12%;
  gap: 10px;
  background:
    linear-gradient(rgba(254, 238, 207, 0.04) 1px, transparent 1px) 0 0 / 100% 16px,
    linear-gradient(90deg, rgba(254, 238, 207, 0.04) 1px, transparent 1px) 0 0 / 16px 100%,
    rgba(21, 9, 5, 0.75);
}

.sc-board > i,
.sc-board .b-cards b {
  display: block;
  border: 1px dashed rgba(254, 238, 207, 0.28);
  border-radius: 6px;
  background: transparent;
  transition: background 0.7s ease, border-color 0.7s ease, box-shadow 0.7s ease;
}

.sc-board .b-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sc-board .b-cta { width: 40%; border-radius: 999px; }
.sc-board .is-hi { border-style: solid; border-color: transparent; }
.sc-board .b-nav.is-hi { background: rgba(254, 238, 207, 0.12); }
.sc-board .b-hero.is-hi { background: linear-gradient(135deg, rgba(192, 69, 39, 0.7), rgba(250, 167, 25, 0.45)); box-shadow: 0 10px 30px -12px rgba(229, 125, 35, 0.7); }
.sc-board .b-cards b.is-hi { background: rgba(254, 238, 207, 0.1); border-color: rgba(250, 167, 25, 0.3); }
.sc-board .b-cta.is-hi { background: var(--gradient); }

.sc-cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: 18px;
  height: 18px;
  transition: transform 0.9s var(--sd-ease);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.sc-cursor path { fill: var(--text); stroke: #150905; stroke-width: 1.2; }

.sc-cursor.is-click::after {
  content: "";
  position: absolute;
  left: -8px;
  top: -8px;
  width: 20px;
  height: 20px;
  border: 1px solid var(--accent-2);
  border-radius: 50%;
  animation: sc-click 0.5s ease-out forwards;
}

@keyframes sc-click { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

.sc-tokens {
  right: 4%; top: 6%; width: 24%; bottom: 6%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sc-sw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sc-sw i { aspect-ratio: 1; border-radius: 6px; }
.sc-type { display: grid; gap: 2px; font-family: var(--font-display); color: var(--text); line-height: 1; }
.sc-type b:nth-child(1) { font-size: clamp(1.1rem, 2vw, 1.7rem); }
.sc-type b:nth-child(2) { font-size: clamp(0.8rem, 1.3vw, 1.05rem); color: rgba(254, 238, 207, 0.7); }
.sc-type b:nth-child(3) { font-size: 0.6rem; color: rgba(254, 238, 207, 0.45); font-family: var(--font-mono); letter-spacing: 0.1em; }
.sc-space { display: grid; gap: 5px; }
.sc-space i { height: 5px; border-radius: 3px; background: rgba(250, 167, 25, 0.5); }

/* ---- seo: the query, the climb to #1, the traffic line ------------ */
.sc-serp {
  left: 4%; top: 6%; width: 58%; bottom: 6%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-q {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(254, 238, 207, 0.2);
  border-radius: 999px;
  font-size: clamp(0.52rem, 0.8vw, 0.66rem);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}

.sc-q svg { width: 12px; height: 12px; flex: none; fill: none; stroke: rgba(254, 238, 207, 0.6); stroke-width: 2; }

.sc-res { position: relative; flex: 1; }

.sc-hit {
  position: absolute;
  left: 0;
  right: 0;
  height: calc(100% / 6 - 6px);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 10px;
  padding: 0 10px;
  border-radius: 8px;
  transition: top 1s var(--sd-ease), background 0.6s ease, border-color 0.6s ease;
  border: 1px solid transparent;
}

.sc-hit em { grid-row: span 2; font-style: normal; font-size: 0.58rem; color: rgba(254, 238, 207, 0.4); width: 2ch; }
.sc-hit b { height: 5px; width: 50%; border-radius: 3px; background: rgba(254, 238, 207, 0.28); }
.sc-hit i { height: 4px; width: 80%; border-radius: 3px; background: rgba(254, 238, 207, 0.1); }
.sc-hit.is-us { border-color: rgba(250, 167, 25, 0.5); background: rgba(229, 125, 35, 0.1); }
.sc-hit.is-us b { width: auto; height: auto; background: none; font-size: 0.6rem; font-weight: 500; letter-spacing: 0.08em; color: var(--accent-2); }
.sc-hit.is-us em { color: var(--accent-2); }

.sc-graph {
  right: 4%; top: 6%; width: 30%; height: 52%;
  padding: 12px;
}

.sc-graph svg { position: absolute; left: 12px; right: 12px; bottom: 12px; top: 34px; width: calc(100% - 24px); height: calc(100% - 46px); overflow: visible; }
.sc-graph .gl { fill: none; stroke: url(#sc-grad); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0)); vector-effect: non-scaling-stroke; }
.sc-graph .ga { fill: url(#sc-area); opacity: calc(var(--p, 0) * 0.8); }

.sc-vitals {
  right: 4%; bottom: 6%; width: 30%; height: 34%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.sc-vitals .sc-chip { justify-content: space-between; }

/* ---- xr: a camera view, a floor found, a hologram placed ----------- */
.sc-xr canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.sc-xr .sc-xr-hud {
  position: absolute;
  left: 5%;
  top: 6%;
  display: grid;
  gap: 8px;
  justify-items: start;
}

.sc-xr .sc-xr-fps { position: absolute; right: 5%; bottom: 6%; }

/* ---- commerce: the product, the cart, the checkout ---------------- */
.sc-prod {
  left: 4%; top: 6%; width: 46%; bottom: 6%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sc-prod .p-img {
  position: relative;
  flex: 1;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 42%, rgba(250, 167, 25, 0.55), rgba(192, 69, 39, 0.3) 38%, transparent 62%),
    rgba(254, 238, 207, 0.05);
  overflow: hidden;
}

.sc-prod .p-img::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: 34%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 2px solid rgba(254, 238, 207, 0.85);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(254, 238, 207, 0.08), inset 0 0 20px rgba(250, 167, 25, 0.5);
  animation: sc-spin 9s linear infinite;
}

@keyframes sc-spin { to { rotate: 360deg; } }

.sc-prod .p-name { height: 6px; width: 60%; border-radius: 3px; background: rgba(254, 238, 207, 0.35); }
.sc-prod .p-price { font-size: 0.7rem; color: var(--accent-2); }

.sc-add {
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--gradient);
  color: #1a0a04;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.sc-add.is-press { transform: scale(0.94); filter: brightness(1.2); }

.sc-fly {
  position: absolute;
  z-index: 3;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px rgba(250, 167, 25, 0.9);
  opacity: 0;
  pointer-events: none;
}

.sc-cart {
  right: 4%; top: 6%; width: 42%; height: 40%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-cart-h { display: flex; justify-content: space-between; align-items: center; }
.sc-cart-h b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--gradient); color: #1a0a04; font-size: 0.62rem; transition: transform 0.3s var(--sd-ease); }
.sc-cart-h b.is-bump { transform: scale(1.35); }
.sc-lines { display: grid; gap: 6px; }
.sc-lines i { height: 16px; border-radius: 6px; background: rgba(254, 238, 207, 0.07); animation: sd-up 0.5s var(--sd-ease) both; }

.sc-check {
  right: 4%; bottom: 6%; width: 42%; height: 42%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sc-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sc-steps .sc-chip { justify-content: center; padding: 5px 4px; font-size: 0.5rem; }
.sc-orders { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; }
.sc-orders b { font-size: clamp(0.9rem, 1.5vw, 1.2rem); font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---- brand: the mark constructed on its grid ---------------------- */
.sc-brand .sc-construct { stroke: rgba(254, 238, 207, 0.22); stroke-width: 1; fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--sd-ease); }
.sc-brand .sc-construct.is-on { stroke-dashoffset: 0; }
.sc-brand .sc-mark { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0.85); filter: blur(6px) drop-shadow(0 10px 24px rgba(229, 125, 35, 0.35)); transition: opacity 0.9s ease, transform 1.1s var(--sd-ease), filter 1.1s ease; }
.sc-brand .sc-mark.is-on { opacity: 1; transform: none; filter: blur(0) drop-shadow(0 10px 24px rgba(229, 125, 35, 0.35)); }
.sc-brand .sc-word { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: 8px; fill: var(--text); text-anchor: middle; opacity: 0; transition: opacity 0.8s ease; }
.sc-brand .sc-word.is-on { opacity: 1; }

.sc-brand .sc-pal {
  right: 4%; bottom: 6%; width: 34%;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.sc-pal .sc-sw i { opacity: 0; transform: translateY(6px); transition: opacity 0.5s ease, transform 0.6s var(--sd-ease); }
.sc-pal .sc-sw i.is-on { opacity: 1; transform: none; }
.sc-brand .sc-side { position: absolute; left: 4%; bottom: 6%; display: grid; gap: 6px; justify-items: start; }

/* ---- motion: viewport + a timeline with a playhead ---------------- */
.sc-view {
  left: 4%; right: 4%; top: 5%; height: 52%;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 90% at 50% 100%, rgba(229, 125, 35, 0.2), transparent 70%), rgba(21, 9, 5, 0.8);
}

.sc-actor {
  position: absolute;
  left: 0;
  top: 0;
  width: 13%;
  aspect-ratio: 1;
  border-radius: 30%;
  background: var(--gradient);
  box-shadow: 0 10px 26px -6px rgba(229, 125, 35, 0.8);
}

.sc-ground { position: absolute; left: 0; right: 0; bottom: 16%; height: 1px; background: rgba(254, 238, 207, 0.2); }
.sc-shadow { position: absolute; bottom: calc(16% - 4px); width: 13%; height: 8px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); filter: blur(2px); }

.sc-tl {
  left: 4%; right: 4%; bottom: 5%; height: 34%;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sc-tl-h { display: flex; justify-content: space-between; }
.sc-tl-h b { font-size: 0.6rem; font-weight: 500; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.sc-tracks { position: relative; flex: 1; display: grid; gap: 5px; }
.sc-track-row { position: relative; border-radius: 4px; background: rgba(254, 238, 207, 0.05); }
.sc-track-row i { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; rotate: 45deg; background: var(--accent-2); box-shadow: 0 0 6px rgba(250, 167, 25, 0.7); }
.sc-track-row span { position: absolute; top: 20%; bottom: 20%; border-radius: 3px; background: rgba(229, 125, 35, 0.35); }
.sc-head { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); box-shadow: 0 0 8px rgba(254, 238, 207, 0.8); }
.sc-head::before { content: ""; position: absolute; left: -4px; top: -6px; width: 10px; height: 8px; border-radius: 2px; background: var(--text); }

/* ---- copy: the line typed, a word struck and bettered ------------- */
.sc-doc {
  left: 4%; top: 6%; width: 62%; bottom: 6%;
  padding: 18px 18px;
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 1.35vw, 1.2rem);
  line-height: 1.45;
  color: var(--text);
}

.sc-doc .sc-lines-t { display: grid; gap: 12px; }
.sc-doc p { margin: 0; min-height: 1.45em; }
.sc-doc del { color: rgba(254, 238, 207, 0.35); text-decoration-color: var(--brand-ember); text-decoration-thickness: 2px; }
.sc-doc ins { text-decoration: none; background: linear-gradient(transparent 62%, rgba(250, 167, 25, 0.35) 62%); }
.sc-doc .sc-ghost-lines { margin-top: 18px; display: grid; gap: 8px; }
.sc-doc .sc-ghost-lines i { height: 5px; border-radius: 3px; background: rgba(254, 238, 207, 0.1); }

.sc-meter {
  right: 4%; top: 6%; width: 26%; bottom: 6%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sc-meter div { display: grid; gap: 6px; }
.sc-meter b { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.sc-meter .sc-chip { align-self: flex-start; }

/* ---- ai: the assistant, live -------------------------------------- */
.sc-chat {
  left: 4%; top: 6%; width: 64%; bottom: 6%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  overflow: hidden;
}

.sc-msg {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: clamp(0.56rem, 0.85vw, 0.74rem);
  line-height: 1.45;
  animation: sd-up 0.5s var(--sd-ease) both;
}

.sc-msg.u { align-self: flex-end; background: rgba(254, 238, 207, 0.12); border-bottom-right-radius: 4px; }
.sc-msg.a { align-self: flex-start; background: linear-gradient(135deg, rgba(192, 69, 39, 0.35), rgba(229, 125, 35, 0.22)); border: 1px solid rgba(250, 167, 25, 0.3); border-bottom-left-radius: 4px; }
.sc-typing { display: inline-flex; gap: 4px; }
.sc-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-2); animation: sd-blink 0.9s ease-in-out infinite; }
.sc-typing i:nth-child(2) { animation-delay: 0.15s; }
.sc-typing i:nth-child(3) { animation-delay: 0.3s; }

.sc-brain {
  right: 4%; top: 6%; width: 24%; bottom: 6%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sc-brain svg { width: 100%; height: auto; aspect-ratio: 1; }
.sc-brain .nn { fill: rgba(254, 238, 207, 0.25); transition: fill 0.3s ease; }
.sc-brain .nn.is-on { fill: var(--accent-2); }
.sc-brain .ne { stroke: rgba(254, 238, 207, 0.1); stroke-width: 0.6; }
.sc-brain .ne.is-on { stroke: rgba(250, 167, 25, 0.6); }

/* ---- crew: specialists docking into the squad --------------------- */
.sc-roster {
  left: 4%; top: 6%; width: 38%; bottom: 6%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sc-role {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--sd-line);
  border-radius: 8px;
  font-size: clamp(0.5rem, 0.78vw, 0.62rem);
  letter-spacing: 0.08em;
  color: rgba(254, 238, 207, 0.75);
  transition: opacity 0.5s ease, border-color 0.5s ease;
}

.sc-role i { width: 18px; height: 18px; flex: none; border-radius: 50%; background: rgba(254, 238, 207, 0.15); }
.sc-role.is-sent { opacity: 0.35; }
.sc-role.is-sent i { background: var(--accent-2); }

.sc-squad {
  right: 4%; top: 6%; width: 50%; bottom: 6%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sc-seats { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 8px; }

.sc-seat {
  position: relative;
  border: 1px dashed rgba(254, 238, 207, 0.2);
  border-radius: 10px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 6px;
  text-align: center;
  font-size: clamp(0.44rem, 0.66vw, 0.56rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(254, 238, 207, 0.3);
  transition: border-color 0.5s ease, background 0.5s ease, color 0.5s ease;
}

.sc-seat i { width: 28%; aspect-ratio: 1; border-radius: 50%; background: rgba(254, 238, 207, 0.08); transition: background 0.5s ease, box-shadow 0.5s ease; }
.sc-seat.is-on { border-style: solid; border-color: rgba(250, 167, 25, 0.45); background: rgba(229, 125, 35, 0.08); color: var(--text); }
.sc-seat.is-on i { background: var(--gradient); box-shadow: 0 0 12px rgba(250, 167, 25, 0.6); }
.sc-squad-f { display: flex; justify-content: space-between; align-items: baseline; }
.sc-squad-f b { font-size: clamp(0.6rem, 0.9vw, 0.8rem); font-weight: 500; white-space: nowrap; color: var(--accent-2); }

/* ---- cloud: the racks lift into orbit ----------------------------- */
.sc-racks {
  left: 4%; bottom: 6%; width: 30%; height: 56%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sc-racks i { flex: 1; border-radius: 4px; background: rgba(254, 238, 207, 0.08); position: relative; transition: background 0.5s ease, opacity 0.5s ease; }
.sc-racks i::after { content: ""; position: absolute; right: 8px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: rgba(250, 167, 25, 0.7); }
.sc-racks i.is-gone { opacity: 0.25; }
.sc-racks i.is-gone::after { background: rgba(254, 238, 207, 0.2); }

.sc-cloud .sc-orbit { fill: none; stroke: rgba(254, 238, 207, 0.12); stroke-width: 1; stroke-dasharray: 3 6; }
.sc-cloud .sc-region { fill: rgba(21, 9, 5, 0.95); stroke: rgba(254, 238, 207, 0.3); }
.sc-cloud .sc-region.is-on { stroke: var(--accent-2); }
.sc-cloud .sc-region-t { font-family: var(--font-mono); font-size: 8px; letter-spacing: 1.4px; fill: rgba(254, 238, 207, 0.7); text-anchor: middle; }
.sc-cloud .sc-beam { stroke: url(#sc-grad); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; fill: none; }
.sc-cloud .sc-beam.is-on { animation: sc-beam 1.2s var(--sd-ease) forwards; }

@keyframes sc-beam { to { stroke-dashoffset: 0; } }

.sc-mig {
  right: 4%; bottom: 6%; width: 56%;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.sc-mig-h { display: flex; justify-content: space-between; align-items: baseline; }
.sc-mig-h b { font-size: 0.9rem; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }

/* ================================================================
   THE LIMBS (between the acts)
   ================================================================ */
/* a straight horizon of light between the acts, drawn out from the
   middle, its tag riding on it */
.sd-limb {
  position: relative;
  height: clamp(60px, 7vw, 110px);
  margin: clamp(10px, 3vw, 40px) auto 0;
  width: min(1400px, 100% - 40px);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
}

.sd-limb svg { width: 100%; height: 100%; overflow: visible; }
.sd-limb path { fill: none; vector-effect: non-scaling-stroke; }
.sd-limb-line { stroke-width: 1.2; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 2.4s var(--sd-ease); }
.sd-limb-glow { stroke-width: 14; opacity: 0; filter: blur(12px); transition: opacity 2.4s ease 0.6s; }
.sd-limb.is-in .sd-limb-line { stroke-dashoffset: 0; }
.sd-limb.is-in .sd-limb-glow { opacity: 0.22; }

.sd-limb-tag {
  position: absolute;
  left: 50%;
  top: calc(50% - 26px);
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.34em;
  white-space: nowrap;
  color: rgba(254, 238, 207, 0.45);
  opacity: 0;
  transition: opacity 1s ease 1.4s;
}

.sd-limb.is-in .sd-limb-tag { opacity: 1; }

/* ================================================================
   THE SYSTEMS
   ================================================================ */
.sd-systems { padding: clamp(40px, 6vw, 90px) 0 clamp(40px, 6vw, 80px); }

.sd-sys-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* a bank of panels, not a row of boxes: the middle column rides lower */
@media (min-width: 1025px) {
  .sd-sys:nth-child(3n + 2) { margin-top: clamp(30px, 4vw, 60px); margin-bottom: calc(clamp(30px, 4vw, 60px) * -1); }
}

.sd-sys-card {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px 24px 26px;
  overflow: hidden;
  border: 1px solid var(--sd-line);
  border-radius: 20px;
  background:
    radial-gradient(420px circle at var(--mx) var(--my), rgba(229, 125, 35, 0.14), transparent 60%),
    var(--sd-panel);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.6s var(--sd-ease);
}

/* the gradient hairline, the site's hover language */
.sd-sys-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

@media (hover: hover) {
  .sd-sys-card:hover { transform: translateY(-6px); }
  .sd-sys-card:hover::before { opacity: 1; }
}

.sd-sys-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: rgba(254, 238, 207, 0.45);
}

.sd-sys-id { color: var(--accent-2); }

/* a 3 x 3 status matrix, each card lighting its own pattern */
.sd-sys-dots {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  gap: 3px;
  margin-right: auto;
}

.sd-sys-dots i { width: 4px; height: 4px; border-radius: 1px; background: rgba(254, 238, 207, 0.15); }
.sd-sys.is-in .sd-sys-dots i:nth-child(odd) { animation: sd-dot 2.6s ease-in-out infinite; animation-delay: calc(var(--k) * -0.4s); }
.sd-sys.is-in .sd-sys-dots i:nth-child(3n) { animation: sd-dot 1.9s ease-in-out infinite; animation-delay: calc(var(--k) * -0.7s); }

@keyframes sd-dot { 0%, 100% { background: rgba(254, 238, 207, 0.15); } 50% { background: var(--accent-2); box-shadow: 0 0 6px rgba(250, 167, 25, 0.8); } }

.sd-sys-st { display: flex; align-items: center; gap: 6px; color: rgba(254, 238, 207, 0.55); }
.sd-sys-st::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 6px rgba(250, 167, 25, 0.8); }

.sd-sys-card h3 {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.sd-sys-card p {
  position: relative;
  margin: 10px 0 0;
  max-width: 36ch;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--muted);
}

.sd-sys-num {
  position: absolute;
  right: 12px;
  bottom: -26px;
  font-family: var(--font-display);
  font-size: clamp(5rem, 9vw, 7.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(254, 238, 207, 0.07);
  transition: -webkit-text-stroke-color 0.5s ease;
  pointer-events: none;
}

.sd-sys-card:hover .sd-sys-num { -webkit-text-stroke-color: rgba(250, 167, 25, 0.25); }

/* charge: a line fills along the card's foot as it boots */
.sd-sys-charge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.6s var(--sd-ease) calc(0.4s + var(--k, 0) * 0.12s);
}

.sd-sys.is-in .sd-sys-charge { transform: scaleX(1); }

/* ================================================================
   THE MISSION LOGS
   ================================================================ */
.sd-logs { padding: clamp(40px, 6vw, 90px) 0 clamp(40px, 6vw, 90px); }

.sd-log-grid {
  --drop: clamp(50px, 8vw, 140px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(50px, 7vw, 110px) clamp(30px, 5vw, 90px);
  margin: 0;
  padding: 0 0 var(--drop);
  list-style: none;
}

.sd-log { perspective: 1500px; }
.sd-log.is-right { translate: 0 calc(var(--drop) + 40px); }
.sd-log.is-right.is-in { translate: 0 var(--drop); }

.sd-log-card {
  --hov: 0;
  --side: 1;
  position: relative;
  transform-style: preserve-3d;
  transform-origin: 0% 50%;
  transform: rotateY(calc(var(--side) * (1 - var(--hov)) * 12deg)) rotateX(calc((1 - var(--hov)) * 2deg)) translateZ(calc(var(--hov) * 26px));
  transition: --hov 0.7s var(--sd-ease);
}

.sd-log.is-right .sd-log-card { --side: -1; transform-origin: 100% 50%; }

@media (hover: hover) {
  .sd-log:hover .sd-log-card { --hov: 1; }
}

.sd-log:focus-within .sd-log-card { --hov: 1; }

.sd-log-card::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 40%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(229, 125, 35, 0.26), transparent);
  filter: blur(26px);
  opacity: calc(0.55 + var(--hov) * 0.45);
  pointer-events: none;
}

.sd-screen {
  overflow: hidden;
  border: 1px solid rgba(254, 238, 207, 0.12);
  border-radius: 18px;
  background: rgba(12, 5, 3, 0.85);
  box-shadow: 0 50px 90px -46px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(254, 238, 207, 0.06);
  transition: border-color 0.5s ease;
}

.sd-log:hover .sd-screen,
.sd-log:focus-within .sd-screen { border-color: rgba(250, 167, 25, 0.4); }

.sd-screen-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(254, 238, 207, 0.08);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: rgba(254, 238, 207, 0.55);
}

.sd-screen-bar .sd-rec { opacity: 0.35; animation: none; box-shadow: none; }
.sd-screen.is-live .sd-screen-bar .sd-rec { opacity: 1; animation: sd-blink 1.2s steps(2, jump-none) infinite; box-shadow: 0 0 8px rgba(255, 74, 50, 0.8); }
.sd-screen-call { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sd-tc { font-variant-numeric: tabular-nums; color: var(--accent-2); }

.sd-frame {
  position: relative;
  aspect-ratio: 1904 / 906;
  overflow: hidden;
  background: #0b0503;
}

.sd-poster,
.sd-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(calc(0.7 + var(--hov) * 0.3)) sepia(calc(0.22 - var(--hov) * 0.22)) contrast(1.04);
  transform: scale(calc(1.035 - var(--hov) * 0.035));
  transition: transform 1.2s var(--sd-ease);
}

.sd-video { opacity: 0; transition: opacity 0.9s ease, transform 1.2s var(--sd-ease); }
.sd-video.is-playing { opacity: 1; }

.sd-grade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 75% at 50% 45%, transparent 55%, rgba(10, 4, 2, 0.62) 100%),
    linear-gradient(180deg, rgba(229, 125, 35, 0.2), rgba(192, 69, 39, 0.28));
  mix-blend-mode: multiply;
  opacity: calc(1 - var(--hov) * 0.85);
}

.sd-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(254, 238, 207, 0.035) 0 1px, transparent 1px 3px);
  opacity: calc(1 - var(--hov) * 0.7);
}

.sd-vf {
  --c: rgba(254, 238, 207, 0.6);
  position: absolute;
  inset: calc(14px + var(--hov) * 8px);
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 0 / 1px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 1px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 1px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 1px 16px no-repeat;
}

.sd-static {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(ellipse 60% 60% at 50% 50%, rgba(229, 125, 35, 0.14), transparent 70%),
    repeating-linear-gradient(90deg, rgba(254, 238, 207, 0.025) 0 2px, transparent 2px 5px),
    #100604;
}

.sd-static img { width: 56px; height: 56px; border-radius: 12px; opacity: 0.85; }
.sd-static b { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500; letter-spacing: 0.26em; color: var(--accent-2); }

.sd-log-copy { padding: 24px 6px 0; }

.sd-log-meta {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(254, 238, 207, 0.45);
}

.sd-log-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}

.sd-log-copy h3 a { color: inherit; }
.sd-log-copy h3 a::after { content: ""; position: absolute; inset: 0; z-index: 6; }
.sd-log-copy h3 a:focus-visible { outline: none; }
.sd-log:focus-within .sd-screen { box-shadow: 0 0 0 2px rgba(250, 167, 25, 0.6), 0 50px 90px -46px rgba(0, 0, 0, 0.95); }

.sd-log-copy > p:not(.sd-log-meta) {
  max-width: 46ch;
  margin: 10px 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.sd-log-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.sd-log-cta i { font-style: normal; transition: transform 0.5s var(--sd-ease); }
.sd-log:hover .sd-log-cta i,
.sd-log:focus-within .sd-log-cta i { transform: translateX(6px); }

/* ================================================================
   THE OPEN CHANNEL
   ================================================================ */
.sd-launch { padding: clamp(40px, 6vw, 90px) 0 clamp(60px, 8vw, 110px); }

.sd-console {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(50px, 7vw, 100px) clamp(22px, 5vw, 80px) clamp(40px, 5vw, 70px);
  border: 1px solid rgba(254, 238, 207, 0.12);
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 90% at 50% 120%, rgba(229, 125, 35, 0.3), transparent 70%),
    radial-gradient(ellipse 40% 50% at 0% 0%, rgba(192, 69, 39, 0.16), transparent 70%),
    rgba(12, 5, 3, 0.82);
}

.sd-console .sd-kicker { justify-content: center; }
.sd-console h2 { max-width: 20ch; margin: 0 auto; }
.sd-console-p { max-width: 48ch; margin: 20px auto 0; font-size: 1.05rem; line-height: 1.6; color: var(--muted); }

/* the transmission: a waveform across the console, louder on hover */
.sd-console-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 4%;
  opacity: 0.22;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 70%);
  mask-image: linear-gradient(180deg, transparent, #000 70%);
  transition: opacity 0.6s ease;
}

.sd-console-wave i {
  width: 2px;
  height: 100%;
  border-radius: 2px;
  background: var(--gradient);
  transform-origin: bottom;
  transform: scaleY(0.12);
  animation: sd-wave 1.8s ease-in-out infinite;
}

.sd-console-wave i:nth-child(3n) { animation-duration: 1.3s; }
.sd-console-wave i:nth-child(4n) { animation-duration: 2.2s; }
.sd-console-wave i:nth-child(2n) { animation-delay: -0.6s; }
.sd-console-wave i:nth-child(5n) { animation-delay: -1.1s; }

@keyframes sd-wave { 50% { transform: scaleY(var(--amp, 0.45)); } }

.sd-console:hover .sd-console-wave { opacity: 0.4; --amp: 0.75; }

.sd-console > *:not(.sd-console-wave) { position: relative; }

.sd-console-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 0;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: rgba(254, 238, 207, 0.5);
}

.sd-console-foot i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 8px rgba(250, 167, 25, 0.8); animation: sd-blink 1.4s ease-in-out infinite; }

/* the doors to the neighbouring modules */
.sd-next {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  margin-top: 18px;
}

.sd-next-link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 44px;
  padding: 18px 22px;
  border: 1px solid var(--sd-line);
  border-radius: 16px;
  background: var(--sd-panel);
  transition: transform 0.5s var(--sd-ease), border-color 0.4s ease;
}

.sd-next-link span {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(254, 238, 207, 0.45);
}

.sd-next-link b { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--text); transition: color 0.3s ease; }
.sd-next-link--next { text-align: right; align-items: flex-end; }
.sd-next-link--all { align-items: center; text-align: center; }
.sd-next-link--prev b::before { content: "\2190  "; color: var(--accent-2); }
.sd-next-link--next b::after { content: "  \2192"; color: var(--accent-2); }

.sd-next-link:hover,
.sd-next-link:focus-visible { border-color: rgba(250, 167, 25, 0.45); }
.sd-next-link:hover b,
.sd-next-link:focus-visible b { color: var(--accent-2); }
.sd-next-link--prev:hover { transform: translateX(-4px); }
.sd-next-link--next:hover { transform: translateX(4px); }

/* ================================================================
   COMMS TRACKER (the home page's)
   ================================================================ */
.sd-comms {
  position: fixed;
  left: clamp(12px, 1.6vw, 26px);
  top: 50%;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: rgba(254, 238, 207, 0.55);
  transform: translate(calc(-100% - 40px), -50%);
  transition: transform 0.9s var(--sd-ease);
}

.sd-comms.is-on { transform: translate(0, -50%); }
.sd-comms-tag { writing-mode: vertical-rl; transform: rotate(180deg); color: var(--accent-2); }
.sd-comms-signal { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.sd-comms-signal i { width: 3px; background: var(--accent-2); animation: sd-sig 1.6s ease-in-out infinite; }
.sd-comms-signal i:nth-child(1) { height: 30%; }
.sd-comms-signal i:nth-child(2) { height: 50%; animation-delay: 0.15s; }
.sd-comms-signal i:nth-child(3) { height: 70%; animation-delay: 0.3s; }
.sd-comms-signal i:nth-child(4) { height: 85%; animation-delay: 0.45s; }
.sd-comms-signal i:nth-child(5) { height: 100%; animation-delay: 0.6s; }

@keyframes sd-sig { 50% { opacity: 0.25; } }

.sd-comms-line { position: relative; width: 1px; height: clamp(40px, 8vh, 80px); overflow: hidden; background: rgba(254, 238, 207, 0.2); }
.sd-comms-line::after { content: ""; position: absolute; left: 0; top: -30%; width: 1px; height: 30%; background: linear-gradient(transparent, var(--accent-2)); animation: sd-packet 2.4s linear infinite; }
.sd-comms-line:last-of-type::after { animation-delay: 1.2s; }

@keyframes sd-packet { to { top: 100%; } }

.sd-comms-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }

.sd-comms-list a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(254, 238, 207, 0.2);
  border-radius: 10px;
  background: rgba(21, 9, 5, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.sd-comms-list a:hover,
.sd-comms-list a:focus-visible { border-color: var(--accent-2); background: rgba(250, 167, 25, 0.12); color: var(--accent-2); transform: translateX(3px); }
.sd-comms-list svg { width: 16px; height: 16px; fill: currentColor; }
.sd-comms-status { display: flex; flex-direction: column; align-items: center; gap: 8px; writing-mode: vertical-rl; transform: rotate(180deg); }
.sd-comms-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 8px rgba(250, 167, 25, 0.8); animation: sd-blink 1.4s ease-in-out infinite; }

@media (max-width: 1100px), (hover: none) {
  .sd-comms { display: none; }
}

/* room for the tracker where it shows */
@media (min-width: 1101px) and (hover: hover) {
  .sd .container { width: min(var(--container), 100% - 180px); }
}

/* ================================================================
   SIZES
   ================================================================ */
@media (max-width: 1024px) {
  .sd-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .sd-scene { max-width: 620px; width: 100%; justify-self: center; transform: none; animation-name: sd-scene-in-flat; }
  .sd-sys-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sd-hud-bl { display: none; }
  .sd-hud { width: min(100%, 560px); transform: perspective(900px) rotateY(10deg) rotateX(2deg); }
}

@keyframes sd-scene-in-flat {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 767px) {
  .sd-hero { min-height: 0; padding-top: 120px; }
  .sd-frame-hud { display: none; }
  .sd-scene { aspect-ratio: 4 / 3.6; border-radius: 18px; }
  .sd-sys-grid { grid-template-columns: minmax(0, 1fr); }
  .sd-log-grid { grid-template-columns: minmax(0, 1fr); padding-bottom: 0; gap: 56px; }
  .sd-log.is-right,
  .sd-log.is-right.is-in { translate: 0 0; }
  .sd-log-card,
  .sd-log.is-right .sd-log-card { --side: 0; transform-origin: 50% 100%; transform: rotateX(calc((1 - var(--hov)) * 6deg)); }
  .sd-next { grid-template-columns: 1fr 1fr; }
  .sd-next-link--all { grid-column: 1 / -1; order: 3; }
  .sd-hud { transform: none; }
  .sd-hud::before { inset: -20px -16px; }
}

@media (max-width: 420px) {
  .sd-next { grid-template-columns: minmax(0, 1fr); }
  .sd-next-link--next { text-align: left; align-items: flex-start; }
  .sd-cta { width: 100%; }
  .sd-cta-arrow { margin-left: auto; }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  [data-sd-in],
  .sd-log.is-right { opacity: 1; translate: 0 0; transition: none; }
  .sd-log.is-right { translate: 0 var(--drop); }
  .sd-w > span { translate: 0 0; transition: none; }
  .sd-lede, .sd-hero-actions, .sd-hud, .sd-frame-hud { opacity: 1; translate: 0 0; animation: none; }
  .sd-hud-rows li { opacity: 1; transform: none; animation: none; }
  .sd-hud-status::after, .sd-cta::before, .sd-cta-wave i { animation: none !important; }
  .sd-scene { opacity: 1; animation: none; }
  .sd-bg-light, .sd-bg-grain { animation: none !important; }
  .sd-hero::before, .sd-hero::after { display: none; }
  .sd-bg { opacity: 1; animation: none; }
  .sd-rec, .sd-sys-dots i, .sd-console-wave i, .sd-comms-signal i, .sd-comms-line::after, .sd-hud-br i::after, .sc-phone, .sc-caret, .sc-prod .p-img::after, .sc-net .sc-core circle.o { animation: none !important; }
  .sd-sys-charge { transform: scaleX(1); transition: none; }
}

@media (prefers-reduced-motion: reduce) and (max-width: 767px) {
  .sd-log.is-right { translate: 0 0; }
}

/* screen-reader-only text (the shared rule lives in home.css) */
.sd .visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* below the bay: the page ink, lit by a faint ember glow that stays
   with the viewer (no sky, no arcs) */
.sd::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 88% 18%, rgba(229, 125, 35, 0.08), transparent 70%),
    radial-gradient(ellipse 45% 40% at 6% 88%, rgba(192, 69, 39, 0.08), transparent 70%),
    #150905;
}
