/* ── Theme Variables ────────────────────────────────── */
:root {
  --bg: #FCFBF2;
  --text: #000000;
  --text-secondary: #787878;
  --search-bg: linear-gradient(90deg,
    rgba(255,255,255,0.5) 13%,
    rgba(235,238,255,0.5) 29%,
    rgba(255,255,255,0.5) 100%);
  --search-border: #ddd;
  --slider-right: #ccc;
  --badge-current-bg: #1040f2;
  --badge-current-text: #fff;
  --border-color: #E1E5E8;
  --dot-color: rgba(0,0,0,0.06);
}

/* Dark themes (white text) */
[data-theme-mode="dark"] {
  --text: #ffffff;
  --text-secondary: rgba(255,255,255,0.65);
  --search-bg: rgba(255,255,255,0.22);
  --search-border: rgba(255,255,255,0.32);
  --slider-right: rgba(255,255,255,0.3);
  --badge-current-bg: #ffffff;
  --badge-current-text: #000000;
  --dot-color: rgba(255,255,255,0.1);
}

/* Light themes (black text) */
[data-theme-mode="light"] {
  --text: #000000;
  --text-secondary: rgba(0,0,0,0.55);
  --search-bg: rgba(255,255,255,0.55);
  --search-border: rgba(0,0,0,0.12);
  --slider-right: rgba(0,0,0,0.2);
  --badge-current-bg: #000000;
  --badge-current-text: #ffffff;
  --dot-color: rgba(0,0,0,0.08);
}

[data-theme="terracotta"] {
  --bg: #D9633B;
  --border-color: #B14A26;
}

[data-theme="ochre"] {
  --bg: #D89B3A;
  --border-color: #B27722;
}

[data-theme="cobalt"] {
  --bg: #123FF2;
  --border-color: #0B2FB8;
}

[data-theme="olive"] {
  --bg: #7A8450;
  --border-color: #5D6638;
}

[data-theme="putty"] {
  --bg: #D4C4A8;
  --border-color: #AA9B7F;
}

[data-theme="lime"] {
  --bg: #B5C943;
  --border-color: #8EA228;
}

/* ── Reset & Base ───────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  overflow: auto;
  transition: background 0.5s ease, color 0.5s ease;
  height: 100%;
  /* Breathing room for fixed bottom controls; tightened on small viewports in controls section */
  scroll-padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 56px);
}

body {
  min-height: 100%;
  position: relative;
  border: none;
  border-radius: 40px;
  transition: border-color 0.5s ease;
}

.map-canvas {
  position: relative;
  /* Fixed artboard — pan/scroll the viewport on any screen size; no breakpoint layout shifts */
  width: 2680px;
  height: 1500px;
  cursor: grab;
  --page-sheet-width: 1728px;
  /* Hero / piano / footer nav math (inherited by .page descendants) */
  --hero-name-top-offset: 90px;
  --piano-clearance-north-of-header: 100px;
  --piano-widget-outer-height: 188px;
  /* Horizontal: inset from left edge of centered .page sheet */
  --piano-offset-from-page-left: 240px;
  --play-svg-gap-below-piano: 20px;
  /* Match desktop .page height so piano lines up with centered sheet */
  --page-block-height-desktop: 1117px;
  --page-hero-header-bottom: calc(var(--hero-name-top-offset) + (120px * 2) + 12px + (12px * 0.96));
}

.draw-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

body.is-drawing-enabled .map-canvas {
  cursor: crosshair;
}

body.is-panning {
  user-select: none;
  cursor: grabbing;
}

body.is-panning .map-canvas {
  cursor: grabbing;
}

body::before {
  content: '';
  position: fixed;
  inset: 10px;
  border-radius: 30px;
  background-image: radial-gradient(circle, var(--dot-color) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
  transition: background 0.5s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

input {
  border: none;
  outline: none;
  background: none;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
}

/* ── Page Layout ───────────────────────────────────── */
.page {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: var(--page-sheet-width);
  height: 1117px;
  margin: 0;
  border-radius: 40px;
  overflow: visible;
}

.hero-name {
  font-weight: 900;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 120px;
  line-height: 1;
  letter-spacing: 0px;
  color: var(--text);
  text-align: center;
  position: absolute;
  left: 0;
  right: 0;
  top: var(--hero-name-top-offset);
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  transition: color 0.5s ease;
}

.hero-name-n {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.hero-name-pop {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 196px;
  height: auto;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-7deg) scale(0.94);
  border-radius: 16px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
  z-index: 12;
}

.hero-name-n:hover .hero-name-pop {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-7deg) scale(1);
}

.hero-name-o {
  position: relative;
  display: inline-block;
  cursor: pointer;
  user-select: none;
}

.hero-name-o-letter {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.hero-name-o-hint {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 5px 10px;
  border-radius: 9px;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  z-index: 22;
  opacity: 0;
  transition: opacity 0.18s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.86);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

[data-theme-mode="dark"] .hero-name-o-hint {
  background: rgba(0, 0, 0, 0.88);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-name-o:hover .hero-name-o-hint,
.hero-name-o:focus-visible .hero-name-o-hint {
  opacity: 1;
}

.hero-name-o:focus-visible {
  outline: 2px solid rgba(16, 64, 242, 0.85);
  outline-offset: 4px;
  border-radius: 4px;
}

.hero-name-m {
  display: inline-block;
  cursor: pointer;
  transform-origin: 100% 50%;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.hero-name-m:hover {
  animation: heroNameMStretch 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes heroNameMStretch {
  0%   { transform: scaleX(1) translateX(0); }
  45%  { transform: scaleX(1.5) translateX(-2px); }
  70%  { transform: scaleX(0.96) translateX(0); }
  100% { transform: scaleX(1) translateX(0); }
}

.hero-name-a {
  display: inline-block;
  cursor: pointer;
  transform-origin: 50% 85%;
  transition: transform 0.2s ease;
}

.hero-name-a:hover {
  transform: rotate(-12deg);
}

.hero-name-c-top {
  display: inline-block;
  cursor: pointer;
}

.hero-name-c-top:hover {
  animation: heroTopOBounce 0.56s cubic-bezier(0.2, 0.9, 0.25, 1);
}

@keyframes heroTopOBounce {
  0% { transform: translateY(0); }
  35% { transform: translateY(-14px); }
  60% { transform: translateY(3px); }
  100% { transform: translateY(0); }
}

.hero-name-n-end {
  display: inline-block;
  cursor: pointer;
  padding: 0 2px;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-name-n-end:hover {
  animation: heroNameNSomersault 1.05s cubic-bezier(0.22, 0.7, 0.22, 1);
}

@keyframes heroNameNSomersault {
  0% { transform: rotateX(0deg) translateZ(0); }
  100% { transform: rotateX(360deg) translateZ(0); }
}

.hero-name-vinyl {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1em;
  height: 1em;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-8deg) scale(0.88);
  pointer-events: none;
  filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.28));
  transition: opacity 0.24s ease, transform 0.24s ease;
  z-index: 13;
}

.hero-name-o:hover .hero-name-vinyl,
.hero-name-o.is-spotify-active .hero-name-vinyl {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  animation: heroNameVinylSpin 1.2s linear infinite;
}

@keyframes heroNameVinylSpin {
  from { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  to { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
}

.spotify-mini-player {
  position: fixed;
  left: max(16px, env(safe-area-inset-left, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  width: min(300px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  z-index: 115;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.spotify-mini-player.is-visible {
  opacity: 0.96;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-tagline {
  display: block;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 0.96;
  color: var(--text);
  text-align: center;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--hero-name-top-offset) - 24px);
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  transition: color 0.5s ease;
}

.hero-blurb {
  position: absolute;
  left: calc(25% - 580px);
  top: 254px;
  width: 420px;
  z-index: 2;
  color: var(--text);
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.34;
  letter-spacing: 0;
  text-wrap: pretty;
}

.hero-hi {
  position: absolute;
  left: calc(25% - 580px);
  top: 180px;
  width: 90px;
  height: auto;
  opacity: 0.8;
  filter: brightness(0);
  z-index: 2;
}

[data-theme-mode="dark"] .hero-hi {
  filter: brightness(0) invert(1);
}

.hero-explore {
  display: none;
  position: absolute;
  left: calc(50% + 280px);
  top: -40px;
  width: 150px;
  height: auto;
  opacity: 0.85;
  filter: brightness(0);
  transform: rotate(-6deg);
  transform-origin: center center;
  z-index: 2;
  pointer-events: none;
}

[data-theme-mode="dark"] .hero-explore {
  filter: brightness(0) invert(1);
}

.hero-blurb p + p {
  margin-top: 22px;
}

.hero-blurb-media {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
  margin-top: 28px;
}

.hero-blurb-photo {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
  margin-top: 0;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
  transform: rotate(5deg);
  transform-origin: center center;
  flex-shrink: 0;
  transition: transform 0.28s ease;
}

.hero-blurb-photo:hover {
  transform: rotate(2deg);
}

.hero-blurb-xo-nico {
  display: block;
  width: 85px;
  height: auto;
  flex-shrink: 0;
  margin-left: 8px;
}

[data-theme-mode="dark"] .hero-blurb-xo-nico {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

[data-theme-mode="dark"] .hero-tagline {
  color: rgba(255, 255, 255, 0.78);
}

[data-theme-mode="light"] .hero-tagline {
  color: rgba(0, 0, 0, 0.6);
}

.experience-mini {
  display: block;
  position: absolute;
  top: 694px;
  left: calc(50% + 463px);
  width: 500px;
  max-width: min(500px, calc(100% - 48px));
  z-index: 4;
  opacity: 0;
  transform: translateY(10px);
  animation: experienceMiniIn 0.7s cubic-bezier(0.22, 0.7, 0.22, 1) 0.1s forwards;
}

.experience-mini-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
  transition: color 0.5s ease;
}

.experience-mini-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(8px);
  animation: experienceMiniItemIn 0.55s cubic-bezier(0.22, 0.7, 0.22, 1) forwards;
  transition: border-color 0.5s ease;
}

.experience-mini-item:nth-child(2) { animation-delay: 0.18s; }
.experience-mini-item:nth-child(3) { animation-delay: 0.26s; }
.experience-mini-item:nth-child(4) { animation-delay: 0.34s; }
.experience-mini-item:nth-child(5) { animation-delay: 0.42s; }

.experience-mini-item:last-child {
  border-bottom: none;
}

.experience-mini-main h3 {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  transition: color 0.5s ease;
}

.experience-mini-main p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.2;
  color: var(--text-secondary);
  transition: color 0.5s ease;
}

.experience-mini-acquired {
  font-weight: 400;
}

.experience-mini-acquired-dot {
  font-size: 0.7em;
  line-height: 1;
  margin-right: 0.2em;
  margin-left: 0.05em;
  vertical-align: 0.12em;
  opacity: 0.85;
}

.experience-mini-dates {
  font-size: 11px;
  line-height: 1.1;
  color: var(--text-secondary);
  white-space: nowrap;
  margin-top: 1px;
  transition: color 0.5s ease;
}

[data-theme-mode="dark"] .experience-mini-item {
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

[data-theme-mode="light"] .experience-mini-item {
  border-bottom-color: rgba(0, 0, 0, 0.16);
}

@keyframes experienceMiniIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes experienceMiniItemIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.corner-card {
  position: absolute;
  background: #fff;
  border: 5px solid #f4f0ee;
  border-radius: 46px;
  box-shadow: 0 24px 34px -24px rgba(0, 0, 0, 0.16);
}

.corner-card-tl {
  width: 592px;
  height: 534px;
  top: -235px;
  left: -18px;
  transform: rotate(-8deg);
}

.corner-card-tr {
  width: 444px;
  height: 299px;
  top: -53px;
  right: 143px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.92)),
    url("https://images.unsplash.com/photo-1545235617-9465d2a55698?auto=format&fit=crop&w=1000&q=80") center/cover no-repeat;
}

.corner-card-br {
  width: 438px;
  height: 438px;
  right: 290px;
  bottom: -210px;
}

.corner-card-rm {
  width: 505px;
  height: 505px;
  right: -160px;
  top: 378px;
}

/* ── Left Badges ──────────────────────────────────── */
.year-badges {
  position: absolute;
  top: 480px;
  left: 58px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 23px;
  padding: 0 16px;
  border-radius: 58px;
  font-size: 10px;
  font-weight: 400;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.5s ease, color 0.5s ease;
}

.badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.badge-current {
  background: var(--badge-current-bg);
  color: var(--badge-current-text);
}

.badge-2017 {
  background: #f2c511;
  color: #000;
  width: 44px;
}

.badge-2021 {
  background: #b67028;
  color: #fff;
  width: 44px;
}

.badge-2023 {
  background: #2d6b3e;
  color: #fff;
  width: 44px;
}

.badge-2026 {
  background: #dfed43;
  color: #000;
  width: 44px;
}

.badge-2012 {
  background: #d9502b;
  color: #fff;
  width: 44px;
}

/* ── Center Content ──────────────────────────────── */
.center-content {
  position: absolute;
  top: 100px;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 186px;
  padding-bottom: 8px;
  z-index: 2;
}



.scene-card {
  position: absolute;
  margin: 0;
  z-index: 4;
  border-radius: 22px;
  overflow: hidden;
  border: none;
  background: none;
  box-shadow: 0 20px 30px -24px rgba(0, 0, 0, 0.28);
}

.scene-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.scene-card-glass {
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.24));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(255, 255, 255, 0.26),
    0 22px 38px -28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}

.scene-card-glass img {
  border-radius: 14px;
}

.scene-card-yahoo {
  display: none;
  width: 215px;
  height: 165px;
  top: 124px;
  left: 20%;
  transform: rotate(-8deg);
  animation: sceneFloatYahoo 12s ease-in-out infinite;
}

.scene-card-yahoo.scene-card-glass {
  padding-bottom: 0;
  background: linear-gradient(145deg, rgba(125, 46, 255, 0.7), rgba(125, 46, 255, 0.42));
}

.scene-card-easter {
  display: none;
  width: 258px;
  height: 138px;
  top: 68px;
  right: 30%;
  transform: rotate(9deg);
  animation: sceneFloatEaster 13s ease-in-out infinite;
}

.scene-card-asana {
  display: none;
  width: 250px;
  height: 176px;
  left: 18px;
  bottom: 62px;
  transform: rotate(7deg);
  animation: sceneFloatAsana 11s ease-in-out infinite;
}

/* Default.svg — flip to random aura on back */
.default-card {
  position: absolute;
  top: -148px;
  left: calc(50% + 528px);
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  width: 146px;
  transform: translateX(-50%) rotate(5deg);
  transform-origin: center center;
  z-index: 4;
  font: inherit;
  color: inherit;
  perspective: 960px;
}

.default-card:focus-visible {
  outline: 2px solid rgba(16, 64, 242, 0.85);
  outline-offset: 4px;
}

.default-card-inner {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 256 / 320;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.default-card.is-flipped .default-card-inner {
  transform: rotateY(180deg);
}

.default-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 18px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  background: rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 32px -12px rgba(0, 0, 0, 0.2);
}

[data-theme-mode="dark"] .default-card-face {
  background: rgba(255, 255, 255, 0.12);
}

.default-card-face img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  box-sizing: border-box;
  border: none;
  border-radius: 12px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.default-card-face-back {
  transform: rotateY(180deg);
}

.default-card-face-front {
  display: none;
}

.project-folder {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transform: rotate(-4deg);
}

a.project-folder,
button.project-folder {
  text-decoration: none;
  color: inherit;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
}

.project-folder img {
  width: 132px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.25));
  transform-origin: 50% 60%;
  will-change: transform;
}

.project-folder:hover img {
  animation: projectFolderWiggle 1s ease-in-out infinite;
}

.project-folder .folder-label {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  color: #000000;
}

[data-theme-mode="dark"] .project-folder .folder-label {
  color: #ffffff;
}

.project-folder--yellow {
  left: calc(50% + 628px);
  top: 414px;
  transform: rotate(-4deg);
}

.project-folder--yellow .folder-back,
.project-folder--yellow .folder-front {
  filter: hue-rotate(248deg) saturate(2.1) brightness(0.86) contrast(1.12) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.32));
}

.project-folder--yellow-two {
  left: calc(50% + 768px);
  top: 184px;
  transform: rotate(6deg);
}

.project-folder--yellow-three {
  left: calc(50% + 580px);
  top: 38px;
  transform: rotate(-7deg);
}

.project-folder--yellow-four {
  left: calc(50% + 425px);
  top: 218px;
  transform: rotate(-2deg);
}

.project-folder--yellow-five {
  left: calc(50% + 808px);
  top: 382px;
  transform: rotate(8deg);
}

.project-folder--yellow .folder-stack {
  position: relative;
  width: 142px;
  height: 142px;
  display: block;
}

.project-folder--yellow .folder-back,
.project-folder--yellow .folder-paper,
.project-folder--yellow .folder-front {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.25));
}

.project-folder--yellow .folder-back {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 1;
}

.project-folder--yellow .folder-paper {
  position: absolute;
  left: 50%;
  top: 14%;
  width: 78%;
  transform: translateX(-50%) translateY(0);
  transform-origin: 50% 100%;
  opacity: 0.8;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.25));
  transition: transform 0.32s cubic-bezier(0.22, 0.7, 0.22, 1), opacity 0.32s ease, filter 0.32s ease;
  z-index: 2;
}

.project-folder--yellow .folder-front {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 3;
}

.project-folder--yellow:hover .folder-paper {
  transform: translateX(-50%) translateY(-14px);
  opacity: 1;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.25));
}

.project-folder--yellow:hover img {
  animation: none;
}

/* One folder variant in a dark "black" gradient theme. */
.project-folder--yellow-three .folder-back,
.project-folder--yellow-three .folder-front {
  filter: grayscale(1) saturate(0.2) brightness(0.28) contrast(1.3) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
}

.project-folder--yellow-four .folder-back,
.project-folder--yellow-four .folder-front {
  filter: hue-rotate(272deg) saturate(2.35) brightness(0.76) contrast(1.18) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.3));
}

.project-folder--yellow-five .folder-back,
.project-folder--yellow-five .folder-front {
  filter: hue-rotate(318deg) saturate(1.45) brightness(0.96) contrast(1.08) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.3));
}

.project-folder--yellow-two .folder-back,
.project-folder--yellow-two .folder-front {
  filter: hue-rotate(120deg) saturate(1.45) brightness(0.9) contrast(1.08) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.3));
}

/* ── dot-fire loader (nzbin/three-dots). Anchored off-screen; dots are box-shadows. ─ */
.dot-fire {
  position: relative;
  left: -9999px;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background-color: currentColor;
  color: #111111;
  box-shadow: 9999px 22.5px 0 -5px currentColor;
  animation: dotFire 1.5s infinite linear;
  animation-delay: -0.85s;
}

.dot-fire::before,
.dot-fire::after {
  content: "";
  display: inline-block;
  position: absolute;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background-color: currentColor;
  color: inherit;
}

.dot-fire::before {
  box-shadow: 9999px 22.5px 0 -5px currentColor;
  animation: dotFire 1.5s infinite linear;
  animation-delay: -1.85s;
}

.dot-fire::after {
  box-shadow: 9999px 22.5px 0 -5px currentColor;
  animation: dotFire 1.5s infinite linear;
  animation-delay: -2.85s;
}

@keyframes dotFire {
  1% {
    box-shadow: 9999px 22.5px 0 -5px currentColor;
  }
  50% {
    box-shadow: 9999px -5.625px 0 2px currentColor;
  }
  100% {
    box-shadow: 9999px -22.5px 0 -5px currentColor;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot-fire,
  .dot-fire::before,
  .dot-fire::after {
    animation: none;
  }
}

.canvas-pencil-btn {
  position: absolute;
  /* Positioned on #mapCanvas (same coords as draw layer) — not inside .page */
  left: calc(25% - 240px);
  top: max(72px, 10%);
  width: 210px;
  height: 90px;
  border: none;
  background: transparent;
  padding: 0;
  z-index: 4;
  cursor: pointer;
}

.canvas-pencil-stack {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-block;
  line-height: 0;
  transform: rotate(-10deg);
  transition: transform 0.2s ease;
}

.canvas-pencil {
  width: 160px;
  height: auto;
  display: block;
  position: relative;
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
  transition: filter 0.2s ease;
}

/* Invisible anchor at the “lead” — stroke starts here (tune % to match art) */
.canvas-pencil-tip {
  position: absolute;
  left: 22%;
  top: 92%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  margin-top: -2px;
  pointer-events: none;
  opacity: 0;
}

.canvas-pencil-btn:hover .canvas-pencil-stack {
  transform: rotate(-3deg);
}

.canvas-pencil-btn.is-draw-enabled .canvas-pencil {
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25)) brightness(1.05);
}

.canvas-pencil-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 4px;
}

.canvas-eraser-btn {
  position: absolute;
  /* Snug to the right of the pencil hit area (210px) with a small gap; lower than pencil */
  left: calc(25% - 240px + 138px);
  top: max(158px, calc(10% + 84px));
  width: 150px;
  height: 78px;
  border: none;
  background: transparent;
  padding: 0;
  z-index: 4;
  cursor: pointer;
}

.canvas-eraser-stack {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-block;
  line-height: 0;
  transform: rotate(6deg);
  transition: transform 0.2s ease;
}

.canvas-eraser {
  width: 112px;
  height: auto;
  display: block;
  position: relative;
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
  transition: filter 0.2s ease;
}

.canvas-eraser-tip {
  position: absolute;
  left: 14%;
  top: 89%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  margin-top: -3px;
  pointer-events: none;
  opacity: 0;
}

.canvas-eraser-btn:hover .canvas-eraser-stack {
  transform: rotate(2deg);
}

.canvas-eraser-btn.is-eraser-enabled .canvas-eraser {
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25)) brightness(1.05);
}

.canvas-eraser-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 4px;
}

/* Word art on map canvas — same coordinate space as pencil */
.canvas-decor {
  position: absolute;
  /* Below .draw-layer (3) so pencil strokes paint on top; above .page (1) */
  z-index: 2;
  pointer-events: none;
  user-select: none;
  height: auto;
  opacity: 0.6;
  filter: brightness(0) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
}

[data-theme-mode="dark"] .canvas-decor {
  filter: brightness(0) invert(1) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
}

/* Below piano — centered under widget (388px wide), same vertical stack as .piano-widget */
.canvas-decor--play {
  left: calc((100% - var(--page-sheet-width)) / 2 + var(--piano-offset-from-page-left) + 194px - 57.5px); /* half of 115px width */
  top: calc(
    (100% - var(--page-block-height-desktop)) / 2
    + var(--hero-name-top-offset)
    - var(--piano-clearance-north-of-header)
    + var(--play-svg-gap-below-piano)
    + 35px
  );
  width: 115px; /* 20% smaller than 144px */
  transform: rotate(-3.5deg);
  transform-origin: center;
}

/* Immediately to the right of .canvas-pencil-btn (210px wide + gap) */
.canvas-decor--draw {
  /* Snug to pencil right edge (210px wide from 25% - 240px) */
  left: calc(25% - 240px + 138px);
  top: max(72px, 10%);
  width: 95px; /* 20% smaller than 119px */
  transform: rotate(-7deg);
  transform-origin: center;
}

@keyframes projectFolderWiggle {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-2px) rotate(-2deg) scale(1.01);
  }
  50% {
    transform: translateY(1px) rotate(1.5deg) scale(1);
  }
  75% {
    transform: translateY(-1px) rotate(-1deg) scale(1.01);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

/* Below hero name + tagline; moves with the artboard (not viewport-fixed) */
.search-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  position: absolute;
  left: 50%;
  top: calc(var(--page-hero-header-bottom) + 14px);
  bottom: auto;
  transform: translateX(-50%);
  width: min(320px, calc(100% - 48px));
  max-width: calc(100% - 48px);
  box-sizing: border-box;
  z-index: 6;
}

.search-form {
  margin: 0;
  width: 100%;
}

.search-llm-status {
  display: none;
  margin: 0;
  padding: 0 6px;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0.9;
}

.search-llm-status.is-online {
  color: rgba(226, 255, 226, 0.98);
}

.search-llm-status.is-offline {
  color: rgba(255, 220, 220, 0.95);
}

.search-results {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 8px 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(
      168deg,
      rgba(30, 30, 32, 0.88) 0%,
      rgba(12, 12, 14, 0.82) 42%,
      rgba(10, 10, 12, 0.82) 58%,
      rgba(22, 22, 24, 0.9) 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 28px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  max-height: min(280px, 40vh);
  overflow: hidden;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: #ffffff;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.search-results .search-results-title,
.search-results .search-results-snippet,
.search-results .search-results-dismiss-text {
  color: #ffffff;
}

.search-results .search-results-link,
.search-results .search-results-entry {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.search-results .search-results-footer {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.search-results.is-fading-out {
  opacity: 0;
}

.search-results.is-fading-in {
  opacity: 0;
  animation: searchResultsFadeIn 0.22s ease forwards;
}

@keyframes searchResultsFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.search-results-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 4px 0 2px;
}

.search-results-footer {
  display: flex;
  justify-content: center;
  padding: 8px 2px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 8px;
}

.search-results-dismiss-text {
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 0;
}

.search-results-dismiss-text:hover {
  opacity: 1;
}

.search-results-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-results-item {
  position: relative;
}

.search-results-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: opacity 0.2s ease;
}

.search-results-entry {
  display: block;
  color: inherit;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.search-results-list li:last-child .search-results-link {
  border-bottom: none;
  padding-bottom: 0;
}

.search-results-list li:last-child .search-results-entry {
  border-bottom: none;
  padding-bottom: 0;
}

.search-results-link:hover {
  opacity: 0.85;
}

.search-results-title {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--text);
}

.search-results-snippet {
  font-weight: 400;
  font-size: 12px;
  opacity: 0.88;
  color: var(--text);
}

.search-results-loading,
.search-results-fallback {
  margin: 0;
  font-size: 12px;
  color: var(--text);
}

.search-results-fallback a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}


.search-bar {
  display: flex;
  width: 100%;
  max-width: none;
  height: 48px;
  position: relative;
  border-radius: 90px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-top-color: rgba(255, 255, 255, 0.5);
  border-left-color: rgba(255, 255, 255, 0.38);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  align-items: center;
  padding: 0 14px;
  gap: 8px;
  background:
    linear-gradient(
      168deg,
      rgba(255, 255, 255, 0.38) 0%,
      rgba(255, 255, 255, 0.14) 42%,
      rgba(255, 255, 255, 0.1) 58%,
      rgba(255, 255, 255, 0.28) 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 1px 0 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 8px rgba(0, 0, 0, 0.04),
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.4s ease, transform 0.3s ease;
}

.search-bar-stroke {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.search-bar-stroke rect {
  fill: none;
  stroke: rgba(16, 64, 242, 0.95);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-dasharray: 30 70;
  stroke-dashoffset: 0;
  animation: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.search-bar:focus-within .search-bar-stroke rect {
  opacity: 1;
  animation: searchBorderLinear 3.8s linear infinite;
}

[data-theme] .search-bar-stroke rect {
  stroke: rgba(255, 255, 255, 0.96);
}

.search-bar > :not(.search-bar-stroke) {
  position: relative;
  z-index: 1;
}

.search-bar:hover {
  border-top-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 1px 0 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -2px 8px rgba(0, 0, 0, 0.05),
    0 6px 24px rgba(0, 0, 0, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.05);
  transform: translateY(-0.5px);
}

@keyframes searchBorderLinear {
  to {
    stroke-dashoffset: -100;
  }
}

.search-bar-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text);
  opacity: 0.6;
  transition: color 0.5s ease;
}

.search-bar-field {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
}

.search-bar-caret {
  flex-shrink: 0;
  width: 1.5px;
  height: 1.1em;
  border-radius: 1px;
  background: currentColor;
  color: var(--text);
  animation: searchCaretBlink 1.05s step-end infinite;
}

.search-bar:focus-within .search-bar-caret {
  opacity: 0;
  animation: none;
}

@keyframes searchCaretBlink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-bar-caret {
    animation: none;
    opacity: 1;
  }

  .search-bar-carousel,
  .search-bar-carousel-item {
    transition: none;
  }
}

.search-bar-input {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  text-align: left;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text);
  cursor: text;
  caret-color: var(--text);
  transition: color 0.5s ease;
}

.search-bar-carousel {
  position: absolute;
  left: 4px;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.22s ease;
}

.search-bar-carousel.is-hidden {
  opacity: 0;
}

.search-bar-carousel-item {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: opacity 0.7s ease;
}

.search-bar-carousel-item.is-active {
  opacity: 0.76;
}

.search-bar-carousel-item.is-fading-out {
  opacity: 0;
}

[data-theme-mode="light"] .search-bar-carousel-item.is-active {
  color: rgba(0, 0, 0, 0.78);
  opacity: 1;
}

[data-theme-mode="dark"] .search-bar-carousel-item.is-active {
  color: rgba(255, 255, 255, 0.82);
  opacity: 1;
}

.search-bar-input::placeholder {
  color: var(--text);
  opacity: 0.72;
}

[data-theme-mode="light"] .search-bar-input::placeholder {
  color: rgba(0, 0, 0, 0.78);
  opacity: 1;
}

[data-theme-mode="dark"] .search-bar-input::placeholder {
  color: rgba(255, 255, 255, 0.82);
  opacity: 1;
}

.search-layers-btn {
  position: fixed;
  top: auto;
  /* Beside centered .view-dots; cap offset on narrow viewports so the button stays on-screen */
  left: calc(50% + min(160px, calc(50vw - 48px)));
  right: auto;
  bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  transform: none;
  z-index: 100;
  width: 45px;
  height: 45px;
  margin-right: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 0.5s ease, color 0.5s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.search-layers-btn svg {
  width: 28px;
  height: 28px;
}

.search-layers-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.viewport-spotlight {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 120;
}

.viewport-spotlight.is-active {
  animation: viewportSpotlightFade 4.8s linear forwards;
}

.viewport-spotlight-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.viewport-spotlight-path {
  fill: none;
  stroke: #ffff00;
  stroke-width: 5;
  stroke-linecap: square;
  stroke-linejoin: miter;
  vector-effect: non-scaling-stroke;
  filter: none;
}

[data-theme-mode="light"] .viewport-spotlight-path {
  stroke: var(--border-color);
}

.viewport-spotlight.is-active .viewport-spotlight-path {
  animation: viewportSpotlightDraw 2.2s cubic-bezier(0.45, 0.05, 0.2, 1) forwards;
}

@keyframes viewportSpotlightDraw {
  from {
    stroke-dashoffset: var(--spotlight-perimeter, 4000);
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes viewportSpotlightFade {
  0% {
    opacity: 1;
  }
  67% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.spotlight-toast {
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translate(-50%, -140%);
  opacity: 0;
  pointer-events: none;
  z-index: 130;
  width: max-content;
  max-width: calc(100vw - 20px);
  box-sizing: border-box;
}

.spotlight-toast.is-active {
  animation: spotlightToastEnter 0.52s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.spotlight-toast.is-exiting {
  animation: spotlightToastExit 0.46s cubic-bezier(0.4, 0, 0.9, 0.2) forwards;
}

.spotlight-toast-message {
  background: #ffff00;
  color: #111111;
  border-radius: 10px;
  padding: 10px 10px;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  max-width: min(100%, 420px);
  text-align: center;
  box-sizing: border-box;
}

[data-theme-mode="light"] .spotlight-toast-message {
  background: var(--border-color);
  color: #ffffff;
}

@keyframes spotlightToastEnter {
  from {
    transform: translate(-50%, -140%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes spotlightToastExit {
  from {
    transform: translate(-50%, 0);
    opacity: 1;
  }
  to {
    transform: translate(-50%, -140%);
    opacity: 0;
  }
}

.sample-questions,
.slider {
  display: none;
}

.sample-questions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 90px;
  justify-content: center;
  margin-top: 20px;
  transition: transform 0.38s cubic-bezier(0.22, 0.7, 0.22, 1), opacity 0.32s ease, filter 0.32s ease;
}

.sample-questions.is-transitioning {
  transform: translateY(-8px);
  opacity: 0.75;
  filter: blur(0.8px);
}

.sample-questions.is-bouncing {
  animation: questionBounce 0.42s cubic-bezier(0.18, 0.9, 0.3, 1.25);
}

.sample-questions li {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  text-align: center;
  cursor: pointer;
  line-height: 1.35;
  transition: opacity 0.35s cubic-bezier(0.22, 0.7, 0.22, 1), transform 0.35s cubic-bezier(0.22, 0.7, 0.22, 1), color 0.5s ease;
}

.sample-questions li:hover {
  opacity: 0.7;
}

.sample-questions li.is-primary {
  opacity: 1;
  transform: translateY(-2px);
}

.sample-questions li.is-secondary {
  opacity: 0.74;
}

.sample-questions li.is-tertiary {
  opacity: 0.48;
  transform: translateY(2px);
}

@keyframes questionBounce {
  0% { transform: translateY(0); }
  55% { transform: translateY(6px); }
  78% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

@keyframes themeDotsFloat {
  0% { transform: translate3d(0, 0, 0); }
  12.5% { transform: translate3d(-6px, 8px, 0); }
  25% { transform: translate3d(-12px, 14px, 0); }
  37.5% { transform: translate3d(-4px, 20px, 0); }
  50% { transform: translate3d(10px, 24px, 0); }
  62.5% { transform: translate3d(20px, 16px, 0); }
  75% { transform: translate3d(24px, 4px, 0); }
  87.5% { transform: translate3d(14px, -6px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes sceneFloatYahoo {
  0% { transform: translate3d(0, 0, 0) rotate(-8deg); }
  25% { transform: translate3d(-10px, 8px, 0) rotate(-6deg); }
  50% { transform: translate3d(6px, 16px, 0) rotate(-10deg); }
  75% { transform: translate3d(12px, -4px, 0) rotate(-7deg); }
  100% { transform: translate3d(0, 0, 0) rotate(-8deg); }
}

@keyframes sceneFloatEaster {
  0% { transform: translate3d(0, 0, 0) rotate(9deg); }
  25% { transform: translate3d(8px, -8px, 0) rotate(11deg); }
  50% { transform: translate3d(-6px, 14px, 0) rotate(7deg); }
  75% { transform: translate3d(-12px, 2px, 0) rotate(10deg); }
  100% { transform: translate3d(0, 0, 0) rotate(9deg); }
}

@keyframes sceneFloatAsana {
  0% { transform: translate3d(0, 0, 0) rotate(7deg); }
  25% { transform: translate3d(-8px, 10px, 0) rotate(5deg); }
  50% { transform: translate3d(10px, 16px, 0) rotate(8deg); }
  75% { transform: translate3d(14px, -4px, 0) rotate(6deg); }
  100% { transform: translate3d(0, 0, 0) rotate(7deg); }
}

/* ── Slider ──────────────────────────────────────── */
.slider {
  --dial-progress: 0;
  position: relative;
  width: 250px;
  height: 22px;
  margin-top: 18px;
}

.slider::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  transform: translateY(-50%);
  background:
    linear-gradient(
      to right,
      var(--text) 0%,
      var(--text) calc(var(--dial-progress) * 100%),
      var(--slider-right) calc(var(--dial-progress) * 100%),
      var(--slider-right) 100%
    );
  transition: background 0.38s cubic-bezier(0.22, 0.7, 0.22, 1);
}

.slider-control {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 22px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: ew-resize;
}

.slider-control::-webkit-slider-runnable-track {
  height: 2px;
  background: transparent;
}

.slider-control::-moz-range-track {
  height: 2px;
  background: transparent;
}

.slider-control::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -5px;
  border: none;
  border-radius: 50%;
  background: var(--text);
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.28s cubic-bezier(0.18, 0.8, 0.28, 1.2), background 0.5s ease;
}

.slider-control::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.28s cubic-bezier(0.18, 0.8, 0.28, 1.2), background 0.5s ease;
}

.slider-control:hover::-webkit-slider-thumb {
  transform: scale(1.12);
}

.slider-control:hover::-moz-range-thumb {
  transform: scale(1.12);
}

.slider-control:active::-webkit-slider-thumb {
  transform: scale(1.2);
}

.slider-control:active::-moz-range-thumb {
  transform: scale(1.2);
}

/* ── GO Link ─────────────────────────────────────── */
.go-pill {
  width: 96px;
  height: 42px;
  border-radius: 999px;
  background: #000;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.go-pill:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.go-pill .arrow {
  font-size: 20px;
  line-height: 1;
}

/* ── Theme Dots ──────────────────────────────────── */
.theme-dots {
  --dot-size: 16px;
  --dot-step: 22px;
  --dot-top: 10px;
  --active-index: 0;
  position: fixed;
  top: max(20px, env(safe-area-inset-top, 0px));
  right: max(20px, env(safe-area-inset-right, 0px));
  z-index: 100;
  width: 34px;
  height: 146px;
  padding: 10px 8px;
  border-radius: 999px;
  border: 1px solid #d9d9d9;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  cursor: default;
  user-select: none;
  touch-action: none;
  transition: box-shadow 0.2s ease, height 0.28s ease, padding 0.28s ease;
  animation: none;
}

.theme-dots:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.dot {
  position: absolute;
  left: 50%;
  top: calc(var(--dot-top) + (var(--dot-index, 0) * var(--dot-step)));
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: top 0.28s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.dot:hover {
  transform: translateX(-50%) scale(1.15);
}

.dot.active {
  border: 1px solid #fff;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
}

.theme-dots.is-collapsed .dot {
  top: 50%;
  transform: translate(-50%, -50%);
}

.theme-dots.is-collapsed .dot:not(.active) {
  top: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
}

.theme-dots.is-collapsed {
  height: 34px;
  padding: 8px;
}

.theme-dots.is-collapsed .dot:hover {
  transform: translate(-50%, -50%) scale(1.15);
}

.dot-terracotta { background: #D9633B; }
.dot-ochre      { background: #D89B3A; }
.dot-cobalt     { background: #123FF2; }
.dot-olive      { background: #7A8450; }
.dot-putty      { background: #D4C4A8; }
.dot-lime       { background: #B5C943; }

/* ── View dots (section nav, bottom / viewport-fixed) ─ */
.view-dots {
  position: fixed;
  bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  left: 50%;
  right: auto;
  top: auto;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
  max-width: calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  cursor: default;
  user-select: none;
  touch-action: none;
  transition: box-shadow 0.2s ease;
}

.view-dots:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.12);
}

.view-pill {
  position: relative;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.22s ease, transform 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  line-height: 1;
}

.view-pill:hover {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme-mode="dark"] .view-pill:hover {
  background: rgba(255, 255, 255, 0.12);
}

.view-pill.active {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme-mode="dark"] .view-pill.active {
  background: rgba(255, 255, 255, 0.2);
}

/* ── Piano Widget ────────────────────────────────── */
.piano-widget {
  position: absolute;
  /* Horizontally: page sheet is centered in map; inset from page’s left edge */
  left: calc((100% - var(--page-sheet-width)) / 2 + var(--piano-offset-from-page-left));
  /* Vertically: page is centered in map; sit 100px above hero headline top (see .map-canvas vars) */
  top: calc(
    (100% - var(--page-block-height-desktop)) / 2
    + var(--hero-name-top-offset)
    - var(--piano-clearance-north-of-header)
    - var(--piano-widget-outer-height)
    + 35px
  );
  width: 388px;
  transform: rotate(-3deg);
  transform-origin: center;
  z-index: 6;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 32px -12px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

[data-theme-mode="dark"] .piano-widget {
  background: rgba(255, 255, 255, 0.12);
}

.piano-widget:hover {
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.28);
}

.pw-header {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.6;
  transition: color 0.5s ease;
}

.pw-body {
  padding: 0 8px 12px;
}

.pw-keys {
  display: flex;
  position: relative;
  height: 140px;
}

.pw-key {
  position: relative;
  border: none;
  cursor: pointer;
  transition: background 0.1s ease, transform 0.08s ease;
}

.pw-key::after {
  content: attr(data-label);
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0.4;
}

.pw-white {
  flex: 1;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0 0 6px 6px;
  margin: 0 1px;
  z-index: 1;
}

.pw-white::after {
  color: #000;
}

.pw-white:hover {
  background: rgba(255, 255, 255, 1);
}

.pw-white:active,
.pw-white.pw-active {
  background: #e0e4ff;
  transform: scaleY(0.98);
  transform-origin: top;
}

.pw-black {
  width: 28px;
  height: 58%;
  background: #1a1a2e;
  border-radius: 0 0 5px 5px;
  margin: 0 -14px;
  z-index: 2;
}

.pw-black::after {
  color: rgba(255, 255, 255, 0.5);
}

.pw-black:hover {
  background: #2a2a42;
}

.pw-black:active,
.pw-black.pw-active {
  background: #3a3a6e;
  transform: scaleY(0.97);
  transform-origin: top;
}

/* ── Footer Nav ──────────────────────────────────── */
.footer-nav {
  position: absolute;
  right: 52px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  z-index: 2;
}

.footer-nav a {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
  transition: opacity 0.2s, color 0.5s ease;
}

.footer-nav a:hover {
  opacity: 0.6;
}

/* Center social cluster on the x axis within .page; lock Y below hero header */
.footer-nav.footer-nav--social {
  left: 50%;
  right: auto;
  top: calc(var(--page-hero-header-bottom) + 650px);
  bottom: auto;
  transform: translateX(-50%);
}

/* Social icons in one horizontal row */
.footer-nav--social {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  height: auto;
}

.footer-nav--social a {
  font-size: 0;
  letter-spacing: 0;
  line-height: 0;
  opacity: 1;
}

.footer-nav--social a:hover {
  opacity: 1;
}

.social-icon-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: z-index 0s, opacity 0.2s ease;
}

.social-icon-link:hover {
  z-index: 10;
}

.social-icon-link img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.22));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.social-icon-link:hover img {
  transform: scale(1.08);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

/* Hover chips — same treatment as .hero-name-o-hint / Play · Pause */
.social-icon-hint {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  padding: 6px;
  border-radius: 9px;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  z-index: 22;
  opacity: 0;
  transition: opacity 0.18s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.86);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

[data-theme-mode="dark"] .social-icon-hint {
  background: rgba(0, 0, 0, 0.88);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.social-icon-link:hover .social-icon-hint,
.social-icon-link:focus-visible .social-icon-hint {
  opacity: 1;
}

.social-icon-link:focus-visible {
  outline: 2px solid rgba(16, 64, 242, 0.85);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Level labels while parent links stay playfully rotated */
.social-icon-link--instagram .social-icon-hint {
  transform: translateX(-50%) rotate(8deg);
}

.social-icon-link--pinterest .social-icon-hint {
  transform: translateX(-50%) rotate(-6deg);
}

.social-icon-link--linkedin .social-icon-hint {
  transform: translateX(-50%) rotate(5deg);
}

.social-icon-link--telegram .social-icon-hint {
  transform: translateX(-50%) rotate(-9deg);
}

.social-icon-link--spotify .social-icon-hint {
  transform: translateX(-50%) rotate(4deg);
}

.social-cluster-letschat {
  position: absolute;
  left: -102px;
  top: 50px;
  width: 200px;
  height: auto;
  pointer-events: none;
  z-index: 6;
  display: block;
}

[data-theme-mode="dark"] .social-cluster-letschat {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.social-icon-link--instagram {
  transform: rotate(-8deg);
  z-index: 2;
}

.social-icon-link--pinterest {
  transform: rotate(6deg);
  z-index: 4;
}

.social-icon-link--linkedin {
  transform: rotate(-5deg);
  z-index: 1;
}

.social-icon-link--telegram {
  transform: rotate(9deg);
  z-index: 3;
}

.social-icon-link--spotify {
  transform: rotate(-4deg);
  z-index: 5;
}

/* ── Sticky Note ──────────────────────────────────── */
.post-it {
  display: none;
  position: absolute;
  left: 610px;
  right: auto;
  top: -120px;
  bottom: auto;
  width: 183px;
  min-height: 148px;
  height: 148px;
  border-radius: 12px;
  background: #c9d4ff;
  box-shadow: 0 20px 18px -16px rgba(0, 0, 0, 0.13);
  padding: 12px 12px 24px;
  z-index: 2;
  touch-action: none;
  transition: box-shadow 0.2s ease;
  transform: rotate(-2deg);
  transform-origin: top left;
}

.post-it-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: grab;
  user-select: none;
}

.post-it.is-dragging .post-it-header {
  cursor: grabbing;
}

.post-it.is-dragging,
.post-it.is-resizing {
  box-shadow: 0 24px 20px -14px rgba(0, 0, 0, 0.2);
}

.post-it-pin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.3);
  display: none;
}

.post-it-star {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.post-it-star:hover {
  opacity: 0.7;
  transform: scale(1.06);
}

[data-theme-mode="dark"] .post-it-star {
  color: #000000;
}

.post-it-text {
  margin-top: 18px;
  max-width: 100%;
  font-size: 14px;
  line-height: 1.22;
  outline: none;
  min-height: 54px;
}

[data-theme-mode="dark"] .post-it-text {
  color: #000000;
}

.post-it-text:focus {
  outline: 1px dashed rgba(0, 0, 0, 0.35);
  outline-offset: 4px;
}

.post-it-resize {
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 12px;
  height: 12px;
  border: none;
  background:
    linear-gradient(135deg, transparent 52%, rgba(0, 0, 0, 0.35) 52%, rgba(0, 0, 0, 0.35) 62%, transparent 62%),
    linear-gradient(135deg, transparent 66%, rgba(0, 0, 0, 0.45) 66%, rgba(0, 0, 0, 0.45) 76%, transparent 76%);
  cursor: ns-resize;
  opacity: 0.85;
}

.post-it-resize:hover {
  opacity: 1;
}

/* ── Viewport-fixed controls only (nav / chrome) — map artboard stays fixed-size ─ */
@media (max-width: 720px) {
  html {
    scroll-padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 104px);
  }

  .search-group {
    width: min(280px, calc(100% - 32px));
  }

  .search-bar {
    height: 44px;
    padding: 0 12px;
    gap: 8px;
  }

  .search-bar-input {
    font-size: 11px;
  }

  .search-layers-btn {
    bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 8px));
  }

  .view-dots {
    bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 8px));
  }

  .view-pill {
    font-size: 10px;
    padding: 8px 10px;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 420px) {
  .spotlight-toast-message {
    white-space: normal;
  }
}

/* ── Case study preview modal (folders + search links to /work/*.html) ─ */
.case-study-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px))
    max(20px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.case-study-modal[hidden] {
  display: none !important;
}

.case-study-modal-backdrop {
  position: absolute;
  top: max(20px, env(safe-area-inset-top, 0px));
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  left: max(20px, env(safe-area-inset-left, 0px));
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.case-study-modal-panel {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  max-height: none;
  overflow: auto;
  border-radius: 20px;
  padding: 28px 24px 24px;
  box-sizing: border-box;
  background: #ffffff;
  color: #111111;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.case-study-modal-panel--media-only {
  padding: 52px 16px clamp(24px, 5vmin, 64px);
}

.case-study-modal-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 20px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.case-study-modal-panel.is-loading .case-study-modal-loader {
  opacity: 1;
  pointer-events: auto;
}

.case-study-modal-panel.is-loading .case-study-modal-close {
  z-index: 11;
}

.case-study-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
}

.case-study-modal-close:hover {
  background: rgba(0, 0, 0, 0.08);
  transform: scale(1.05);
}

.case-study-modal-title {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 44px 12px 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.case-study-modal-panel:has(.case-study-modal-subtitle:not([hidden])) .case-study-modal-title {
  margin-bottom: 6px;
}

.case-study-modal-subtitle {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 44px 12px 0;
  letter-spacing: 0.02em;
  color: inherit;
  opacity: 0.88;
}

.case-study-modal-desc {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  margin: 20px 0 0;
  opacity: 0.92;
  white-space: pre-line;
}

.case-study-modal-desc-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.case-study-modal-desc-link:hover {
  opacity: 0.85;
}

.case-study-modal-panel--media-only .case-study-modal-desc {
  text-align: center;
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  /* Slightly more below the copy than above; caps stay modest on very large viewports. */
  padding-top: clamp(100px, 16vmin, 280px);
  padding-bottom: clamp(100px, 14vmin, 240px);
}

.case-study-modal-media {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.case-study-modal-panel--media-only .case-study-modal-media {
  gap: 80px;
}

.case-study-modal-media-item {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.case-study-modal-media-item img,
.case-study-modal-media-item video {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.case-study-modal-media-item--video {
  max-width: 88%;
  margin-left: auto;
  margin-right: auto;
  background: none;
  border: none;
  border-radius: 12px;
  overflow: hidden;
}

.case-study-modal-media-item--video video {
  width: 100%;
  max-width: 100%;
}

/* No `controls` on video — hide any stray native chrome in WebKit-based browsers. */
.case-study-modal-media-item--video video::-webkit-media-controls,
.case-study-modal-media-item--video video::-webkit-media-controls-enclosure,
.case-study-modal-media-item--video video::-webkit-media-controls-panel {
  display: none !important;
}

html.case-study-modal-open,
body.case-study-modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .case-study-modal-close {
    transition: none;
  }
}

/* ── Cross-page view transitions (same-origin: home ↔ case studies, etc.) ─ */
/* Chromium 126+; ignored elsewhere. Makes full navigations cross-fade instead of a hard cut. */
@view-transition {
  navigation: auto;
}

::view-transition-group(root) {
  animation-duration: 0.45s;
  animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(root) {
    animation-duration: 0.01ms;
  }
}
