/* ============================================================
   ORYXEN — Oryxen Design Studio
   Minimal, monochrome, confident. Dark stage + one accent.
   ============================================================ */

/* ---------- Brand font: Stack Sans Notch ---------- */
@font-face { font-family: "Stack Sans Notch"; src: url("/fonts/StackSansNotch-ExtraLight.ttf") format("truetype"); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: "Stack Sans Notch"; src: url("/fonts/StackSansNotch-Light.ttf") format("truetype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Stack Sans Notch"; src: url("/fonts/StackSansNotch-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Stack Sans Notch"; src: url("/fonts/StackSansNotch-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Stack Sans Notch"; src: url("/fonts/StackSansNotch-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Stack Sans Notch"; src: url("/fonts/StackSansNotch-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
/* Inter (variable) — used for UI/body text in a few spots per the ODS design */
@font-face { font-family: "Inter"; src: url("/fonts/InterVariable.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #0a0a0b;
  --ink: #f2f2ef;
  --ink-dim: rgba(242, 242, 239, 0.5);
  --ink-faint: rgba(242, 242, 239, 0.24);
  --line: rgba(242, 242, 239, 0.12);
  --accent: #e9c46a;
  --mono: "SFMono-Regular", "JetBrains Mono", "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Stack Sans Notch", "Helvetica Neue", Inter, system-ui, -apple-system, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.is-oryxen, body.is-oryxen * { cursor: none; }

/* Generated day/night scene. JS recolours --sky-a/--sky-b (sky), the mountain fills, the glow opacity,
   and translates #sun/#moon vertically with scroll. Layers stack in DOM order inside #scene. */
#stage { position: fixed; inset: 0; background: #0a0a0b; }
#scene { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
#scene > * { position: absolute; inset: 0; }
#sky { background: linear-gradient(180deg, var(--sky-a, #96a5d2) 0%, var(--sky-b, #ffc896) 80%); }
#glow { bottom: 0; top: auto; height: 64%; opacity: 0; will-change: opacity;
  background: radial-gradient(115% 90% at 50% 96%, rgba(255,150,86,.6) 0%, rgba(255,150,86,0) 64%); }
.mtn { width: 100%; height: 100%; }
.mtn path { transition: none; }
#mtnBack path { fill: #b796b4; }
#mtnFront path { fill: #3c482e; }
#celestial { pointer-events: none; }
#sun, #moon { position: absolute; left: 50%; border-radius: 50%; will-change: transform, opacity; }
/* gradient fades smoothly to a fully-transparent WARM colour at the very edge (100%) so it meets the glow with
   no gap — that gap was the dark ring. rgba(...,0) keeps the hue (never the `transparent` keyword = black). */
#sun { top: 46%; width: 18vmin; height: 18vmin; margin: -9vmin 0 0 -9vmin;
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #ffffff 34%, #fff4da 50%, #ffd9a0 64%, rgba(255,205,140,.3) 82%, rgba(255,198,138,0) 100%);
  box-shadow: 0 0 17vmin 5vmin rgba(255,202,144,.4); }
#moon { top: 46%; width: 11vmin; height: 11vmin; margin: -5.5vmin 0 0 -5.5vmin; opacity: 0;
  background: radial-gradient(circle at 42% 40%, #fff 0%, #eaf0ff 46%, #c3cde8 72%, rgba(180,195,225,0) 80%);
  box-shadow: 0 0 8vmin 2vmin rgba(180,200,255,.28); }
#terrain { width: 100%; height: 100%; pointer-events: none; }
body.terrain-3d #mtnBack, body.terrain-3d #mtnFront { display: none; }  /* 3D terrain replaces the SVG ridges */
/* NOOB: drop the whole generated scene + 3D terrain, show the flat sunset photo instead (much lighter) */
#bgphoto { display: none; background: #0a0a0b url("/sunset-bg.png") center / cover no-repeat; }
body.perf-noob #bgphoto { display: block; }
body.perf-noob #sky, body.perf-noob #glow, body.perf-noob #mtnBack, body.perf-noob #mtnFront,
body.perf-noob #celestial, body.perf-noob #terrain { display: none; }
#st-status.is-off { color: #c2502a; }   /* studio closed (after 19:00 SGT / weekend) */
#bgscrim { pointer-events: none;
  background: linear-gradient(180deg, rgba(4,4,8,.34) 0%, rgba(4,4,8,0) 26%, rgba(4,4,8,0) 64%, rgba(4,4,8,.42) 100%); }
/* canvas (cards) paints ABOVE the positioned #scene layers */
#gl { display: block; width: 100%; height: 100%; touch-action: none; position: relative; z-index: 1; }

/* Camera/hand-tracking mode keeps the 3D scene as the background (no webcam video, no ASCII). #asciicam unused. */
#asciicam { display: none; }

/* ---------- Film grain overlay (sits on top of the project cards) ---------- */
.grain {
  position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
  z-index: 3; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='180'%20height='180'%3E%3Cfilter%20id='g'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.72'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='matrix'%20values='0.33%200.33%200.33%200%200%200.33%200.33%200.33%200%200%200.33%200.33%200.33%200%200%200%200%200%200%201'/%3E%3C/filter%3E%3Crect%20width='180'%20height='180'%20filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: .50;
  mix-blend-mode: overlay;
  animation: grain .55s steps(1) infinite;
  will-change: transform;
}
.grain.is-min { opacity: .25; animation: none; }   /* NOOB: lighter, static */
@keyframes grain {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-3%, -4%); }
  20%  { transform: translate(2%, -3%); }
  30%  { transform: translate(-4%, 2%); }
  40%  { transform: translate(3%, 3%); }
  50%  { transform: translate(-2%, 4%); }
  60%  { transform: translate(4%, -2%); }
  70%  { transform: translate(-3%, -3%); }
  80%  { transform: translate(2%, 4%); }
  90%  { transform: translate(-4%, -2%); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

#fallback { position: fixed; inset: 0; display: grid; place-items: center; font-family: var(--mono); color: var(--ink-dim); padding: 2rem; text-align: center; z-index: 5; }
#fallback[hidden] { display: none; }

/* ---------- Foreground UI ---------- */
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#ui a, #ui button { pointer-events: auto; }

.nav {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 36px;
}
.brand {
  display: inline-flex; align-items: center;
  text-decoration: none;
  transition: opacity .3s ease;
}
.brand__logo { display: block; height: 38px; width: auto; }
.brand:hover { opacity: .7; }
.nav__right { display: flex; align-items: center; gap: 28px; font-family: var(--mono); }
.nav__link { color: var(--ink-dim); text-decoration: none; font-size: 12px; letter-spacing: 0.18em; transition: color .35s ease; }
.nav__link:hover, .nav__link.is-active { color: var(--ink); }

.cta {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.18em;
  color: #111; background: #ffffff;
  border: none; border-radius: 999px;
  padding: 10px 20px;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, background .3s ease;
}
.cta:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 6px 24px rgba(255,255,255,.28); }

/* HUD */
.hud { position: absolute; font-family: var(--mono); user-select: none; }
.hud--bl { left: 36px; bottom: 28px; }
.hud__title { font-size: 17px; letter-spacing: 0.3em; font-weight: 600; }
.hud__title .slash { color: var(--accent); }
.hud__sub { margin-top: 9px; font-size: 11px; letter-spacing: 0.22em; color: var(--ink-faint); }

.hud--br { right: 36px; bottom: 28px; text-align: right; display: grid; gap: 7px; }
.stat { display: flex; justify-content: flex-end; gap: 26px; font-size: 11px; letter-spacing: 0.2em; }
.stat__k { color: var(--ink-faint); }
.stat__v { color: var(--ink-dim); min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
#st-status { color: var(--accent); }

.hint {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.36em; color: var(--ink-faint);
  transition: opacity .8s ease; text-align: center;
}
.hint.is-hidden { opacity: 0; }

/* Bottom control bar — env toggle · camera · perf toggle, as one centred flex row */
.controls {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; pointer-events: none; z-index: 11;
}
.controls > * { pointer-events: auto; }

/* Segmented pill toggles — Live/Light/Dark (.seg) and Crazy/Noob (.perf) share the look */
.seg, .perf {
  display: flex; gap: 2px; padding: 4px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(18, 18, 20, 0.5); backdrop-filter: blur(6px);
}
.seg__opt, .perf__opt {
  border: none; background: none; cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  color: var(--ink-dim); padding: 7px 15px; border-radius: 999px;
  transition: color .3s ease, background .3s ease;
}
.seg__opt:hover, .perf__opt:hover { color: var(--ink); }
.seg__opt.is-on, .perf__opt.is-on { background: #fff; color: #111; }

/* Camera / hand-tracking toggle — circular */
.cambtn {
  position: relative; flex: none;
  width: 37px; height: 37px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(18,18,20,.5); backdrop-filter: blur(6px);
  color: var(--ink-dim); display: grid; place-items: center; cursor: pointer;
  transition: color .3s ease, background .3s ease, border-color .3s ease;
}
.cambtn:hover { color: var(--ink); border-color: var(--ink); }
.cambtn.is-on { background: #EC1C2F; border-color: #EC1C2F; color: #fff; }
.cambtn.is-loading { opacity: .55; }
.cambtn.is-loading .cambtn__ico { animation: camSpin 1s linear infinite; }
@keyframes camSpin { to { transform: rotate(360deg); } }
.cambtn__ico { width: 18px; height: 18px; }
/* fist-to-exit countdown shown on the camera button */
.cambtn__count { display: none; font-family: var(--mono); font-weight: 700; font-size: 15px; color: #fff; line-height: 1; position: relative; z-index: 3; }
.cambtn__ring { display: none; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; transform: translate(-50%, -50%) rotate(-90deg); z-index: 3; }
.cambtn__ring-bg { fill: none; stroke: rgba(255,255,255,.3); stroke-width: 2.5; }
.cambtn__ring-fg { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 131.95; stroke-dashoffset: 131.95; transition: stroke-dashoffset .06s linear; }
.cambtn.is-counting .cambtn__ico { display: none; }
.cambtn.is-counting .cambtn__count { display: block; }
.cambtn.is-counting .cambtn__ring { display: block; }
/* live mirrored preview — 3× the button, grows upward from it while the camera is on */
.campreview {
  display: none; position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%);
  width: 111px; height: 111px; border-radius: 50%; overflow: hidden; z-index: 2;
  border: 2px solid #EC1C2F; box-shadow: 0 10px 30px rgba(0,0,0,.45); background: #000;
}
.cambtn.is-on .campreview { display: block; }
.campreview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }   /* mirror so users see their own hand */
@media (max-width: 760px) { .controls { bottom: 16px; gap: 8px; } .perf__opt, .seg__opt { padding: 9px 12px; } }

/* ---------- Camera / hand-tracking guide modal (light — ODS Figma design) ---------- */
.camguide {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px;
  background: rgba(6,6,8,.62); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .3s ease; pointer-events: auto;
}
.camguide[hidden] { display: none; }   /* display:grid above otherwise overrides the hidden attr → invisible click-blocker */
.camguide, .camguide * { cursor: auto !important; }   /* restore the OS cursor over the modal */
.camguide button { cursor: pointer !important; }
.camguide.is-open { opacity: 1; }
.camguide__panel {
  width: min(660px, 94vw); max-height: 92vh; overflow-y: auto; color: #000;
  border-radius: 34px; border: 1px solid rgba(255,255,255,.65);
  background: rgba(248,248,248,.8); backdrop-filter: blur(40px) saturate(1.4); -webkit-backdrop-filter: blur(40px) saturate(1.4);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  font-family: var(--sans); text-align: left; padding: 16px 0;
  transform: translateY(12px) scale(.98); transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.camguide.is-open .camguide__panel { transform: translateY(0) scale(1); }
/* header */
.cg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 8px 20px 13px; }
.cg-head__title { font-size: 26px; font-weight: 400; color: #000; line-height: 1.2; letter-spacing: -.03em; margin: 0; }
.cg-head__sub { font-family: "Inter", var(--sans); font-size: 15px; color: #505050; line-height: 1.2; letter-spacing: -.03em; margin: 7px 0 0; }
.cg-close { flex: none; align-self: flex-start; background: #000; color: #fff; border: none; border-radius: 25px; padding: 5px 13px; font-family: var(--sans); font-weight: 300; font-size: 16px; transition: background .2s ease; }
.cg-close:hover { background: #2c2c2e; }
/* body rows — light glass cards */
.cg-body { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.cg-row { display: flex; align-items: center; gap: 20px; background: rgba(118,118,128,.12); border-radius: 30px; padding: 18px 22px; }
.cg-ico { flex: none; width: 76px; height: 76px; border-radius: 50%; background-color: #fff; background-image: url("/hand-poses.png"); background-repeat: no-repeat; background-size: 300% 300%; }
.cg-ico--drag  { background-position: 100% 50%; }                        /* pinch — thumb + index circle */
.cg-ico--point { background-position: 0% 100%; transform: scaleX(-1); }  /* pointing index finger (mirrored) */
.cg-ico--fist  { background-position: 0% 50%; }                          /* closed fist */
.cg-row__txt { display: flex; flex-direction: column; gap: 5px; }
.cg-row__t { font-size: 20px; font-weight: 500; color: #000; line-height: 1.2; letter-spacing: -.03em; text-transform: uppercase; }
.cg-row__d { font-family: "Inter", var(--sans); font-size: 16px; font-weight: 500; line-height: 1.2; letter-spacing: -.03em; color: #000; }
.cg-row__d b { color: #EC1C2F; font-weight: 500; text-transform: uppercase; }
/* footer */
.cg-foot { position: relative; padding: 16px 24px 12px; margin-top: 8px; }
.cg-foot::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 1px; background: #e6e6e6; }
.cg-start { display: block; width: 100%; background: #000; color: #fff; border: none; border-radius: 100px; padding: 17px; font-family: "Inter", var(--sans); font-size: 20px; font-weight: 500; letter-spacing: -.04em; box-shadow: 0 0 2px rgba(0,0,0,.1), 0 1px 8px rgba(0,0,0,.12); transition: background .2s ease, transform .15s ease; }
.cg-start:hover { background: #1a1a1a; transform: translateY(-1px); }
.cg-foot__note { font-family: "Inter", var(--sans); font-size: 15px; color: rgba(0,0,0,.5); text-align: center; margin: 12px 0 0; line-height: 1.2; letter-spacing: -.03em; }
@media (max-width: 520px) {
  .cg-head { padding: 6px 14px 10px; } .cg-head__title { font-size: 21px; } .cg-head__sub { font-size: 13px; }
  .cg-body { padding: 0 12px; } .cg-row { padding: 14px 16px; gap: 14px; border-radius: 24px; }
  .cg-ico { width: 58px; height: 58px; } .cg-row__t { font-size: 17px; } .cg-row__d { font-size: 14px; }
  .cg-foot { padding: 14px 16px 10px; } .cg-foot::before { left: 16px; right: 16px; } .cg-start { font-size: 17px; padding: 15px; }
}

/* ---------- Floating tile label ---------- */
#tilelabel {
  position: fixed; top: 0; left: 0; z-index: 20;
  display: flex; flex-direction: row; align-items: center; gap: 16px;
  padding: 8px 8px 8px 18px;
  background: rgba(12,12,14,.8);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-family: var(--mono);
  transform: translate(-50%, calc(-100% - 16px));
  opacity: 0; transition: opacity .22s ease;
  pointer-events: none; white-space: nowrap;
  box-shadow: 0 12px 34px rgba(0,0,0,.45);
}
#tilelabel.is-on { opacity: 1; }
.tl__text { display: flex; flex-direction: column; gap: 2px; }
.tl__title { font-size: 14px; letter-spacing: .04em; color: var(--ink); font-family: var(--sans); font-weight: 700; }
.tl__cat { font-size: 10px; letter-spacing: .18em; color: var(--ink-dim); text-transform: uppercase; }
/* circular "visit" arrow button */
.tl__btn {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: #0b0b0c;
  display: grid; place-items: center; position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.tl__btn .tl__arrow, .tl__btn .tl__finger { grid-area: 1 / 1; width: 20px; height: 20px; }
.tl__arrow { display: block; }
.tl__finger { display: none; }
/* dwell-to-open: a progress ring fills around the button + the arrow becomes a pointing finger */
.tl__prog { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; transform: translate(-50%, -50%) rotate(-90deg); display: none; }
.tl__prog-bg { fill: none; stroke: rgba(0,0,0,.14); stroke-width: 3; }
.tl__prog-fg { fill: none; stroke: #EC1C2F; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 163.36; stroke-dashoffset: 163.36; transition: stroke-dashoffset .06s linear; }
#tilelabel.is-dwell .tl__arrow { display: none; }
#tilelabel.is-dwell .tl__finger { display: block; }
#tilelabel.is-dwell .tl__prog { display: block; }
#tilelabel.is-on .tl__btn { animation: tlBtnIn .35s cubic-bezier(.2,1.1,.3,1) both; }
@keyframes tlBtnIn { from { transform: scale(.4) rotate(-35deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }

/* ---------- Contact dropdown (glass menu under the CONTACT US button) ---------- */
.cmenu { position: fixed; top: 62px; right: 22px; z-index: 55; pointer-events: auto; }
.cmenu[hidden] { display: none; }
.cmenu, .cmenu * { cursor: auto !important; }   /* real cursor over the menu (site hides it for the crosshair) */
.cmenu a { cursor: pointer !important; }
.cmenu__panel {
  width: 280px; padding: 10px; border-radius: 24px;
  background: rgba(244,244,244,.72);
  backdrop-filter: blur(40px) saturate(1.4); -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: 0 24px 60px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.18);
  color: #0b0b0c; font-family: var(--sans);
  transform-origin: top right; transform: translateY(-8px) scale(.96); opacity: 0;
  transition: transform .22s cubic-bezier(.2,.9,.3,1), opacity .18s ease;
}
.cmenu.is-open .cmenu__panel { transform: translateY(0) scale(1); opacity: 1; }
.cmenu__items { display: flex; flex-direction: column; }
.cmenu__item { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 12px; text-decoration: none; color: #0b0b0c; transition: background .15s ease; }
.cmenu__item:hover { background: rgba(0,0,0,.06); }
.cmenu__item--off { opacity: .42; pointer-events: none; }   /* channel not configured yet */
.cmenu__ico { flex: none; width: 24px; height: 24px; display: grid; place-items: center; color: #0b0b0c; }
.cmenu__ico svg { width: 22px; height: 22px; }
.cmenu__lbl { font-size: 16px; line-height: 1.25; }
.cmenu__empty { padding: 10px 8px; font-size: 14px; color: rgba(0,0,0,.5); }
.cmenu__sep { height: 1px; background: rgba(0,0,0,.1); margin: 7px 8px; }
.cmenu__avail { padding: 4px 8px; font-size: 13px; font-family: "Inter", var(--sans); font-weight: 500; color: rgba(0,0,0,.42); letter-spacing: -.01em; }
.cmenu__loc { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 8px; font-size: 14px; color: rgba(0,0,0,.62); }
.cmenu__loc span { white-space: nowrap; }

/* ---------- Loading screen: mouse-tracked crosshair + corner-framed logo + LOADING pill ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; overflow: hidden;
  /* Terracotta Sunset: espresso → burnt peach → soft apricot, with a soft apricot glow */
  background:
    radial-gradient(125% 95% at 50% 64%, rgba(255,218,185,.42) 0%, rgba(255,218,185,0) 55%),
    linear-gradient(176deg, #4E2C23 0%, #8E4030 22%, #E2725B 52%, #F2A485 76%, #FFDAB9 100%);
  cursor: none;
  transition: opacity .8s ease, visibility .8s ease;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

/* full-bleed crosshair that follows the cursor */
.ldr__lines { position: absolute; inset: 0; pointer-events: none; }
.ldr__h, .ldr__v { position: absolute; left: 0; top: 0; background: rgba(255,255,255,.42); will-change: transform; }
.ldr__h { width: 100%; height: 1px; transform: translateY(50vh); transform-origin: left center; }
.ldr__v { height: 100%; width: 1px;  transform: translateX(50vw); transform-origin: center top; }
/* lines draw in on mount */
.loader .ldr__h { animation: ldrDrawH .9s cubic-bezier(.2,.8,.2,1) both; }
.loader .ldr__v { animation: ldrDrawV .9s cubic-bezier(.2,.8,.2,1) .08s both; }
@keyframes ldrDrawH { from { scale: 0 1; opacity: 0; } to { scale: 1 1; opacity: 1; } }
@keyframes ldrDrawV { from { scale: 1 0; opacity: 0; } to { scale: 1 1; opacity: 1; } }

/* centered corner-bracket frame around the logo mark */
.ldr__frame {
  position: absolute; left: 50%; top: 50%; width: 208px; height: 208px;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  will-change: transform, opacity;
}
.ldr__corner { position: absolute; width: 22px; height: 22px; border: 2px solid rgba(255,255,255,.92); }
.ldr__corner--tl { left: 0;  top: 0;    border-right: 0; border-bottom: 0; }
.ldr__corner--tr { right: 0; top: 0;    border-left: 0;  border-bottom: 0; }
.ldr__corner--bl { left: 0;  bottom: 0; border-right: 0; border-top: 0; }
.ldr__corner--br { right: 0; bottom: 0; border-left: 0;  border-top: 0; }
/* corners breathe outward + back */
.ldr__corner--tl { animation: ldrCorTL 3.4s ease-in-out infinite; }
.ldr__corner--tr { animation: ldrCorTR 3.4s ease-in-out infinite; }
.ldr__corner--bl { animation: ldrCorBL 3.4s ease-in-out infinite; }
.ldr__corner--br { animation: ldrCorBR 3.4s ease-in-out infinite; }
@keyframes ldrCorTL { 0%,100% { transform: translate(0,0); }   50% { transform: translate(-7px,-7px); } }
@keyframes ldrCorTR { 0%,100% { transform: translate(0,0); }   50% { transform: translate(7px,-7px); } }
@keyframes ldrCorBL { 0%,100% { transform: translate(0,0); }   50% { transform: translate(-7px,7px); } }
@keyframes ldrCorBR { 0%,100% { transform: translate(0,0); }   50% { transform: translate(7px,7px); } }

.ldr__mark {
  width: 116px; height: 116px; display: block;
  filter: drop-shadow(0 0 0 rgba(252,206,5,0));
  animation: ldrMark 3.4s ease-in-out infinite;
  will-change: transform, filter;
}
/* logo: gentle breathing scale + brand-color glow pulse */
@keyframes ldrMark {
  0%,100% { transform: scale(1);    filter: drop-shadow(0 0 6px rgba(255,255,255,.25)); }
  50%     { transform: scale(1.06); filter: drop-shadow(0 0 18px rgba(252,206,5,.55)) drop-shadow(0 0 34px rgba(236,28,47,.35)); }
}

/* the LOADING pill that rides the cursor */
.ldr__pill {
  position: absolute; left: 0; top: 0; z-index: 4;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px;
  background: #fff; color: #0b0b0c;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .12em;
  box-shadow: 0 6px 24px rgba(0,0,0,.28);
  transform: translate(50vw, 50vh) translate(-50%, -50%);
  will-change: transform;
}
.ldr__dot { width: 6px; height: 6px; border-radius: 50%; background: #EC1C2F; animation: ldrDot 1s ease-in-out infinite; }
@keyframes ldrDot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.ldr__pct { min-width: 1.6em; text-align: right; font-variant-numeric: tabular-nums; }
.ldr__pctsign { margin-left: -3px; opacity: .6; }

/* reveal: frame zooms + fades, pill drops away */
.loader.is-done .ldr__frame { transform: translate(-50%,-50%) scale(1.5); opacity: 0; transition: transform .8s cubic-bezier(.4,0,.2,1), opacity .7s ease; }
.loader.is-done .ldr__pill  { opacity: 0; transition: opacity .35s ease; }
.loader.is-done .ldr__lines { opacity: 0; transition: opacity .5s ease; }

/* ---------- Custom cursor: crosshair + VIEW pill at the intersection ---------- */
#cursor { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.cur__h, .cur__v { position: absolute; left: 0; top: 0; background: rgba(255, 255, 255, 0.3); will-change: transform; }
.cur__h { width: 100%; height: 1px; }
.cur__v { width: 1px; height: 100%; }

.cur__pill {
  position: absolute; left: 0; top: 0; will-change: transform;
  display: grid; place-items: center;
  min-width: 24px; height: 24px; padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  background: rgba(18, 18, 20, 0.45); backdrop-filter: blur(3px);
  color: #fff; font-family: var(--mono); font-size: 13px; line-height: 1;
  transition: min-width .32s cubic-bezier(.2,.7,.2,1), height .32s cubic-bezier(.2,.7,.2,1),
              padding .32s ease, border-radius .32s ease, background .3s ease, color .3s ease, border-color .3s ease;
}
.cur__plus { display: block; }
.cur__view { display: none; white-space: nowrap; font-size: 11px; letter-spacing: .16em; }

#cursor.is-link .cur__pill { min-width: 84px; height: 38px; border-radius: 20px; background: #fff; color: #111; border-color: #fff; }
#cursor.is-link .cur__plus { display: none; }
#cursor.is-link .cur__view { display: block; }
#cursor.is-grabbing .cur__pill { background: rgba(255,255,255,0.85); color: #111; border-color: #fff; }

@media (max-width: 760px) {
  .nav { padding: 13px 15px; }
  .nav__right { gap: 14px; }
  .brand__logo { height: 26px; }
  .nav__link { font-size: 10px; letter-spacing: .12em; }
  .cta { padding: 8px 13px; font-size: 10px; letter-spacing: .12em; }

  .hud--bl { left: 14px; bottom: 64px; }
  .hud__title { font-size: 13px; letter-spacing: .2em; }
  .hud__sub { font-size: 9px; letter-spacing: .14em; margin-top: 6px; }
  .hud--br { right: 14px; bottom: 64px; gap: 5px; }
  .stat { gap: 14px; font-size: 9px; }
  .stat__v { min-width: 42px; }
  .hint { display: none; }

  .perf__opt, .seg__opt { padding: 9px 14px; font-size: 11px; }   /* comfortable tap target */

  .cmenu { top: 56px; right: 12px; }
  .cmenu__panel { width: min(280px, 88vw); }
}

/* very small screens: drop the decorative stats so the toggle + label fit */
@media (max-width: 480px) {
  .hud--br { display: none; }
  .hud--bl { bottom: 60px; }
}

/* touch devices: no custom crosshair cursor */
@media (hover: none), (pointer: coarse) {
  #cursor { display: none; }
  body.is-oryxen, body.is-oryxen * { cursor: auto; }
}
