/* ─────────────────────────────────────────────
   Explore ARCUHN — inside the machine
   One technical space (drawn by arcuhn.js on a canvas) stays behind every section; you travel
   deeper into it as you read. Sections: hero · what we do · what we examine · how we work ·
   where it leads · final. Builds on styles.css (tokens, header, menu, footer).
   ───────────────────────────────────────────── */
.page-arcuhn {
  --machine: #2E2E2E;
  --machine-deep: #1f1f1f;
  --brass: #c69b61;
  --brass-soft: #d3aa76;
  --brass-dim: rgb(198 155 97 / .35);
  --ink: #242424;
  --signal: #d9533f;
  --ox-mid: #541b20;
  --header-bg: rgb(36 36 36 / .92);

  background: var(--machine);
  color: var(--oat);
}
.page-arcuhn .site-footer { position: relative; z-index: 2; background: #1c1c1c; }

.obs { position: relative; z-index: 0; isolation: isolate; overflow: clip; }
.obs::after {   /* grain */
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: .06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─────────────── the machine (fixed, behind every section) ─────────────── */
.mach {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(90% 80% at 62% 50%, #383838, var(--machine) 45%, var(--machine-deep));
}
.mach__cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.mach__shade {   /* scrim behind the texts on the left + top/bottom falloff */
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgb(28 28 28 / .86) 0%, rgb(28 28 28 / .5) 34%, transparent 60%),
    linear-gradient(to bottom, rgb(24 24 24 / .5), transparent 18%, transparent 70%, rgb(22 22 22 / .7));
  transition: opacity 1.4s var(--ease-out);
}
[data-stage="arrival"] .mach__shade { opacity: .75; }
@media (max-width: 979px) {
  .mach__shade { background: linear-gradient(to bottom, rgb(24 24 24 / .55), rgb(28 28 28 / .7) 40%, rgb(22 22 22 / .85)); }
}

/* ── depth gauge (fixed, right edge) ── */
.depth {
  position: fixed;
  right: var(--gutter);
  top: 50%;
  translate: 0 -50%;
  z-index: 12;
  display: grid;
  justify-items: end;
  gap: 10px;
  font: 400 10px var(--font-mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brass-soft);
  opacity: 0;
  transition: opacity .8s var(--ease-out);
  pointer-events: none;
}
.depth.is-on { opacity: .75; }
.depth__track { position: relative; width: 1px; height: 140px; background: var(--brass-dim); }
.depth__fill { position: absolute; inset: 0 0 auto 0; height: calc(var(--depth, 0) * 100%); background: var(--brass-soft); box-shadow: 0 0 6px rgb(211 170 118 / .7); }
.depth__value { font-size: 18px; letter-spacing: .08em; color: var(--oat); }
.depth__name { max-width: 9em; text-align: right; line-height: 1.5; opacity: .7; }
@media (max-width: 1100px) { .depth { display: none; } }

/* ─────────────── shared type ─────────────── */
.sys-label { margin: 0; display: inline-flex; align-items: center; gap: 12px; font: 400 11px var(--font-mono); letter-spacing: .28em; text-transform: uppercase; color: rgb(211 170 118 / .8); }
.rec { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 8px var(--signal); animation: rec 2.4s ease-in-out infinite; }
@keyframes rec { 50% { opacity: .25; } }
.sys-note { margin: 32px 0 0; font: 400 11px/1.9 var(--font-mono); letter-spacing: .26em; text-transform: uppercase; color: rgb(211 170 118 / .65); transition: color .6s; }
.sys-note::before { content: "// "; }
.sys-note.is-on { color: var(--brass-soft); }

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: 8px 0;
  font: 700 13px var(--font-mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brass-soft);
  justify-self: start;
}
.cta::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform-origin: left; transform: scaleX(.35); transition: transform .6s var(--ease-out); }
.cta:hover::after, .cta:focus-visible::after { transform: scaleX(1); }
.cta span { transition: transform .5s var(--ease-out); }
.cta:hover span { transform: translateX(4px); }
.cta--down:hover span { transform: translateY(4px); }
.cta--big { font-size: clamp(14px, 1.3vw, 17px); }
.cta--quiet { color: rgb(222 216 204 / .7); }

.reveal { opacity: 0; transform: translateY(28px); filter: blur(4px); transition: opacity 1.2s var(--ease-out), transform 1.4s var(--ease-out), filter 1.2s var(--ease-out); transition-delay: var(--rd, 0s); }
.reveal.is-in { opacity: 1; transform: none; filter: none; }

/* ─────────────── 01 · HERO ─────────────── */
.arrival { position: relative; height: 100vh; height: 100svh; min-height: 600px; }
.arrival__copy {
  position: absolute;
  inset: auto 0 0 0;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(28px, 6vh, 64px);
  display: grid;
  gap: clamp(12px, 2.2vh, 22px);
}
.arrival__copy > * { opacity: 0; animation: copy-in 1.4s var(--ease-out) forwards; }
.arrival__copy > :nth-child(1) { animation-delay: .5s; }
.arrival__copy > :nth-child(2) { animation-delay: .65s; }
.arrival__copy > :nth-child(3) { animation-delay: .8s; }
.arrival__copy > :nth-child(4) { animation-delay: 1.05s; }
@keyframes copy-in { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
/* short and low: the machine gets the room */
.arrival__title {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.1rem, 4.2vw, 4.2rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.03em;
  text-transform: uppercase;
  text-wrap: balance;
}
.arrival__sub { margin: 0; max-width: 34rem; font-size: clamp(.98rem, 1.1vw, 1.08rem); line-height: 1.5; color: rgb(222 216 204 / .82); }
.arrival__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; border-top: 1px solid rgb(211 170 118 / .22); padding-top: 18px; }
.arrival__areas { margin: 0; font: 400 clamp(12px, 1vw, 14px)/1.6 var(--font-mono); letter-spacing: .12em; color: rgb(222 216 204 / .82); }

/* ─────────────── shared section type ─────────────── */
.stg__tag { margin: 0 0 18px; display: flex; align-items: center; gap: 14px; font: 400 11px var(--font-mono); letter-spacing: .3em; text-transform: uppercase; color: var(--brass-soft); }
.stg__tag::before { content: ""; width: 40px; height: 1px; background: var(--brass-dim); }
.stg__h { margin: 0; font-size: clamp(3rem, 6vw, 6rem); font-weight: 300; line-height: .9; letter-spacing: -.045em; text-transform: uppercase; }
.stg__h--m { max-width: 16ch; font-size: clamp(2.1rem, 3.9vw, 3.9rem); font-weight: 400; line-height: .98; letter-spacing: -.035em; text-wrap: balance; }
.stg__pre { display: block; margin-bottom: .45em; font: 400 clamp(.85rem, 1.1vw, 1rem)/1.5 var(--font-mono); letter-spacing: .16em; color: var(--brass-soft); }

/* ─────────────── 02 · WHAT WE DO (calm) ─────────────── */
.calm { position: relative; }
.calm__in {
  max-width: 1480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(110px, 16vh, 170px) var(--gutter);
  display: grid;
  align-content: center;
  gap: clamp(40px, 6vh, 72px);
}
@media (min-width: 980px) {
  .calm__in { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: end; gap: clamp(48px, 6vw, 110px); }
}
@media (min-width: 1101px) { .calm__in { padding-right: calc(var(--gutter) + 72px); } }
.calm__lede { margin: 26px 0 0; max-width: 30rem; font-size: clamp(1.05rem, 1.35vw, 1.22rem); line-height: 1.55; color: rgb(222 216 204 / .86); }
.calm__label { margin: 0 0 14px; font: 400 11px var(--font-mono); letter-spacing: .28em; text-transform: uppercase; color: rgb(211 170 118 / .8); }
.look { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgb(222 216 204 / .18); }
.look li { display: flex; gap: 18px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid rgb(222 216 204 / .12); font-size: clamp(1.05rem, 1.4vw, 1.3rem); letter-spacing: -.01em; line-height: 1.35; }
.look span { flex: none; font: 400 11px var(--font-mono); letter-spacing: .2em; color: var(--brass-soft); }

/* ─────────────── STAGES (pinned scenes in the machine) ─────────────── */
.stg { position: relative; height: 170vh; }
.stg--reframe { height: 340vh; }
.stg__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  max-width: 1480px;
  margin: 0 auto;
  padding: 96px var(--gutter) 40px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: center;
}
@media (min-width: 1101px) { .stg__pin { padding-right: calc(var(--gutter) + 72px); } }   /* room for the depth gauge */
.stg__text { position: relative; z-index: 2; }
.stg__comp { position: relative; height: min(74vh, 720px); }

/* 03 · what we examine: five areas, suspended around a lens */
.observe { perspective: 1400px; }
.core { position: absolute; left: 50%; top: 50%; width: min(34%, 280px); aspect-ratio: 1; translate: -50% -50%; opacity: 0; transition: opacity 1.4s var(--ease-out); }
.core i { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgb(211 170 118 / .3); }
.core i:nth-child(1) { animation: spin 40s linear infinite; }
.core i:nth-child(2) { inset: 20%; border-style: solid; border-color: rgb(211 170 118 / .16); }
.core i:nth-child(3) { inset: calc(50% - 4px); border: 0; background: var(--brass-soft); box-shadow: 0 0 16px var(--brass); }
@keyframes spin { to { rotate: 360deg; } }
.observe__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.link { fill: none; stroke: rgb(211 170 118 / .6); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s var(--ease-out), opacity 1s; }
.link.is-drawn { stroke-dashoffset: 0; }
.link.is-fading { opacity: 0; }
.link--core { stroke: rgb(211 170 118 / .3); stroke-dasharray: .01 .02; }
.sigs { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.sig {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(190px, 16vw, 250px);
  padding: 14px 16px 16px;
  display: grid;
  gap: 6px;
  color: var(--oat);
  background: linear-gradient(160deg, rgb(52 52 52 / .82), rgb(34 34 34 / .78));
  border: 1px solid rgb(211 170 118 / .26);
  box-shadow: 0 24px 50px -30px rgb(0 0 0 / .9);
  opacity: 0;
  transform: translateZ(-120px) rotateY(-10deg);
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out), border-color .4s, background .4s;
  transition-delay: calc(var(--i, 0) * .12s);
}
.observe.is-live .core { opacity: 1; }
.observe.is-live .sig { opacity: 1; transform: rotateY(-6deg); animation: drift 10s ease-in-out infinite var(--dl); }
@keyframes drift { 50% { translate: 0 -8px; } }
.sig.is-on { z-index: 3; border-color: var(--brass-soft); background: linear-gradient(160deg, rgb(84 27 32 / .7), rgb(36 36 36 / .85)); transform: rotateY(0) scale(1.03); }
.sig__idx { font: 400 10px var(--font-mono); letter-spacing: .24em; color: rgb(211 170 118 / .8); }
.sig__name { margin: 0; font: 700 12px var(--font-mono); letter-spacing: .22em; text-transform: uppercase; }
.sig__wave { height: 10px; background: repeating-linear-gradient(90deg, rgb(211 170 118 / .55) 0 2px, transparent 2px 6px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 70%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 70%, transparent); transform-origin: bottom; animation: wave 1.8s ease-in-out infinite alternate var(--dl); opacity: .6; }
@keyframes wave { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
.sig__more { margin: 2px 0 0; font-size: 14.5px; line-height: 1.45; color: rgb(222 216 204 / .88); }

/* 04 · how we work: steps on the left, the reframe device on the right */
.how__h { margin: 0; font: 400 clamp(.95rem, 1.25vw, 1.15rem)/1.6 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass-soft); }
.how__h span { color: rgb(211 170 118 / .55); }
.steps { margin: 28px 0 0; padding: 0; list-style: none; counter-reset: st; border-top: 1px solid rgb(222 216 204 / .14); }
.step { counter-increment: st; display: grid; grid-template-columns: 2.6rem 1fr; gap: 2px 12px; padding: 14px 0; border-bottom: 1px solid rgb(222 216 204 / .1); opacity: .5; transition: opacity .6s var(--ease-out); }
.step::before { content: "0" counter(st); grid-row: span 2; padding-top: .45em; font: 400 11px var(--font-mono); letter-spacing: .2em; color: var(--brass-soft); }
.step b { font-size: clamp(1.4rem, 2.3vw, 2.2rem); font-weight: 400; line-height: 1.05; letter-spacing: -.03em; text-transform: uppercase; }
.step span { font-size: clamp(.98rem, 1.15vw, 1.08rem); line-height: 1.45; color: rgb(222 216 204 / .85); }
.step.is-on { opacity: 1; }
.step.is-on::before { color: var(--oat); }
.how__close { margin: 26px 0 0; font: 700 clamp(12px, 1vw, 14px)/1.6 var(--font-mono); letter-spacing: .26em; text-transform: uppercase; color: var(--oat); }

.reframe { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.device { flex: 1 1 auto; min-height: 0; width: 100%; height: auto; max-height: 62vh; overflow: visible; }
.device .ring { fill: none; stroke: rgb(211 170 118 / .3); }
.ring--outer { stroke-width: 1; }
.ring--ticks { stroke-width: 7; stroke-dasharray: 1 12; stroke: rgb(211 170 118 / .22); }
.ring--inner { stroke-dasharray: 2 6; stroke: rgb(211 170 118 / .2); }
.ring__cross { stroke: rgb(211 170 118 / .55); stroke-width: 1; }
.device__ring { transform-box: view-box; transform-origin: 400px 400px; transform: rotate(calc(var(--t, 0) * 120deg)); }
.edge { stroke-width: 1.2; transition: stroke .5s; }
.edge--old { stroke: rgb(211 170 118 / .55); }
.device.is-challenged .edge--old { stroke: rgb(217 83 63 / .8); stroke-dasharray: 5 5; }
.edge--new { stroke: var(--brass-soft); }
.rnode circle { fill: #262626; stroke: var(--brass); stroke-width: 1; transition: fill .6s, stroke .6s; }
.rnode text { font: 400 13px var(--font-mono); letter-spacing: 3px; text-anchor: middle; fill: rgb(222 216 204 / .75); transition: fill .6s; }
.rnode.is-hub circle { fill: var(--brass-soft); stroke: var(--brass-soft); }
.rnode.is-hub text { fill: var(--oat); }
.rnode.is-old circle { stroke: var(--signal); }
.rnode.is-old text { fill: rgb(224 122 102 / .95); }
.rnode.is-parked text { fill: rgb(222 216 204 / .4); }
.frames { display: grid; gap: 8px; width: min(100%, 30rem); }
.frame { margin: 0; display: grid; gap: 2px; font-size: clamp(.98rem, 1.2vw, 1.12rem); line-height: 1.35; letter-spacing: -.01em; }
.frame span { font: 400 10px var(--font-mono); letter-spacing: .26em; text-transform: uppercase; color: rgb(211 170 118 / .75); }
.frame--old { opacity: calc(1 - var(--t, 0) * .55); transition: color .6s; }
.stg--reframe.is-shifted .frame--old { text-decoration: line-through; text-decoration-color: rgb(217 83 63 / .7); color: rgb(222 216 204 / .6); }
.frame--new { opacity: clamp(0, (var(--t, 0) - .5) * 3.2, 1); translate: 0 calc((1 - clamp(0, (var(--t, 0) - .5) * 3.2, 1)) * 10px); }
.frame--new span { color: var(--brass-soft); }
.sys-note--frame { margin-top: 4px; }

/* 05 · where it leads: outputs emerging from the system.
   The outputs sit in a plain column (they can never overlap); the routes are drawn by JS
   from the source to wherever each output actually is. */
.create { display: grid; grid-template-columns: minmax(80px, 30%) minmax(0, 1fr); align-items: center; height: auto; max-height: calc(100svh - 150px); }
.src { position: relative; justify-self: center; width: 64px; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgb(211 170 118 / .5); box-shadow: 0 0 40px rgb(198 155 97 / .35), inset 0 0 20px rgb(198 155 97 / .25); }
.src i { position: absolute; inset: calc(50% - 5px); border-radius: 50%; background: var(--brass-soft); box-shadow: 0 0 14px var(--brass); }
.create__routes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.route { fill: none; stroke: rgb(211 170 118 / .5); stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease-out); transition-delay: calc(.2s + var(--i) * .25s); }
.route--flow { stroke: var(--oat); stroke-width: 2; stroke-dasharray: .03 .97; stroke-dashoffset: 1; opacity: 0; transition: opacity .6s 2s; }
.create.is-live .route { stroke-dashoffset: 0; }
.create.is-live .route--flow { opacity: .8; animation: flow 3.2s linear infinite; animation-delay: calc(var(--i) * -1s); stroke-dashoffset: 1; }
@keyframes flow { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.outs { position: relative; display: grid; gap: clamp(14px, 3vh, 30px); max-width: 26rem; }
.out {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 16px 16px 18px;
  border-left: 1px solid rgb(211 170 118 / .3);
  background: linear-gradient(90deg, rgb(30 30 30 / .88), rgb(30 30 30 / .55));
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.out:nth-child(1) { transition-delay: 1s; }
.out:nth-child(2) { transition-delay: 1.25s; }
.out:nth-child(3) { transition-delay: 1.5s; }
.create.is-live .out { opacity: 1; transform: none; }
.out__status { margin: 0; display: flex; align-items: center; gap: 10px; font: 400 10px var(--font-mono); letter-spacing: .26em; text-transform: uppercase; color: rgb(222 216 204 / .6); }
.led { width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgb(222 216 204 / .4); }
.out--active { border-color: var(--brass-soft); }
.out--active .out__status { color: var(--brass-soft); }
.out--active .led { background: var(--brass-soft); border-color: transparent; box-shadow: 0 0 10px var(--brass); animation: rec 3s ease-in-out infinite; }
.out__name { margin: 2px 0 0; font-size: clamp(1.3rem, 1.9vw, 1.75rem); font-weight: 400; letter-spacing: .04em; }
.out:not(.out--active) .out__name { color: rgb(222 216 204 / .7); }
.out__text { margin: 0; line-height: 1.45; font-size: 1rem; color: rgb(222 216 204 / .82); }
.out .cta { margin-top: 6px; }

/* ─────────────── 06 · FINAL ─────────────── */
.final { position: relative; max-width: 1320px; margin: 0 auto; min-height: 100vh; padding: clamp(120px, 18vh, 200px) var(--gutter); display: grid; align-content: center; justify-items: start; gap: 44px; }
.final__title { margin: 0; max-width: 14ch; font-size: clamp(2.4rem, 6vw, 5.6rem); font-weight: 400; line-height: .98; letter-spacing: -.035em; text-transform: uppercase; }
.final__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 44px; }

/* ─────────────── phones & small tablets: simpler, same sequence ─────────────── */
@media (max-width: 979px) {
  .stg { height: auto; }
  .stg__pin { position: relative; height: auto; display: block; padding: clamp(80px, 14vh, 120px) var(--gutter); }
  .stg__comp { height: auto; margin-top: 40px; }

  .observe { perspective: none; }
  .core, .observe__lines { display: none; }
  .sigs { position: relative; inset: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
  .sig { position: relative; left: auto; top: auto; width: auto; transform: none; }
  .observe.is-live .sig { transform: none; animation: none; }
  .sig.is-on { transform: none; }

  /* how we work stays a pinned scroll moment, compact */
  .stg--reframe { height: 300vh; }
  .stg--reframe .stg__pin { position: sticky; height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 6px; padding: 78px var(--gutter) 16px; }
  .stg--reframe .stg__tag { margin-bottom: 8px; }
  .how__h { font-size: .72rem; letter-spacing: .08em; }
  .steps { margin-top: 10px; }
  .step { padding: 7px 0; }
  .step b { font-size: 1.05rem; }
  .step span { display: none; }
  .step.is-on span { display: block; font-size: .92rem; }
  .how__close { display: none; }
  .stg--reframe .stg__comp { margin: 0; height: 100%; min-height: 0; }
  .device { max-height: none; }
  .rnode text { font-size: 22px; letter-spacing: 2px; }
  .frames { gap: 4px; }
  .frame { font-size: .88rem; }

  .create { display: block; max-height: none; }
  .src, .create__routes { display: none; }
  .outs { max-width: none; gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .rec, .out--active .led, .core i, .sig__wave, .route--flow { animation: none !important; }
  .observe.is-live .sig { animation: none; }
  .arrival__copy > * { animation: none; opacity: 1; }
}
