/* Water Sort — laboratory glass on ink. System fonts only. */
:root {
  --ink: #080b16;
  --ink-2: #101628;
  --panel: rgba(16, 22, 40, 0.88);
  --glass: rgba(255, 255, 255, 0.06);
  --line: rgba(186, 214, 255, 0.16);
  --line-strong: rgba(186, 214, 255, 0.28);
  --text: #eef2ff;
  --muted: #9aa3c2;
  --aqua: #3ee0c7;
  --aqua-deep: #1aa392;
  --coral: #ff5a8a;
  --gold: #f4c95d;
  --violet: #8b78fa;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 28px;
  --sans: "Avenir Next", "Segoe UI", "Gill Sans", "Trebuchet MS", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --measure: 42rem;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--ink); color: var(--text); }
body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(62, 224, 199, 0.14), transparent 60%),
    radial-gradient(700px 480px at 100% 20%, rgba(255, 90, 138, 0.08), transparent 55%),
    var(--ink);
  min-height: 100%;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--aqua); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #7ff3e2; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; letter-spacing: -0.03em; color: var(--text); }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 0 0.35em; }
h2 { font-size: clamp(1.45rem, 3.4vw, 2rem); margin: 0 0 0.7em; }
p { margin: 0 0 1em; color: var(--text); }
p:last-child { margin-bottom: 0; }

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 20;
  background: var(--aqua);
  color: #06231e;
  padding: 8px 12px;
  border-radius: 8px;
}
.skip:focus { top: 12px; }

/* Header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(8, 11, 22, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease, background 160ms ease;
}
.site-head.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(8, 11, 22, 0.9);
}
.site-head-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 1.15rem;
}
.brand-mark svg { display: block; width: 36px; height: 36px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  overflow: hidden;
}
.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  background: var(--glass);
}

/* Home */
.home { padding-bottom: 4rem; }
.hero {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 20px 0.5rem;
  text-align: center;
}
.hero-kicker,
.kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--aqua);
  margin: 0 0 10px;
}
.kicker span {
  display: inline-block;
  margin-right: 8px;
  color: var(--gold);
}
.hero-lede {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 36rem;
  margin: 0 auto 1.25rem;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4.15;
  min-height: 560px;
  max-height: 86vh;
  margin: 0 auto 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0a10;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06);
}
.stage iframe,
.cover,
.loader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cover {
  display: grid;
  place-items: end center;
  background: #0a0a10;
}
.cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,11,22,0) 50%, rgba(8,11,22,0.55) 100%);
  pointer-events: none;
}
.play-btn {
  position: relative;
  z-index: 1;
  margin-bottom: 12%;
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #06231e;
  background: linear-gradient(180deg, #7ff3e2, var(--aqua) 55%, var(--aqua-deep));
  padding: 0.95rem 1.8rem;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(62, 224, 199, 0.28);
}
.play-btn:hover { filter: brightness(1.06); }
.play-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.play-btn-mini {
  display: inline-flex;
  margin: 0;
  font-size: 0.98rem;
  padding: 0.7rem 1.2rem;
  text-decoration: none;
  color: #06231e;
}

.loader {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #0a0a10;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.08em;
}
.stage[data-gf-state="loading"] .loader { display: flex; }
.pour-rack { display: flex; gap: 14px; align-items: flex-end; height: 120px; }
.pour-tube {
  width: 28px;
  height: 110px;
  border: 1.5px solid rgba(215, 222, 239, 0.7);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  overflow: hidden;
  position: relative;
}
.pour-tube i {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0;
  animation: fill-up 1.4s ease-in-out infinite;
}
.pour-tube:nth-child(1) i { background: var(--coral); animation-delay: 0s; }
.pour-tube:nth-child(2) i { background: var(--aqua); animation-delay: 0.2s; }
.pour-tube:nth-child(3) i { background: var(--gold); animation-delay: 0.4s; }
@keyframes fill-up {
  0% { height: 12%; }
  55% { height: 78%; }
  100% { height: 18%; }
}

.engage {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 2.5rem;
}
.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
}
.chip:hover, .chip:focus-visible { border-color: var(--aqua); }
.chip[aria-pressed="true"],
.chip[data-gf-liked] {
  background: rgba(62, 224, 199, 0.16);
  border-color: var(--aqua);
  color: var(--aqua);
}
.chip-strong {
  background: rgba(244, 201, 93, 0.12);
  border-color: rgba(244, 201, 93, 0.4);
}
.share-msg { color: var(--aqua); font-size: 0.88rem; align-self: center; }

.block {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.8rem 20px 0.4rem;
}
.block p { color: #d8deef; }
.shot {
  margin: 1.4rem 0 0;
  padding: 10px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.shot img {
  margin: 0 auto;
  max-height: 28rem;
  width: auto;
  border-radius: 12px;
}
.shot figcaption {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}

.faq-list { margin: 0; }
.faq-item {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item dt {
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  color: var(--text);
}
.faq-item dd { margin: 0; color: #d8deef; }

.comments .invite { color: var(--muted); }
.comment-form, .comment, .comment-reply {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin: 1rem 0;
}
.comment[data-gf-owner] {
  border-color: rgba(62, 224, 199, 0.45);
  box-shadow: inset 3px 0 0 var(--aqua);
}
.field { display: block; margin-bottom: 12px; }
.field span {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(8, 11, 22, 0.7);
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
  border-radius: 10px;
}
.field input:focus,
.field textarea:focus { outline: 2px solid var(--aqua); outline-offset: 1px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.text-btn {
  appearance: none;
  border: 0;
  background: none;
  color: var(--aqua);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  min-height: 44px;
}
.form-msg, .replying-line { color: var(--muted); font-size: 0.9rem; }
.count:not(:empty)::before { content: "("; }
.count:not(:empty)::after { content: ")"; }
.comment-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.comment-head time, [data-gf-c-to] { color: var(--muted); font-size: 0.85rem; }
.owner-flag { display: none; }
[data-gf-c-owner]:not(:empty),
.comment[data-gf-owner] .owner-flag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #06231e;
  background: var(--aqua);
  border-radius: 999px;
  padding: 2px 8px;
}
[data-gf-comments] .empty-comments { display: none; color: var(--muted); }
[data-gf-comments][data-gf-empty] .empty-comments { display: block; }
[data-gf-comments][data-gf-off] { display: none; }
[data-gf-reply-cancel] { display: none; }
[data-gf-replying] [data-gf-reply-cancel] { display: inline; }

/* Legal / contact */
.legal {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 20px 4rem;
}
.legal-updated, .legal-section p { color: #d8deef; }
.legal-section { margin-top: 1.6rem; }
.legal-section h2 { font-size: 1.25rem; }

/* Footer */
.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  background: #070915;
}
.site-foot-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 20px 2.4rem;
}
.foot-brand {
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.foot-note { color: var(--muted); max-width: 36rem; font-size: 0.95rem; }
.foot-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 1rem 0 0;
  margin: 0;
}
.foot-links a { color: var(--text); text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--aqua); }
.foot-copy {
  margin-top: 1.2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .site-head-inner { padding: 10px 14px; }
  .site-nav a { padding: 8px 9px; font-size: 0.86rem; }
  .hero { padding-top: 1rem; }
  .stage {
    aspect-ratio: 3 / 4.4;
    min-height: 70vh;
    border-radius: 20px;
  }
  .play-btn { font-size: 1.05rem; padding: 0.9rem 1.4rem; }
  .chip { min-height: 44px; }
}

@media (min-width: 900px) {
  .stage {
    max-width: 28.5rem;
  }
}

.cover { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.stage iframe { touch-action: manipulation; }

/* Phones: header scrolls away so it never sits over the top of the game frame. */
@media (max-width: 640px) { .site-head { position: relative; } }
.stage, #play { scroll-margin-top: 72px; }

/* Engine hides cover/loader with the hidden attribute; never override it. */
[hidden] { display: none !important; }
