/* Drink the Ocean: "water gauge" theme. Blocky voxel look, the page is the sea and it drains as you scroll. */
:root {
  --sky: #bfeefa;
  --shallow: #5cc8e6;
  --sea: #1a8fc0;
  --deep: #0b4f7a;
  --abyss: #062b45;
  --ink: #06263b;
  --foam: #f2fbfe;
  --card: #ffffff;
  --salt: #fff6dc;
  --straw: #ffd166;
  --link: #0b5f91;
  --cola: #6b3a1f;
  --lemon: #f5e050;
  --slime: #7ed957;
  --lava: #ff6b35;
  --edge: #06263b;
  --wrap: 980px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, var(--sky) 0, var(--shallow) 480px, var(--sea) 1200px, var(--deep) 2300px, var(--abyss) 100%);
}

a { color: var(--link); }
img { max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 20; background: var(--card); padding: .5rem .8rem; border: 3px solid var(--edge); }

/* Header */
.top__in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; padding-top: .8rem; padding-bottom: .8rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); font-weight: 900; font-size: 1.15rem; text-decoration: none; letter-spacing: -.01em; }
.logo { display: block; flex: none; }
.top__nav { display: flex; gap: 1.1rem; }
.top__nav a { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; }
.top__nav a:hover, .top__nav a:focus-visible { border-bottom-color: var(--ink); }

/* Hero */
.hero h1 { margin: .5rem 0 .1rem; font-size: clamp(2.2rem, 7vw, 3.5rem); line-height: 1.05; font-weight: 900; letter-spacing: -.02em; text-shadow: 3px 3px 0 var(--foam); }
.hero__sub { margin: 0 0 1rem; color: var(--deep); font-weight: 700; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.2rem; min-height: 44px;
  background: var(--straw); color: var(--ink);
  border: 3px solid var(--edge); border-radius: 0; box-shadow: 0 5px 0 var(--edge);
  font: inherit; font-weight: 800; letter-spacing: .02em; text-decoration: none; cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge); }
.btn:focus-visible, .act:focus-visible { outline: 3px solid var(--foam); outline-offset: 3px; }
.btn--ghost { background: var(--card); }

/* Player: cover, loader and game share one 16:9 box */
.stage { position: relative; aspect-ratio: 16 / 9; background: var(--abyss); border: 4px solid var(--edge); box-shadow: 0 8px 0 var(--edge); overflow: hidden; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.stage__cover { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.stage__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage__art { position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky) 0 36%, var(--shallow) 36% 50%, var(--sea) 50% 66%, var(--deep) 66% 84%, var(--abyss) 84%); }
.btn--play { position: relative; z-index: 1; padding: .85rem 1.5rem; font-size: clamp(1.05rem, 2.6vw, 1.4rem); text-transform: uppercase; }
.stage__loader { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: 1rem; text-align: center; color: var(--foam); background: linear-gradient(180deg, var(--deep), var(--abyss)); }
.stage[data-gf-state] .stage__cover { display: none; }
.stage[data-gf-state="loading"] .stage__loader { display: flex; }
.stage__loading { margin: .6rem 0 0; font-weight: 800; font-size: 1.15rem; }
.stage__hint { margin: 0; font-size: .9rem; opacity: .8; }

/* Loader: a cup being sipped dry, in blocky steps */
.cup { position: relative; width: 64px; height: 76px; border: 4px solid var(--foam); border-top: 0; background: rgba(255, 255, 255, .08); }
.cup__water { position: absolute; left: 0; right: 0; bottom: 0; height: 85%; background: var(--shallow); animation: sip 1.8s steps(8) infinite; }
.cup__straw { position: absolute; left: 58%; bottom: 8px; width: 8px; height: 104px; background: var(--straw); transform: rotate(12deg); transform-origin: bottom; z-index: 1; }
@keyframes sip { from { height: 85%; } to { height: 8%; } }

/* Like / share / fullscreen */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1.1rem 0 .4rem; }
.act { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .45rem .9rem; background: var(--card); color: var(--ink); border: 3px solid var(--edge); border-radius: 0; box-shadow: 0 4px 0 var(--edge); font: inherit; font-weight: 700; cursor: pointer; }
.act:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.act svg { width: 20px; height: 20px; fill: var(--ink); }
.act[data-gf-liked], .act[aria-pressed="true"] { background: #ffe0e5; }
.act[data-gf-liked] .act__heart, .act[aria-pressed="true"] .act__heart { fill: #e63950; }
.act__count { min-width: 1ch; }
.act__count:empty { display: none; }
.act__msg { font-size: .9rem; font-weight: 700; }
.act--end { margin-left: auto; }

.credit { margin: 1rem 0 0; padding: .8rem 1rem; background: var(--salt); border: 3px solid var(--edge); font-size: .97rem; }
.credit a { font-weight: 700; }
.help-line { margin: .6rem 0 0; font-size: .97rem; }
.help-line a { font-weight: 700; }

/* Guide text */
.prose { margin-top: 2.2rem; padding: 1.4rem 1.2rem; background: var(--card); border: 4px solid var(--edge); box-shadow: 0 8px 0 var(--edge); }
.prose h2 { margin: 2.2rem 0 .6rem; font-size: 1.55rem; line-height: 1.25; }
.prose h2:first-child { margin-top: .2rem; }
.prose h2::before { content: ""; display: inline-block; width: .6em; height: .6em; margin-right: .5em; background: var(--sea); box-shadow: 3px 3px 0 var(--edge); vertical-align: .05em; }
.prose h3 { margin: 1.5rem 0 .4rem; font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .3rem 0; }
.prose strong { color: var(--deep); }

/* FAQ */
.faq { margin-top: 2.6rem; }
.faq h2 { color: var(--foam); font-size: 1.7rem; margin: 0 0 1rem; }
.faq__grid { display: grid; gap: 1rem; }
.faq__item { padding: 1rem 1.1rem; background: var(--card); border: 3px solid var(--edge); box-shadow: 0 5px 0 var(--edge); }
.faq__item h3 { margin: 0 0 .4rem; font-size: 1.08rem; line-height: 1.35; }
.faq__item p { margin: 0; }

/* Comments: loaded by script, never part of the page text */
.comments { margin-top: 2.6rem; margin-bottom: 3rem; }
.comments h2 { color: var(--foam); font-size: 1.7rem; margin: 0 0 1rem; }
.comments__count:empty { display: none; }
.cform { display: grid; gap: .5rem; padding: 1rem; background: var(--card); border: 3px solid var(--edge); box-shadow: 0 5px 0 var(--edge); }
.cform__label { font-weight: 700; }
.cform__label span { font-weight: 400; opacity: .7; }
.cform input, .cform textarea { width: 100%; padding: .6rem .7rem; font: inherit; color: var(--ink); background: var(--foam); border: 3px solid var(--edge); border-radius: 0; }
.cform__row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .3rem; }
.cform [data-gf-reply-cancel] { display: none; }
.cform[data-gf-replying] [data-gf-reply-cancel] { display: inline-flex; }
.cform__replying:empty, .cform__msg:empty { display: none; }
.cform__replying, .cform__msg { margin: 0; font-weight: 700; }
.clist { display: grid; gap: .8rem; margin-top: 1rem; }
.clist[data-gf-empty]::before { content: "No comments yet. How deep did you get before your first plug? Leave a tip for the next player."; color: var(--foam); font-weight: 700; }
.clist[data-gf-off]::before { content: "Comments are closed."; color: var(--foam); font-weight: 700; }
.c { padding: .8rem 1rem; background: var(--card); border: 3px solid var(--edge); }
.c[data-gf-owner] { background: var(--salt); border-color: #a87800; }
.c__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; font-size: .92rem; }
.c__owner { display: none; padding: 0 .35rem; background: var(--straw); border: 2px solid var(--edge); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.c[data-gf-owner] > .c__head > .c__owner { display: inline-block; }
.c__time { opacity: .65; }
.c__text { margin: .3rem 0; }
.c__to { font-weight: 700; color: var(--link); }
.c__to:empty { display: none; }
.c__reply { padding: .2rem 0; background: none; border: 0; color: var(--link); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.c__replies { display: grid; gap: .6rem; margin-left: 1rem; padding-left: .8rem; border-left: 4px solid var(--shallow); }
.c__replies:empty { display: none; }

/* Plain pages (about, contact, legal) */
.doc { margin-top: 1.4rem; margin-bottom: 1rem; padding: 1.4rem 1.2rem; background: var(--card); border: 4px solid var(--edge); box-shadow: 0 8px 0 var(--edge); }
.doc h1 { margin: .2rem 0 1rem; font-size: clamp(1.8rem, 5vw, 2.4rem); line-height: 1.15; }
.doc h2 { margin: 1.7rem 0 .5rem; font-size: 1.3rem; }
.doc__meta { margin-top: -.4rem; font-size: .92rem; opacity: .7; }
.doc__back { margin-top: 2rem; font-weight: 700; }

/* Footer: the bottom of the sea */
.foot { margin-top: 3rem; padding: 2rem 0 2.4rem; color: var(--foam); background: var(--abyss); border-top: 6px solid var(--edge); }
.foot a { color: var(--foam); }
.foot__brand { display: flex; align-items: center; gap: .5rem; margin: 0; font-weight: 900; font-size: 1.2rem; }
.foot__nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: .7rem 0 1rem; }
.foot__note { max-width: 62ch; margin: .4rem 0; font-size: .88rem; opacity: .85; }

/* Depth gauge: wide screens only; drains with scroll where scroll timelines exist */
.gauge { display: none; }
@media (min-width: 1180px) {
  .gauge { position: fixed; right: 18px; top: 50%; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: .4rem; transform: translateY(-50%); font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .gauge__label { padding: 0 .3rem; background: var(--card); border: 2px solid var(--edge); }
  .gauge__tube { position: relative; width: 18px; height: 46vh; border: 3px solid var(--edge); box-shadow: 3px 3px 0 var(--edge); background: repeating-linear-gradient(180deg, transparent 0 calc(10% - 2px), rgba(6, 38, 59, .35) calc(10% - 2px) 10%), rgba(255, 255, 255, .4); }
  .gauge__water { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; background: linear-gradient(180deg, var(--shallow), var(--sea)); transform-origin: bottom; }
}
@supports (animation-timeline: scroll()) {
  .gauge__water { animation: drain linear both; animation-timeline: scroll(root block); }
}
@keyframes drain { from { transform: scaleY(1); } to { transform: scaleY(.03); } }

@media (min-width: 760px) {
  .faq__grid { grid-template-columns: 1fr 1fr; }
  .prose, .doc { padding: 2rem 2.2rem; }
}

/* Phones: the player spans the full screen width */
@media (max-width: 640px) {
  .play.wrap { padding: 0; }
  .stage { border-left: 0; border-right: 0; }
  .actions, .credit, .help-line { margin-left: 16px; margin-right: 16px; }
  .top__nav { gap: .9rem; font-size: .95rem; }
  .act--end { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
