/* =========================================================
   Joan Joseph Garcia — "La casa"
   Warm ink · cream · acid lime · amber
   ========================================================= */

:root {
  --bg: #11100e;
  --bg-2: #171512;
  --bg-3: #1f1c18;
  --cream: #efe7da;
  --text-1: #efe7da;
  --text-2: rgba(239, 231, 218, 0.74);
  --text-3: rgba(239, 231, 218, 0.52);
  --text-4: rgba(239, 231, 218, 0.32);
  --line: rgba(239, 231, 218, 0.1);
  --line-strong: rgba(239, 231, 218, 0.22);
  --lime: #c9f45c;
  --lime-dim: rgba(201, 244, 92, 0.16);
  --amber: #ff8a3d;
  --gold: #e9b04a;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --t-hero: clamp(1.9rem, 3vw, 3.5rem);
  --t-h2: clamp(2rem, 4.2vw, 4.4rem);
  --t-h3: clamp(1.3rem, 1.8vw, 1.9rem);
  --t-body: clamp(0.98rem, 0.3vw + 0.9rem, 1.1rem);
  --t-serif: clamp(1.15rem, 0.7vw + 0.95rem, 1.5rem);
  --t-label: clamp(0.64rem, 0.18vw + 0.6rem, 0.74rem);

  --gutter: max(clamp(1rem, 2.6vw, 2.8rem), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  /* bottom spacing that clears the iPhone home indicator */
  --gutter-b: calc(clamp(1rem, 2.6vw, 2.8rem) + env(safe-area-inset-bottom, 0px));
  --header-h: 84px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--f-display);
  font-size: var(--t-body);
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ol, ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd, figure, blockquote { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--lime); color: var(--bg); }
:focus-visible { outline: 1px solid var(--lime); outline-offset: 4px; }
.line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line > span { display: inline-block; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); animation: pulse 2.4s var(--ease-in-out) infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.eyebrow {
  font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-3); display: flex; gap: 0.6em; align-items: center;
}
.eyebrow span:first-child { color: var(--lime); }
.eyebrow--amber, .eyebrow--amber span:first-child { color: var(--gold); }

/* ---------- Layers ---------- */
.world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; touch-action: none; }
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(8, 7, 6, 0.55) 100%),
    linear-gradient(to bottom, rgba(8, 7, 6, 0.35), transparent 18%, transparent 78%, rgba(8, 7, 6, 0.45));
  transition: background-color 0.8s var(--ease-out);
}
body[data-state="about"] .vignette, body[data-state="services"] .vignette { background-color: rgba(10, 14, 12, 0.5); }
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: 0.06;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-1%); } 80% { transform: translate(3%,3%); } }
body.no-webgl { background: radial-gradient(80% 60% at 50% 70%, #c4693a 0%, #6b3420 45%, var(--bg) 100%); }
body.no-webgl .world { display: none; }

/* ---------- Loader ---------- */
/* Loader on warm paper: Barcelona drawn in ink */
.loader {
  --ink: #1b1a17;
  --ink-2: rgba(27, 26, 23, 0.66);
  --ink-3: rgba(27, 26, 23, 0.46);
  --terra: #c4562b;
  position: fixed; inset: 0; z-index: 100; overflow: hidden;
  background: radial-gradient(75% 65% at 50% 64%, #fcf8f0 0%, #f4ecdf 55%, #e9dfcd 100%);
  color: var(--ink);
  display: grid; place-items: center;
}
.loader__corner { position: absolute; font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); line-height: 1.6; }
.loader__corner--tl { top: 26px; left: var(--gutter); color: var(--ink-2); }
.loader__corner--tr { top: 22px; right: var(--gutter); text-align: right; display: flex; flex-direction: column; }
.loader__corner--tr b { color: var(--terra); font-weight: 500; }
.loader__corner--bl { bottom: 24px; left: var(--gutter); }
.loader__corner--br { bottom: 24px; right: var(--gutter); display: flex; gap: 0.6rem; align-items: center; }
/* The name always fits above the skyline: its size follows both width and height */
.loader__name {
  --fs: clamp(3rem, min(8vw, 11vh), 9rem);
  position: absolute; left: var(--gutter); top: 9vh;
  display: flex; flex-direction: column;
  font-size: var(--fs); font-weight: 200; font-stretch: 112%;
  text-transform: uppercase; line-height: 0.88; letter-spacing: -0.015em;
  color: var(--ink);
  white-space: nowrap;
  pointer-events: none;
}

/* Barcelona skyline */
.loader__city {
  position: absolute; left: 50%; bottom: calc(40px + 5.6rem); transform: translateX(-50%);
  width: min(980px, 92vw, calc((100svh - 9vh - 1.8 * clamp(3rem, min(8vw, 11vh), 9rem) - 10rem) * 2.63));
}
.loader__city svg { display: block; width: 100%; height: auto; overflow: visible; }
.loader__city .ln {
  fill: none; stroke: rgba(27, 26, 23, 0.86); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.loader__city .far .ln { stroke: rgba(27, 26, 23, 0.28); stroke-width: 1.2; }
.loader__city .dots circle { fill: var(--ink); opacity: 0; transition: opacity 0.8s var(--ease-out); }
.loader__city .dots-on .dots circle, .dots-on .loader__city .dots circle { opacity: 1; }
.loader__city .agbar { filter: drop-shadow(0 0 3px rgba(255, 138, 61, 0.35)); }
.loader__city .agbar circle { fill: rgba(27, 26, 23, 0.1); transition: fill 0.35s; }
.loader__city .agbar circle.on { fill: #e98a33; }
.loader__city .agbar circle.on.warm { fill: var(--terra); }
.loader__city .sea path { fill: none; stroke: rgba(27, 26, 23, 0.22); stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 2 11; animation: waves 7s linear infinite; }
.loader__city .sea path:nth-child(2) { animation-duration: 9s; animation-direction: reverse; }
.loader__city .reflect path { fill: none; stroke: #e98a33; stroke-width: 2; stroke-linecap: round; }
.loader__city .reflect { opacity: 0; }
@keyframes waves { to { stroke-dashoffset: -130; } }

.loader__status { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); text-align: center; width: min(420px, 70vw); }
.loader__row { display: flex; align-items: center; gap: 1rem; font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.loader__row b { color: var(--terra); font-weight: 500; font-variant-numeric: tabular-nums; }
.loader__line { flex: 1; height: 1px; background: rgba(27, 26, 23, 0.18); }
.loader__phrase { margin-top: 0.9rem; font-family: var(--f-serif); font-size: clamp(1.5rem, 2.2vw, 2rem); color: var(--ink); }
.loader__phrase em { color: var(--terra); }

.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.eq b { display: block; width: 2px; height: 30%; background: currentColor; border-radius: 1px; }
.sound-on .sound-btn .eq b, .loader .eq b { animation: eq 0.9s ease-in-out infinite; }
.eq b:nth-child(2) { animation-delay: -0.3s !important; }
.eq b:nth-child(3) { animation-delay: -0.6s !important; }
.eq b:nth-child(4) { animation-delay: -0.15s !important; }
@keyframes eq { 0%,100% { height: 25%; } 50% { height: 100%; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 55;
  height: var(--header-h);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.header .nav { justify-self: center; }
.header > * { pointer-events: auto; }
body[data-state="loading"] .header { opacity: 0; }
.story-open .header { opacity: 0; pointer-events: none; }
.logo { justify-self: start; font-weight: 800; font-stretch: 112%; font-size: 1.3rem; letter-spacing: -0.03em; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35); }
.logo sup { font-size: 0.42em; color: var(--lime); margin-left: 1px; }
.nav { display: flex; gap: clamp(1rem, 2.2vw, 2.4rem); font-size: 0.92rem; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45); }
.nav a { position: relative; color: rgba(239, 231, 218, 0.86); transition: color 0.25s; padding: 0.3rem 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--lime); transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease-out); }
.nav a:hover, .nav a.is-active { color: var(--text-1); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.header__right { justify-self: end; display: flex; align-items: center; gap: clamp(0.6rem, 1.4vw, 1.4rem); }

.pill {
  display: inline-flex; align-items: center; gap: 0.6rem;
  height: 2.5rem; padding: 0 1rem; border-radius: 999px;
  background: rgba(239, 231, 218, 0.88); color: var(--bg);
  font-size: 0.86rem; font-weight: 500;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.3s, color 0.3s;
}
.pill:hover { background: var(--lime); }
.pill--ghost { background: rgba(17, 16, 14, 0.35); color: var(--text-1); border: 1px solid var(--line-strong); }
.pill--ghost:hover { background: var(--cream); color: var(--bg); }
.pill svg { width: 15px; height: 15px; }
.pill kbd { font-family: var(--f-mono); font-size: 0.6rem; padding: 0.15rem 0.35rem; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--text-3); }
.pill i { font-style: normal; display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--cream); color: var(--bg); font-size: 0.9rem; }
.outside-btn { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; height: 2.2rem; display: none; }
body[data-state="room"] .outside-btn, body[data-state="about"] .outside-btn, body[data-state="services"] .outside-btn { display: inline-flex; }

.sound-btn { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); padding: 0.4rem 0.2rem; }
.sound-btn[aria-pressed="true"] { color: var(--lime); }
.lang { display: flex; gap: 0.15rem; font-family: var(--f-mono); font-size: 0.68rem; }
.lang button { color: var(--text-3); padding: 0.4rem 0.3rem; transition: color 0.25s; }
.lang button[aria-pressed="true"] { color: var(--lime); }
.lang button:hover { color: var(--text-1); }

.menu-btn i, .menu-btn i::before { display: block; width: 15px; height: 1px; background: currentColor; position: relative; transition: transform 0.4s var(--ease-out); }
.menu-btn i { box-shadow: 0 -4px 0 currentColor; border-radius: 0; width: 15px; height: 1px; background: currentColor; display: block; }
.menu-btn[aria-expanded="true"] i { box-shadow: none; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] i::before { content: ""; position: absolute; inset: 0; transform: rotate(-90deg); }
.clock { text-align: right; line-height: 1.15; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4); }
.clock strong { display: block; font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.clock > span { font-family: var(--f-mono); font-size: 0.58rem; letter-spacing: 0.12em; color: var(--text-2); }

/* ---------- Shared states ---------- */
.entrance, .room-ui, .hello { transition: opacity 0.7s var(--ease-out), visibility 0.7s; }
.entrance { opacity: 0; visibility: hidden; }
body[data-state="entrance"] .entrance { opacity: 1; visibility: visible; }
.is-moving .entrance, .is-moving .room-ui { opacity: 0 !important; pointer-events: none; }
body[data-state="loading"] .hello, .story-open .hello, .contact-open .hello { opacity: 0; pointer-events: none; }

/* =========================================================
   ENTRANCE
   ========================================================= */
.entrance { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
/* soft scrim: darkens the wall only where the type sits, so the scene keeps its colour elsewhere */
.entrance::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 46% at 20% 22%, rgba(32, 12, 4, 0.22), rgba(32, 12, 4, 0.08) 55%, transparent 80%),
    radial-gradient(70% 16% at 50% 50%, rgba(28, 10, 3, 0.16), transparent 75%),
    radial-gradient(30% 22% at 92% 64%, rgba(28, 10, 3, 0.18), transparent 75%);
}
.entrance button, .entrance a { pointer-events: auto; }
.entrance__name {
  position: absolute; left: var(--gutter); top: calc(var(--header-h) + 1vh);
  display: flex; flex-direction: column;
  font-size: clamp(3rem, min(8.4vw, 13vh), 10.5rem); font-weight: 250; font-stretch: 110%; white-space: nowrap;
  text-transform: uppercase; line-height: 0.88; letter-spacing: -0.015em;
  color: #fff8ec;
  text-shadow: 0 1px 1px rgba(30, 10, 2, 0.16);
}
.entrance__center { position: absolute; left: 0; right: 0; top: 47%; text-align: center; padding: 0 var(--gutter); }
.entrance__role {
  display: inline-block; position: relative;
  font-size: clamp(1.7rem, 3.6vw, 4.2rem); font-weight: 650; font-stretch: 100%;
  text-transform: uppercase; letter-spacing: -0.005em; line-height: 1;
  color: #fff8ec;
  text-shadow: 0 1px 2px rgba(25, 8, 2, 0.22);
  text-wrap: balance;
}
.entrance__role::after {
  content: ""; position: absolute; left: 34%; width: 26%; bottom: -0.16em; height: 0.06em; min-height: 3px;
  background: var(--lime); border-radius: 2px;
}
.entrance__meta { position: absolute; right: var(--gutter); top: calc(47% + clamp(3.4rem, 6.2vw, 7.2rem)); text-align: right; text-shadow: 0 1px 2px rgba(25, 8, 2, 0.3); }
.tag { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.entrance__based { margin-top: 0.4rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.entrance__coords { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.08em; color: rgba(255, 248, 236, 0.8); }
.entrance__counter {
  position: absolute; right: var(--gutter); top: 38%;
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
  font-family: var(--f-serif); font-size: clamp(1.8rem, 2.4vw, 2.6rem); line-height: 1; color: #fff8ec;
  text-shadow: 0 2px 20px rgba(40, 14, 4, 0.5);
}
.entrance__counter i { font-style: normal; transform: rotate(20deg); opacity: 0.8; }
.entrance__counter small { margin-top: 0.4rem; font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; }
.entrance__caption {
  position: absolute; left: var(--gutter); bottom: calc(var(--gutter-b) + 104px);
  max-width: 24rem; padding: 1rem 1.2rem;
  background: rgba(17, 16, 14, 0.62); border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-family: var(--f-serif); font-style: italic; font-size: 1.15rem; line-height: 1.3; color: var(--text-1);
}
.step-0 .entrance__caption { opacity: 0 !important; }
.entrance__scroll {
  position: absolute; left: calc(var(--gutter) - 0.2rem); top: 50%;
  writing-mode: vertical-rl; transform: rotate(180deg) translateY(50%);
  display: flex; align-items: center; gap: 0.8rem;
  font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 248, 236, 0.85);
}
.entrance__scroll i { position: relative; width: 1px; height: 60px; background: rgba(255, 248, 236, 0.3); overflow: hidden; }
.entrance__scroll i::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 40%; background: #fff8ec; animation: drip 2s var(--ease-in-out) infinite; }
@keyframes drip { 0% { transform: translateY(100%); } 100% { transform: translateY(-260%); } }

.door-badge {
  position: absolute; left: 50%; top: 70%; transform: translate(-50%, -50%);
  width: 108px; height: 108px; display: grid; place-items: center;
}
.door-badge svg { position: absolute; inset: 0; animation: spin 14s linear infinite; }
.door-badge text { fill: #fff8ec; font-family: var(--f-display); font-weight: 700; font-size: 8.6px; letter-spacing: 0.24em; text-transform: uppercase; }
.door-badge > span {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: #fff8ec; color: var(--bg); font-size: 1.2rem;
  transition: transform 0.5s var(--ease-back), background-color 0.3s;
}
.door-badge:hover > span { transform: scale(1.15); background: var(--lime); }
body:not(.step-0) .door-badge { opacity: 0; pointer-events: none; transition: opacity 0.5s; }

.entrance__actions { position: absolute; right: var(--gutter); bottom: var(--gutter-b); display: grid; gap: 0.6rem; width: min(270px, 60vw); }
.act {
  display: flex; align-items: center; justify-content: space-between;
  height: 3.1rem; padding: 0 0.7rem 0 1.3rem; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  transition: transform 0.5s var(--ease-out), background-color 0.3s, color 0.3s;
}
.act i { font-style: normal; font-size: 1.1rem; transition: transform 0.5s var(--ease-back); }
.act:hover i { transform: translateX(4px); }
.act--light { background: rgba(255, 248, 236, 0.9); color: var(--bg); box-shadow: 0 10px 40px rgba(40, 14, 4, 0.25); }
.act--light:hover { background: var(--lime); }
.act--dark { background: rgba(17, 16, 14, 0.78); color: var(--text-1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.act--dark:hover { background: var(--bg); }
.act__ring { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; }

/* =========================================================
   ROOM UI
   ========================================================= */
.room-ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; opacity: 0; visibility: hidden; }
body[data-state="room"] .room-ui { opacity: 1; visibility: visible; }
.room-ui__hint {
  position: absolute; left: 50%; bottom: calc(var(--gutter-b) + 6px); transform: translateX(-50%);
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3);
  white-space: nowrap;
}
.toast {
  position: absolute; right: var(--gutter); bottom: var(--gutter-b);
  display: flex; gap: 0.9rem; align-items: center;
  width: min(380px, calc(100vw - 2 * var(--gutter)));
  padding: 0.9rem 1.1rem; border-radius: 18px;
  background: rgba(23, 21, 18, 0.88); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 0.84rem; line-height: 1.35; color: var(--text-1);
  transform: translateY(20px); opacity: 0; overflow: hidden;
  transition: transform 0.7s var(--ease-out), opacity 0.5s;
}
.toast small { display: block; font-family: var(--f-mono); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.2rem; }
.toast__icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); color: var(--bg); }
.toast__icon svg { width: 18px; height: 18px; }
.toast__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.toast-on .toast { transform: none; opacity: 1; }
.toast-on .room-ui__hint { opacity: 0; }
.toast-on .toast__bar { transform: scaleX(1); transition: transform 7s linear; }
.is-dragging .room-ui__hint { opacity: 0; }
.room-nav { display: none; }

/* =========================================================
   PANELS (about / services) — HTML inside the room
   ========================================================= */
.panel {
  position: fixed; inset: 0; z-index: 20; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--header-h) + clamp(0.5rem, 3vh, 2rem)) var(--gutter) clamp(5rem, 10vh, 7rem);
  background: linear-gradient(90deg, rgba(13, 18, 16, 0.25), rgba(13, 18, 16, 0.6) 30%, rgba(13, 18, 16, 0.6) 70%, rgba(13, 18, 16, 0.25));
  scrollbar-width: thin;
}
.panel__close {
  position: fixed; left: 50%; bottom: var(--gutter-b); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 0.7rem; height: 2.6rem; padding: 0 0.5rem 0 1.1rem; border-radius: 999px;
  background: rgba(17, 16, 14, 0.7); border: 1px solid var(--line-strong);
  font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.3s, color 0.3s;
}
.panel__close i { font-style: normal; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--cream); color: var(--bg); }
.panel__close:hover { background: var(--cream); color: var(--bg); }
.panel__close:hover i { background: var(--lime); }

.about {
  position: relative;
  max-width: 1320px; margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(210px, 0.5fr);
  grid-template-areas: "intro portrait index" "marquee marquee marquee";
  gap: clamp(1.4rem, 3vw, 3.2rem);
  align-items: start;
}

/* Intro */
.intro { grid-area: intro; }
.intro__bar { display: block; width: 4.4rem; height: 6px; background: var(--lime); margin-bottom: clamp(1rem, 2.6vh, 1.8rem); transform-origin: left; }
.intro__title { font-size: var(--t-hero); font-weight: 750; font-stretch: 104%; text-transform: uppercase; line-height: 1.04; letter-spacing: -0.01em; min-height: 3.15em; }
.intro__title .line > span { max-width: 100%; }
.intro__place { margin-top: clamp(1rem, 2.6vh, 1.8rem); display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; font-size: var(--t-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.intro__place strong { color: var(--text-1); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.06em; }
.intro__facts { margin-top: 0.9rem; max-width: 34rem; }
.intro__facts > div { display: grid; grid-template-columns: 5.2rem 1fr; align-items: baseline; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.intro__facts > div:last-child { border-bottom: 1px solid var(--line); }
.intro__facts dt { font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.intro__facts dd { font-size: 0.95rem; color: var(--text-2); }
.intro__facts a, .intro__facts em { font-style: normal; font-weight: 700; letter-spacing: 0.04em; color: var(--lime); }
.intro__facts em { color: var(--amber); }
.intro__ctas { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: clamp(1rem, 2.6vh, 1.8rem); align-items: center; }
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 1.1rem;
  height: 3rem; padding: 0 0.35rem 0 1.4rem; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  transition: color 0.4s var(--ease-out);
}
.btn i { font-style: normal; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; transition: transform 0.5s var(--ease-back); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; transform: translateY(101%); transition: transform 0.5s var(--ease-out); }
.btn:hover::before { transform: translateY(0); }
.btn:hover i { transform: translateX(3px) rotate(-45deg); }
.btn--solid { background: var(--cream); color: var(--bg); }
.btn--solid i { background: var(--lime); color: var(--bg); }
.btn--solid::before { background: var(--lime); }
.btn--ghost { border: 1px solid var(--line-strong); color: var(--text-1); }
.btn--ghost i { color: var(--text-3); }
.btn--ghost::before { background: var(--cream); }
.btn--ghost:hover, .btn--ghost:hover i { color: var(--bg); }
.intro__quote { margin-top: clamp(1rem, 2.6vh, 1.8rem); max-width: 30rem; font-family: var(--f-serif); font-style: italic; font-size: var(--t-serif); line-height: 1.3; color: var(--text-3); text-wrap: balance; }

/* Portrait */
.portrait { grid-area: portrait; position: relative; cursor: crosshair; padding-top: 1.2rem; }
.portrait__frame { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #080807; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
.portrait__img, .portrait__lens img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.portrait__img { filter: contrast(1.05); }
.portrait__lens { position: absolute; inset: 0; background: var(--lime); --x: 50%; --y: 40%; --r: 0px; clip-path: circle(var(--r) at var(--x) var(--y)); transition: clip-path 0.5s var(--ease-out); }
.portrait__lens img { mix-blend-mode: multiply; filter: grayscale(1) contrast(1.35) brightness(1.25); }
.portrait.is-hover .portrait__lens { --r: 88px; transition: none; }
.portrait.is-signal .portrait__lens { --r: 150%; transition: clip-path 1s var(--ease-in-out); }
.portrait__dot { position: absolute; left: 7%; top: 9%; width: 11%; aspect-ratio: 1; border-radius: 50%; background: var(--lime); mix-blend-mode: difference; animation: float 7s var(--ease-in-out) infinite; pointer-events: none; }
@keyframes float { 50% { transform: translate(0, 120%); } }
.portrait__name {
  position: absolute; z-index: 2; top: 0; left: -0.1em;
  display: flex; flex-direction: column;
  font-size: clamp(1.6rem, 2.6vw, 2.8rem); font-weight: 800; font-stretch: 110%; text-transform: uppercase;
  line-height: 0.9; letter-spacing: -0.01em; color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25), 0 0 30px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.portrait__hint { margin-top: 0.6rem; text-align: right; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-1); }

/* Index */
.index { grid-area: index; border-left: 1px solid rgba(233, 176, 74, 0.45); padding-left: clamp(1rem, 1.6vw, 1.6rem); padding-top: 0.6rem; }
.index__label { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
.index__label small { color: var(--text-4); }
.index__label:not(:first-child) { margin-top: 2.2rem; }
.index__list button, .index__links a {
  position: relative; display: flex; align-items: baseline; gap: 0.9rem; width: 100%;
  padding: 0.5rem 0; text-align: left; border-bottom: 1px solid var(--line);
  font-size: 0.92rem; color: var(--text-2);
  transition: color 0.3s, padding-left 0.5s var(--ease-out);
}
.index__links a i { margin-left: auto; font-style: normal; color: var(--text-4); font-size: 0.8rem; }
.index__list small, .index__links small { font-family: var(--f-mono); font-size: 0.58rem; color: var(--text-4); letter-spacing: 0.08em; min-width: 1.4rem; }
.index__list button::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; }
.index__list button.is-active { color: var(--text-1); padding-left: 0.6rem; }
.index__list button.is-active small { color: var(--lime); }
.index__list button.is-active::after { transform: scaleX(1); transition: transform 4.8s linear; }
.index__list.is-manual button.is-active::after { transition: transform 0.5s var(--ease-out); }
.index__list button:hover, .index__links a:hover { color: var(--text-1); }
.index__links a:hover { padding-left: 0.6rem; }
.index__links a:hover i { color: var(--lime); }

.marquee { grid-area: marquee; margin: clamp(0.5rem, 3vh, 2rem) calc(var(--gutter) * -1) 0; overflow: hidden; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: inline-flex; gap: 2.2rem; align-items: center; font-size: clamp(1rem, 1.4vw, 1.4rem); font-weight: 400; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); animation: marquee 48s linear infinite; }
.marquee__track i { font-style: normal; color: var(--lime); }
@keyframes marquee { to { transform: translateX(-50%); } }
.chapter { position: absolute; right: 18%; bottom: 3.2rem; font-size: clamp(3.5rem, 6vw, 6rem); font-weight: 700; line-height: 0.8; color: rgba(239, 231, 218, 0.08); pointer-events: none; }

/* Services panel */
.services-wrap { max-width: 1100px; margin: 0 auto; }
.services-wrap .eyebrow { margin-top: 0.4rem; }
.services-title { margin-top: 1rem; font-size: var(--t-h2); font-weight: 700; line-height: 1.02; letter-spacing: -0.03em; max-width: 18ch; text-wrap: balance; }
.services { margin-top: clamp(1.6rem, 5vh, 3rem); border-top: 1px solid var(--line-strong); }
.service {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 3rem minmax(0, 0.9fr) minmax(0, 1fr) auto; gap: 1.6rem; align-items: baseline;
  padding: clamp(1.1rem, 3vh, 1.8rem) 0; border-bottom: 1px solid var(--line-strong);
  transition: color 0.4s;
}
.service::before { content: ""; position: absolute; inset: 0 -1.2rem; z-index: -1; border-radius: 10px; background: var(--lime); transform: scaleY(0); transform-origin: bottom; transition: transform 0.6s var(--ease-out); }
.service__n { font-family: var(--f-mono); font-size: 0.72rem; color: var(--lime); transition: color 0.4s; }
.service__name { font-size: var(--t-h3); font-weight: 700; font-stretch: 106%; text-transform: uppercase; line-height: 1.05; }
.service__text { color: var(--text-2); max-width: 40ch; transition: color 0.4s; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
.tags li { font-family: var(--f-mono); font-size: 0.64rem; padding: 0.3rem 0.6rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-3); transition: color 0.4s, border-color 0.4s; }
@media (hover: hover) {
  .service:hover { color: var(--bg); }
  .service:hover::before { transform: scaleY(1); transform-origin: top; }
  .service:hover .service__n, .service:hover .service__text, .service:hover .tags li { color: var(--bg); }
  .service:hover .tags li { border-color: rgba(17, 16, 14, 0.3); }
}

/* =========================================================
   LISTENING — panel on the left, the shelf stays clickable on the right
   ========================================================= */
.panel--listen {
  pointer-events: none; overflow: hidden;
  background: linear-gradient(90deg, rgba(12, 17, 15, 0.86) 0%, rgba(12, 17, 15, 0.62) 34%, rgba(12, 17, 15, 0) 60%);
}
.panel--listen .listen, .panel--listen .panel__close { pointer-events: auto; }
.listen {
  width: min(500px, 46vw);
  max-height: calc(100svh - var(--header-h) - 5.5rem);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  padding-right: 0.5rem;
}
.listen::-webkit-scrollbar { display: none; }
.listen__hint { margin-top: 0.9rem; display: flex; align-items: center; gap: 0.8rem; font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.listen__hint i { width: 2.4rem; height: 1px; background: var(--amber); }
.listen__label { margin-top: clamp(1.6rem, 5vh, 3rem); font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.listen__title { margin-top: 0.4rem; font-size: clamp(2rem, 3.3vw, 3.5rem); font-weight: 750; font-stretch: 102%; text-transform: uppercase; line-height: 1; letter-spacing: -0.015em; text-wrap: balance; overflow-wrap: break-word; }
.listen__artist { margin-top: 0.5rem; font-family: var(--f-serif); font-style: italic; font-size: clamp(1.5rem, 2.2vw, 2.1rem); color: var(--gold); }
.listen__ctas { display: flex; align-items: center; gap: 1rem; margin-top: 1.4rem; }
.listen__ctas .btn i { font-size: 0.7rem; }
.listen__intro { margin-top: 1.6rem; max-width: 26rem; color: var(--text-3); font-size: 0.92rem; }
.listen__list { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.listen__list small { color: var(--text-4); }
.listen__list ol { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(239, 231, 218, 0.2) transparent; padding-right: 0.3rem; }
.listen__list button {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 0.8rem; align-items: center; width: 100%;
  padding: 0.35rem; border-radius: 8px; text-align: left; transition: background-color 0.25s;
}
.listen__list button:hover { background: rgba(239, 231, 218, 0.06); }
.listen__list img { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; background: var(--bg-3); }
.listen__list b { display: block; font-size: 0.88rem; font-weight: 600; line-height: 1.2; }
.listen__list span small { display: block; font-family: var(--f-serif); font-style: italic; font-size: 0.92rem; color: var(--text-3); }
.listen__list i { font-style: normal; font-size: 0.6rem; color: var(--text-4); padding-right: 0.4rem; }
.listen__list button[aria-current="true"] { background: rgba(201, 244, 92, 0.1); }
.listen__list button[aria-current="true"] b, .listen__list button[aria-current="true"] i { color: var(--lime); }
.listen__note { margin: 1.2rem 0 0.5rem; font-size: 0.72rem; color: var(--text-4); }

/* ---------- Now-playing dock ---------- */
.dock {
  position: fixed; right: var(--gutter); bottom: var(--gutter-b); z-index: 65;
  width: min(340px, calc(100vw - 2 * var(--gutter)));
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out), visibility 0.6s;
}
body[data-state="room"] .dock, body[data-state="about"] .dock, body[data-state="services"] .dock,
body[data-state="listening"] .dock, body.music-open .dock { opacity: 1; visibility: visible; transform: none; }
body[data-state="entrance"] .dock { bottom: calc(var(--gutter-b) + 7.6rem); }
body.contact-open .dock, body.menu-open .dock, body.toast-on .dock { opacity: 0; visibility: hidden; }
.dock__pill {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  padding: 0.4rem 0.4rem 0.4rem 0.4rem; border-radius: 999px;
  background: rgba(239, 231, 218, 0.94); color: var(--bg); text-align: left;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s var(--ease-out), background-color 0.3s;
}
.dock__pill:hover { transform: translateY(-2px); }
.dock__cover { flex: none; width: 50px; height: 50px; border-radius: 50%; object-fit: cover; background: var(--bg-3); box-shadow: 0 0 0 3px rgba(17, 16, 14, 0.85); }
.music-playing .dock__cover { animation: spin 6s linear infinite; }
.dock__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.dock__text small { display: flex; align-items: center; gap: 0.4rem; font-family: var(--f-mono); font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase; color: #8a4a1c; }
.dock__text small .eq { height: 9px; color: var(--amber); }
.music-playing .dock__text .eq b { animation: eq 0.9s ease-in-out infinite; }
.dock__text b { font-size: 0.95rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock__text > span { font-size: 0.78rem; color: rgba(17, 16, 14, 0.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock__btn { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--cream); font-size: 0.8rem; box-shadow: 0 0 0 3px rgba(17, 16, 14, 0.15); }
/* The Spotify player stays rendered (just invisible) so it can load and be ready
   the moment the visitor clicks. display:none would stop it from loading. */
.dock__player {
  position: absolute; left: 0; right: 0; bottom: 0;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  padding: 0.55rem; border-radius: 18px;
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.music-open .dock__pill { display: none; }
.music-open .dock__player {
  position: relative; opacity: 1; pointer-events: auto; transform: none;
  display: block; padding: 0.55rem; border-radius: 18px;
  background: rgba(23, 21, 18, 0.92); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}
.dock__head { display: flex; justify-content: space-between; align-items: center; padding: 0 0.3rem 0.45rem; font-family: var(--f-mono); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.dock__head > span { display: flex; align-items: center; gap: 0.5rem; }
.dock__head .eq { height: 9px; color: var(--amber); }
.music-playing .dock__head .eq b { animation: eq 0.9s ease-in-out infinite; }
.dock__head button { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--cream); color: var(--bg); font-size: 0.9rem; line-height: 1; }
.dock__embed { min-height: 80px; border-radius: 12px; overflow: hidden; }
.dock__embed iframe { display: block; border: 0; border-radius: 12px; }

/* =========================================================
   STORY
   ========================================================= */
.story { position: fixed; inset: 0; z-index: 60; background: #0e0d0c; display: flex; flex-direction: column; }
.story__bar {
  position: relative; flex: none; height: 64px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 0 var(--gutter); border-bottom: 1px solid var(--line);
  background: rgba(14, 13, 12, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.story__brand { font-weight: 800; font-size: 0.95rem; }
.story__brand sup { color: var(--lime); font-size: 0.5em; }
.story__brand em { margin-left: 0.5rem; font-family: var(--f-serif); font-weight: 400; font-size: 1.05rem; color: var(--text-2); }
.story__nav { display: flex; gap: 0.2rem; }
.story__nav a { display: inline-flex; gap: 0.35rem; align-items: baseline; padding: 0.42rem 0.75rem; border-radius: 999px; font-size: 0.8rem; color: var(--text-3); transition: color 0.3s, background-color 0.3s; }
.story__nav a small { font-family: var(--f-mono); font-size: 0.58rem; color: var(--gold); opacity: 0.7; }
.story__nav a:hover { color: var(--text-1); }
.story__nav a.is-active { color: var(--text-1); background: rgba(239, 231, 218, 0.08); }
.story__close { justify-self: end; font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; }
.story__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.story__progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--lime)); transform-origin: left; transform: scaleX(0); }
.story__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.story__content { position: relative; }
.story__content::before { content: ""; position: fixed; right: -10vw; top: 10vh; width: 60vw; height: 70vh; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 138, 61, 0.07), transparent); pointer-events: none; }
.story section { padding: clamp(4rem, 12vh, 8rem) var(--gutter); max-width: 1440px; margin: 0 auto; }
.s-title { margin-top: 1.2rem; font-size: clamp(1.8rem, 3.3vw, 3.4rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.03em; max-width: 22ch; text-wrap: balance; }

/* ---------- Story, cream version (switch with SITE.storyTheme or ?story=light|dark) ---------- */
.story.is-light {
  --bg: #f4ecdf;
  --cream: #1b1a17;
  --text-1: #1b1a17;
  --text-2: rgba(27, 26, 23, 0.74);
  --text-3: rgba(27, 26, 23, 0.56);
  --text-4: rgba(27, 26, 23, 0.4);
  --line: rgba(27, 26, 23, 0.12);
  --line-strong: rgba(27, 26, 23, 0.22);
  --gold: #b5562a;
  background: radial-gradient(80% 60% at 75% 20%, #fbf6ec 0%, #f4ecdf 55%, #ece2d0 100%);
  color: var(--text-1);
}
.story.is-light .story__bar { background: rgba(247, 241, 231, 0.9); }
.story.is-light .story__nav a.is-active { background: rgba(27, 26, 23, 0.06); }
.story.is-light .story__content::before { background: radial-gradient(closest-side, rgba(255, 138, 61, 0.1), transparent); }
.story.is-light .pill--ghost { background: transparent; }
.story.is-light .pill--ghost:hover { background: var(--text-1); color: #f4ecdf; }
.story.is-light .pill--ghost:hover i { background: var(--lime); color: #1b1a17; }
.story.is-light .btn--solid:hover { color: #1b1a17; }
.story.is-light .half { background: linear-gradient(160deg, #fbf7ef, #f1e7d6); }
.story.is-light .half:nth-child(2) { background: linear-gradient(160deg, #f6f6ea, #ebe7d4); }
.story.is-light .half__icon { color: rgba(27, 26, 23, 0.14); }
.story.is-light .step::before, .story.is-light .toolline li::before { background: #f4ecdf; }
.story.is-light .card { background: #fbf7ef; }
.story.is-light .card a { color: var(--gold); }
.story.is-light .step__ico { background: #f4ecdf; }
.story.is-light .step.is-active .step__ico { background: #c4562b; border-color: #c4562b; box-shadow: 0 0 0 7px rgba(196, 86, 43, 0.14); }
.story.is-light .s-path__badge { background: #c4562b; color: #fff8ee; box-shadow: 0 24px 50px -20px rgba(140, 50, 15, 0.55); }
.story.is-light .toolline__ico { background: #fbf7ef; }
.story.is-light .card { box-shadow: 0 1px 0 rgba(60, 35, 15, 0.04), 0 18px 40px -28px rgba(60, 35, 15, 0.35); }
.story.is-light .chips li { background: rgba(255, 253, 248, 0.6); }
.story.is-light .link-btn:hover { color: var(--gold); border-color: var(--gold); }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.is-in, .no-io .reveal { opacity: 1; transform: none; }

/* 01 intro */
.s-intro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.7fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; min-height: calc(100svh - 64px); }
.s-intro__title { margin-top: 1.4rem; font-size: clamp(2.4rem, 5.6vw, 5.8rem); font-weight: 800; text-transform: uppercase; line-height: 0.95; letter-spacing: -0.03em; }
.s-intro__title .line > span { max-width: 100%; }
.outline { color: transparent; -webkit-text-stroke: 1.5px var(--cream); }
.s-intro__body { margin-top: clamp(1.6rem, 4vh, 2.6rem); max-width: 34rem; font-family: var(--f-serif); font-style: italic; font-size: var(--t-serif); line-height: 1.32; color: var(--text-2); }
.meta { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: clamp(1.6rem, 4vh, 2.6rem); padding-top: 1.1rem; border-top: 1px solid var(--line); max-width: 40rem; }
.meta dt { font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.3rem; }
.meta dd { font-size: 0.92rem; }
.s-intro__scroll { margin-top: 2.4rem; font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-4); display: flex; gap: 0.8rem; align-items: center; }
.s-intro__scroll::after { content: ""; width: 60px; height: 1px; background: var(--line-strong); }
.s-intro__photo { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #080807; }
.s-intro__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.1); }
.s-intro__photo figcaption { position: absolute; left: 1.2rem; bottom: 1.2rem; display: flex; flex-direction: column; font-size: clamp(1.6rem, 2.4vw, 2.6rem); font-weight: 800; font-stretch: 110%; text-transform: uppercase; line-height: 0.9; }
.s-intro__photo figcaption span:last-child { color: var(--lime); }

/* 02 halves */
.halves { margin-top: clamp(2rem, 6vh, 3.5rem); display: grid; grid-template-columns: 1.55fr 1fr; gap: 1rem; }
.half {
  position: relative; overflow: hidden; min-height: clamp(380px, 60vh, 560px);
  padding: clamp(1.4rem, 2.6vw, 2.4rem); border: 1px solid var(--line); border-radius: 6px;
  background: radial-gradient(90% 70% at 20% 110%, rgba(255, 138, 61, 0.1), transparent 60%), linear-gradient(160deg, #1a1714, #121110);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.half:nth-child(2) { background: radial-gradient(90% 70% at 80% 110%, rgba(201, 244, 92, 0.08), transparent 60%), linear-gradient(160deg, #161a17, #111211); }
.half header { position: absolute; top: clamp(1.4rem, 2.6vw, 2.4rem); left: clamp(1.4rem, 2.6vw, 2.4rem); right: clamp(1.4rem, 2.6vw, 2.4rem); display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.half__icon { position: absolute; right: 8%; top: 28%; width: clamp(90px, 10vw, 150px); color: rgba(239, 231, 218, 0.12); }
.half h3 { font-size: clamp(1.8rem, 2.8vw, 2.8rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.half__lead { margin-top: 1rem; max-width: 30rem; font-family: var(--f-serif); font-style: italic; font-size: var(--t-serif); line-height: 1.3; color: var(--text-2); }
.half p:not(.half__lead) { margin-top: 0.8rem; max-width: 34rem; color: var(--text-3); font-size: 0.95rem; }

/* 03 path */
.s-path { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); }
.s-path__aside { position: sticky; top: 3rem; align-self: start; }
.s-path__counter { display: flex; align-items: flex-end; gap: 0.7rem; margin-top: 2rem; }
.s-path__counter span { font-size: clamp(5rem, 10vw, 9.5rem); font-weight: 600; line-height: 0.78; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.s-path__counter small { font-family: var(--f-mono); font-size: 0.8rem; color: var(--text-4); padding-bottom: 0.5rem; }
.s-path__where { margin-top: 1.1rem; font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.s-path__list { position: relative; padding-left: clamp(1.6rem, 3vw, 3rem); padding-top: 10vh; padding-bottom: 20vh; }
.s-path__list::before, .s-path__list::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; }
.s-path__list::before { background: var(--line-strong); }
.s-path__list::after { background: linear-gradient(var(--amber), var(--lime)); transform-origin: top; transform: scaleY(var(--progress, 0)); transition: transform 0.8s var(--ease-out); }
.step { position: relative; padding-bottom: clamp(3.5rem, 12vh, 7rem); opacity: 0.3; transition: opacity 0.6s var(--ease-out); }
.step::before { content: ""; position: absolute; z-index: 1; left: calc(clamp(1.6rem, 3vw, 3rem) * -1 - 6px); top: 0.3rem; width: 13px; height: 13px; border-radius: 50%; background: #0e0d0c; border: 1px solid var(--line-strong); transition: all 0.4s; }
.step.is-active, .no-io .step { opacity: 1; }
.step.is-past { opacity: 0.55; }
.step.is-active::before { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 7px rgba(255, 138, 61, 0.18); }
.step.is-past::before { background: var(--gold); border-color: var(--gold); }
.step__meta { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.step__title { margin-top: 0.7rem; font-size: clamp(1.5rem, 2.5vw, 2.5rem); font-weight: 500; line-height: 1.08; letter-spacing: -0.025em; max-width: 22ch; text-wrap: balance; }
.step__text { margin-top: 0.9rem; max-width: 46ch; color: var(--text-2); }

/* 04 tools */
.s-tools__grid { margin-top: clamp(2rem, 6vh, 3.5rem); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.s-tools__lead { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1.25; max-width: 28rem; }
.s-tools__text { margin-top: 1.2rem; color: var(--text-3); max-width: 30rem; }
.toolline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-top: 2rem; }
.toolline::before { content: ""; position: absolute; left: 6px; right: 0; top: 6px; height: 1px; background: linear-gradient(90deg, var(--gold), var(--amber)); opacity: 0.6; }
.toolline li { position: relative; display: flex; flex-direction: column; gap: 0.35rem; }
.toolline li::before { content: ""; position: absolute; top: -2rem; left: 0; width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--gold); background: #0e0d0c; }
.toolline li.is-now::before { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 6px rgba(255, 138, 61, 0.2); }
.toolline small { font-family: var(--f-mono); font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.toolline b { font-size: clamp(1.1rem, 1.5vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; }
.toolline span { font-size: 0.85rem; color: var(--text-3); }

/* 05 work */
.s-work__head { display: flex; justify-content: space-between; align-items: center; }
.s-work__drag { font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-4); }
.cards { margin-top: clamp(2rem, 5vh, 3rem); display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 1rem; cursor: grab; scrollbar-width: thin; }
.cards.is-grab { cursor: grabbing; scroll-snap-type: none; }
.card {
  flex: 0 0 clamp(260px, 26vw, 340px); scroll-snap-align: start;
  padding: 1rem; border: 1px solid var(--line); border-radius: 6px; background: #151311;
  display: flex; flex-direction: column; gap: 0.5rem; user-select: none;
  transition: border-color 0.4s, transform 0.6s var(--ease-out);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.card header { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.14em; color: var(--gold); }
.card__art { position: relative; aspect-ratio: 4 / 3; border-radius: 3px; overflow: hidden; margin: 0.4rem 0 0.8rem; background: radial-gradient(70% 70% at 30% 20%, var(--c1), var(--c2) 70%, #0d0c0b); display: grid; place-items: center; }
.card__art span { font-size: clamp(5rem, 9vw, 8rem); font-weight: 800; color: rgba(255, 255, 255, 0.16); letter-spacing: -0.04em; }
.card h3 { font-size: 1.55rem; font-weight: 500; letter-spacing: -0.02em; }
.card__meta { font-family: var(--f-mono); font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-4); }
.card__text { font-family: var(--f-serif); font-style: italic; font-size: 1.05rem; line-height: 1.3; color: var(--text-2); }
.card a { margin-top: auto; padding-top: 0.6rem; font-size: 0.82rem; color: var(--lime); }

/* 06 hello */
.s-hello { min-height: 80svh; display: flex; flex-direction: column; justify-content: center; }
.s-hello__title { margin-top: 1.4rem; font-size: clamp(2.2rem, 4.4vw, 4.6rem); font-weight: 500; line-height: 1.02; letter-spacing: -0.035em; max-width: 18ch; }
.s-hello__title em { font-family: var(--f-serif); font-weight: 400; color: var(--gold); letter-spacing: -0.02em; }
.s-hello .intro__ctas { margin-top: 2.4rem; }
.link-btn { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2); padding: 0.6rem 0.4rem; border-bottom: 1px solid var(--line-strong); transition: color 0.3s, border-color 0.3s; }
.link-btn:hover { color: var(--lime); border-color: var(--lime); }
/* ---------- Story redesign: icons, polaroid, illustrated cards ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.meta dt { display: flex; align-items: center; gap: 0.45rem; }
.meta dt .ico { font-size: 0.95rem; }

.s-intro__photo { aspect-ratio: auto; overflow: visible; background: none; width: 100%; max-width: 420px; justify-self: center; }
.polaroid { position: relative; background: #fffdf8; padding: 12px 12px 0; border-radius: 3px; transform: rotate(2.2deg); box-shadow: 0 1px 2px rgba(40, 25, 10, 0.12), 0 28px 60px -20px rgba(60, 35, 15, 0.4); transition: transform 0.8s var(--ease-out); }
.s-intro__photo:hover .polaroid { transform: rotate(0.6deg) translateY(-4px); }
.polaroid::before { content: ""; position: absolute; z-index: 2; top: -14px; left: 50%; width: 118px; height: 30px; transform: translateX(-50%) rotate(-3deg); background: rgba(236, 219, 178, 0.72); box-shadow: 0 1px 2px rgba(60, 35, 15, 0.12); }
.polaroid__img { aspect-ratio: 4 / 5; overflow: hidden; background: #1b1a17; }
.polaroid__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(0.85) sepia(0.18) contrast(1.05); transition: filter 0.8s; }
.s-intro__photo:hover .polaroid__img img { filter: grayscale(0.2) sepia(0.1); }
.s-intro__photo .polaroid figcaption { position: static; display: flex; justify-content: space-between; align-items: baseline; padding: 0.9rem 0.3rem 1rem; color: #1b1a17; font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: 1.35rem; text-transform: none; line-height: 1; }
.polaroid figcaption small { font-family: var(--f-mono); font-style: normal; font-size: 0.58rem; letter-spacing: 0.14em; color: #b5562a; }
.stamp { position: absolute; z-index: 3; left: -46px; bottom: 70px; width: 118px; height: 118px; border-radius: 50%; background: var(--lime); color: #1b1a17; display: grid; place-items: center; transform: rotate(-8deg); box-shadow: 0 12px 30px -12px rgba(60, 35, 15, 0.45); }
.stamp > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 24s linear infinite; }
.stamp text { font-family: var(--f-display); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; fill: currentColor; }
.stamp__core { width: 30px; height: 30px; fill: #ff8a3d; stroke: #1b1a17; stroke-width: 1.4; stroke-linejoin: round; }

.half { min-height: 0; justify-content: flex-start; }
.half header { position: static; align-items: center; margin-bottom: clamp(2rem, 5vh, 3.2rem); }
.half__tile { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: #c4562b; color: #fff8ee; font-size: 1.5rem; transform: rotate(-4deg); }
.half:nth-child(2) .half__tile { background: #2f4a3a; color: var(--lime); transform: rotate(4deg); }
.half__tag { display: flex; gap: 0.8rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 1.8rem; list-style: none; }
.chips li { font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.45rem 0.75rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-2); }

.s-path__list { padding-left: clamp(2.6rem, 4vw, 3.6rem); }
.step::before { display: none; }
.step__ico { position: absolute; z-index: 1; left: calc(clamp(2.6rem, 4vw, 3.6rem) * -1 - 19px); top: -0.3rem; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #0e0d0c; border: 1px solid var(--line-strong); color: var(--text-3); font-size: 1.05rem; transition: all 0.4s; }
.step.is-past .step__ico { border-color: var(--gold); color: var(--gold); }
.step.is-active .step__ico { background: var(--amber); border-color: var(--amber); color: #1b1a17; box-shadow: 0 0 0 7px rgba(255, 138, 61, 0.18); }
.s-path__badge { margin-top: 2.2rem; width: clamp(96px, 10vw, 140px); aspect-ratio: 1; border-radius: 28px; display: grid; place-items: center; background: rgba(255, 138, 61, 0.14); color: var(--amber); font-size: clamp(2.6rem, 4vw, 3.8rem); transform: rotate(-4deg); }
.s-path__badge .ico { stroke-width: 1.3; }
.s-path__badge.is-swap { animation: badge-pop 0.6s var(--ease-out); }
@keyframes badge-pop { 0% { transform: rotate(-12deg) scale(0.82); } 100% { transform: rotate(-4deg) scale(1); } }

.toolline__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 0.5rem; border: 1px solid var(--line); color: var(--gold); font-size: 1.15rem; }
.toolline li.is-now .toolline__ico { background: #c4562b; border-color: #c4562b; color: #fff8ee; }

.card { border-radius: 10px; }
.card h3 { font-size: 1.3rem; }
.card a { display: inline-flex; align-items: center; gap: 0.3rem; }
.card__art svg { width: 100%; height: 100%; display: block; }
.card__art use { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card__art--autberry { background: radial-gradient(80% 70% at 50% 40%, #3a2048 0%, #1a0f22 55%, #0b0710 100%); }
.card__art--autberry img { width: 70%; height: auto; filter: drop-shadow(0 6px 24px rgba(214, 170, 80, 0.28)); pointer-events: none; }
.card__art--flow { background: linear-gradient(160deg, #24402f, #13241b); }
.flow__wire { fill: none; stroke: rgba(201, 244, 92, 0.45); stroke-width: 2.5; stroke-dasharray: 5 7; animation: flow-dash 1.6s linear infinite; }
.flow__pulse { fill: none; stroke: var(--lime); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 16 400; animation: flow-pulse 2.6s var(--ease-out) infinite; }
@keyframes flow-dash { to { stroke-dashoffset: -24; } }
@keyframes flow-pulse { from { stroke-dashoffset: 16; } to { stroke-dashoffset: -230; } }
.flow__node rect { fill: #efe7da; }
.flow__node { color: #1b1a17; }
.flow__node--main rect { fill: var(--lime); }
.flow__node:last-of-type rect { fill: #ff8a3d; }
.card__art--crm { background: linear-gradient(160deg, #d0653a, #8a3416); }
.crm__col > rect:first-child { fill: rgba(255, 248, 238, 0.14); }
.crm__head { fill: rgba(255, 248, 238, 0.6); }
.crm__card { fill: #fbf3e6; }
.crm__card--hot { fill: var(--lime); animation: crm-float 3s ease-in-out infinite; }
.crm__dot { fill: #c4562b; animation: crm-float 3s ease-in-out infinite; }
@keyframes crm-float { 50% { transform: translateY(-4px); } }
.card__art--shop { background: linear-gradient(160deg, #efc061, #b8761f); }
.shop__win rect { fill: #fffaf0; }
.shop__win path { stroke: rgba(27, 26, 23, 0.12); stroke-width: 1.5; }
.shop__win circle { fill: rgba(27, 26, 23, 0.2); }
.shop__item > rect:first-child { fill: #f3d9a8; }
.shop__item:nth-of-type(3) > rect:first-child { fill: #e8c6b0; }
.shop__item:nth-of-type(4) > rect:first-child { fill: #d9e3c5; }
.shop__line { fill: rgba(27, 26, 23, 0.25); }
.shop__price { fill: #c4562b; }
.shop__bag { color: var(--lime); }
.shop__bag circle { fill: #1b1a17; }
.card__art--house { background: linear-gradient(180deg, #f6d9b8, #efe7da); }
.house__sun { fill: #ff8a3d; }
.house__wall { fill: #c4562b; }
.house__cornice { fill: #a9461f; }
.house__win rect { fill: #2a3a33; stroke: #efe7da; stroke-width: 3; }
.house__win path { stroke: #efe7da; stroke-width: 4; }
.house__door { fill: var(--lime); }
.house__plaque { fill: #efe7da; }
.house__jjg { font-family: var(--f-display); font-size: 7px; font-weight: 800; fill: #1b1a17; }
.house__step { fill: #8f3a18; }

.s-hello { position: relative; }
.s-hello__spark { position: absolute; right: var(--gutter); top: 18%; width: clamp(90px, 12vw, 180px); height: clamp(90px, 12vw, 180px); fill: none; stroke: var(--gold); stroke-width: 0.8; stroke-linejoin: round; animation: spin 40s linear infinite; opacity: 0.8; }
.s-hello__sign { margin-top: 4.5rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; }
.s-hello__name { font-family: var(--f-serif); font-style: italic; font-size: clamp(3rem, 5vw, 4.6rem); line-height: 1; color: var(--text-1); }
.s-hello__swash { width: 180px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; }
.s-hello__sign p { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.6rem; font-family: var(--f-serif); font-style: italic; color: var(--text-4); }
.s-hello__sign p .ico { color: #c4562b; }
@media (max-width: 960px) {
  .s-path__badge { display: none; }
  .stamp { left: -16px; width: 96px; height: 96px; bottom: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .stamp > svg:first-child, .s-hello__spark, .flow__wire, .flow__pulse, .crm__card--hot, .crm__dot { animation: none; }
}

/* =========================================================
   CONTACT DRAWER
   ========================================================= */
.drawer { position: fixed; inset: 0; z-index: 70; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(8, 7, 6, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); cursor: pointer; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(720px, 100%); overflow-y: auto; overscroll-behavior: contain;
  padding: 1.2rem clamp(1.2rem, 3vw, 3rem) 3rem;
  background: radial-gradient(80% 50% at 100% 0%, rgba(255, 138, 61, 0.08), transparent 60%), linear-gradient(180deg, #1a1714, #11100e);
  border-left: 1px solid var(--line);
}
.drawer__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: clamp(1.6rem, 5vh, 3rem); }
.status { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.8rem; border: 1px solid var(--line-strong); border-radius: 999px; font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; }
.drawer__top .pill { font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; height: 2.2rem; padding-right: 0.4rem; }
.drawer__title { margin-top: 1rem; font-size: clamp(1.9rem, 3.2vw, 3rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.03em; }
.drawer__title em { display: block; font-family: var(--f-serif); font-weight: 400; color: var(--gold); letter-spacing: -0.015em; }
.drawer__lead { margin-top: 1.2rem; max-width: 34rem; color: var(--text-3); font-size: 0.95rem; }
.drawer__block { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.drawer__label { font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips button { padding: 0.55rem 1rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.82rem; color: var(--text-2); transition: all 0.3s; }
.chips button:hover { color: var(--text-1); border-color: var(--text-3); }
.chips button[aria-checked="true"] { background: var(--cream); color: var(--bg); border-color: var(--cream); }
.chips button[aria-checked="true"]::before { content: "● "; color: var(--amber); font-size: 0.6rem; vertical-align: middle; }
.drawer__big { display: inline-block; font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 400; letter-spacing: -0.025em; word-break: break-all; border-bottom: 1px solid transparent; transition: color 0.3s, border-color 0.3s; }
.drawer__big:hover { color: var(--lime); border-color: var(--lime); }
.drawer__note { margin-top: 0.9rem; font-size: 0.8rem; color: var(--text-4); }
.drawer__note b { color: var(--text-2); font-weight: 600; }

/* =========================================================
   MENU
   ========================================================= */
.menu {
  position: fixed; inset: 0; z-index: 50;
  display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 2rem; align-items: end;
  padding: calc(var(--header-h) + 3vh) var(--gutter) var(--gutter);
  background: radial-gradient(60% 60% at 20% 100%, rgba(255, 138, 61, 0.14), transparent 70%), #12110f;
}
.menu__nav { display: grid; }
.menu__nav a { display: flex; align-items: baseline; gap: 1.2rem; border-bottom: 1px solid var(--line); padding: 0.35rem 0; font-size: clamp(1.9rem, 4.6vw, 4rem); font-weight: 750; font-stretch: 106%; text-transform: uppercase; letter-spacing: -0.02em; line-height: 1.05; transition: color 0.3s, padding-left 0.5s var(--ease-out); }
.menu__nav a small { font-family: var(--f-mono); font-size: 0.7rem; font-weight: 400; letter-spacing: 0.1em; color: var(--lime); }
.menu__nav a:hover { color: var(--lime); padding-left: 0.8rem; }
.menu__side { display: grid; gap: 0.6rem; align-content: end; }
.menu__side a { font-size: 1.1rem; color: var(--text-2); }
.menu__side a:hover { color: var(--lime); }
.menu__foot { margin-top: 2rem; font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.14em; color: var(--text-4); text-transform: uppercase; }

/* ---------- Hello badge ---------- */
.hello { position: fixed; left: var(--gutter); bottom: var(--gutter-b); z-index: 30; width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; background: rgba(239, 231, 218, 0.92); color: var(--bg); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
.hello svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 16s linear infinite; }
.hello text { fill: var(--bg); font-family: var(--f-mono); font-size: 8.6px; letter-spacing: 0.2em; text-transform: uppercase; }
.hello__core { position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--cream); transition: transform 0.5s var(--ease-back), background-color 0.3s; }
.hello__core svg { width: 16px; height: 16px; }
.hello__core i { position: absolute; top: 0; right: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--lime); border: 2px solid var(--bg); }
.hello:hover .hello__core { transform: scale(1.15) rotate(-8deg); background: var(--lime); color: var(--bg); }
body[data-state="entrance"] .hello { bottom: var(--gutter-b); }

/* ---------- Cursor ---------- */
.cursor { display: none; }
.has-cursor .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 200; }
.cursor__dot, .cursor__ring { position: absolute; top: 0; left: 0; border-radius: 50%; will-change: transform; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--lime); }
.cursor__ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1px solid rgba(239, 231, 218, 0.5); transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out), margin 0.4s var(--ease-out), background-color 0.3s, border-color 0.3s, opacity 0.3s; }
.cursor.is-ui .cursor__ring, .cursor.is-link .cursor__ring { width: 60px; height: 60px; margin: -30px 0 0 -30px; border-color: var(--lime); }
.cursor.is-drag .cursor__ring { width: 70px; height: 70px; margin: -35px 0 0 -35px; background: rgba(201, 244, 92, 0.15); border-color: var(--lime); }
.is-dragging .cursor__ring { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: rgba(201, 244, 92, 0.3); }
.cursor.is-hidden .cursor__ring, .cursor.is-hidden .cursor__dot { opacity: 0; }

.noscript { position: fixed; inset: 0; display: grid; place-items: center; padding: 2rem; text-align: center; background: var(--bg); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .about { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); grid-template-areas: "intro portrait" "index index" "marquee marquee"; }
  .index { border-left: 0; border-top: 1px solid rgba(233, 176, 74, 0.45); padding: 1.4rem 0 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  .index__label:not(:first-child) { margin-top: 0; }
  .index > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .index > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .index > :nth-child(3) { grid-column: 2; grid-row: 1; }
  .index > :nth-child(4) { grid-column: 2; grid-row: 2; }
  .chapter { display: none; }
  .nav { gap: 1.1rem; }
  .story__nav a span { display: none; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .nav, .clock, .sound-btn span { display: none; }
  .header { grid-template-columns: auto 1fr; }
  .service { grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0.5rem 1rem; }
  .service__text, .tags { grid-column: 2; }
  .tags { justify-content: flex-start; }
  .s-intro, .s-path, .s-tools__grid { grid-template-columns: 1fr; }
  .s-intro__photo { max-width: 360px; width: 80%; }
  .s-path__aside { position: relative; top: 0; }
  .halves { grid-template-columns: 1fr; }
  .toolline { grid-template-columns: 1fr 1fr; row-gap: 2.6rem; }
  .menu { grid-template-columns: 1fr; align-content: end; }
  .story__brand em { display: none; }
}

@media (max-width: 720px) {
  .entrance__name { font-size: clamp(2.6rem, 15vw, 6rem); top: calc(var(--header-h) + 0.5rem); }
  .loader__corner--bl, .loader__corner--br { display: none; }
  .loader__name { --fs: clamp(2.6rem, 15vw, 5rem); }
  /* on a narrow phone, zoom into the heart of the skyline (Sagrada Família, the sun, Torre Glòries) */
  @media (orientation: portrait) { .loader__city { width: 165vw; bottom: calc(40px + 6rem); } }
  .entrance__center { top: 44%; }
  .entrance__role { font-size: clamp(1.6rem, 8vw, 2.6rem); }
  .entrance__meta { left: var(--gutter); right: var(--gutter); top: auto; bottom: calc(var(--gutter-b) + 132px); text-align: left; }
  .entrance__meta .tag { display: none; }
  .entrance__counter { top: calc(var(--header-h) + 0.5rem); font-size: 1.5rem; }
  .entrance__counter small { display: none; }
  .entrance__caption { left: var(--gutter); right: var(--gutter); max-width: none; bottom: calc(var(--gutter-b) + 132px); font-size: 1rem; }
  .entrance__scroll { display: none; }
  .door-badge { top: 64%; width: 92px; height: 92px; }
  .entrance__actions { left: calc(var(--gutter) + 90px); width: auto; }
  .act { height: 2.8rem; font-size: 0.66rem; }
  .hello { width: 70px; height: 70px; }
  /* on phones the welcome note drops in under the header, so it never fights the player */
  .toast { top: calc(var(--header-h) + 0.4rem); bottom: auto; left: var(--gutter); right: var(--gutter); width: auto; transform: translateY(-16px); }
  body.toast-on[data-state="room"]:not(.menu-open):not(.contact-open) .dock { opacity: 1; visibility: visible; }
  .room-ui__hint { display: none; }
  .room-nav {
    display: flex; gap: 0.4rem; pointer-events: auto;
    position: absolute; left: calc(var(--gutter) + 82px); right: var(--gutter); bottom: calc(var(--gutter-b) + 14px);
  }
  .room-nav button {
    flex: 1; height: 2.6rem; border-radius: 999px; padding: 0 0.4rem;
    background: rgba(17, 16, 14, 0.72); border: 1px solid var(--line-strong);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  }
  .room-nav button:active { background: var(--lime); color: var(--bg); }
  .lang button { padding: 0.4rem 0.2rem; }
  .outside-btn span { display: none; }
  .outside-btn { padding: 0 0.7rem; }

  .about { grid-template-columns: 1fr; grid-template-areas: "portrait" "intro" "index" "marquee"; }
  .portrait { width: 78%; justify-self: end; }
  .intro__title { min-height: 0; font-size: clamp(1.7rem, 9.5vw, 3rem); }
  .intro__title .line > span { white-space: nowrap; }
  /* while reading a panel on a phone, the player and the hello badge step aside (the music keeps playing) */
  body[data-state="about"] .dock, body[data-state="about"] .hello,
  body[data-state="listening"] .hello { opacity: 0; visibility: hidden; pointer-events: none; }
  .index { grid-template-columns: 1fr; }
  .index > :nth-child(n) { grid-column: 1; grid-row: auto; }
  .index__label:nth-of-type(2) { margin-top: 1.6rem; }
  .panel { background: rgba(13, 18, 16, 0.78); }
  /* text fades out under the header instead of running behind the logo */
  .panel {
    -webkit-mask-image: linear-gradient(to bottom, transparent calc(var(--header-h) - 14px), #000 calc(var(--header-h) + 18px));
    mask-image: linear-gradient(to bottom, transparent calc(var(--header-h) - 14px), #000 calc(var(--header-h) + 18px));
  }
  .panel__close { left: auto; right: var(--gutter); transform: none; }
  .panel--listen { pointer-events: auto; overflow-y: auto; background: linear-gradient(180deg, rgba(12, 17, 15, 0.35), rgba(12, 17, 15, 0.9) 34%); padding-top: 34vh; }
  .listen { width: auto; max-height: none; overflow: visible; padding-bottom: 15rem; }
  body[data-state="listening"] .dock { left: var(--gutter); }
  .drawer__top kbd { display: none; }
  .listen__list ol { max-height: none; }
  .dock { left: calc(var(--gutter) + 80px); width: auto; bottom: calc(var(--gutter-b) + 3.4rem); }
  body[data-state="listening"] .dock, body[data-state="about"] .dock, body[data-state="services"] .dock { bottom: calc(var(--gutter-b) + 3.6rem); }
  .dock__cover { width: 42px; height: 42px; }
  .dock__btn { width: 40px; height: 40px; }
  .story__bar { grid-template-columns: auto 1fr auto; }
  .story__nav { justify-content: center; overflow-x: auto; }
  .story__nav a { padding: 0.4rem 0.45rem; }
  .story__close span { display: none; }
  .act { letter-spacing: 0.08em; padding-left: 1.1rem; white-space: nowrap; }
  /* short phones (iPhone SE and the like): keep the door, the title and the two buttons, drop the small print */
  @media (max-height: 700px) {
    .entrance__meta { display: none; }
    .entrance__name { font-size: clamp(2.2rem, 12vw, 4rem); }
    .door-badge { top: 66%; width: 84px; height: 84px; }
  }
  .s-intro { min-height: 0; padding-bottom: 1rem; }
  .s-hello__spark { top: auto; bottom: 14%; width: 76px; height: 76px; }
  .toolline { grid-template-columns: 1fr; padding-top: 0; padding-left: 2rem; }
  .toolline::before { left: 6px; top: 0; bottom: 0; width: 1px; height: auto; right: auto; }
  .toolline li::before { top: 0.2rem; left: -2rem; }
}

/* Phones held sideways: very little height, so only the essentials stay on the façade */
@media (max-height: 520px) and (orientation: landscape) {
  .entrance__meta, .entrance__scroll, .entrance__counter, .room-ui__hint { display: none; }
  .entrance__name { font-size: clamp(2rem, 9vh, 3rem); }
  .door-badge { width: 84px; height: 84px; top: 72%; }
  .door-badge > span { width: 42px; height: 42px; }
  .entrance__actions { width: min(240px, 40vw); gap: 0.45rem; }
  .act { height: 2.6rem; font-size: 0.66rem; }
  .entrance__caption { bottom: var(--gutter-b); max-width: 40vw; font-size: 1rem; }
  .hello { width: 64px; height: 64px; }
  .loader__name { --fs: clamp(2rem, 11vh, 3.4rem); top: 18px; }
  .loader__corner--tl, .loader__corner--bl, .loader__corner--br { display: none; }
  .loader__city { width: min(520px, 64vw); bottom: calc(24px + 4.2rem); }
  .loader__status { bottom: 18px; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
