/* Worldstart site: the logo over the summer island, set in Inter, with a glitchy mosaic in the logo's
   colors as the one loud thing. Shared by index.html and changelog.html. */
:root {
  --paper: #fafcff; --paper-2: #eef4ff; --ink: #18204a; --ink-2: #4a5378; --line: #18204a1f;
  --sky: #1f8fff;
  /* the logo's colors: START's pink and its purple shade, the wood of WORLD, the globe's blue and green */
  --m-pink: #ff2f9e; --m-violet: #7a3cf0; --m-orange: #f08a4b; --m-blue: #1f8fff; --m-lime: #8ee53f; --m-yellow: #ffc83d;
  --display: "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --wrap: 1240px; --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.55 var(--body); font-optical-sizing: auto; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* Top bar */
.bar { display: flex; align-items: center; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.bar .home { font: 850 22px/1 var(--display); letter-spacing: -0.04em; text-decoration: none; }
.bar nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-weight: 500; font-size: 16px; }
.bar nav a { text-decoration: none; }
.bar nav a:hover { text-decoration: underline; }
.pill { display: inline-block; padding: 9px 18px; border-radius: 99px; background: var(--ink); color: var(--paper); }
.bar nav a.pill:hover { text-decoration: none; background: var(--m-pink); }
@media (max-width: 560px) { .bar nav .optional { display: none; } }

/* Hero: the logo like a title screen, its lower part over the island's sky */
.hero { position: relative; margin-top: 4px; }
.logo { margin: 0; }
.logo img { width: 100%; height: auto; }
.hero .logo {
  --w: min(560px, 80vw); width: var(--w); margin: 0 auto calc(var(--w) * -0.12); position: relative; z-index: 2;
  filter: drop-shadow(0 18px 28px #18204a40);
}
.window {
  position: relative; border-radius: clamp(18px, 3vw, 36px); overflow: hidden; background: var(--paper-2);
  aspect-ratio: 16 / 9; min-height: 420px;
}
.window img { width: 100%; height: 100%; object-fit: cover; }
.panel {
  position: absolute; right: clamp(14px, 2.4vw, 32px); bottom: clamp(14px, 2.4vw, 32px); width: min(450px, 40%);
  background: #fafcffeb; backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-radius: 24px; padding: 26px 28px 22px; box-shadow: 0 24px 60px -24px #18204a55;
}
.panel h2 { margin: 0 0 10px; font: 800 clamp(24px, 2.5vw, 32px)/1.08 var(--display); letter-spacing: -0.035em; }
.panel p { margin: 0 0 18px; color: var(--ink-2); }
/* until the screenshot reaches full width it is too short to hold the panel: it stacks underneath */
@media (max-width: 1240px) {
  .window { min-height: 0; aspect-ratio: auto; overflow: visible; background: none; border-radius: 0; }
  .window img { height: auto; aspect-ratio: 16 / 9; border-radius: 18px; }
  .panel { position: static; width: auto; max-width: 600px; margin-top: 14px; padding: 4px 2px 0; background: none; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Downloads (markup from tools/build_site.py) */
.downloads { display: flex; flex-direction: column; gap: 10px; }
.dl {
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 14px; padding: 14px 18px 13px 20px;
  border-radius: 18px; text-decoration: none; background: var(--ink); color: var(--paper);
  transition: transform 0.15s ease, background 0.15s ease;
}
.dl b { font: 800 17px/1.2 var(--display); letter-spacing: -0.02em; }
.dl small { grid-column: 1; font-size: 14px; opacity: 0.72; }
.dl::after { content: ""; grid-row: 1 / span 2; grid-column: 2; width: 26px; height: 26px; border-radius: 50%;
  background: conic-gradient(var(--m-pink), var(--m-orange), var(--m-yellow), var(--m-lime), var(--m-blue), var(--m-violet), var(--m-pink));
  -webkit-mask: radial-gradient(circle, #0000 0 7px, #000 8px); mask: radial-gradient(circle, #0000 0 7px, #000 8px);
  transition: transform 0.5s ease; }
a.dl:hover { transform: translateY(-2px); text-decoration: none; }
a.dl:hover::after { transform: rotate(240deg); }
.dl.alt { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.dl.off { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 2px var(--line); }
.dl.off::after { display: none; }
.fine { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }

/* The glitch mosaic: one band, drawn by the script at the bottom of the page */
.mosaic { height: 64px; margin: clamp(56px, 8vw, 104px) 0; overflow: hidden; }
.mosaic svg { display: block; height: 100%; }
.mosaic rect { animation: blip 0.5s steps(2, end) both; animation-delay: var(--d); }
@keyframes blip { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mosaic rect { animation: none; }
  .dl, .dl::after, .look { transition: none; }
}

/* Section headings */
.head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.head h2 { margin: 0 0 14px; font: 850 clamp(32px, 4.6vw, 60px)/1.02 var(--display); letter-spacing: -0.04em; }
.head p { margin: 0; font-size: 20px; color: var(--ink-2); max-width: 600px; }
section { margin: clamp(72px, 11vw, 150px) 0; }

/* One world, three looks: the creator's stage shot, cropped to each figure */
.looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 2vw, 24px); }
.look { margin: 0; transition: transform 0.4s cubic-bezier(.3, 1.5, .5, 1); }
.look:nth-child(1) { transform: rotate(-2.5deg) translateY(10px); }
.look:nth-child(3) { transform: rotate(2.5deg) translateY(10px); }
.look:hover { transform: none; }
.look .shot {
  aspect-ratio: 460 / 565; border-radius: 22px; background: url(img/styles.jpg) var(--paper-2);
  background-size: 347.8% auto; background-position-y: 61.2%; box-shadow: 0 18px 40px -22px #18204a66;
}
.look:nth-child(1) .shot { background-position-x: 18.4%; }
.look:nth-child(2) .shot { background-position-x: 50.4%; }
.look:nth-child(3) .shot { background-position-x: 82.5%; }
.look figcaption { margin-top: 14px; text-align: center; font-size: clamp(20px, 2.4vw, 30px); line-height: 1; }
.f-pixel { font-family: "Pixelify Sans", var(--display); font-weight: 600; }
.f-poly { font-family: var(--display); font-weight: 900; letter-spacing: -0.04em; }
.f-anime { font-family: "Yusei Magic", var(--display); }
@media (max-width: 560px) { .look .shot { border-radius: 14px; } .look:nth-child(n) { transform: none; } }

/* What you do: big shots, alternating sides */
.feature { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.feature + .feature { margin-top: clamp(48px, 7vw, 96px); }
.feature:nth-of-type(even) { grid-template-columns: 1fr 1.55fr; }
.feature:nth-of-type(even) img { order: 2; }
.feature img { border-radius: clamp(14px, 2vw, 26px); box-shadow: 0 26px 60px -30px #18204a88; }
.feature h3 { margin: 0 0 12px; font: 800 clamp(24px, 2.8vw, 36px)/1.08 var(--display); letter-spacing: -0.04em; }
.feature p { margin: 0; color: var(--ink-2); max-width: 440px; }
.feature .dot { display: block; width: 18px; height: 18px; border-radius: 4px; margin-bottom: 18px; }
.also { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); margin-top: clamp(56px, 8vw, 104px);
  padding-top: 28px; border-top: 2px solid var(--ink); }
.also h3 { margin: 0 0 8px; font: 800 22px/1.15 var(--display); letter-spacing: -0.03em; }
.also p { margin: 0; color: var(--ink-2); max-width: 460px; }
@media (max-width: 760px) {
  .feature, .feature:nth-of-type(even), .also { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) img { order: 0; }
}

/* The cast: Mike's character sheets standing on one floor, at their real heights */
.cast { display: flex; align-items: flex-end; gap: clamp(4px, 1.2vw, 18px); overflow-x: auto; scroll-snap-type: x proximity;
  padding: 8px 2px 4px; margin: 0 calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: thin; }
.cast figure { margin: 0; flex: 0 0 auto; scroll-snap-align: start; text-align: center; }
.cast img { mix-blend-mode: multiply; width: auto; }
.cast figcaption { margin-top: 10px; padding-top: 10px; border-top: 2px solid var(--ink); font-weight: 500; font-size: 15px; }
/* heights relative to a person's 1 (the rabbit's ears add the rest); a phone scrolls the row sideways */
.cast { --h: clamp(190px, 17.5vw, 228px); }
.cast .person img { height: var(--h); }
.cast .tall img { height: calc(var(--h) * 1.18); }
.cast .shiba img { height: calc(var(--h) * 0.54); }
.cast .retriever img { height: calc(var(--h) * 0.59); }
.cast .wolf img { height: calc(var(--h) * 0.64); }
.castnote { margin: 18px 0 0; color: var(--ink-2); font-size: 15px; }

/* Changelog entries: latest few on the home page, all of them on changelog.html */
.log { list-style: none; margin: 0; padding: 0; }
.log > li { display: grid; grid-template-columns: 170px 1fr; gap: 8px 32px; padding: 26px 0; border-top: 1px solid var(--line); }
.log > li:first-child { border-top: 2px solid var(--ink); }
.log time { font-weight: 500; }
.log .ver { display: block; color: var(--ink-2); font-size: 14px; }
.log h3 { margin: 0 0 6px; font: 800 21px/1.2 var(--display); letter-spacing: -0.03em; }
.log ul { margin: 0; padding-left: 20px; max-width: 720px; color: var(--ink-2); }
.log ul li { margin: 6px 0; }
.log code { font-size: 0.88em; background: var(--paper-2); padding: 1px 5px; border-radius: 5px; }
@media (max-width: 640px) { .log > li { grid-template-columns: 1fr; } }
.more { display: inline-block; margin-top: 26px; font-weight: 700; }

/* Closing call to download: the logo again, beside the buttons */
.again { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px clamp(24px, 5vw, 80px); align-items: center; }
.again .logo { max-width: 440px; }
.again .lede { margin: 0 0 22px; font: 800 clamp(22px, 2.4vw, 30px)/1.2 var(--display); letter-spacing: -0.03em; max-width: 520px; }
@media (max-width: 860px) { .again { grid-template-columns: minmax(0, 1fr); } .again .logo { max-width: 300px; } }
footer { padding: 40px 0 56px; color: var(--ink-2); font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer a { color: var(--ink); }

/* changelog.html */
.page-head { margin: clamp(32px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 { margin: 0 0 12px; font: 800 clamp(40px, 7vw, 88px)/1 var(--display); letter-spacing: -0.05em; }
.page-head p { margin: 0; color: var(--ink-2); font-size: 20px; max-width: 620px; }
