/* ═════════════════════════════════════════════════════════
   Aaron Cook · A BLEUUE CONCEPT — the orb (v2)
   ═════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'The Seasons';
  src: url('fonts/TheSeasons-Regular.woff2') format('woff2'),
       url('fonts/TheSeasons-Regular.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --tight: -0.045em;
  --label-track: 0.22em;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring-soft: linear(
    0, 0.4 6%, 0.78 13%, 1.04 22%, 1.08 30%, 1.04 38%,
    0.99 50%, 1.005 62%, 0.998 78%, 1 100%
  );
  --spring-bounce: linear(
    0, 0.32 5%, 0.66 10%, 0.92 15%, 1.10 22%, 1.14 28%,
    1.08 35%, 0.98 45%, 1.02 55%, 0.995 70%, 1 100%
  );

  /* orb sphere size */
  --orb-size: clamp(160px, 26vmin, 240px);
}

/* ─── THEME TOKENS ─────────────────────────────────────── */

/* DARK — pure black + dark sphere with light specular */
:root, :root[data-theme="dark"] {
  --bg-1:           #000000;
  --bg-2:           #0A0A0A;
  --ink:            #FFFFFF;
  --ink-2:          rgba(255,255,255,0.65);
  --ink-3:          rgba(255,255,255,0.40);
  --rule:           rgba(255,255,255,0.12);
  --rule-2:         rgba(255,255,255,0.22);
  --glass-bg:       rgba(20,20,20,0.55);
  --glass-bg-2:     rgba(30,30,30,0.70);
  --glass-border:   rgba(255,255,255,0.12);
  --glass-edge:     rgba(255,255,255,0.20);
  --glass-shadow:   0 28px 80px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
  --ico-shadow:       0 2px 8px rgba(0,0,0,0.4), 0 6px 20px rgba(0,0,0,0.25);
  --ico-shadow-hover: 0 4px 14px rgba(0,0,0,0.55), 0 12px 36px rgba(0,0,0,0.35);
  --menu-bg:        #1A1A1A;          /* solid for popover — no noise bleed-through */
  --menu-hover:     #2A2A2A;

  /* sphere = dark 3D ball, bright specular at top-left */
  --sphere-gradient: radial-gradient(circle at 32% 28%,
                       #FFFFFF 0%,
                       #BFBFBF 8%,
                       #565656 28%,
                       #1E1E1E 60%,
                       #050505 92%,
                       #000000 100%);
  --sphere-shadow:  0 30px 70px rgba(0,0,0,0.9),
                    0 0 60px rgba(255,255,255,0.06),
                    inset -10px -20px 40px rgba(0,0,0,0.6);
  --sphere-rim:     rgba(255,255,255,0.15);
  --sphere-glow:    rgba(255,255,255,0.10);

  /* WebGL background palette */
  --mesh-a: 0,0,0;
  --mesh-b: 0.06,0.06,0.06;
  --mesh-c: 0.22,0.22,0.22;
  --mesh-int: 1.0;
}

/* LIGHT — pure white / grays / black. No cream. */
:root[data-theme="light"] {
  --bg-1:           #FFFFFF;
  --bg-2:           #F4F4F4;
  --ink:            #000000;
  --ink-2:          rgba(0,0,0,0.65);
  --ink-3:          rgba(0,0,0,0.40);
  --rule:           rgba(0,0,0,0.10);
  --rule-2:         rgba(0,0,0,0.22);
  --glass-bg:       rgba(255,255,255,0.65);
  --glass-bg-2:     rgba(255,255,255,0.85);
  --glass-border:   rgba(0,0,0,0.10);
  --glass-edge:     rgba(0,0,0,0.16);
  --glass-shadow:   0 28px 80px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.9);
  --ico-shadow:       0 2px 6px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.08);
  --ico-shadow-hover: 0 4px 12px rgba(0,0,0,0.10), 0 12px 28px rgba(0,0,0,0.14);
  --menu-bg:        #FFFFFF;
  --menu-hover:     #F0F0F0;

  /* sphere = predominantly white with a soft gray edge for depth */
  --sphere-gradient: radial-gradient(circle at 32% 28%,
                       #FFFFFF 0%,
                       #FDFDFD 25%,
                       #F5F5F5 55%,
                       #E2E2E2 80%,
                       #C8C8C8 100%);
  --sphere-shadow:  0 24px 50px rgba(0,0,0,0.12),
                    0 0 40px rgba(0,0,0,0.04),
                    inset -6px -12px 28px rgba(0,0,0,0.06);
  --sphere-rim:     rgba(0,0,0,0.05);
  --sphere-glow:    rgba(0,0,0,0.03);

  --mesh-a: 1,1,1;
  --mesh-b: 0.96,0.96,0.96;
  --mesh-c: 0.85,0.85,0.85;
  --mesh-int: 0.45;
}

/* ICE — your exact hex #E9F0F6 + matching grays + pale 3D sphere (grays only) */
:root[data-theme="ice"] {
  --bg-1:           #E9F0F6;
  --bg-2:           #DCE2E8;
  --ink:            #1A1A1A;
  --ink-2:          rgba(26,26,26,0.65);
  --ink-3:          rgba(26,26,26,0.40);
  --rule:           rgba(26,26,26,0.10);
  --rule-2:         rgba(26,26,26,0.22);
  --glass-bg:       rgba(255,255,255,0.55);
  --glass-bg-2:     rgba(255,255,255,0.75);
  --glass-border:   rgba(26,26,26,0.10);
  --glass-edge:     rgba(26,26,26,0.16);
  --glass-shadow:   0 28px 80px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.85);
  --ico-shadow:       0 2px 6px rgba(0,0,0,0.04), 0 6px 16px rgba(0,0,0,0.06);
  --ico-shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 12px 28px rgba(0,0,0,0.10);
  --menu-bg:        #FFFFFF;
  --menu-hover:     #E9F0F6;

  /* sphere = pale 3D ball, grays only with one faint #E9F0F6 highlight tint */
  --sphere-gradient: radial-gradient(circle at 32% 28%,
                       #FFFFFF 0%,
                       #FAFBFC 12%,
                       #E9F0F6 32%,
                       #C9CDD0 65%,
                       #A8ABAE 92%,
                       #8E9194 100%);
  --sphere-shadow:  0 30px 60px rgba(0,0,0,0.16),
                    0 0 50px rgba(255,255,255,0.4),
                    inset -8px -16px 36px rgba(0,0,0,0.10);
  --sphere-rim:     rgba(26,26,26,0.06);
  --sphere-glow:    rgba(255,255,255,0.5);

  --mesh-a: 0.914,0.941,0.965;
  --mesh-b: 0.88,0.88,0.88;
  --mesh-c: 0.70,0.70,0.70;
  --mesh-int: 0.65;
}

/* ─── BASE ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg-1);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  min-height: 100vh; min-height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.8s var(--ease), color 0.8s var(--ease);
  user-select: none;
  -webkit-user-select: none;
}

/* ─── BACKGROUND (WebGL canvas always visible) ─────────── */
#bgMesh {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}
body.no-webgl {
  background:
    radial-gradient(70% 70% at 50% 45%, var(--bg-2), var(--bg-1)) center/cover no-repeat fixed,
    var(--bg-1);
}
.bg-vignette {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 50%, transparent 60%, rgba(0,0,0,0.35) 100%);
}
:root[data-theme="light"] .bg-vignette { display: none; }
:root[data-theme="ice"]   .bg-vignette {
  background: radial-gradient(120% 80% at 50% 50%, transparent 65%, rgba(0,0,0,0.06) 100%);
}

/* ─── FRAME ────────────────────────────────────────────── */
.frame {
  position: fixed; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  padding:
    max(clamp(20px, 4vw, 36px), env(safe-area-inset-top))
    max(clamp(20px, 4vw, 36px), env(safe-area-inset-right))
    max(clamp(20px, 4vw, 36px), env(safe-area-inset-bottom))
    max(clamp(20px, 4vw, 36px), env(safe-area-inset-left));
  pointer-events: none;
}
.frame > * { pointer-events: auto; }

/* ─── TOP — AARON COOK. ───────────────────────────────── */
.top {
  text-align: center;
  opacity: 0;
  animation: fadeIn 1s var(--ease) 0.2s forwards;
}
.top .name {
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 700;
  letter-spacing: var(--tight);
  text-transform: uppercase;
  line-height: 1;
}
.top .name .accent {
  font-family: 'The Seasons', serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.top .role {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

/* ─── THEME SWITCHER ───────────────────────────────────── */
/* Single-word pill showing current mode. Tap opens a vertical popup. */
.theme {
  position: fixed;
  top: max(clamp(20px, 4vw, 36px), env(safe-area-inset-top));
  right: max(clamp(20px, 4vw, 36px), env(safe-area-inset-right));
  z-index: 55;
  opacity: 0;
  animation: fadeIn 1s var(--ease) 0.5s forwards;
}
.theme-current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--ico-shadow);
  transition: background 0.25s var(--ease), transform 0.4s var(--spring-bounce);
}
.theme-current:hover { transform: scale(1.04); }
.theme-current:active { transform: scale(0.96); }
.theme-current .caret {
  font-size: 8px;
  transition: transform 0.35s var(--spring-soft);
}
.theme.open .theme-current .caret { transform: rotate(180deg); }

.theme-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex; flex-direction: column;
  gap: 2px;
  background: var(--menu-bg);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 4px;
  box-shadow: var(--glass-shadow);
  opacity: 0;
  transform: translateY(-6px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.4s var(--spring-soft);
  min-width: 120px;
  z-index: 60;         /* above the theme-scrim */
}

/* ─── THEME SCRIM — blurs background when popover is open ── */
.theme-scrim {
  position: fixed; inset: 0;
  z-index: 5;
  pointer-events: none;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  background: transparent;
  opacity: 0;
  transition: backdrop-filter 0.35s var(--ease), background 0.35s var(--ease), opacity 0.25s var(--ease);
}
.theme-scrim.active {
  opacity: 1;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
:root[data-theme="light"] .theme-scrim.active { background: rgba(0, 0, 0, 0.08); }
:root[data-theme="ice"]   .theme-scrim.active { background: rgba(0, 0, 0, 0.06); }
.theme.open .theme-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.theme-menu button {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 10px 16px;
  color: var(--ink);
  opacity: 1;
  border-radius: 12px;
  text-align: left;
  transition: background 0.2s var(--ease);
  white-space: nowrap;
}
.theme-menu button:hover { background: var(--menu-hover); }
.theme-menu button.active {
  background: var(--menu-hover);
}
.theme-menu button.active::after {
  content: "•";
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  vertical-align: middle;
}

/* ─── STAGE ─────────────────────────────────────────────── */
.stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

/* Desktop side rails — labels at very edges so it doesn't feel sparse */
.rail {
  position: fixed;
  z-index: 3;
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 1.2s var(--ease) 0.8s forwards;
}
.rail.left {
  left: clamp(20px, 4vw, 36px);
  top: 50%;
  transform-origin: left top;
  transform: rotate(-90deg) translateX(-50%);
}
.rail.right {
  right: clamp(20px, 4vw, 36px);
  top: 50%;
  transform-origin: right top;
  transform: rotate(90deg) translateX(50%);
}
@media (max-width: 740px) { .rail { display: none; } }

/* ─── ORB ───────────────────────────────────────────────── */
.orb-wrap {
  position: relative;
  width: var(--orb-size);
  height: var(--orb-size);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  animation: fadeIn 1.2s var(--ease) 0.7s forwards;
  transition: opacity 0.3s var(--ease);
  z-index: 5;
}

/* outer glow ring — pulses outward */
.orb-glow {
  position: absolute;
  inset: -45%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sphere-glow) 0%, transparent 55%);
  animation: orbGlow 5s ease-in-out infinite;
  pointer-events: none;
}

/* breathing wrapper — does the scaling animation */
.orb-breathe {
  position: absolute;
  inset: 0;
  display: block;
  animation: orbBreathe 5s ease-in-out infinite;
  transform-origin: center;
}

/* the sphere itself — 3D ball. Transform set by JS for cursor interaction. */
.orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--sphere-gradient);
  box-shadow: var(--sphere-shadow);
  transform-origin: center;
  transition: transform 0.4s var(--ease);
  will-change: transform;
}

/* the rim was removed by request — kept as no-op to avoid breaking references */
.orb-rim { display: none; }

/* second specular hotspot — adds depth. Lives inside breathe wrapper. */
.orb-spec {
  position: absolute;
  top: 14%; left: 20%;
  width: 28%; height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.45) 0%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}
:root[data-theme="dark"] .orb-spec { background: radial-gradient(ellipse, rgba(255,255,255,0.7) 0%, transparent 70%); }

.orb-hint {
  position: fixed;
  bottom: calc(15vh + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
  animation: hintPulse 3s ease-in-out 1.5s infinite;
  transition: opacity 0.6s var(--ease);
}
.orb-hint.hidden {
  opacity: 0 !important;
  animation: none;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.85; }
}

/* Dramatic breathing */
@keyframes orbBreathe {
  0%, 100% { transform: scale(1) translateY(0); }
  50%      { transform: scale(1.14) translateY(-2px); }
}
@keyframes orbGlow {
  0%, 100% { transform: scale(1);    opacity: 0.85; }
  50%      { transform: scale(1.28); opacity: 0.45; }
}
@keyframes orbRim {
  0%, 100% { transform: scale(1);    opacity: 0.6; }
  50%      { transform: scale(1.08); opacity: 0.25; }
}
@keyframes hintFade {
  0%, 100% { opacity: 0; }
  35%, 55% { opacity: 0.7; }
}

/* Tap feedback only */
.orb-wrap:active .orb-breathe { transform: scale(0.92); transition: transform 0.2s var(--ease); }

/* When orb is open: shrink and fade away, the panel takes its place */
.orb-wrap.menu-open {
  pointer-events: none;
  opacity: 0;
  transform: scale(0.5);
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease);
}

/* ─── PANEL — sits ABOVE scrim, outside frame stacking context ─ */
.panel {
  position: fixed;
  left: 50%; top: 50%;
  width: var(--orb-size);
  height: var(--orb-size);
  transform: translate(-50%, -50%) scale(0.6);
  background: var(--glass-bg);
  border: 0;                          /* pure floating glass — no stroke */
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  box-shadow: var(--glass-shadow);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
  transition:
    width 0.6s var(--spring-soft),
    height 0.6s var(--spring-soft),
    border-radius 0.6s var(--spring-soft),
    transform 0.5s var(--ease),
    opacity 0.3s var(--ease);
}
.panel::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg,
              var(--glass-edge) 0%, transparent 30%,
              transparent 70%, var(--glass-edge) 100%);
  opacity: 0.4;
  pointer-events: none;
  mix-blend-mode: overlay;
  border-radius: inherit;
}

/* panel open states */
.panel.open {
  opacity: 1;
  pointer-events: auto;
  width:  min(420px, 88vw);
  height: auto;
  max-height: calc(100vh - 80px);
  max-height: calc(100dvh - 80px);
  border-radius: 32px;
  transform: translate(-50%, -50%) scale(1);
}
.panel.morphed-wide {
  width:  min(580px, 92vw);
  border-radius: 28px;
}
.panel.morphed-tall {
  width:  min(460px, 90vw);
  border-radius: 28px;
}

/* panel-stack — single column flexbox so panel sizes to content */
.panel-stack {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* views — only the active one renders. Equal padding top/bottom. */
.view {
  display: none;
  padding: clamp(20px, 3.5vw, 28px);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--spring-soft);
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 80px);
  max-height: calc(100dvh - 80px);
}
.view::-webkit-scrollbar { width: 0; }
.view.active {
  display: flex;
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.15s;
  animation: viewReveal 0.5s var(--ease) 0.1s both;
}
@keyframes viewReveal {
  from { opacity: 0; transform: translateY(8px) scale(0.97); filter: blur(6px); }
  to   { opacity: 1; transform: none;                         filter: blur(0); }
}

/* panel head */
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: clamp(14px, 2.5vw, 20px);
  flex-shrink: 0;
}
.panel-head .lbl {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--ink-3);
}
.panel-head .actions { display: flex; gap: 4px; }
.panel-head .btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--ink-2);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.panel-head .btn:hover { background: var(--glass-bg-2); color: var(--ink); }
.panel-head .btn svg { width: 14px; height: 14px; }

/* MENU */
.menu {
  display: flex; flex-direction: column;
  gap: 6px;
  flex: 1;
  background: transparent;
  border-radius: 16px;
}
.menu button {
  background: var(--glass-bg);
  border-radius: 14px;
  padding: clamp(14px, 2.5vw, 18px) 20px;
  display: flex; justify-content: space-between; align-items: center;
  text-align: left;
  transition:
    background 0.25s var(--ease),
    padding-left 0.4s var(--spring-soft),
    box-shadow 0.4s var(--ease);
  box-shadow: var(--ico-shadow);
  opacity: 0;
  transform: translateY(8px);
  filter: blur(6px);
  animation: menuReveal 0.55s var(--ease) forwards;
}
.menu button:nth-child(1) { animation-delay: 0.12s; }
.menu button:nth-child(2) { animation-delay: 0.20s; }
.menu button:nth-child(3) { animation-delay: 0.28s; }
.menu button:nth-child(4) { animation-delay: 0.36s; }
@keyframes menuReveal {
  to { opacity: 1; transform: none; filter: blur(0); }
}
.menu button:hover {
  background: var(--glass-bg-2);
  padding-left: 28px;
  box-shadow: var(--ico-shadow-hover);
}
.menu button:active { transform: scale(0.985); }
.menu button .l { display: flex; flex-direction: column; gap: 3px; }
.menu button .ttl {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.menu button .sub {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.menu button .arrow {
  font-size: 14px;
  color: var(--ink-3);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}
.menu button:hover .arrow { transform: translateX(4px); color: var(--ink); }

/* CONTACT — editorial typographic list */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex; flex-direction: column;
}
.contact-list li {
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  transform: translateY(10px);
  filter: blur(6px);
  animation: contactRowReveal 0.6s var(--ease) forwards;
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list li:nth-child(1) { animation-delay: 0.12s; }
.contact-list li:nth-child(2) { animation-delay: 0.22s; }
.contact-list li:nth-child(3) { animation-delay: 0.32s; }
.contact-list li:nth-child(4) { animation-delay: 0.42s; }
@keyframes contactRowReveal {
  to { opacity: 1; transform: none; filter: blur(0); }
}

.contact-list a, .contact-list button {
  width: 100%;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition: padding-left 0.45s var(--spring-soft), color 0.3s var(--ease);
  background: transparent;
  border: 0;
}
.contact-list a:hover, .contact-list button:hover {
  padding-left: 16px;
}
.contact-list .num {
  font-size: 9px;
  letter-spacing: 0.24em;
  font-weight: 500;
  color: var(--ink-3);
  font-feature-settings: "tnum";
}
.contact-list .meta {
  display: flex; flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.contact-list .role {
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.contact-list .val {
  font-size: clamp(20px, 4.5vw, 26px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-list .mark {
  font-size: 16px;
  font-weight: 300;
  color: var(--ink-3);
  transition: transform 0.45s var(--spring-bounce), color 0.3s var(--ease);
}
.contact-list a:hover .mark,
.contact-list button:hover .mark {
  color: var(--ink);
  transform: translateX(6px);
}

/* SHOP */
.prods {
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 12px;
  flex: 1;
}
.prods::-webkit-scrollbar { height: 0; }
.prod {
  flex: 0 0 150px;
  scroll-snap-align: start;
  background: var(--glass-bg);
  border: 0;
  box-shadow: var(--ico-shadow);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.4s var(--spring-soft), background 0.25s var(--ease), box-shadow 0.4s var(--ease);
  opacity: 0;
  filter: blur(8px);
  animation: prodReveal 0.7s var(--ease) forwards;
}
.prod:nth-child(1) { animation-delay: 0.10s; }
.prod:nth-child(2) { animation-delay: 0.18s; }
.prod:nth-child(3) { animation-delay: 0.26s; }
.prod:nth-child(4) { animation-delay: 0.34s; }
.prod:nth-child(5) { animation-delay: 0.42s; }
.prod:nth-child(6) { animation-delay: 0.50s; }
.prod:nth-child(7) { animation-delay: 0.58s; }
.prod:nth-child(8) { animation-delay: 0.66s; }
.prod:hover { transform: translateY(-4px); background: var(--glass-bg-2); box-shadow: var(--ico-shadow-hover); }

@keyframes prodReveal {
  from { opacity: 0; filter: blur(8px); transform: translateY(10px); }
  to   { opacity: 1; filter: blur(0);   transform: none; }
}
.prod .img {
  aspect-ratio: 3/4;
  background: var(--bg-2) center/cover;
  position: relative;
}
.prod .img .stock {
  position: absolute; top: 8px; left: 8px;
  font-size: 7.5px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 7px;
  font-weight: 600;
  border-radius: 4px;
  /* Always-readable on any photo: dark frosted pill with white text */
  background: rgba(0, 0, 0, 0.65);
  color: #FFFFFF;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.prod .img .stock.out {
  background: rgba(255, 255, 255, 0.92);
  color: #000000;
}
.prod .info { padding: 8px 10px 10px; }
.prod .info .ttl { display: block; font-size: 11px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.prod .info .price { display: block; font-size: 10px; color: var(--ink-2); margin-top: 3px; }

.prods-skel { display: flex; gap: 10px; padding: 4px 0 12px; flex: 1; }
.prods-skel .s {
  flex: 0 0 150px; aspect-ratio: 3/4.5;
  background: linear-gradient(90deg, var(--glass-bg) 0%, var(--rule) 50%, var(--glass-bg) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: 14px;
}
.shop-foot {
  flex-shrink: 0; padding-top: 12px; text-align: center;
}
.shop-foot a {
  font-size: 9.5px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-2); border-bottom: 1px solid var(--rule-2); padding-bottom: 2px;
}
.prods-err {
  flex: 1; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 20px; font-size: 12px; color: var(--ink-3);
}
.prods-err a { color: var(--ink); border-bottom: 1px solid var(--rule-2); }

/* SEYELENS — 3D rotating coverflow gallery */
.folio {
  position: relative;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  padding: 8px 0;
  height: 220px;
  margin-bottom: 8px;
  cursor: grab;
  flex-shrink: 0;
}
.folio.dragging { cursor: grabbing; }
.folio-3d {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
  /* No CSS transition — JS lerp owns the rotation. Prevents double-easing stutter. */
}
.folio .tile {
  position: absolute;
  top: 50%; left: 50%;
  width: 100px;
  height: 140px;
  margin: -70px 0 0 -50px;
  border-radius: 10px;
  background: var(--bg-2) center/cover;
  background-size: cover;
  box-shadow: var(--ico-shadow);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: box-shadow 0.4s var(--ease), filter 0.5s var(--ease);
  will-change: transform, filter;
}
.folio .tile.facing { box-shadow: var(--ico-shadow-hover); }
.folio .tile.behind { filter: brightness(0.55) blur(1px); }

.folio-foot { text-align: center; flex-shrink: 0; margin-top: 4px; }
.folio-foot .link-cta {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
  padding: 6px 0;
  position: relative;
  opacity: 0;
  animation: linkReveal 0.7s var(--ease) 0.4s forwards;
}
.folio-foot .link-cta::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease);
}
.folio-foot .link-cta:hover::after { transform: scaleX(1); }
@keyframes linkReveal {
  from { opacity: 0; transform: translateY(6px); filter: blur(4px); }
  to   { opacity: 1; transform: none;            filter: blur(0);  }
}

/* EDITORIAL */
.edit {
  flex: 1 0 auto;
  display: flex; flex-direction: column;
  padding: 0;
}
.edit .word {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(34px, 6.5vw, 48px);
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0 0 14px;
  text-align: left;
  text-transform: uppercase;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(8px);
  animation: editReveal 0.7s var(--ease) 0.15s forwards;
}
.edit p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  text-align: left;
  max-width: 38ch;
  margin: 0;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(6px);
  animation: editReveal 0.6s var(--ease) 0.30s forwards;
}
.edit-foot { text-align: left; margin-top: 18px; flex-shrink: 0; }
.edit-foot a {
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink); font-weight: 600;
  position: relative;
  padding-bottom: 3px;
  opacity: 0;
  filter: blur(4px);
  animation: editReveal 0.5s var(--ease) 0.50s forwards;
}
.edit-foot a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease);
}
.edit-foot a:hover::after { transform: scaleX(1); }
@keyframes editReveal {
  to { opacity: 1; filter: blur(0); transform: none; }
}

/* ─── SCRIM ────────────────────────────────────────────── */
/* Sits below the panel — backdrop-filter blurs the body, not the panel. */
.scrim {
  position: fixed; inset: 0;
  z-index: 40;
  background: transparent;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  pointer-events: none;
  transition: backdrop-filter 0.5s var(--ease), background 0.5s var(--ease);
}
.scrim.open {
  background: rgba(0,0,0,0.30);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  pointer-events: auto;
}
:root[data-theme="light"] .scrim.open { background: rgba(0,0,0,0.18); }
:root[data-theme="ice"]   .scrim.open { background: rgba(0,0,0,0.14); }

/* ─── BOTTOM ───────────────────────────────────────────── */
.bottom {
  text-align: center;
  font-size: 9px;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0;
  animation: fadeIn 1s var(--ease) 0.5s forwards;
}

/* ─── TABLET (portrait, ~600–900px) ────────────────────── */
@media (min-width: 600px) and (max-width: 879px) {
  :root { --orb-size: clamp(200px, 30vmin, 280px); }
  .top .name { font-size: clamp(26px, 4vw, 36px); }
  .panel.open { width: min(440px, 70vw); }
  .panel.morphed-wide { width: min(620px, 80vw); }
  .panel.morphed-tall { width: min(480px, 72vw); }
}

/* ─── DESKTOP LAYOUT REFINEMENT (~880px+) ──────────────── */
@media (min-width: 880px) {
  :root { --orb-size: clamp(220px, 28vmin, 320px); }
  .top .name { font-size: clamp(28px, 3.4vw, 44px); }
  .top .role { font-size: 11px; margin-top: 12px; }
}

/* ─── LARGE DESKTOP (~1400px+) ─────────────────────────── */
@media (min-width: 1400px) {
  :root { --orb-size: clamp(280px, 24vmin, 360px); }
  .top .name { font-size: 48px; }
}

/* ─── MOBILE LAYOUT — toggle centered top, name & role below ─ */
@media (max-width: 599px) {
  /* Frame uses larger top padding so things sit away from notch/Safari chrome */
  .frame {
    padding-top: max(60px, calc(env(safe-area-inset-top) + 36px));
  }

  /* Theme switcher centered at top */
  .theme {
    position: fixed;
    top: max(20px, calc(env(safe-area-inset-top) + 12px));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  /* Popover anchors to center, opens straight down */
  .theme-menu {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-6px) scale(0.95);
  }
  .theme.open .theme-menu {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  /* Top block (name + role) padded below the theme toggle */
  .top {
    padding-top: 56px;
  }
  .top .name {
    font-size: 22px;
  }
  .top .role {
    font-size: 9.5px;
    margin-top: 6px;
  }
}

/* ─── SMALL PHONES ─────────────────────────────────────── */
@media (max-width: 380px) {
  .panel.open { width: 94vw; }
  .top .name { font-size: 20px; }
  .top .role { font-size: 9px; }
}

/* ─── PHONE LANDSCAPE — squat panels ───────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --orb-size: 140px; }
  .top { display: none; }
  .bottom { display: none; }
  .panel.open { max-height: 90vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .orb-wrap, .top, .bottom, .theme, .rail { opacity: 1; }
  .contact-list li, .menu button, .edit .word, .edit p, .edit-foot a, .prod { opacity: 1; filter: none; transform: none; }
}

@keyframes fadeIn { to { opacity: 1; } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
