/* slows.land — web player styles */
:root {
  --bg: #05060a;
  --accent: hsl(220 80% 62%);
  --glass: rgba(255, 255, 255, 0.07);
  --glass-line: rgba(255, 255, 255, 0.14);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Inter", "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  overflow: hidden;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* clean, even display face (real SF on Apple, Inter elsewhere) */
.font-round { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Inter", sans-serif; }

/* ---- stage / canvases ---- */
#stage { position: fixed; inset: 0; touch-action: none; }
#lava, #stripes {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
#stripes { mix-blend-mode: screen; opacity: .9; pointer-events: none; }
body.no-webgl #lava {
  background:
    radial-gradient(60% 50% at 30% 30%, hsl(260 70% 30% / .9), transparent 70%),
    radial-gradient(55% 45% at 70% 70%, hsl(200 70% 28% / .9), transparent 70%),
    #05060a;
  animation: drift 18s var(--ease) infinite alternate;
}
@keyframes drift { to { filter: hue-rotate(40deg); } }
.veil {
  position: fixed; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.45) 0%, transparent 22%, transparent 55%, rgba(0,0,0,.65) 100%);
}

/* ---- immersive mode: hide every chrome layer, leave only the visual ---- */
.top, .promo, .center, .dock, .foot { transition: opacity .55s var(--ease); }
body.immersive .top,
body.immersive .promo,
body.immersive .center,
body.immersive .dock,
body.immersive .foot {
  opacity: 0; pointer-events: none;
}
body.immersive #stage { cursor: pointer; }

/* coming-soon promo — top centre, above the hero */
.promo {
  position: fixed; left: 0; right: 0; z-index: 5;
  top: max(56px, calc(env(safe-area-inset-top) + 42px));
  display: flex; justify-content: center; pointer-events: none;
}
.promo .badge { pointer-events: auto; }

/* ---- top bar ---- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 22px 0;
}
.wordmark { font-size: 19px; font-weight: 500; letter-spacing: -.01em; }
.wordmark .land { font-weight: 300; opacity: .5; }
.top-right { display: flex; align-items: center; gap: 14px; }
.tagline { font-size: 12.5px; opacity: .45; font-weight: 400; }

/* hide-everything (immersive) button */
#immersive-btn {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff;
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: background .3s, transform .2s var(--ease);
}
#immersive-btn:hover { background: rgba(255,255,255,.16); }
#immersive-btn:active { transform: scale(.92); }
#immersive-btn svg { width: 17px; height: 17px; }

/* ---- center title ---- */
.center {
  position: fixed; left: 0; right: 0; top: 38%;
  transform: translateY(-50%); z-index: 4; text-align: center;
  padding: 0 24px; pointer-events: none;
  transition: top .9s var(--ease);
}
#atmo-name {
  font-weight: 200; letter-spacing: -.02em; line-height: 1.04;
  font-size: clamp(40px, 9vw, 96px);
  text-shadow: 0 4px 40px rgba(0,0,0,.4);
}
#atmo-desc { margin-top: 14px; font-size: clamp(14px, 2.2vw, 19px); opacity: .58; font-weight: 400; letter-spacing: .01em; }
.hint {
  margin-top: 22px; font-size: 13px; opacity: .4; letter-spacing: .02em;
  transition: opacity .5s;
}
body.playing .hint { opacity: 0; }

/* ---- bottom dock ---- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 0 16px max(20px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.dock::before {
  content: ""; position: absolute; inset: -40px 0 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.5) 60%);
}

/* atmosphere rail — a single glass strip of dots with a sliding glass plate */
#selector.rail {
  position: relative;
  display: inline-flex; align-items: center; gap: 2px;
  padding: 6px 8px; border-radius: 999px;
  max-width: calc(100vw - 28px);
  overflow-x: auto; scrollbar-width: none;
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 10px 34px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.1);
}
#selector.rail::-webkit-scrollbar { display: none; }
.tick {
  position: relative; z-index: 1; flex: 0 0 auto;
  width: 30px; height: 30px; border: none; background: none; cursor: pointer;
  display: grid; place-items: center; border-radius: 999px;
}
.tick .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: currentColor; opacity: .45; box-shadow: 0 0 8px currentColor;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.tick:hover .dot { opacity: .8; }
.tick.active .dot { opacity: 1; transform: scale(1.2); }
.rail-highlight {
  position: absolute; top: 6px; left: 0; width: 30px; height: 30px;
  border-radius: 999px; opacity: 0; pointer-events: none; z-index: 0;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: 0 2px 12px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .42s var(--ease), width .42s var(--ease), opacity .3s;
}

/* play */
#play {
  width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer;
  background: #fff; color: #000; display: grid; place-items: center;
  box-shadow: 0 8px 40px rgba(0,0,0,.4), 0 0 0 6px rgba(255,255,255,.06);
  transition: transform .2s var(--ease);
}
#play:active { transform: scale(.94); }
#play .i-play, #play .i-pause { width: 24px; height: 24px; fill: #000; }
#play .i-pause { display: none; }
body.playing #play .i-play { display: none; }
body.playing #play .i-pause { display: block; }

/* ---- pad module: segmented Sound / Color control ---- */
.pad-module { display: flex; flex-direction: column; align-items: center; gap: 9px; }

/* segmented switch (glass, Apple style, sliding highlight) */
.seg {
  position: relative; display: inline-flex; padding: 3px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.seg-btn {
  position: relative; z-index: 1; border: none; background: none; cursor: pointer; color: #fff;
  opacity: .55; font-size: 11.5px; font-weight: 500; letter-spacing: .02em;
  padding: 5px 17px; border-radius: 999px; transition: opacity .25s var(--ease);
}
.seg-btn.active { opacity: 1; }
.seg-hl {
  position: absolute; z-index: 0; top: 0; left: 0; width: 0; height: 0; border-radius: 999px;
  background: rgba(255,255,255,.17); border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 2px 8px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.32);
  transition: transform .35s var(--ease), width .35s var(--ease);
}

/* both pads share the same square stage */
.pad-stage { position: relative; width: 108px; height: 108px; }
.pad {
  position: absolute; inset: 0; border-radius: 18px; overflow: hidden;
  touch-action: none; cursor: crosshair;
}
.pad[hidden] { display: none; }

/* sound XY pad */
#xy {
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
#xy::before, #xy::after { content: ""; position: absolute; background: rgba(255,255,255,.08); }
#xy::before { left: 50%; top: 0; bottom: 0; width: 1px; }
#xy::after { top: 50%; left: 0; right: 0; height: 1px; }
#xy-knob {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); transform: translate(-50%, -50%);
  box-shadow: 0 0 16px var(--accent); transition: background .4s;
}
.pad-lbl { position: absolute; font-size: 8px; letter-spacing: .06em; color: rgba(255,255,255,.22); pointer-events: none; }
.pad-lbl.t { top: 5px; left: 50%; transform: translateX(-50%); }
.pad-lbl.b { bottom: 5px; left: 50%; transform: translateX(-50%); }
.pad-lbl.l { left: 6px; top: 50%; transform: translateY(-50%); }
.pad-lbl.r { right: 6px; top: 50%; transform: translateY(-50%); }

/* color pad */
#colorpad { border: 1px solid var(--glass-line); background: #111; }
#color-canvas { width: 100%; height: 100%; display: block; }
#color-knob {
  position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; border-radius: 50%;
  transform: translate(-50%, -50%); border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
}

/* coming-soon badge */
.badge {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  padding: 9px 15px; border-radius: 12px; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 12px; cursor: default;
}
.badge svg { width: 17px; height: 17px; fill: #fff; opacity: .95; }
.badge b { font-weight: 700; font-size: 13px; display: block; }
.badge span { opacity: .55; }

/* footer */
.foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 7;
  display: flex; gap: 16px; justify-content: center; align-items: center;
  padding: 0 0 6px; font-size: 11px; opacity: .35; pointer-events: none;
}
.foot a { color: #fff; text-decoration: none; pointer-events: auto; }
.foot a:hover { opacity: 1; text-decoration: underline; }
.foot .sep { opacity: .4; }

/* desktop / iPad: roomier, title higher, controls centered with xy to the side */
@media (min-width: 760px) {
  .center { top: 35%; }
  .pad-stage { width: 116px; height: 116px; }
  .dock { gap: 18px; padding-bottom: 26px; }
}
@media (max-width: 420px) {
  .dock { gap: 11px; }
  #play { width: 58px; height: 58px; }
  .pad-stage { width: 94px; height: 94px; }
  .foot { font-size: 10px; gap: 12px; }
  .tick { width: 27px; }
  .rail-highlight { width: 27px; }
  .tagline { display: none; }
}
@media (display-mode: standalone) { .top { padding-top: max(34px, env(safe-area-inset-top)); } }
