/* Andrey Sabev — portfolio. Page chrome around the 3D studio. */
:root {
  --bg: #0b0c0e;
  --ink: #f2efe9;
  --muted: rgba(242, 239, 233, 0.62);
  --faint: rgba(242, 239, 233, 0.6);
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(20, 20, 21, 0.6);
  --card: rgba(27, 27, 26, 0.94);
  --accent: #a8c97a;
  --accent-hi: #bcd994;
  --accent-ink: #18210f;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gap: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 14.5px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
kbd { font: 500 10.5px var(--sans); padding: 2px 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.1); color: var(--muted); margin-left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------- stage */
#stage {
  position: fixed; inset: var(--gap); border-radius: 16px; overflow: hidden;
  background: #050506; isolation: isolate; overflow: clip;
}
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* --------------------------------------------------------------- HUD */
#hud {
  position: absolute; inset: 0 0 auto 0; z-index: 6; display: flex; justify-content: space-between; align-items: flex-start;
  padding: 26px 28px; pointer-events: none; gap: 20px;
  opacity: 0; transform: translateY(-8px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
#stage::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 220px; z-index: 5; pointer-events: none;
  background: linear-gradient(to bottom, rgba(6, 6, 8, 0.62), rgba(6, 6, 8, 0)); opacity: 0; transition: opacity 0.9s;
}
#stage.is-ready::before { opacity: 1; }
#stage.is-ready #hud { opacity: 1; transform: none; }
#stage[data-mode="os"] #hud, #stage[data-mode="to-os"] #hud,
#stage[data-mode="os"]::before, #stage[data-mode="to-os"]::before { opacity: 0; }
#stage[data-mode="os"] #hud *, #stage[data-mode="to-os"] #hud * { pointer-events: none !important; }
/* only the buttons catch the pointer: the empty parts of the header must not block the room */
#hud > * { pointer-events: none; }
#hud button { pointer-events: auto; }
#brand { max-width: min(760px, 62vw); transition: opacity 0.5s; }
#brand-name { font: 400 34px/1.05 var(--serif); letter-spacing: -0.01em; }
#tagline { margin-top: 7px; font-size: 13.5px; color: var(--muted); max-width: 64ch; }
#brand-head { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.7s var(--ease), opacity 0.45s, margin 0.7s var(--ease); margin-bottom: 14px; }
#brand-head > div { overflow: hidden; min-height: 0; }
#stage[data-mode="focus"] #brand-head { grid-template-rows: 0fr; opacity: 0; margin-bottom: 0; }
#chips { display: flex; flex-wrap: wrap; gap: 6px; }
#hud-right { display: flex; gap: 6px; flex: none; }
#stage[data-mode="bulb"] #brand, #stage[data-mode="to-bulb"] #brand { opacity: 0; pointer-events: none; }
#stage[data-mode="bulb"] #hud-right #btn-contact { display: none; }

.chip {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px;
  font: 500 12.5px/1 var(--sans); color: #ebe7e0; white-space: nowrap;
  background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.chip:hover, .chip.is-hover { background: rgba(48, 48, 50, 0.78); border-color: rgba(255, 255, 255, 0.2); }
.chip.is-hover:not(.is-active) { border-color: rgba(168, 201, 122, 0.5); }
.chip:active { transform: scale(0.97); }
.chip.is-active { background: rgba(168, 201, 122, 0.18); border-color: rgba(168, 201, 122, 0.75); color: #e2efcf; }
.chip.is-on { color: #e2efcf; border-color: rgba(168, 201, 122, 0.55); }
.chip.is-on::before, .os-pill.is-on::before { content: ""; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(168, 201, 122, 0.8); }
.chip-solid { background: var(--ink); color: #151515; border-color: transparent; font-weight: 600; }
.chip-solid:hover { background: #fff; border-color: transparent; }
.chip-back { display: none; color: var(--muted); }
#chips.has-focus .chip-back { display: inline-flex; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px; border-radius: 999px;
  border: 1px solid transparent; font: 600 13.5px/1 var(--sans); white-space: nowrap;
  transition: background 0.2s, transform 0.2s var(--ease), border-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hi); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.icon-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; padding: 0;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); color: var(--muted); font-size: 15px; line-height: 1;
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.15); color: var(--ink); }

/* ---------------------------------------------------------- hotspots */
#hotspots { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hotspot, .follow {
  position: absolute; left: 0; top: 0; translate: -50% -50%;
  opacity: 0; pointer-events: none; transition: opacity 0.35s;
  will-change: transform;
}
.hotspot.is-visible, .follow.is-visible { opacity: 1; pointer-events: auto; }
.hotspot { width: 34px; height: 34px; padding: 0; border: 0; background: none; display: grid; place-items: center; }
.hotspot i {
  width: 8px; height: 8px; border-radius: 50%; background: #fff; position: relative;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14), 0 0 12px rgba(255, 255, 255, 0.65);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.hotspot i::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.5);
  animation: ping 2.8s var(--ease) infinite;
}
.hotspot:nth-child(3n) i::after { animation-delay: 0.6s; }
.hotspot:nth-child(3n + 1) i::after { animation-delay: 1.3s; }
@keyframes ping { 0% { transform: scale(0.8); opacity: 0.8; } 70%, 100% { transform: scale(2.1); opacity: 0; } }
.hotspot span {
  position: absolute; left: 50%; bottom: calc(100% + 2px); translate: -50% 6px; opacity: 0;
  padding: 6px 11px; border-radius: 999px; font: 500 12px/1 var(--sans); white-space: nowrap; color: var(--ink);
  background: rgba(18, 18, 19, 0.88); border: 1px solid var(--line);
  transition: opacity 0.2s, translate 0.25s var(--ease); pointer-events: none;
}
.hotspot.is-hover i, .hotspot:hover i { transform: scale(1.35); box-shadow: 0 0 0 6px rgba(168, 201, 122, 0.35), 0 0 18px rgba(255, 255, 255, 0.9); }
.hotspot.is-hover span, .hotspot:hover span { opacity: 1; translate: -50% 0; }
#enter-pill { z-index: 4; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }

/* -------------------------------------------------------------- card */
#card {
  position: absolute; left: 28px; bottom: 28px; z-index: 7; width: min(410px, calc(100% - 56px));
  padding: 20px 22px 18px; border-radius: 18px; background: var(--card); border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease);
}
#card.is-open { opacity: 1; transform: none; pointer-events: auto; transition-delay: 0.25s; }
#card-close { position: absolute; top: 14px; right: 14px; }
#card-kicker { font-size: 12.5px; color: var(--muted); padding-right: 40px; }
#card-title { font: 400 38px/1.08 var(--serif); letter-spacing: -0.01em; margin-top: 6px; outline: none; }
#card-blurb { margin-top: 8px; color: #d8d4cc; font-size: 14.5px; }
#card-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
#card-nav { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- panel */
#panel {
  position: absolute; top: 12px; right: 12px; bottom: 12px; z-index: 8; width: min(540px, 46vw);
  background: rgba(21, 21, 20, 0.95); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 18px;
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  transform: translateX(calc(100% + 40px)); transition: transform 0.7s var(--ease); display: flex; flex-direction: column;
}
#panel.is-open { transform: none; }
#panel-close { position: absolute; top: 16px; right: 16px; z-index: 2; background: rgba(34, 34, 33, 0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
#panel-body { overflow-y: auto; padding: 30px 30px 26px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; overscroll-behavior: contain; }
#panel-body > * { animation: rise 0.6s var(--ease) both; }
#panel-body > *:nth-child(2) { animation-delay: 0.04s; } #panel-body > *:nth-child(3) { animation-delay: 0.08s; }
#panel-body > *:nth-child(4) { animation-delay: 0.12s; } #panel-body > *:nth-child(n + 5) { animation-delay: 0.16s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.panel-kicker { font-size: 12.5px; color: var(--muted); padding-right: 44px; }
#panel-body h2 { font: 400 46px/1.04 var(--serif); letter-spacing: -0.015em; margin-top: 8px; }
.panel-intro { margin-top: 14px; font-size: 15.5px; line-height: 1.55; color: #dedad2; }
#panel-body h3 { font: 500 12px/1 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); margin: 28px 0 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.stat { position: relative; padding: 16px 14px 13px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.stat b { display: block; font: 400 36px/1 var(--serif); letter-spacing: -0.01em; color: var(--ink); }
.stat span { display: block; margin-top: 8px; font-size: 12px; line-height: 1.3; color: var(--muted); }
.stat i, .tile-sample {
  font: 500 10px/1 var(--sans); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 6px; border-radius: 999px; color: var(--muted); border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(0, 0, 0, 0.25);
}
.stat i { display: inline-block; margin-top: 9px; }
.bullets, .os-bullets { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.bullets li, .os-bullets li { position: relative; padding-left: 20px; color: #dedad2; }
.bullets li::before, .os-bullets li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 6px 11px; border-radius: 999px; font-size: 12.5px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: #e4e0d8; }
.sample-note { margin-top: 14px; font-size: 12px; color: var(--faint); }
.panel-cta { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------- tiles */
.tiles { display: grid; gap: 10px; }
.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles-2 .tile:last-child:nth-child(odd) { grid-column: 1 / -1; } /* no lonely half-width tile at the end */
.tile {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 13px; overflow: hidden; isolation: isolate;
  background: #1b1b1a; color: #fff; text-align: left;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45); }
.tile-art {
  position: absolute; inset: 0; z-index: -1; transition: transform 0.7s var(--ease);
  background:
    radial-gradient(120% 90% at 12% 0%, hsl(var(--h) 85% 66% / 0.95), transparent 62%),
    radial-gradient(95% 85% at 100% 100%, hsl(calc(var(--h) + 55) 75% 50% / 0.9), transparent 60%),
    linear-gradient(160deg, hsl(calc(var(--h) + 20) 45% 24%), hsl(calc(var(--h) - 30) 50% 11%));
}
.tile:hover .tile-art { transform: scale(1.07); }
.tile-art i { position: absolute; display: block; }
.tile-art i:nth-child(1) { right: -14%; top: 12%; width: 62%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.45); }
.tile-art i:nth-child(2) { right: 8%; top: 28%; width: 30%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.85); mix-blend-mode: soft-light; }
.tile-art i:nth-child(3) { left: -10%; bottom: 34%; width: 80%; height: 1px; background: rgba(255, 255, 255, 0.4); transform: rotate(-24deg); transform-origin: left; }
.tile-num { position: absolute; left: 12px; top: 6px; font: 400 34px/1.1 var(--serif); color: rgba(255, 255, 255, 0.92); }
.tile-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.tile-meta { position: absolute; inset: auto 0 0 0; padding: 30px 12px 11px; display: flex; flex-direction: column; gap: 2px; background: linear-gradient(to top, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0)); }
.tile-meta b { font-weight: 600; font-size: 13px; line-height: 1.25; }
.tile-meta em { font-style: normal; font-size: 11.5px; color: rgba(255, 255, 255, 0.86); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65); }
.tile-meta b { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55); }
.tile-sample { position: absolute; top: 9px; right: 9px; color: #fff; border-color: rgba(255, 255, 255, 0.3); background: rgba(0, 0, 0, 0.64); }

/* ----------------------------------------------------- contact + misc */
.popover {
  position: absolute; top: 68px; right: 28px; z-index: 9; width: min(340px, calc(100% - 56px)); padding: 20px 20px 16px;
  border-radius: 16px; background: var(--card); border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  opacity: 0; transform: translateY(-8px) scale(0.98); transform-origin: top right; pointer-events: none;
  transition: opacity 0.25s, transform 0.3s var(--ease);
}
.popover.is-open { opacity: 1; transform: none; pointer-events: auto; }
.popover .icon-btn { position: absolute; top: 12px; right: 12px; }
.popover h3 { font: 400 28px/1.1 var(--serif); padding-right: 36px; }
.popover p { margin-top: 8px; color: #d8d4cc; font-size: 14px; }
.contact-list { margin-top: 14px; display: grid; }
.contact-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13.5px; }
.contact-row span { color: var(--muted); } .contact-row b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-row i { font-style: normal; color: var(--accent); transition: transform 0.2s; } .contact-row:hover i { transform: translate(2px, -2px); }
.contact-empty { margin-top: 14px !important; padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, 0.18); color: var(--muted) !important; font-size: 13px !important; }

#hint {
  position: absolute; right: 28px; bottom: 26px; z-index: 4; font-size: 12.5px; color: var(--faint); pointer-events: none;
  opacity: 0; transition: opacity 0.6s; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}
#stage.is-ready[data-mode="overview"] #hint, #stage.is-ready[data-mode="focus"] #hint { opacity: 1; }
#stage.panel-open #hint { opacity: 0 !important; }

#toast {
  position: absolute; left: 50%; bottom: 30px; z-index: 40; translate: -50% 12px; opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 999px; background: rgba(18, 18, 19, 0.94); border: 1px solid var(--line); font-size: 13px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); transition: opacity 0.3s, translate 0.35s var(--ease); max-width: calc(100% - 40px); text-align: center;
}
#toast.is-on { opacity: 1; translate: -50% 0; }

#fade { position: absolute; inset: 0; z-index: 35; background: #040405; opacity: 0; pointer-events: none; transition: opacity 0.46s ease; }
#fade.is-on { opacity: 1; pointer-events: auto; }

/* ---------------------------------------------------------- lightbox */
#lightbox {
  position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; padding: 56px 28px 40px;
  background: rgba(5, 5, 6, 0.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#lightbox.is-open { opacity: 1; pointer-events: auto; }
#lightbox-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; }
#lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: grid; gap: 12px; justify-items: center; }
#lightbox img, #lightbox video { max-width: 100%; max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); border-radius: 14px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7); background: #000; }
#lightbox figcaption { color: var(--muted); font-size: 13px; }

/* -------------------------------------------------------- bulb scene */
#bulb-ui { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0; transition: opacity 0.6s 0.2s; }
#stage[data-mode="bulb"] #bulb-ui { opacity: 1; }
#stage[data-mode="bulb"] #bulb-ui > * { pointer-events: auto; }
#stage[data-mode="bulb"] #hint, #stage[data-mode="to-bulb"] #hint { opacity: 0; }
#bulb-copy { position: absolute; left: 28px; top: 26px; max-width: 420px; }
#bulb-kicker { font-size: 12.5px; color: var(--muted); }
#bulb-title { font: 400 54px/1 var(--serif); letter-spacing: -0.015em; margin-top: 6px; }
#bulb-text { margin-top: 12px; color: #d8d4cc; font-size: 15px; line-height: 1.55; }
#bulb-back { position: absolute; left: 50%; top: 26px; translate: -50% 0; }
#bulb-controls { position: absolute; left: 28px; bottom: 28px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#bulb-note { font-size: 12.5px; color: var(--faint); }
.switch { gap: 9px; padding-left: 8px; height: 34px; }
.switch i { width: 30px; height: 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); position: relative; transition: background 0.25s; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #1a1a1a; transition: transform 0.3s var(--ease), background 0.25s; }
.switch[aria-checked="true"] i { background: var(--accent); }
.switch[aria-checked="true"] i::after { transform: translateX(12px); }
.switch[aria-checked="false"] i::after { background: #d9d5cd; }

/* ------------------------------------------------------------ loader */
#loader { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--bg); transition: opacity 1.1s ease, visibility 0s 1.1s; }
#loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-name { font: 400 clamp(38px, 6vw, 60px)/1 var(--serif); letter-spacing: -0.015em; }
#loader-text { margin-top: 12px; color: var(--muted); font-size: 13px; }
.loader-bar { display: block; width: 150px; height: 2px; margin: 22px auto 0; background: rgba(255, 255, 255, 0.1); border-radius: 2px; overflow: hidden; }
.loader-bar i { display: block; width: 40%; height: 100%; background: var(--accent); border-radius: 2px; animation: load 1.3s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

/* ============================================================ Studio OS */
#os { position: absolute; inset: 0; z-index: 30; opacity: 0; pointer-events: none; transition: opacity 0.75s ease; overflow: hidden; background: #0b0e3a; }
#os.is-open { opacity: 1; pointer-events: auto; }
#os:not(.is-open) *, .os-win:not(.is-open) { pointer-events: none !important; }
.os-wall { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.os-bar {
  position: absolute; left: 12px; right: 12px; top: 12px; height: 42px; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 0 6px 0 16px; border-radius: 21px; background: rgba(13, 13, 15, 0.72); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.os-bar-left, .os-bar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.os-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(168, 201, 122, 0.6); flex: none; }
.os-name { font: 400 21px/1 var(--serif); white-space: nowrap; }
.os-app { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-time { font-size: 13px; font-variant-numeric: tabular-nums; padding: 0 6px; color: #e9e5dd; }
.os-pill { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); font: 500 12.5px/1 var(--sans); white-space: nowrap; transition: background 0.2s; }
.os-pill:hover { background: rgba(255, 255, 255, 0.13); }
.os-pill.is-on { color: #e2efcf; border-color: rgba(168, 201, 122, 0.55); }
.os-clock { position: absolute; left: 64%; top: 11.5%; translate: -50% 0; text-align: center; pointer-events: none; text-shadow: 0 4px 40px rgba(0, 0, 0, 0.35); white-space: nowrap; }
.os-clock-time { font: 400 clamp(84px, 10.5vw, 168px)/0.95 var(--serif); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.os-clock-date { font: 400 clamp(20px, 2.1vw, 32px)/1.2 var(--serif); margin-top: 6px; color: rgba(246, 242, 234, 0.92); }
.os-windows { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.os-win {
  position: absolute; display: flex; flex-direction: column; pointer-events: auto; overflow: hidden;
  background: #1d1d1c; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 14px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(255, 255, 255, 0.04) inset;
  opacity: 0; transform: scale(0.96) translateY(10px); transition: opacity 0.22s, transform 0.28s var(--ease), box-shadow 0.2s;
}
.os-win.is-open { opacity: 1; transform: none; }
.os-win:focus:not(:focus-visible) { outline: none; }
.os-win:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.os-win.is-dragging { transition: none; box-shadow: 0 44px 110px rgba(0, 0, 0, 0.65); }
.os-win.is-max { left: 12px !important; top: 62px !important; width: calc(100% - 24px) !important; height: calc(100% - 150px) !important; }
.os-win-bar { position: relative; flex: none; height: 38px; display: grid; place-items: center; border-bottom: 1px solid rgba(255, 255, 255, 0.07); cursor: grab; touch-action: none; user-select: none; }
.os-win.is-dragging .os-win-bar { cursor: grabbing; }
.os-win-title { font: 400 17px/1 var(--serif); color: #e9e5dd; }
.os-lights { position: absolute; left: 14px; top: 50%; translate: 0 -50%; display: flex; gap: 12px; }
.tl { position: relative; width: 12px; height: 12px; border-radius: 50%; padding: 0; border: 0; background: #4a4a48; transition: filter 0.15s; }
.tl::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; } /* 24px hit area */
.os-win.is-front .tl-close { background: #e0685f; } .os-win.is-front .tl-min { background: #e0b45f; } .os-win.is-front .tl-max { background: #8fbf6a; }
.tl:hover { filter: brightness(1.25); }
.os-win-body { flex: 1; min-height: 0; position: relative; }
.os-win h2 { font: 400 30px/1.1 var(--serif); letter-spacing: -0.01em; }
.os-win .lead { font: 400 19px/1.35 var(--serif); margin-top: 8px; color: #ece8e0; }

.os-notes { display: grid; grid-template-columns: 150px 1fr; height: 100%; }
.os-notes nav { padding: 12px 8px; background: rgba(255, 255, 255, 0.03); border-right: 1px solid rgba(255, 255, 255, 0.06); display: flex; flex-direction: column; gap: 2px; }
.os-notes nav button { text-align: left; padding: 8px 12px; border-radius: 9px; border: 0; background: none; color: var(--muted); font-size: 13.5px; transition: background 0.15s, color 0.15s; }
.os-notes nav button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.os-notes nav button.is-on { background: rgba(168, 201, 122, 0.18); color: #e2efcf; }
.os-notes article { padding: 22px 26px 26px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
.os-notes article p { margin-top: 10px; color: #d8d4cc; font-size: 14px; }
.os-facts { margin: 18px 0 0; display: grid; }
.os-facts div { display: grid; grid-template-columns: 136px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); font-size: 13.5px; }
.os-facts dt { color: var(--muted); } .os-facts dd { margin: 0; color: #e9e5dd; }
.os-skill-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; }
.os-skill-list button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-align: left; padding: 10px 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.07); background: none; }
.os-skill-list b { font-weight: 500; font-size: 14px; } .os-skill-list span { grid-column: 1; font-size: 12.5px; color: var(--muted); }
.os-skill-list i { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-size: 12.5px; color: var(--accent); opacity: 0; translate: -6px 0; transition: opacity 0.2s, translate 0.25s var(--ease); }
.os-skill-list button:hover i, .os-skill-list button:focus-visible i { opacity: 1; translate: 0 0; }
.os-scratch { width: 100%; height: calc(100% - 56px); min-height: 180px; margin-top: 14px; resize: none; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.22); color: var(--ink); font: 400 14px/1.6 var(--sans); padding: 14px; }
.os-scratch:focus { border-color: rgba(168, 201, 122, 0.5); }
.os-scratch:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.os-work { display: flex; flex-direction: column; height: 100%; }
.os-url { flex: none; display: flex; align-items: center; gap: 10px; margin: 10px 14px 0; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.06); font-size: 12.5px; color: var(--muted); }
.os-url span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); } .os-url em { font-style: normal; }
.os-work-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px 24px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
.os-work .tiles { margin-top: 18px; } .os-bullets { margin-top: 20px; font-size: 14px; }

.os-term { position: absolute; inset: 0; overflow-y: auto; padding: 12px 14px 14px; background: #121416; font: 400 13px/1.55 var(--mono); color: #d9d5cd; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
.os-term .ln { white-space: pre-wrap; word-break: break-word; } .os-term .res { color: #c9c5bd; margin-bottom: 6px; }
.os-term b { font-weight: 500; color: var(--accent); } .os-term .d { color: #8fb4d8; } .os-term .f { color: #e9e5dd; }
.os-prompt { color: var(--accent); }
.os-term-line { display: flex; gap: 8px; align-items: baseline; margin-left: -8px; padding-left: 6px; border-left: 2px solid transparent; }
.os-term-line:focus-within { border-left-color: var(--accent); }
.os-term-line input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; caret-color: var(--accent); padding: 0; }
.neo { display: flex; gap: 22px; align-items: flex-start; } .neo pre { margin: 0; color: var(--accent); font: inherit; line-height: 1.3; }
.neo .sw { display: flex; margin-top: 8px; } .neo .sw i { width: 22px; height: 12px; display: block; }
.os-matrix { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.os-game { position: absolute; inset: 0; display: flex; flex-direction: column; background: #131517; }
.os-game canvas { display: block; flex: 1; min-height: 0; touch-action: none; cursor: none; }
.os-game canvas:focus-visible { outline-offset: -3px; }
.os-game-hud { flex: none; height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-size: 12.5px; color: var(--muted); border-top: 1px solid rgba(255, 255, 255, 0.06); font-variant-numeric: tabular-nums; }
.g-lives { color: #ff5f8f; }

.os-dock { position: absolute; left: 50%; bottom: 16px; translate: -50% 0; z-index: 6; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 20px; background: rgba(16, 16, 18, 0.7); border: 1px solid var(--line); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.os-dock button { position: relative; width: 46px; height: 46px; border-radius: 13px; border: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.06); display: grid; place-items: center; color: #ece8e0; transition: transform 0.25s var(--ease), background 0.2s; }
.os-dock button:hover { transform: translateY(-5px) scale(1.06); background: rgba(255, 255, 255, 0.14); }
.os-dock button.is-front { background: rgba(168, 201, 122, 0.2); color: #e2efcf; }
.os-dock svg { width: 23px; height: 23px; }
.os-dock button.is-running::after { content: ""; position: absolute; bottom: -6px; left: 50%; translate: -50% 0; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.os-dock-sep { width: 1px; height: 28px; background: rgba(255, 255, 255, 0.12); margin: 0 2px; }

/* ----------------------------------------------------------- fallback */
#fallback { display: none; }
.no-webgl { overflow: auto; }
.no-webgl #stage { display: none; }
.no-webgl #fallback { display: block; max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
#fallback h1 { font: 400 56px/1 var(--serif); } #fallback .lead { color: var(--accent); margin-top: 8px; }
#fallback > p { margin-top: 12px; color: var(--muted); }
#fallback article { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
#fallback h2 { font: 400 30px/1.1 var(--serif); } #fallback article p { margin-top: 8px; color: #d8d4cc; }
#fallback ul { margin: 10px 0 0; padding-left: 18px; color: #d8d4cc; }
#fallback h3 { font: 500 12px/1 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); margin: 20px 0 0; }
#fallback .fb-work span { color: var(--muted); }
.fb-top { display: flex; justify-content: flex-end; margin-bottom: 18px !important; }

/* --------------------------------------------------------- responsive */
@media (max-width: 1280px) and (min-width: 900.02px) {
  .chip { padding: 0 10px; font-size: 12px; }
}
@media (max-width: 900px) {
  /* quieter markers on small screens: the objects are the point */
  .hotspot i { width: 7px; height: 7px; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 0 8px rgba(255, 255, 255, 0.55); }
  .hotspot i::after { display: none; }
}
@media (pointer: coarse) {
  .chip { height: 40px; } .icon-btn { width: 40px; height: 40px; } .btn { height: 42px; } .switch, .os-pill { height: 40px; }
}
#hud { padding-left: max(28px, env(safe-area-inset-left)); padding-right: max(28px, env(safe-area-inset-right)); padding-top: max(26px, env(safe-area-inset-top)); }
#card { left: max(28px, env(safe-area-inset-left)); bottom: max(28px, env(safe-area-inset-bottom)); }
#bulb-copy, #bulb-controls { left: max(28px, env(safe-area-inset-left)); }
@media (min-width: 900.02px) {
  /* with the panel open the card keeps only its title and buttons: the panel says the rest */
  #stage.panel-open #card-blurb, #stage.panel-open #card-kicker { display: none; }
  #stage.panel-open #card-title { font-size: 24px; }
  #stage.panel-open #toast { left: calc((100% - min(540px, 46vw)) / 2); }
  /* the work panel sits below the header buttons and the chips make room for it */
  #panel { top: 70px; }
  #stage.panel-open #brand { max-width: calc(100% - min(540px, 46vw)); }
  /* the lamp has no chip of its own on desktop: it stays reachable by keyboard and shows up when focused */
  .chip-opt:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 1100px) {
  #brand-name { font-size: 30px; }
  #tagline { display: none; }
  #brand-head { margin-bottom: 12px; }
}
@media (max-width: 900px) {
  :root { --gap: 0px; }
  #stage { border-radius: 0; }
  #hud { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left)); flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  /* comfortable touch targets */
  .chip { height: 40px; padding: 0 15px; font-size: 13px; }
  .icon-btn { width: 40px; height: 40px; font-size: 17px; }
  .btn { height: 42px; }
  .hotspot { width: 44px; height: 44px; }
  .os-pill { height: 40px; }
  .switch { height: 40px; }
  #hud-right { justify-content: flex-end; }
  #brand { max-width: 100%; }
  #brand-head { margin-bottom: 10px; }
  #chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #chips::-webkit-scrollbar { display: none; }
  /* a soft edge on the right shows that the strip scrolls */
  #chips { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); }
  #card { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); width: auto; padding: 16px 16px 14px; }
  #card-kicker { padding-right: 48px; }
  #card-title { font-size: 30px; }
  #hint { left: 16px; right: 16px; bottom: max(22px, env(safe-area-inset-bottom)); text-align: center; }
  #stage[data-mode="focus"] #hint { display: none; }
  #panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: min(64%, 560px); border-radius: 20px 20px 0 0; transform: translateY(105%); box-shadow: 0 -30px 90px rgba(0, 0, 0, 0.6); }
  #panel-body { padding: 26px 18px max(22px, env(safe-area-inset-bottom)); }
  .panel-kicker { padding-right: 52px; }
  #toast { bottom: max(30px, env(safe-area-inset-bottom)); }
  .os-dock { bottom: max(16px, env(safe-area-inset-bottom)); }
  #panel-body h2 { font-size: 36px; }
  .stat b { font-size: 28px; }
  .popover { right: max(12px, env(safe-area-inset-right)); top: calc(62px + env(safe-area-inset-top)); }
  #lightbox-close { top: max(18px, env(safe-area-inset-top)); }
  .os-bar { top: max(12px, env(safe-area-inset-top)); }
  #bulb-copy { left: 16px; top: calc(120px + env(safe-area-inset-top)); right: 16px; } #bulb-title { font-size: 40px; }
  #bulb-back { left: 16px; top: calc(66px + env(safe-area-inset-top)); translate: none; } #bulb-back kbd { display: none; } #bulb-controls { left: 16px; bottom: max(18px, env(safe-area-inset-bottom)); }
  .os-bar .os-app { display: none; }

  .os-clock { left: 50%; top: 13%; }
}
@media (max-width: 900px) and (min-height: 521px) and (max-height: 700px) {
  #panel { height: 46%; } /* a shorter sheet on small tablets, so the object stays in view */
}
@media (max-width: 900px) and (max-height: 520px) {
  #brand-head { display: none; }
  #hud { flex-direction: row; align-items: center; padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: 4px; gap: 8px; }
  #brand { flex: 1; min-width: 0; }
  #chips { margin: 0 0 0 -16px; }
  #hint { display: none; }
  #card { padding: 10px 14px 10px; } #card-kicker { display: none; } #card-close { top: 8px; right: 8px; } #card-title { padding-right: 46px; } #card-blurb { display: none; } #card-title { font-size: 24px; margin-top: 2px; } #card-actions { margin-top: 8px; }
  /* short, wide screens (landscape phones): the work panel is a side sheet, like on desktop */
  #panel { top: calc(env(safe-area-inset-top) + 66px); bottom: 12px; left: auto; right: max(12px, env(safe-area-inset-right)); width: min(50%, 460px); height: auto; border-radius: 18px; transform: translateX(calc(100% + 40px)); box-shadow: -30px 0 90px rgba(0, 0, 0, 0.5); }
  #panel.is-open { transform: none; }
  #stage.panel-open #card-blurb, #stage.panel-open #card-kicker { display: none; }
  #stage.panel-open #card { right: calc(min(50%, 460px) + 24px); } /* the card stays clear of the side sheet */
  #bulb-copy { top: 70px; max-width: 46%; } #bulb-title { font-size: 34px; } #bulb-text { font-size: 13.5px; }
}
@media (max-width: 760px) {
  .os-win { left: 8px !important; right: 8px; top: calc(62px + env(safe-area-inset-top)) !important; width: auto !important; height: calc(100% - 150px) !important; }
  .os-win-bar { cursor: default; }
  .os-notes { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .os-notes nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
  .os-exit kbd, .os-time { display: none; }
  .os-bar { height: 50px; border-radius: 25px; }
  .tl { width: 14px; height: 14px; } .tl::before { inset: -13px; } .os-lights { gap: 24px; }
  .os-notes nav button { min-height: 40px; }
  .tiles-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .neo { flex-direction: column; gap: 8px; }
}
@media (max-width: 359px) {
  .os-bar .os-name { display: none; }
}
@media (max-width: 399px) {
  .os-bar-right { gap: 6px; }
  .os-pill { padding: 0 9px; font-size: 12px; }
}
@media (max-width: 420px) {
  .os-notes nav button { white-space: nowrap; padding: 8px 10px; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .stat b { font-size: 24px; }
  #hud-right { flex-wrap: wrap; row-gap: 6px; }
}
@media (max-height: 560px) and (min-width: 900.02px) {
  #tagline { display: none; }
  #card-title { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; transition-delay: 0s !important; }
  .hotspot i::after { display: none; }
}

/* ------------------------------------------- panel: tables, services, steps */
#panel-body h4 { font: 500 14px/1.3 var(--sans); color: var(--ink); margin: 0 0 8px; }
#panel-body h4 i { font: 500 9.5px/1 var(--sans); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 6px; margin-left: 6px; border-radius: 999px; color: var(--muted); border: 1px solid rgba(255, 255, 255, 0.16); vertical-align: 1px; }
.tbl-wrap { margin-bottom: 18px; }
.tbl-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.35; }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); font-weight: 400; }
.tbl thead th { border-top: 0; font: 500 10.5px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); background: rgba(255, 255, 255, 0.03); }
.tbl tbody th { color: #e4e0d8; }
.tbl td { color: var(--muted); font-variant-numeric: tabular-nums; }
.tbl td.emph { color: var(--accent); font-weight: 600; }
.tbl-note { margin-top: 7px; font-size: 11.5px; color: var(--faint); }
.services { display: grid; gap: 10px; }
.service { padding: 15px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.service h4 { font: 400 22px/1.15 var(--serif); letter-spacing: -0.005em; margin-bottom: 6px; }
.service p { font-size: 13.5px; color: #dedad2; }
.service p + p { margin-top: 8px; }
.service .service-get, .service .service-ex { font-size: 12.5px; color: var(--muted); }
.service b { font-weight: 500; color: var(--accent); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { position: relative; display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; padding: 0 0 18px; }
.steps li::before { content: ""; position: absolute; left: 13.5px; top: 28px; bottom: 2px; width: 1px; background: var(--line); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::before { display: none; }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 500 12px/1 var(--sans); color: var(--accent-ink); background: var(--accent); }
.steps b { font-weight: 500; font-size: 14px; }
.steps p { margin-top: 2px; font-size: 13px; color: var(--muted); }
.steps em { font-style: normal; font-size: 11.5px; color: var(--muted); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.cta-box { margin-top: 28px; padding: 22px 22px 20px; border-radius: 16px; background: linear-gradient(160deg, rgba(168, 201, 122, 0.16), rgba(168, 201, 122, 0.04)); border: 1px solid rgba(168, 201, 122, 0.35); }
#panel-body .cta-box h3 { font: 400 28px/1.12 var(--serif); letter-spacing: -0.01em; text-transform: none; color: var(--ink); margin: 0; }
.cta-box p { margin: 8px 0 16px; font-size: 14px; color: #dedad2; }
.case { width: min(560px, 100%); padding: 28px 28px 24px; border-radius: 18px; background: var(--card); border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7); text-align: left; max-height: calc(100vh - 190px); overflow-y: auto; }
.case-meta { font-size: 12.5px; color: var(--muted); }
.case h3 { font: 400 38px/1.08 var(--serif); letter-spacing: -0.01em; margin: 6px 0 16px; }
.case dl { margin: 0; display: grid; }
.case dl div { padding: 12px 0; border-top: 1px solid var(--line); }
.case dt { font: 500 11px/1 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.case dd { margin: 0; font-size: 14.5px; line-height: 1.55; color: #e4e0d8; }
.case-sample { margin-top: 14px; font-size: 12px; color: var(--faint); }
@media (max-width: 900px) {
  .steps li { grid-template-columns: 28px 1fr; } .steps em { grid-column: 2; justify-self: start; }
  .case { padding: 22px 18px 18px; } .case h3 { font-size: 30px; }
}
.cta-box .btn { max-width: 100%; height: auto; min-height: 36px; padding: 10px 18px; white-space: normal; text-align: center; line-height: 1.25; }

/* ------------------------------------------------ case-study popup extras */
.btn-sm { height: 30px; padding: 0 13px; font-size: 12.5px; margin-top: 9px; }
.case-tag { font: 400 20px/1.25 var(--serif); font-style: italic; color: #e4e0d8; margin: -8px 0 16px; }
.case-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.case-metrics div { padding: 12px 10px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.case-metrics b { display: block; font: 400 26px/1 var(--serif); letter-spacing: -0.01em; color: var(--accent); }
.case-metrics span { display: block; margin-top: 6px; font-size: 11px; line-height: 1.25; color: var(--muted); }
.case-reels { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.case-reels p { font: 500 11px/1 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.case-reels > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.case-reels video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: #000; }
#lightbox .case { width: min(620px, 100%); }
@media (max-width: 560px) {
  .case-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.tile-wide { grid-column: 1 / -1; }

/* ------------------------------------------- ads: campaign cards, chart, proofs */
.adcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.adcard { position: relative; overflow: hidden; padding: 14px 14px 13px; border-radius: 16px; border: 1px solid hsl(var(--p) 60% 60% / 0.28);
  background: radial-gradient(120% 80% at 0% 0%, hsl(var(--p) 70% 55% / 0.26), transparent 60%), linear-gradient(170deg, hsl(var(--p) 30% 16% / 0.9), rgba(24, 24, 24, 0.9)); }
.adcard header { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.adcard header b { font-weight: 500; }
.adcard header em { margin-left: auto; font: 500 10px/1 var(--sans); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; color: #d9efbd; background: rgba(168, 201, 122, 0.16); border: 1px solid rgba(168, 201, 122, 0.4); }
.adcard-dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--p) 80% 65%); box-shadow: 0 0 10px hsl(var(--p) 80% 60%); }
.adcard-name { margin-top: 6px; font-size: 12px; color: var(--muted); }
.adcard-hero { display: flex; align-items: baseline; gap: 7px; margin: 10px 0 12px; }
.adcard-hero strong { font: 400 56px/0.95 var(--serif); letter-spacing: -0.02em; }
.adcard-hero span { font-size: 12.5px; color: var(--muted); }
.adcard dl { margin: 0; display: grid; }
.adcard dl div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 12px; }
.adcard dt { color: var(--muted); } .adcard dd { margin: 0; font-variant-numeric: tabular-nums; color: #ece8e0; }
.adcard-bar { margin-top: 10px; }
.adcard-bar i { display: block; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.1); position: relative; overflow: hidden; }
.adcard-bar i::after { content: ""; position: absolute; inset: 0; width: calc(var(--w) * 100%); border-radius: 5px; background: linear-gradient(90deg, hsl(var(--p) 80% 62%), hsl(calc(var(--p) + 40) 85% 70%)); transform-origin: left; animation: grow 1s var(--ease) 0.2s both; }
.adcard-bar span { display: block; margin-top: 6px; font-size: 11px; color: var(--faint); }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.chart { padding: 16px 16px 8px; border-radius: 16px; border: 1px solid rgba(254, 44, 85, 0.25);
  background: radial-gradient(110% 90% at 100% 0%, hsl(var(--p) 85% 55% / 0.2), transparent 60%), linear-gradient(170deg, rgba(34, 22, 28, 0.9), rgba(22, 22, 22, 0.9)); }
.chart-title { font: 500 11px/1 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.chart ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.chart li { display: grid; grid-template-columns: 62px 1fr; gap: 4px 12px; align-items: center; }
.chart-label { font-size: 12.5px; color: #e4e0d8; font-variant-numeric: tabular-nums; }
.chart-bar { position: relative; height: 30px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.chart-bar i { position: absolute; inset: 0; width: calc(var(--w) * 100%); border-radius: 8px; background: linear-gradient(90deg, #fe2c55, #ff7a8a 55%, #25f4ee); transform-origin: left; animation: grow 1.1s var(--ease) var(--d) both; }
.chart-bar b { position: absolute; right: 10px; top: 50%; translate: 0 -50%; font: 400 22px/1 var(--serif); color: #fff; text-shadow: 0 0 8px rgba(0, 0, 0, 0.85), 0 1px 2px rgba(0, 0, 0, 0.9); }
.chart-sub { grid-column: 2; margin-top: -2px; font-size: 11.5px; color: var(--muted); }
.chart li:last-child { padding-bottom: 8px; }
.proofs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.proof { display: block; padding: 0; overflow: hidden; text-align: left; border-radius: 14px; border: 1px solid hsl(var(--p) 55% 60% / 0.3); background: linear-gradient(170deg, hsl(var(--p) 25% 15%), #181818); transition: transform 0.35s var(--ease), box-shadow 0.35s; }
.proof:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45); }
.proof img { display: block; width: 100%; height: 92px; object-fit: cover; object-position: left top; opacity: 0.9; border-bottom: 1px solid rgba(255, 255, 255, 0.08); filter: saturate(0.9); }
.proof span { display: block; padding: 10px 12px 11px; }
.proof b { display: block; font-weight: 500; font-size: 13px; }
.proof em { display: block; margin-top: 2px; font-style: normal; font-size: 11.5px; color: var(--muted); }
@media (max-width: 560px) { .adcards, .proofs { grid-template-columns: 1fr; } }

/* service cards: two per row, with a small accent mark and a lift on hover */
.services { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.service { position: relative; overflow: hidden; transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s; }
.service::before { content: ""; position: absolute; left: 16px; top: 0; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); transition: width 0.45s var(--ease); }
.service:hover { transform: translateY(-3px); border-color: rgba(168, 201, 122, 0.35); background: rgba(168, 201, 122, 0.06); }
.service:hover::before { width: 60px; }

/* ------------------------------------------------ currently learning */
.learns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 4px; }
.learn { position: relative; padding: 16px 16px 15px; border-radius: 18px; overflow: hidden;
  border: 1px dashed hsl(var(--p) 55% 62% / 0.45);
  background: radial-gradient(120% 70% at 0% 0%, hsl(var(--p) 60% 50% / 0.18), transparent 60%), rgba(255, 255, 255, 0.03);
  animation: rise 0.7s var(--ease) var(--d) both; }
.learn::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(255, 255, 255, 0.035) 23px 24px); }
.learn header { display: flex; gap: 12px; align-items: center; }
.learn-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: hsl(var(--p) 40% 30% / 0.5); border: 1px solid hsl(var(--p) 60% 65% / 0.35); }
.learn-icon svg { width: 30px; height: 30px; fill: none; stroke: hsl(var(--p) 75% 75%); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.learn-icon svg .fill { fill: hsl(var(--p) 75% 75%); stroke: none; }
.learn h4 { font: 400 26px/1.05 var(--serif) !important; margin: 0 0 6px !important; }
.learn-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px; font: 500 11px/1.2 var(--sans); letter-spacing: 0.04em; color: #e2efcf; background: rgba(168, 201, 122, 0.14); border: 1px solid rgba(168, 201, 122, 0.4); }
.learn-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(168, 201, 122, 0.7); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(168, 201, 122, 0.6); } 100% { box-shadow: 0 0 0 8px rgba(168, 201, 122, 0); } }
.learn-meter { list-style: none; margin: 16px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.learn-meter li { display: grid; gap: 6px; }
.learn-meter i { display: block; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.09); position: relative; overflow: hidden; }
.learn-meter li.on i { background: linear-gradient(90deg, hsl(var(--p) 70% 58%), var(--accent)); }
.learn-meter li.here + li i::after { content: ""; position: absolute; inset: 0; width: 35%; border-radius: 6px; background: linear-gradient(90deg, rgba(168, 201, 122, 0.45), rgba(168, 201, 122, 0)); animation: inch 2.4s ease-in-out infinite; }
@keyframes inch { 0%, 100% { width: 12%; } 50% { width: 40%; } }
.learn-meter span { font-size: 9.5px; line-height: 1.2; color: var(--faint); letter-spacing: 0.02em; }
.learn-meter li.here span { color: #e2efcf; font-weight: 600; }
.learn-label { margin-top: 14px; font: 500 10.5px/1 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); }
.learn-now { list-style: none; margin: 9px 0 0; padding: 0; display: grid; gap: 6px; }
.learn-now li { position: relative; padding-left: 18px; font-size: 13px; line-height: 1.4; color: #dedad2; }
.learn-now li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 8px; height: 8px; border-radius: 3px; border: 1.5px solid hsl(var(--p) 60% 65%); }
.learn-next { position: relative; margin-top: 13px; padding-top: 11px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; color: #e8e4dc; }
.learn-next b { font-weight: 500; color: var(--accent); }
.learn-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.learn-note span { color: var(--accent); margin-right: 4px; animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

/* ------------------------------------------------------- views counter */
.views { position: relative; overflow: hidden; padding: 22px 20px 18px; border-radius: 20px; isolation: isolate;
  border: 1px solid rgba(168, 201, 122, 0.3);
  background: radial-gradient(140% 90% at 100% 0%, rgba(168, 201, 122, 0.16), transparent 55%), linear-gradient(170deg, rgba(34, 38, 28, 0.95), rgba(20, 20, 20, 0.95)); }
.views-glow { position: absolute; z-index: -1; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(168, 201, 122, 0.22); filter: blur(50px); animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.25); opacity: 0.6; } }
.views-spark { position: absolute; z-index: -1; left: 0; right: 0; bottom: 64px; width: 100%; height: 90px; opacity: 0.9; }
.views-spark .area { fill: url(#vsg); opacity: 0; animation: fadein 1.2s ease 1.2s forwards; }
.views-spark .line { fill: none; stroke: #a8c97a; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 2.6s cubic-bezier(.2, .8, .2, 1) 0.3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
.views-tag { display: flex; align-items: center; gap: 7px; font: 500 10.5px/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.views-tag i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--accent); animation: pulse 1.8s ease-out infinite; }
.views-num { margin-top: 10px; font: 400 clamp(46px, 7vw, 66px)/1 var(--serif); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: #f4f1ea; text-shadow: 0 0 30px rgba(168, 201, 122, 0.25); white-space: nowrap; }
.views-num .is-done { color: #e9f3db; transition: color 0.6s; }
.views-label { margin-top: 6px; font-size: 13.5px; color: #dedad2; }
.views-minis { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 56px; }
.views-mini { padding: 11px 11px 10px; border-radius: 12px; background: rgba(10, 10, 10, 0.45); border: 1px solid rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.views-mini b { display: block; font: 400 26px/1 var(--serif); color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.views-mini > span { display: block; margin-top: 6px; font-size: 11px; line-height: 1.3; color: var(--muted); }
.chart-bar i { min-width: 8px; }
@media (max-width: 560px) { .views-minis { grid-template-columns: 1fr 1fr; } .views-mini:last-child { grid-column: 1 / -1; } }

/* ------------------------------------------------ hover interactivity */
.stat, .service, .adcard, .learn, .views-mini, .views, .tile, .tbl-wrap, .proof, .steps li, .chart {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s; transform-style: preserve-3d; }
.is-tilt { transform: perspective(800px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)) translateY(-2px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(168, 201, 122, 0.25); }
.is-tilt::selection { background: transparent; }
.stat, .views-mini, .tbl-wrap, .steps li { position: relative; }
.stat.is-tilt::after, .views-mini.is-tilt::after, .adcard.is-tilt::after, .tbl-wrap.is-tilt::after, .proof.is-tilt::after, .service.is-tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.09), transparent 60%); }
.chart ol:hover li { opacity: 0.45; transition: opacity 0.25s; }
.chart ol li { transition: opacity 0.25s; }
.chart ol li:hover { opacity: 1; }
.chart li:hover .chart-bar i { filter: brightness(1.15) saturate(1.2); }
.views-num { cursor: pointer; display: inline-block; }
.views-num:hover { text-shadow: 0 0 40px rgba(168, 201, 122, 0.5); }
.views-num:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 8px; }
.views-num span { display: inline-block; }
.views-num span.bump { animation: bump 0.6s var(--ease); }
@keyframes bump { 0% { transform: translateY(0); color: #f4f1ea; } 30% { transform: translateY(-4px); color: #c9e3a3; } 100% { transform: translateY(0); color: #e9f3db; } }
.views-live { margin-right: 8px; padding: 2px 7px; border-radius: 999px; font-weight: 600; color: #18210f; background: var(--accent); letter-spacing: 0.08em; }
.views-today { margin-top: 4px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.views-today span { color: var(--accent); font-weight: 600; }
.tiles-wrap { gap: 26px; }
.work-group h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 600 12px/1 inherit; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.82); }
.work-group h4::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.22), transparent); }
.work-group h4 span { order: 2; font-size: 11px; padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); letter-spacing: 0; }
.work-group h4::after { order: 3; }
.tiles-tall.tiles-2 .tile, .tiles-tall.tiles-1 .tile { aspect-ratio: 4 / 5 !important; }
.tiles-tall.tiles-3 .tile { aspect-ratio: 9 / 16 !important; }
.tiles-land .tile { aspect-ratio: 16 / 9 !important; grid-column: auto !important; }

/* "built from scratch" case study (Web panel) */
.built { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.built-hero { position: relative; overflow: hidden; padding: 22px 22px 20px; border-radius: 16px; border: 1px solid rgba(255,255,255,.1);
  background: radial-gradient(120% 90% at 100% 0%, rgba(150,110,255,.28), transparent 60%), radial-gradient(90% 80% at 0% 100%, rgba(255,150,80,.18), transparent 60%), rgba(255,255,255,.03); }
.built-hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, #000, transparent 85%); pointer-events: none; }
.built-badge { position: relative; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; background: rgba(168,201,122,.16); color: #c6e39c; }
.built-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #a8c97a; box-shadow: 0 0 0 0 rgba(168,201,122,.6); animation: builtPulse 1.8s infinite; }
@keyframes builtPulse { 70% { box-shadow: 0 0 0 8px rgba(168,201,122,0); } 100% { box-shadow: 0 0 0 0 rgba(168,201,122,0); } }
.built-hero strong { position: relative; display: block; margin: 14px 0 8px; font: 400 26px/1.15 var(--serif); }
.built-hero p { position: relative; margin: 0; font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.78); }
.built-facts { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.built-facts div { padding: 12px; border-radius: 12px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.07); }
.built-facts b { display: block; font: 400 24px/1 var(--serif); }
.built-facts span { display: block; margin-top: 6px; font-size: 11.5px; color: rgba(255,255,255,.64); }
.built-stack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; position: relative; }
.built-stack li { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); border-left: 3px solid hsl(var(--p) 70% 62%); opacity: 0; animation: builtIn .5s ease forwards; animation-delay: var(--d); transition: background .2s, transform .2s; }
.built-stack li:hover { background: hsl(var(--p) 60% 50% / .12); transform: translateX(4px); }
@keyframes builtIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.built-n { font: 400 22px/1 var(--serif); color: hsl(var(--p) 75% 70%); }
.built-stack b { font-size: 14px; font-weight: 600; }
.built-stack p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,.66); }
.built-stack em { font-style: normal; font-size: 11px; white-space: nowrap; padding: 4px 9px; border-radius: 99px; background: hsl(var(--p) 60% 50% / .16); color: hsl(var(--p) 80% 80%); }
@media (max-width: 520px) { .built-stack li { grid-template-columns: auto 1fr; } .built-stack em { grid-column: 2; justify-self: start; } .built-facts { grid-template-columns: 1fr 1fr 1fr; } }

/* sound menu */
.sound-menu { right: 200px; width: min(330px, calc(100% - 32px)); }
.sound-menu h3 { font-size: 26px; }
.sound-menu > div > p { margin: 4px 0 14px; color: rgba(255,255,255,.62); font-size: 13px; }
.snd-opts { display: flex; flex-direction: column; gap: 6px; }
.snd-opt, .snd-switch { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.03); transition: background .2s, border-color .2s, transform .2s; }
.snd-opt:hover, .snd-switch:hover { background: rgba(255,255,255,.07); transform: translateX(2px); }
.snd-opt:focus-visible, .snd-switch:focus-visible, .snd-off:focus-visible { outline: 2px solid #a8c97a; outline-offset: 2px; }
.snd-opt.is-on { border-color: rgba(168,201,122,.55); background: rgba(168,201,122,.1); }
.snd-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.06); }
.snd-opt.is-on .snd-ico { background: rgba(168,201,122,.22); color: #cfe8a8; }
.snd-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.snd-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.snd-txt b { font-size: 13.5px; font-weight: 600; }
.snd-txt em { font-style: normal; font-size: 11.5px; color: rgba(255,255,255,.58); }
.snd-check { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.25); }
.snd-opt.is-on .snd-check { border-color: #a8c97a; background: radial-gradient(circle, #a8c97a 45%, transparent 50%); }
.snd-eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; width: 18px; }
.snd-eq i, .snd-chip-eq i { flex: 1; height: 30%; border-radius: 1px; background: rgba(255,255,255,.3); }
.snd-opt.is-on .snd-eq i { background: #a8c97a; animation: sndEq 1.1s ease-in-out infinite; }
.snd-eq i:nth-child(2), .snd-chip-eq i:nth-child(2) { animation-delay: -.4s !important; }
.snd-eq i:nth-child(3), .snd-chip-eq i:nth-child(3) { animation-delay: -.7s !important; }
.snd-eq i:nth-child(4) { animation-delay: -.2s !important; }
@keyframes sndEq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.snd-vol { display: flex; flex-direction: column; gap: 8px; margin: 12px 2px 4px; font-size: 12px; color: rgba(255,255,255,.7); }
.snd-vol[hidden] { display: none; }
.snd-vol input { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; cursor: pointer; background: linear-gradient(90deg, #a8c97a calc(var(--v) * 100%), rgba(255,255,255,.14) 0); }
.snd-vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #f3efe6; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.snd-vol input::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #f3efe6; }
.snd-switch { margin-top: 10px; }
.snd-toggle { flex: none; position: relative; width: 36px; height: 20px; border-radius: 99px; background: rgba(255,255,255,.16); transition: background .2s; }
.snd-toggle i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.snd-switch[aria-checked="true"] .snd-toggle { background: #a8c97a; }
.snd-switch[aria-checked="true"] .snd-toggle i { transform: translateX(16px); }
.snd-off { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; margin-top: 12px; padding: 9px; border-radius: 10px; text-align: center; font-size: 12.5px; color: rgba(255,255,255,.65); border: 1px dashed rgba(255,255,255,.16); transition: color .2s, border-color .2s; }
.snd-off:hover { color: #ff9b8a; border-color: rgba(255,155,138,.5); }
.snd-chip-eq { display: none; align-items: flex-end; gap: 2px; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; }
#btn-sound.is-on .snd-chip-eq { display: inline-flex; }
#btn-sound.is-on .snd-chip-eq i { background: currentColor; animation: sndEq 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .snd-eq i, .snd-chip-eq i { animation: none !important; height: 60% !important; } }
@media (max-width: 700px) { .sound-menu { right: 12px; } }

/* bento for 5 (or 8, 11...) portrait pieces: two featured tiles, then rows of three */
.tiles-bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tiles-bento .tile { grid-column: span 2; aspect-ratio: 9 / 16 !important; }
.tiles-bento .tile:nth-child(-n+2) { grid-column: span 3; aspect-ratio: 4 / 5 !important; }
.tiles-bento .tile:nth-child(-n+2) .tile-meta b { font-size: 17px; }
.tiles-bento .tile:nth-child(-n+2) .tile-growth b { font-size: 22px; }
.tiles-bento .tile:nth-child(-n+2) .tile-media { object-position: center 30%; }
/* growth badge */
.tile-growth { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; align-items: flex-start; padding: 7px 10px 6px; border-radius: 10px; background: rgba(12,14,10,.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(168,201,122,.35); box-shadow: 0 6px 18px rgba(0,0,0,.35); transition: transform .3s var(--ease); }
.tile-growth b { font: 400 18px/1 var(--serif); color: #cfe8a8; }
.tile-growth b::before { content: '↗ '; font-family: system-ui, sans-serif; font-size: .7em; opacity: .85; }
.tile-growth span { margin-top: 3px; font-size: 10px; letter-spacing: .04em; color: rgba(255,255,255,.7); }
.tile:hover .tile-growth { transform: translateY(-2px) scale(1.04); }
.tile:hover .tile-meta { background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,0)); }
