/* Dewdrop's page. The game is soft, glowing and round, so the page is too:
   one long sky that deepens as you scroll, the game's own rounded typeface,
   and no hard corners. The sky has four colourings ("skies"); the swatches in
   the Customize section switch between them. */

@font-face {
  font-family: "DynaPuff";
  src: url("fonts/DynaPuff.ttf") format("truetype");
  font-weight: 400 700; font-display: swap;
}

:root {
  --sky-top: #5b46d6;
  --sky-mid: #8b6fe3;
  --sky-low: #c2a3ef;
  --deep: #241a66;
  --glow: #7ef0ff;      /* the dewdrops, and anything that should shine */
  --text: #f6f0ff;
  --soft: rgba(255, 255, 255, .72);
  --edge: clamp(18px, 5vw, 72px);
}
:root[data-sky="lagoon"] { --sky-top: #1c5fb0; --sky-mid: #2f9cc4; --sky-low: #9be0dc; --deep: #0c2a57; --glow: #b8fff0; }
:root[data-sky="moss"] { --sky-top: #0b6e42; --sky-mid: #17995d; --sky-low: #8ddba6; --deep: #063522; --glow: #f3ff9a; }
:root[data-sky="dusk"] { --sky-top: #8c3a8f; --sky-mid: #d5648d; --sky-low: #f5b592; --deep: #3d1446; --glow: #fff0b0; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text);
  font: 400 19px/1.55 "DynaPuff", "Trebuchet MS", system-ui, sans-serif;
  /* One sky for the whole page: bright at the top, deep at the bottom. */
  background: linear-gradient(var(--sky-top), var(--sky-mid) 22%, var(--sky-low) 38%, var(--sky-mid) 58%, var(--deep) 100%);
  background-color: var(--deep);
  overflow-x: hidden;
}
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid #fff; outline-offset: 4px; border-radius: 12px; }

/* ---------- Top strip ---------- */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--edge);
}
.studio { text-decoration: none; font-weight: 600; font-size: 16px; }
.studio:hover { text-decoration: underline; text-underline-offset: 4px; }

.pill {
  display: inline-block; padding: 9px 20px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  color: var(--deep); background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .5);
  transition: box-shadow .25s, transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.pill:hover { box-shadow: 0 0 0 8px rgba(255, 255, 255, .22); transform: translateY(-2px); }
.pill.big { padding: 15px 30px; font-size: 20px; }
.pill.quiet { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.pill.quiet:hover { box-shadow: inset 0 0 0 2px #fff, 0 0 0 8px rgba(255, 255, 255, .16); }

/* ---------- The top: the logo and the words ---------- */
.hero {
  position: relative; min-height: 78vh; min-height: 78svh;
  display: grid; place-items: center; text-align: center;
  padding: 92px var(--edge) 48px;
  /* Soft shafts of light, as in the game's sky. */
  background:
    linear-gradient(100deg, transparent 18%, rgba(255, 255, 255, .07) 24%, transparent 33%),
    linear-gradient(97deg, transparent 52%, rgba(255, 255, 255, .09) 60%, transparent 70%),
    linear-gradient(104deg, transparent 76%, rgba(255, 255, 255, .06) 83%, transparent 90%);
}
.intro { max-width: 640px; }
.intro h1 img { width: 100%; max-width: 560px; height: auto; margin: 0 auto; filter: drop-shadow(0 6px 24px rgba(40, 20, 110, .45)); }
.tag { font-size: clamp(26px, 3.2vw, 38px); font-weight: 600; line-height: 1.15; margin: 18px 0 12px; }
.lead { color: var(--text); max-width: 26em; margin: 0 auto; }
.go { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero .go { justify-content: center; }

/* ---------- The sections below ---------- */
h2 { position: relative; font-size: clamp(32px, 4.6vw, 58px); font-weight: 600; line-height: 1.05; padding-bottom: 48px; margin-bottom: 12px; }
/* A sprig that grows under each heading as it comes into view (dewdrop.js adds it). */
.sprig { position: absolute; left: -6px; bottom: 0; width: 230px; height: 34px; overflow: visible; }
.sprig path { fill: none; stroke: var(--glow); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset 1.1s ease-out; filter: drop-shadow(0 0 6px var(--glow)); }
.sprig .leaf { fill: var(--glow); stroke: none; transform-box: fill-box; transform-origin: 50% 100%; transform: scale(0); transition: transform .5s cubic-bezier(.3, 1.8, .5, 1); }
.sprig .leaf:nth-of-type(2) { transition-delay: .45s; } .sprig .leaf:nth-of-type(3) { transition-delay: .7s; } .sprig .leaf:nth-of-type(4) { transition-delay: .95s; }
.grown .sprig path { stroke-dashoffset: 0; }
.grown .sprig .leaf { transform: scale(1); }

.band {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(24px, 5vw, 72px);
  max-width: 1280px; margin: 0 auto; padding: clamp(48px, 8vw, 110px) var(--edge);
}
.band.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.band.flip .words { order: 2; }
.words p { color: var(--text); font-size: 20px; max-width: 28em; }

/* Clips sit in soft, slightly lopsided frames, tipped a little each way. */
.clip { border-radius: 46px 20px 54px 24px; overflow: hidden; transform: rotate(-1.2deg); box-shadow: 0 0 0 3px rgba(255, 255, 255, .55), 0 24px 60px rgba(20, 10, 70, .45); background: var(--deep); }
.flip .clip { border-radius: 22px 50px 22px 56px; transform: rotate(1.1deg); }
.clip video, .clip img { width: 100%; height: auto; }

.skies { display: flex; align-items: center; gap: 12px; margin-top: 22px; color: var(--text); }
.skies button { width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8); transition: transform .2s cubic-bezier(.3, 1.8, .5, 1); }
.skies button:hover { transform: scale(1.18); }
.skies [data-sky="violet"] { background: linear-gradient(#5b46d6, #c2a3ef); }
.skies [data-sky="lagoon"] { background: linear-gradient(#1c5fb0, #9be0dc); }
.skies [data-sky="moss"] { background: linear-gradient(#0b6e42, #8ddba6); }
.skies [data-sky="dusk"] { background: linear-gradient(#8c3a8f, #f5b592); }
.skies button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px #fff, 0 0 0 4px rgba(255, 255, 255, .45); }

/* Features hang off a vine like leaves, left and right in turn. */
.features { max-width: 900px; margin: 0 auto; padding: clamp(40px, 7vw, 90px) var(--edge); }
.features ul { position: relative; padding: 6px 0 6px 0; }
.features ul::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; border-radius: 3px; background: var(--glow); box-shadow: 0 0 10px var(--glow); }
.features li { position: relative; width: 50%; padding: 14px 34px 14px 0; text-align: right; font-size: 20px; line-height: 1.3; }
.features li:nth-child(even) { margin-left: 50%; padding: 14px 0 14px 34px; text-align: left; }
/* The leaf each feature hangs from. */
.features li::after {
  content: ""; position: absolute; top: 14px; right: -3px; width: 20px; height: 26px;
  background: var(--glow); border-radius: 100% 0 100% 0 / 100% 0 100% 0;
  transform: translateX(100%) rotate(-58deg); transform-origin: 0 0; filter: drop-shadow(0 0 6px var(--glow));
}
.features li:nth-child(odd)::after { right: auto; left: 100%; margin-left: -3px; transform: scaleX(-1) rotate(-58deg); transform-origin: 0 0; }
.features li:nth-child(even)::after { right: auto; left: 3px; transform: rotate(-58deg); transform-origin: 0 0; }

/* ---------- Get it ---------- */
.get { text-align: center; padding: clamp(40px, 7vw, 90px) var(--edge) clamp(56px, 8vw, 110px); }
.get .art { width: min(760px, 100%); height: auto; margin: 0 auto 44px; border-radius: 60px 26px 66px 30px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .55), 0 24px 60px rgba(10, 5, 50, .5); }
.get h2 { display: inline-block; }
.get h2 .sprig { left: 50%; margin-left: -115px; }
.get p { color: var(--soft); }
.get .go { justify-content: center; }

footer { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; padding: 22px var(--edge) 30px; font-size: 15px; color: var(--soft); }
footer a { text-decoration: none; color: var(--text); font-weight: 600; }
footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
footer .credit { flex-basis: 100%; font-size: 13px; opacity: .7; }

@media (max-width: 900px) {
  .hero { padding-top: 84px; min-height: 0; }
  .intro h1 img { max-width: 320px; }
  .band, .band.flip { grid-template-columns: minmax(0, 1fr); }
  .band.flip .words { order: 0; }
  .features ul::before { left: 8px; }
  .features li, .features li:nth-child(even) { width: auto; margin-left: 0; padding: 12px 0 12px 40px; text-align: left; font-size: 18px; }
  .features li::after, .features li:nth-child(odd)::after, .features li:nth-child(even)::after { left: 11px; right: auto; margin: 0; transform: rotate(-58deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sprig path, .sprig .leaf, .pill { transition: none; }
}
