:root {
  /* Stage Control night-show palette: violet dome, white ink, lime micro-accent */
  --blue: #0e0e16;
  --lime: #d9ff00;
  --ink: #ffffff;
  --font: "Archivo", system-ui, sans-serif;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  /* black like the original — the blue is painted by the WebGL scene */
  background: #000;
  color: var(--ink);
  font-family: var(--font);
}

/* ---------- doubled-letter roll hover (K95 signature) ---------- */
.roll { display: inline-flex; }
.rl {
  display: inline-block;
  height: 1.08em;
  overflow: hidden;
  font-style: normal;
}
.rl.sp { width: 0.32em; }
.rl b {
  display: block;
  font-weight: inherit;
  line-height: 1.08;
  transition: transform 0.45s cubic-bezier(0.76, 0, 0.24, 1);
  transition-delay: calc(var(--i) * 20ms);
}
.roll:hover b { transform: translateY(-100%); }

@media (hover: hover) and (pointer: fine) {
  body, body a, body button { cursor: none; }
}

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

#loader {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue);
  transition: opacity 0.7s ease;
}
#loader.done { opacity: 0; pointer-events: none; }
#loader span { font-weight: 900; letter-spacing: 0.3em; font-size: 15px; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.ui { position: fixed; z-index: 10; }

header.ui {
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 32px;
}

.logo { font-weight: 900; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }

#desktop-nav { display: flex; align-items: center; gap: 36px; }
#desktop-nav a, #desktop-nav .lang {
  color: var(--ink); text-decoration: none;
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
}
#desktop-nav a { opacity: 0.95; transition: opacity 0.25s; }
#desktop-nav a:hover { opacity: 0.45; }
#desktop-nav .lang i { font-style: normal; opacity: 0.45; }

#btn-menu {
  display: none; align-items: center; gap: 8px;
  appearance: none; border: 0;
  font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--ink);
  background: rgba(0, 0, 30, 0.45);
  padding: 12px 20px; border-radius: 999px;
  backdrop-filter: blur(8px);
}
#btn-menu i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }

#menu-overlay {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7vh;
  background:
    radial-gradient(130% 100% at 75% 15%, rgba(255, 255, 255, 0.22), transparent 55%),
    radial-gradient(120% 120% at 25% 95%, rgba(0, 0, 40, 0.5), transparent 60%),
    var(--blue);
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s;
}
body.menu-open #menu-overlay { opacity: 1; visibility: visible; }
#menu-overlay .lang-row { display: flex; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.2em; }
#menu-overlay .lang-row a { color: var(--ink); opacity: 0.4; text-decoration: none; }
#menu-overlay .lang-row a.on { opacity: 1; }
#menu-overlay nav { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#menu-overlay nav a {
  font-size: clamp(38px, 8.5vw, 78px); font-weight: 500;
  text-decoration: none; color: rgba(255, 255, 255, 0.35);
  transition: color 0.25s;
}
#menu-overlay nav a.active, #menu-overlay nav a:hover { color: var(--ink); }
#menu-overlay .socials { display: flex; gap: 44px; }
#menu-overlay .socials a { color: var(--ink); opacity: 0.85; text-decoration: none; font-size: 13px; }

.counter { right: 30px; bottom: 30px; font-size: 12px; letter-spacing: 0.1em; font-weight: 700; }
.counter u { text-underline-offset: 3px; }

/* ---------- case study overlay ---------- */
#case {
  position: fixed; inset: 0; z-index: 15;
  overflow-y: auto;
  background: var(--blue);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s;
}
body.case-open #case { opacity: 1; visibility: visible; }
.case-inner { max-width: 860px; margin: 0 auto; padding: 110px 24px 0; }
#case-back {
  appearance: none; border: 1px solid rgba(255,255,255,0.4); background: transparent;
  color: var(--ink); font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  padding: 10px 18px; border-radius: 999px; margin-bottom: 42px;
}
.case-hero {
  height: 58vh; border-radius: 4px;
  background: #e63c17;
  display: flex; align-items: center; justify-content: center;
}
.case-hero span { font-size: clamp(90px, 22vw, 220px); font-weight: 900; color: rgba(255,255,255,0.25); }
#case h1 { font-size: clamp(48px, 9vw, 96px); font-weight: 900; margin-top: 52px; letter-spacing: -0.02em; }
.case-meta { margin-top: 10px; font-size: 14px; font-weight: 700; letter-spacing: 0.12em; }
.case-label { margin-top: 60px; font-size: 12px; letter-spacing: 0.18em; opacity: 0.7; }
.case-copy { margin-top: 18px; font-size: clamp(20px, 3vw, 27px); line-height: 1.42; font-weight: 500; }
.case-h2 { margin-top: 70px; font-size: 15px; font-weight: 700; letter-spacing: 0.14em; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); margin-left: 8px; }
.case-media {
  margin-top: 46px; height: 46vh; border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px dashed rgba(255, 255, 255, 0.35);
  display: flex; align-items: center; justify-content: center;
}
.case-media.wide { height: 68vh; }
.case-media span { font-size: 11px; letter-spacing: 0.22em; opacity: 0.7; }
.case-next {
  margin-top: 110px; padding: 70px 0 90px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.case-next > span { font-size: 12px; letter-spacing: 0.2em; opacity: 0.75; }
#case-next-btn {
  appearance: none; border: 0; background: transparent;
  color: var(--ink); font-family: var(--font);
  font-size: clamp(34px, 6vw, 56px); font-weight: 900; letter-spacing: -0.01em;
}
.case-next-thumb {
  width: 150px; height: 190px; border-radius: 4px;
  background: #ffd200; color: rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 54px; font-weight: 900;
}

/* ---------- custom cursor ---------- */
#cursor, #cursor-dot, #card-label {
  position: fixed; top: 0; left: 0; z-index: 30;
  pointer-events: none; display: none;
}
@media (hover: hover) and (pointer: fine) {
  #cursor, #cursor-dot, #card-label { display: flex; }
}
#cursor {
  align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(0, 0, 30, 0.45);
  backdrop-filter: blur(6px);
  transform: translate(-50%, -50%);
  border: 1.5px solid transparent;
  transition: padding 0.25s, background 0.25s, border 0.25s;
}
#cursor span { font-size: 10px; font-weight: 700; letter-spacing: 0.22em; white-space: nowrap; }
#cursor.is-card { padding: 20px; background: rgba(255, 255, 255, 0.12); border-color: var(--ink); }
#cursor.is-card span { display: none; }
#cursor.is-ui { padding: 5px; background: var(--ink); border-color: transparent; }
#cursor.is-ui span { display: none; }
#cursor-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lime);
  transform: translate(-50%, -50%);
}
#card-label {
  align-items: center; gap: 10px;
  padding: 10px 18px 10px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transform: translate(32px, -50%);
  opacity: 0; transition: opacity 0.2s;
}
#card-label.on { opacity: 1; }
#card-label .arrow {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
#card-label .txt { display: flex; flex-direction: column; line-height: 1.25; }
#card-label b { font-size: 13px; font-weight: 700; }
#card-label i { font-style: normal; font-size: 11px; opacity: 0.75; }

/* ---------- mobile ---------- */
@media (max-width: 720px) {
  header.ui { padding: 18px 20px; }
  #desktop-nav { display: none; }
  #btn-menu { display: inline-flex; }
  .counter { right: 18px; bottom: 24px; font-size: 11px; }
  .case-inner { padding-top: 90px; }
}
