:root {
  --bg: #0A0A0E;
  --fg: #EDE7D9;
  --muted: #787268;
  --line: rgba(237, 231, 217, 0.12);
  --accent: #E8704A;
  --display: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html, body { height: 100%; background: var(--bg); }

body {
  font-family: var(--display);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }

/* ───── Intro loader ───── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "tl tr"
    "stage stage"
    "bl br";
  padding: 28px 32px;
  gap: 12px;
  transition: opacity 0.8s ease;
}
.loader.done { opacity: 0; pointer-events: none; }

.loader.ready { cursor: pointer; }
.loader.ready .loader-corner.br span {
  color: var(--accent);
  animation: loader-pulse 1.4s ease-in-out infinite;
}
.loader.ready .loader-pct {
  text-shadow: 0 0 120px rgba(232, 112, 74, 0.32);
  transition: text-shadow 0.6s ease;
}
@keyframes loader-pulse {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}

.loader-corner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
}
.loader-corner.dim,
.loader-corner .dim { color: var(--muted); }
.loader-corner.tl { grid-area: tl; align-items: flex-start; }
.loader-corner.tr { grid-area: tr; align-items: flex-end; }
.loader-corner.bl { grid-area: bl; align-items: flex-start; }
.loader-corner.br { grid-area: br; align-items: flex-end; justify-content: flex-end; }

.loader-stage {
  grid-area: stage;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.loader-pct {
  font-size: clamp(120px, 28vw, 380px);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: -0.06em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 90px rgba(232, 112, 74, 0.18);
  position: relative;
}
.loader-pct::after {
  content: "%";
  position: absolute;
  top: 0.05em;
  right: -0.55em;
  font-size: 0.18em;
  letter-spacing: 0;
  color: var(--accent);
  text-shadow: none;
}

.loader-status {
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--accent);
  text-transform: uppercase;
  padding-left: 0.42em;
  min-height: 1em;
  white-space: nowrap;
}

.loader-bar {
  width: min(420px, 70vw);
  height: 1px;
  background: rgba(237, 231, 217, 0.16);
  position: relative;
  overflow: hidden;
}
.loader-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--accent);
  box-shadow:
    0 0 10px rgba(232, 112, 74, 0.7),
    0 0 28px rgba(232, 112, 74, 0.35);
  transition: width 0.18s linear;
}

@media (max-width: 600px) {
  .loader { padding: 20px; }
  .loader-corner { font-size: 9px; }
  .loader-status { font-size: 10px; letter-spacing: 0.3em; }
}

/* delay-fade entrance for page content once loader is gone */
body:not(.loaded) .page,
body:not(.loaded) .foot,
body:not(.loaded) .sound-toggle,
body:not(.loaded) .availability {
  opacity: 0;
}
body.loaded .page,
body.loaded .foot,
body.loaded .sound-toggle,
body.loaded .availability {
  opacity: 1;
  transition: opacity 0.8s ease 0.1s;
}

/* ───── 3D canvas ───── */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ───── Vignette + grain (cinematic feel) ───── */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.55) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ───── Cursor ───── */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--fg);
  pointer-events: none;
  z-index: 100;
  transform: translate(-50%, -50%);
  transition: width 0.18s ease, height 0.18s ease, background 0.18s ease, border 0.18s ease;
  mix-blend-mode: difference;
}
.cursor.hover {
  width: 56px;
  height: 56px;
  background: transparent;
  border: 1px solid var(--fg);
}

@media (pointer: coarse) {
  body, button, a { cursor: auto; }
  .cursor { display: none; }
}

/* ───── Marquee ───── */
.marquee {
  position: fixed;
  left: 0; right: 0;
  z-index: 5;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(10, 10, 14, 0.6);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  padding: 10px 0;
  color: var(--fg);
}
.marquee.top { top: 0; }
.marquee-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: scroll 42s linear infinite;
  will-change: transform;
}
.marquee span,
.marquee em { padding: 0 14px; }
.marquee em { color: var(--muted); font-style: normal; }

@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ───── Sound toggle ───── */
/* ───── Availability ───── */
.availability {
  position: fixed;
  top: 56px;
  left: 32px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.06em;
}
.availability .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 6px rgba(232, 112, 74, 0.7),
    0 0 14px rgba(232, 112, 74, 0.35);
  animation: avail-pulse 2.4s ease-in-out infinite;
}
@keyframes avail-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.18); }
}

.sound-toggle {
  position: fixed;
  top: 56px;
  right: 32px;
  z-index: 5;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(10, 10, 14, 0.4);
  backdrop-filter: blur(8px);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.sound-toggle:hover { color: var(--fg); border-color: var(--fg); }
.sound-toggle .sound-off { display: none; }
.sound-toggle.muted .sound-on { display: none; }
.sound-toggle.muted .sound-off { display: inline; }

/* ───── Page ───── */
.page {
  position: relative;
  z-index: 3;
  height: 100vh;
  padding: 110px 32px 64px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.display {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(72px, 16vw, 220px);
  line-height: 0.88;
  letter-spacing: -0.05em;
  margin-bottom: 18px;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

.role {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  margin-bottom: 26px;
}

.bullets {
  list-style: none;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.85;
  color: rgba(237, 231, 217, 0.62);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  margin-bottom: 44px;
  max-width: 520px;
}
.bullets li {
  display: flex;
  gap: 10px;
}
.bullets li::before {
  content: "—";
  color: var(--muted);
  flex-shrink: 0;
}

.links {
  list-style: none;
  display: flex;
  flex-direction: column;
  max-width: 520px;
}

.link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 14px;
  text-align: left;
  color: var(--fg);
  transition: padding-left 0.25s ease, color 0.25s ease;
}
.link:first-child { border-top: 1px solid var(--line); }
.link:hover { padding-left: 12px; color: var(--accent); }

.link-arrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.06em;
}
.link:hover .link-arrow { color: var(--accent); }

.toast {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: lowercase;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.toast.visible { opacity: 1; }

/* ───── Footer ───── */
.foot {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  padding: 14px 32px;
  border-top: 1px solid var(--line);
  background: rgba(10, 10, 14, 0.6);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

/* ───── Mobile ───── */
@media (max-width: 760px) {
  .sound-toggle { top: 48px; right: 20px; }
  .availability { top: 48px; left: 20px; font-size: 10px; }
  .page { padding: 100px 20px 80px; }
  .display { font-size: clamp(56px, 22vw, 140px); }
  .foot { padding: 12px 20px; }
}
