/* What 2 Watch: placeholder page. Pixel-art styles; no third-party fonts or assets. */

:root {
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
}

/* Pixel palettes: p1 lightest … p4 darkest, dim = faint background pixels */
[data-theme="moss"]  { --bg:#121316; --fg:#d6dccf; --muted:#8b9286; --p1:#e2ebc9; --p2:#b5d68a; --p3:#87b85a; --p4:#4e6b35; --dim:#26331f; --accent:#a3d06a; --on-accent:#10140b; --glitch-a:#ff4f7a; --glitch-b:#4ff0ff; }
[data-theme="amber"] { --bg:#141210; --fg:#efe3cf; --muted:#9c907c; --p1:#ffe8b0; --p2:#ffc861; --p3:#e0952f; --p4:#8a5518; --dim:#33240f; --accent:#ffc861; --on-accent:#1a1206; --glitch-a:#ff3b3b; --glitch-b:#3bc8ff; }
[data-theme="ice"]   { --bg:#0f1318; --fg:#d8e6ee; --muted:#83949f; --p1:#dff6ff; --p2:#8fd8f5; --p3:#4aa8d8; --p4:#24597a; --dim:#132634; --accent:#8fd8f5; --on-accent:#08141b; --glitch-a:#ff5ad1; --glitch-b:#7dff9b; }
[data-theme="rose"]  { --bg:#151114; --fg:#f0dde6; --muted:#9e8792; --p1:#ffe0ee; --p2:#ff9fc8; --p3:#e05f9a; --p4:#7f2d55; --dim:#321524; --accent:#ff9fc8; --on-accent:#1c0a13; --glitch-a:#ffe14f; --glitch-b:#4fd0ff; }
[data-theme="mono"]  { --bg:#111111; --fg:#e6e6e6; --muted:#8c8c8c; --p1:#f2f2f2; --p2:#bdbdbd; --p3:#858585; --p4:#4a4a4a; --dim:#242424; --accent:#e6e6e6; --on-accent:#111111; --glitch-a:#ff2b2b; --glitch-b:#2bdcff; }

*, *::before, *::after { box-sizing: border-box; }

/* One fixed screen: no scrolling. Sizes below scale with both width and height. */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  margin: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
main { display: flex; flex-direction: column; justify-content: center; min-height: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.stage {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  image-rendering: pixelated;
}

.bar, main, .foot { position: relative; z-index: 1; }

/* Top bar */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) clamp(1rem, 4vw, 2.5rem) 1rem;
  font-size: .8rem;
  color: var(--muted);
}
.brand { display: inline-flex; align-items: center; color: var(--p2); font-weight: 800; font-size: 1.1rem; min-height: 28px; }
.bar-hint { letter-spacing: .08em; }

/* Hero */
.hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 0 clamp(1rem, 5vw, 3rem) .5rem;
}

.logo-slot { width: min(420px, 80vw); height: clamp(60px, min(13vw, 15vh), 150px); }
.metallic-paint { position: relative; }
.metallic-paint-canvas { display: block; width: 100%; height: 100%; }
.metallic-paint--fallback { display: grid; place-items: center; font-size: clamp(3rem, 10vw, 5rem); font-weight: 800; color: var(--p2); }

.title-slot { width: min(1100px, 96vw); height: clamp(70px, min(15vw, 19vh), 190px); }

.sub {
  margin: clamp(.3rem, 1.6vh, 1.2rem) 0 .4rem;
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
  font-weight: 700;
  color: var(--fg);
}
.small {
  margin: 0;
  max-width: 40rem;
  font-size: clamp(.82rem, 1.6vw, .95rem);
  color: var(--muted);
}

.actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem;
  margin-top: clamp(.5rem, 2.2vh, 1.6rem);
}
.btn {
  display: inline-flex; align-items: center; gap: .65rem;
  min-height: 44px;
  padding: .6rem 1.05rem;
  font: 600 .92rem/1 var(--mono);
  cursor: pointer;
  border-radius: 0;
  transition: transform .08s steps(2), box-shadow .08s steps(2), background-color .15s;
}
.btn-primary { color: var(--on-accent); background: var(--accent); border: 2px solid var(--accent); box-shadow: 4px 4px 0 var(--p4); }
.btn-ghost { color: var(--fg); background: color-mix(in srgb, var(--bg) 70%, var(--dim)); border: 2px solid color-mix(in srgb, var(--fg) 22%, transparent); box-shadow: 4px 4px 0 var(--dim); }
.btn:hover { transform: translate(-1px, -1px); }
.btn-primary:hover { box-shadow: 5px 5px 0 var(--p4); }
.btn-ghost:hover { border-color: var(--p3); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 transparent; }
.btn kbd { font: 600 .7rem/1 var(--mono); padding: .2rem .35rem; border: 1px solid currentColor; opacity: .7; }
.btn-icon {
  width: 12px; height: 12px;
  background:
    linear-gradient(currentColor 0 0) 0 0 / 4px 4px no-repeat,
    linear-gradient(currentColor 0 0) 8px 0 / 4px 4px no-repeat,
    linear-gradient(currentColor 0 0) 4px 4px / 4px 4px no-repeat,
    linear-gradient(currentColor 0 0) 0 8px / 4px 4px no-repeat,
    linear-gradient(currentColor 0 0) 8px 8px / 4px 4px no-repeat;
}
.btn-play {
  width: 10px; height: 12px;
  background:
    linear-gradient(var(--p2) 0 0) 0 0 / 4px 12px no-repeat,
    linear-gradient(var(--p2) 0 0) 4px 2px / 3px 8px no-repeat,
    linear-gradient(var(--p2) 0 0) 7px 4px / 3px 4px no-repeat;
}
.theme-now { margin: clamp(.2rem, 1.2vh, 1rem) 0 0; min-height: 1.4em; font-size: .75rem; letter-spacing: .1em; color: var(--muted); }

:focus-visible { outline: 2px dashed var(--p2); outline-offset: 4px; }

/* ParticleText */
.particle-text { position: relative; display: block; overflow: hidden; touch-action: pan-y; isolation: isolate; color: var(--p2); }
.particle-text__canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.particle-text__canvas--full { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 2; }
.particle-text__sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Shuffle */
.shuffle-parent { visibility: hidden; }
.shuffle-parent.is-ready { visibility: visible; }
.shuffle-word { display: inline-block; white-space: nowrap; }
.shuffle-char-wrapper { display: inline-block; overflow: hidden; vertical-align: bottom; position: relative; }
.shuffle-inner { display: inline-flex; will-change: transform; white-space: nowrap; }
.shuffle-char { display: inline-block; text-align: center; line-height: 1.2; }
.shuffle-accent { color: var(--p2); }

/* FuzzyText */
.fuzzy-text { display: block; }

/* TextLoop */
/* The loop's drawing is taller than the band. Reserve only the band's height and let the drawing
   overflow (no clipping); the empty parts of the drawing ignore the pointer so buttons stay clickable. */
/* The visible band is about 24% of the drawing's width tall. Reserve that much (capped by screen height)
   and narrow the drawing when the cap applies, so the band never rises into the buttons. */
.ribbon {
  --rh: min(24vw, 26vh);
  height: var(--rh);
  margin-top: clamp(1rem, 3vh, 2rem);
  display: flex; align-items: center; justify-content: center;
}
.ribbon.text-loop { overflow: visible; }
/* Size the drawing by height (the band is about 150 of its 520 units tall) and let the long wave
   overflow sideways so it spans the full width at any screen size. */
.ribbon .text-loop-svg { flex-shrink: 0; width: 100%; height: calc(var(--rh) * 3.1); pointer-events: none; overflow: visible; }
.ribbon .text-loop-ribbon, .ribbon .text-loop-ribbon-cross { pointer-events: visibleStroke; }
.text-loop { position: relative; width: 100%; overflow: hidden; }
.text-loop-svg { display: block; width: 100%; height: auto; }
.text-loop-text { user-select: none; font-family: var(--mono); }
.text-loop-measure { visibility: hidden; pointer-events: none; font-family: var(--mono); }
.text-loop-ribbon { stroke: var(--accent); }
.text-loop-ink { fill: var(--on-accent); }
.text-loop-ribbon-cross { stroke: var(--p4); }
.text-loop-ink-cross { fill: var(--p1); }

/* Footer */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1.5rem;
  padding: .4rem clamp(1rem, 4vw, 2.5rem) calc(.6rem + env(safe-area-inset-bottom, 0px));
  font-size: .78rem;
  color: var(--muted);
}
.foot p { margin: 0; padding: .35rem .6rem; background: color-mix(in srgb, var(--bg) 82%, transparent); }

@media (max-width: 560px) {
  .bar-hint { display: none; }
  .foot { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
