/* CognitiveSOUL homepage: "The Machine"
   Two modes. Default (no JS / reduced motion): an ordinary document over a
   static machine backdrop. html.world-on: one fixed stage, the sections become
   copy windows faded in by home.js, and a spacer provides the scroll. */

body.home { background: radial-gradient(120% 90% at 70% 0%, #121a33 0%, var(--void) 55%) fixed, var(--void); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--brass); color: #0b1020; padding: 8px 12px; font-weight: 600; }
.skip:focus { left: 12px; }
.home .nav { position: fixed; left: 0; right: 0; top: 0; z-index: 30; }
.home .accent { color: var(--brass); }
.pixelated { image-rendering: pixelated; }

/* ---------- The world ---------- */
.world { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.world__layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.world__far { opacity: 0.9; }
.world__near { filter: blur(3px); opacity: 0.85; }
.world__vignette { position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 50% 50%, transparent 55%, rgba(5,8,18,0.75) 100%); }
.world .plate { font-family: 'Silkscreen', monospace; font-size: 20px; letter-spacing: 0.12em; fill: #e9c477; }
.world .order__txt { font-family: 'Silkscreen', monospace; font-size: 19px; letter-spacing: 0.1em; fill: #b8e2ea; }
.gear__engage { fill: none; stroke: #7dc7d4; stroke-width: 6; opacity: 0; transition: opacity .3s ease-out; }
.gear.is-engaged .gear__engage { opacity: 0.85; }


/* ---------- Copy (shared) ---------- */
.stops { position: relative; z-index: 2; }
.stop h1, .stop h2 { font-family: var(--font-display); font-weight: 900; letter-spacing: -0.02em; line-height: 1.04; margin: 0; color: var(--ink); text-wrap: balance; }
.stop h1 { font-size: clamp(2.3rem, 3.7vw, 3.7rem); }
.stop--hero .stop__inner { max-width: 46rem; }
.plates-layer > * { transition: opacity .3s ease-out; }
.stop h2 { font-size: clamp(2rem, 3.4vw, 3.2rem); }
.stop p { color: var(--ink-mute); font-size: 1.06rem; line-height: 1.65; margin: 1.1rem 0 0; max-width: 34rem; }
.stop .lede { font-size: 1.12rem; }
.stop .eyebrow { margin: 0 0 1rem; }
.stop .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2rem; }
.stop .link-more { margin-top: 1.4rem; }
.stop__inner {                    /* reading card: the machine stays visible around it */
  position: relative; max-width: 38rem; padding: 30px 34px 32px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(15,21,40,0.86), rgba(11,16,32,0.8));
  border: 1px solid rgba(212,165,72,0.2);
  box-shadow: 0 28px 60px -28px rgba(0,0,0,0.75), inset 0 1px 0 rgba(255,255,255,0.05);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

.plates { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plates li { position: relative; padding: 12px 14px 12px 30px; border: 1px solid rgba(212,165,72,0.28); border-radius: 3px;
  background: linear-gradient(180deg, rgba(212,165,72,0.08), rgba(212,165,72,0.02)); color: var(--ink-mute); font-size: 0.9rem; line-height: 1.35; }
.plates li::before { content: ""; position: absolute; left: 12px; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); box-shadow: inset 0 -1px 0 rgba(0,0,0,0.4); }
.plates strong { display: block; color: var(--brass-soft); font-family: 'Silkscreen', monospace; font-weight: 400; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 2px; }

.suite { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; }
.suite a { display: block; padding: 10px 0; border-bottom: 1px solid var(--hairline-strong); color: var(--ink-mute); font-size: 0.92rem; transition: color .15s ease-out, border-color .15s ease-out; }
.suite b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; color: var(--ink); }
.suite a:hover, .suite a:focus-visible { color: var(--ink); border-color: var(--brass); }
.suite a:hover b { color: var(--brass-soft); }

.porthole { margin: 0; position: relative; border-radius: 10px; padding: 10px; background: linear-gradient(160deg, #e9c477, #8a5f1c 45%, #d4a548 70%, #6b4612);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.4); }
.porthole img { display: block; width: 100%; height: auto; border-radius: 4px; background: #0b1020; }
.porthole figcaption { font-family: 'Silkscreen', monospace; font-size: 10px; letter-spacing: 0.1em; color: #2a1c08; padding: 8px 4px 0; }
.porthole::before, .porthole::after { content: ""; position: absolute; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: #5a3d12; }
.porthole::before { left: 4px; } .porthole::after { right: 4px; }

.plaque { margin: 1.4rem 0 0; padding: 18px 20px; border: 1px solid rgba(212,165,72,0.3); border-radius: 3px; background: rgba(212,165,72,0.05); }
.plaque blockquote { margin: 0; }
.plaque blockquote p { margin: 0; color: var(--ink); font-size: 1.02rem; }
.plaque figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--ink-dim); }
.plaque figcaption strong { color: var(--brass-soft); }
.maker { font-size: 0.95rem !important; }
.maker a, .foot a { color: var(--brass-soft); border-bottom: 1px dotted var(--brass-soft); }

.stop .contact-form { margin: 1.6rem 0 0; max-width: 32rem; }
.hp { position: absolute; left: -9999px; }
.foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 1.8rem; font-family: 'Silkscreen', monospace; font-size: 9px; letter-spacing: 0.1em; color: var(--ink-dim); }

/* ---------- Gauge (map) ---------- */
.gauge { display: none; }

/* ---------- Document mode (no JS, reduced motion) ---------- */
html:not(.world-on) .world { opacity: 0.35; }
html:not(.world-on) .stop { min-height: 70vh; display: flex; flex-wrap: wrap; align-items: center; gap: 40px; padding: 120px max(32px, calc((100vw - 1180px) / 2)) 60px; }
html:not(.world-on) .stop--trail { justify-content: flex-end; }
html:not(.world-on) .porthole { flex: 1 1 380px; max-width: 620px; }
html:not(.world-on) .porthole--tall { max-width: 300px; }
html:not(.world-on) .spacer { display: none; }

/* ---------- World mode ---------- */
.world-on .stops { position: fixed; inset: 0; pointer-events: none; }
.world-on .stop {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 4vw;
  padding: 96px max(48px, calc((100vw - 1240px) / 2)) 48px; opacity: 0; visibility: hidden; will-change: opacity, transform;
}
.world-on .stop.is-live { visibility: visible; }
.world-on .stop.is-on .stop__inner, .world-on .stop.is-on .porthole { pointer-events: auto; }
.world-on .stop--trail { justify-content: flex-end; }
.world-on .stop--wide { justify-content: space-between; }
.world-on .stop--trail.stop--wide { flex-direction: row-reverse; }
.world-on .stop--wide .stop__inner { max-width: 29rem; }
.world-on .porthole { flex: 0 1 min(52vw, 640px); }
.world-on .porthole--tall { flex: 0 1 min(24vw, 290px); max-height: 78vh; overflow: hidden; }
.world-on .porthole--tall img { max-height: calc(78vh - 46px); object-fit: cover; object-position: top; }
.world-on .stop--close { padding-top: 84px; }
.world-on .stop--close .contact-form { margin-top: 1.1rem; }
.world-on .stop--close textarea { min-height: 70px; }

.world-on .gauge { display: block; position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 25; }
.gauge ol { list-style: none; margin: 0; padding: 4px 0; position: relative; display: flex; flex-direction: column; gap: 14px; }
.gauge ol::before { content: ""; position: absolute; right: 5px; top: 0; bottom: 0; width: 2px; background: rgba(212,165,72,0.22); }
.gauge a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; position: relative; height: 12px; }
.gauge a::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #0b1020; border: 2px solid rgba(212,165,72,0.55); box-sizing: border-box; transition: background .15s ease-out, border-color .15s ease-out, transform .15s ease-out; }
.gauge a span { font-family: 'Silkscreen', monospace; font-size: 9px; letter-spacing: 0.1em; color: var(--ink-dim); opacity: 0; transform: translateX(6px); transition: opacity .15s ease-out, transform .15s ease-out, color .15s ease-out; white-space: nowrap; }
.gauge:hover a span, .gauge a:focus-visible span, .gauge a.is-active span { opacity: 1; transform: none; }
.gauge a.is-active span { color: var(--brass-soft); }
.gauge a.is-active::after { background: var(--brass); border-color: var(--brass-soft); transform: scale(1.25); }
.gauge a:hover::after { border-color: var(--brass-soft); }
.gauge a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.gauge__needle { position: absolute; right: 2px; top: 0; height: calc(100% - 8px); width: 8px; pointer-events: none; }
.gauge__needle::before { content: ""; position: absolute; right: 0; top: 0; width: 8px; height: 8px; margin-top: -4px; border-radius: 1px; background: var(--cyan); transform: rotate(45deg); }

@media (max-width: 1000px) {
  .home .nav-links { display: none; }
}
@media (max-width: 820px) {
  .world-on .stop { align-items: flex-end; padding: 72px 30px 28px 20px; }
  .world-on .stop--trail, .world-on .stop--wide, .world-on .stop--trail.stop--wide { justify-content: flex-end; flex-direction: column; align-items: stretch; gap: 14px; }
  .world-on .stop--wide { justify-content: flex-end; }
  .world-on .stop__inner, .world-on .stop--wide .stop__inner { max-width: none; }
  .stop__inner { padding: 18px 18px 20px; border-radius: 10px; }
  .world-on .porthole, .world-on .porthole--tall { flex: none; max-width: none; width: 100%; max-height: 32vh; overflow: hidden; }
  .world-on .porthole img, .world-on .porthole--tall img { max-height: calc(32vh - 20px); object-fit: cover; object-position: top; }
  .world-on .porthole figcaption { display: none; }
  .world-on .stop--trail.stop--wide .porthole { order: -1; }
  .world-on .stop--wide .porthole { order: -1; }
  .stop h1 { font-size: clamp(2rem, 8.4vw, 2.6rem); }
  .stop h2 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .stop p { font-size: 0.98rem; }
  .plates, .suite { grid-template-columns: 1fr 1fr; gap: 6px; }
  .plates li { padding: 8px 8px 8px 24px; font-size: 0.8rem; }
  .plates li::before { left: 9px; top: 13px; }
  .world-on .gauge { right: 6px; }
  .gauge a span { display: none; }
  .gauge ol { gap: 9px; }
  .gauge a::after { width: 9px; height: 9px; }
  .world-on .stop--close .cf-row { grid-template-columns: 1fr; gap: 0; }
  .world-on .stop--close .cf-row .cf-field { margin-top: 10px; }
  .home .nav-cta .btn { padding: 8px 10px; }
}

/* Gauge reading card: appears behind the labels whenever they are shown */
.world-on .gauge { right: 12px; }
.gauge::before { content: ""; position: absolute; inset: 0; border-radius: 12px; pointer-events: none;
  background: linear-gradient(180deg, rgba(15,21,40,0.9), rgba(11,16,32,0.84));
  border: 1px solid rgba(212,165,72,0.2); box-shadow: 0 20px 44px -22px rgba(0,0,0,0.75);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .18s ease-out; }
.gauge:hover::before, .gauge:focus-within::before { opacity: 1; }
.gauge ol { position: relative; z-index: 1; padding: 12px 10px 12px 16px; }
.gauge ol::before { right: 15px; top: 12px; bottom: 12px; }
.gauge__needle { z-index: 1; right: 12px; top: 12px; height: calc(100% - 32px); }
/* At rest only the active label shows: give it its own small plate */
.gauge a.is-active span { background: rgba(11,16,32,0.85); border: 1px solid rgba(212,165,72,0.25); border-radius: 4px; padding: 3px 7px; }
.gauge:hover a.is-active span, .gauge:focus-within a.is-active span { background: none; border-color: transparent; }
@media (max-width: 820px) {
  .world-on .gauge { right: 2px; }
  .gauge ol { padding: 8px 4px 8px 6px; }
  .gauge ol::before { right: 7px; top: 8px; bottom: 8px; }
  .gauge__needle { right: 4px; top: 8px; height: calc(100% - 24px); }
}

/* Clickable nameplates and product gears (shortcuts to their stop) */
.world .plate-link, .world .gear--link { pointer-events: auto; cursor: pointer; }
.world .plate-link rect { transition: fill .15s ease-out, stroke .15s ease-out; }
.world .plate-link:hover rect { fill: #1b2644; stroke: #e9c477; }
.world .plate-link:hover .plate { fill: #fff1c9; }
.world .gear--link:hover .gear__engage { opacity: 0.5; }
