/* Bloom Summoner site. The look follows the game's title card: the inked gold logo, Fraunces storybook type, Sun Silk gold.
   Layout: the title screen as the hero, then the page itself cleanses as you scroll, from Blight grey to Bloom green. */

@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('fonts/nunito-sans.woff2') format('woff2'); font-weight: 200 1000; font-style: normal; font-display: swap; }

:root {
  /* colour: from the game's palette */
  --blight: #141821;      /* the grey night under the fog */
  --blight-2: #1c2230;
  --forest: #1e3323;      /* the game's loading green */
  --forest-2: #253f29;
  --parchment: #f6eed6;   /* text */
  --dim: #c4b896;         /* secondary text */
  --mist: #dfe2ec;        /* text under the Blight */
  --sun: #f4c440;         /* Sun Silk */
  --sun-hi: #fff6c4;
  --sun-text: #ffe6a8;
  --glow: rgba(254, 215, 120, .45);
  --ink: #2b1404;         /* Bloom outline */
  --ink-blight: #0d0e13;  /* Blight outline */
  --line: rgba(246, 238, 214, .16);

  /* type */
  --story: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--blight); color: var(--parchment);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--sun-hi); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--story); font-variation-settings: 'SOFT' 100, 'WONK' 1; font-weight: 800; line-height: 1.1; text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 9; background: var(--sun); color: var(--ink); padding: 8px 14px; border-radius: 999px; font-weight: 800; }
.skip:focus { left: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- the logo (docs/logo in the game repo) */
.mark { margin: 0 auto; width: min(86vw, 480px); filter: drop-shadow(0 0 26px var(--glow)); }
.mark img { width: 100%; }
.mark-sm { display: inline-block; width: 120px; }
.mark-sm img { width: 100%; filter: drop-shadow(0 2px 10px rgba(254, 215, 120, .25)); }
.sprig { width: min(74vw, 300px); margin: 14px auto 4px; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; min-height: clamp(560px, 86svh, 940px); padding-block: 56px 72px; padding-left: var(--gutter); padding-right: var(--gutter-r); background: var(--forest); }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero::before { /* the title card's shade: dark at the edges, a soft pool behind the words */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 46%, rgba(6, 9, 5, .5), rgba(6, 9, 5, 0) 70%),
    radial-gradient(ellipse at 50% 42%, rgba(30, 40, 20, .1), rgba(6, 9, 5, .82) 88%),
    linear-gradient(to bottom, rgba(20, 24, 33, 0) 82%, var(--blight) 100%);
}
.hero-inner { position: relative; text-align: center; max-width: 640px; }
.hero-inner::before { /* Sun Silk glow behind the logo */
  content: ''; position: absolute; left: 50%; top: 20%; width: min(130vw, 820px); aspect-ratio: 1.6; transform: translate(-50%, -50%); z-index: -1;
  background: radial-gradient(closest-side, rgba(254, 233, 83, .2), rgba(254, 200, 80, .06) 55%, rgba(254, 200, 80, 0));
  animation: glow 4s ease-in-out infinite;
}
@keyframes glow { 50% { opacity: .7; transform: translate(-50%, -50%) scale(1.05); } }
.tag { margin-top: 4px; font: italic 500 clamp(17px, 4.6vw, 21px)/1.45 var(--story); font-variation-settings: 'SOFT' 100, 'opsz' 24; text-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 0 14px rgba(0, 0, 0, .8), 0 0 3px rgba(0, 0, 0, .8); }
.tag span { display: block; }
.tag .grey { color: var(--mist); }
.tag .bloom { color: var(--sun-text); }

.petals { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.petals i { position: absolute; left: var(--x); top: -4%; width: var(--s); height: calc(var(--s) * .62); border-radius: 80% 0 80% 0; background: var(--c); box-shadow: 0 0 0 1px rgba(43, 20, 4, .55), inset -2px -2px 0 rgba(120, 40, 60, .22); animation: petal var(--dur) linear var(--delay) infinite; }
@keyframes petal { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(var(--sway), 55vh) rotate(260deg); } 100% { transform: translate(0, 112vh) rotate(540deg); } }

/* ---------------------------------------------------------------- coming soon: a gold seal over where it will be */
.soon { display: grid; justify-items: center; gap: 14px; margin-top: 28px; }
.seal {
  display: inline-block; padding: 9px 26px 10px; border-radius: 999px;
  font: italic 700 clamp(20px, 5vw, 24px)/1.1 var(--story); font-variation-settings: 'SOFT' 100, 'opsz' 30; letter-spacing: .01em;
  color: var(--ink); background: linear-gradient(var(--sun-hi), var(--sun));
  box-shadow: 0 0 0 2px var(--ink), 0 0 26px var(--glow);
}
/* the stores' own badges, untouched, at one height with a quarter of it as clear space (Apple's rule);
   the browser on its own row, the two phone stores under it, App Store first */
.badges { display: grid; justify-items: center; gap: 12px; margin: 0; padding: 0; list-style: none; --bh: 44px; }
.badges .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.badges img { height: var(--bh); width: auto; }
.wd-badge {   /* Wavedash has no badge of its own, so this one follows the stores': black, a thin grey rim, small line over the name */
  display: inline-grid; align-content: center; justify-items: start; gap: 3px; height: var(--bh); padding: 0 14px 0 12px;
  border-radius: 7px; background: #000; box-shadow: inset 0 0 0 1px #a6a6a6;
  font: 600 9.5px/1 -apple-system, 'Helvetica Neue', Arial, sans-serif; letter-spacing: .04em; color: #fff; text-transform: uppercase;
}
.wd-badge img { height: 17px; }
.soon-note { max-width: 36ch; font: 600 15px/1.45 var(--body); color: var(--mist); text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }
.soon-follow { font: 700 15px/1.4 var(--body); color: var(--sun-hi); text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }
.soon-follow:hover { color: #fff; }

/* ---------------------------------------------------------------- story + beats: the page cleanses as you scroll */
.cleanse { background: linear-gradient(to bottom, var(--blight) 0%, var(--blight-2) 22%, #1d2a26 48%, var(--forest) 70%, var(--forest-2) 100%); }
.story { padding-block: 72px 24px; }
.story p { max-width: 34ch; margin-inline: auto; text-align: center; font: italic 500 clamp(21px, 4.4vw, 28px)/1.45 var(--story); font-variation-settings: 'SOFT' 100, 'opsz' 36; color: var(--mist); }
.story p b { font-style: normal; font-weight: 700; color: var(--sun-text); }

.beats { display: grid; gap: clamp(56px, 9vw, 104px); padding-block: 56px 96px; }
.beat { display: grid; gap: 22px; align-items: center; }
.beat > * { min-width: 0; }
.beat h2 { font-size: clamp(30px, 5.4vw, 44px); color: var(--parchment); }
.beat p { margin-top: 12px; max-width: 46ch; color: var(--dim); }
.beat p + p { margin-top: 10px; }
.shot { display: block; margin: 0; border-radius: 16px; overflow: hidden; background: var(--ink); box-shadow: 0 0 0 3px var(--frame, var(--ink)), inset 0 0 0 1px var(--rim, rgba(254, 233, 83, .35)), 0 18px 40px rgba(0, 0, 0, .45); aspect-ratio: 16 / 9; max-width: 100%; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.beat.grey .shot { --frame: var(--ink-blight); --rim: rgba(223, 226, 236, .28); }
.beat.gold .shot { --rim: rgba(254, 233, 83, .6); box-shadow: 0 0 0 3px var(--ink), inset 0 0 0 1px var(--rim), 0 18px 40px rgba(0, 0, 0, .45), 0 0 60px rgba(254, 215, 120, .18); }
@media (min-width: 820px) {
  .beat { grid-template-columns: 7fr 5fr; gap: 48px; }
  .beat.flip { grid-template-columns: 5fr 7fr; }
  .beat.flip .shot { order: 2; }
}

/* ---------------------------------------------------------------- closing */
.again { position: relative; isolation: isolate; padding-block: 88px 96px; text-align: center; background: var(--forest-2); overflow: hidden; }
.again::before { content: ''; position: absolute; left: 50%; top: 42%; width: min(140vw, 900px); aspect-ratio: 1.8; transform: translate(-50%, -50%); z-index: -1; background: radial-gradient(closest-side, rgba(254, 215, 120, .22), rgba(254, 215, 120, 0)); }
.again h2 { font-size: clamp(32px, 6vw, 52px); color: var(--sun-text); }
.again .soon { margin-top: 24px; }
.again .soon-note { text-shadow: none; }

/* ---------------------------------------------------------------- footer */
.foot { background: #172219; border-top: 1px solid var(--line); padding-block: 36px calc(36px + env(safe-area-inset-bottom, 0px)); font-size: 15px; color: var(--dim); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot nav a { color: var(--parchment); text-decoration: none; font-weight: 700; }
.foot nav a:hover { color: var(--sun-hi); text-decoration: underline; }
.foot nav a[aria-current] { color: var(--sun-text); }
.foot small { font-size: 14px; }

/* ---------------------------------------------------------------- inner pages (privacy, support, press) */
.page { background: linear-gradient(to bottom, var(--blight-2), var(--forest) 520px, var(--forest)); display: flex; flex-direction: column; }
.page > main { flex: 1; }   /* a short page still keeps its footer at the bottom */
.top { padding-block: 22px 0; }
.doc { padding-block: 36px 88px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(36px, 7vw, 54px); color: var(--sun-text); }
.doc .lede { margin-top: 14px; font: 500 19px/1.55 var(--story); font-variation-settings: 'SOFT' 100, 'opsz' 18; color: var(--parchment); max-width: 56ch; }
.doc .meta { margin-top: 10px; color: var(--dim); font-size: 15px; }
.doc h2 { margin-top: 44px; font-size: clamp(24px, 4.4vw, 30px); color: var(--parchment); }
.doc p, .doc ul, .doc dl { margin-top: 12px; max-width: 62ch; color: #e6dcc0; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--parchment); }
.mail { font: 700 19px/1.3 var(--body); color: var(--sun-hi); overflow-wrap: anywhere; }
.facts .mail { font-size: 17px; }

details { margin-top: 12px; max-width: 62ch; border-radius: 12px; background: rgba(10, 14, 10, .4); box-shadow: inset 0 0 0 1px var(--line); }
details[open] { box-shadow: inset 0 0 0 1px rgba(254, 233, 83, .35); }
summary { cursor: pointer; list-style: none; padding: 14px 44px 14px 18px; position: relative; font: 700 17px/1.35 var(--body); color: var(--parchment); }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-52%); font: 700 22px/1 var(--body); color: var(--sun); transition: transform .2s ease; }
details[open] summary::after { transform: translateY(-52%) rotate(45deg); }
details > p, details > ul { margin: 0; padding: 0 18px 16px; }
details > ul { padding-left: 38px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; }
.facts dt { font-weight: 800; color: var(--parchment); }
.facts dd { margin: 0; min-width: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; margin-top: 18px; }
.gallery figure { margin: 0; }
.gallery .shot { border-radius: 12px; }
.gallery.tall { grid-template-columns: repeat(2, minmax(0, 240px)); }
.gallery.tall .shot { aspect-ratio: 590 / 1278; }
.gallery figcaption { margin-top: 8px; font-size: 14px; color: var(--dim); }
.kit { display: flex; flex-wrap: wrap; gap: 18px; align-items: stretch; margin-top: 18px; }
.kit figure { margin: 0; display: grid; justify-items: center; align-content: space-between; gap: 12px; padding: 18px; border-radius: 14px; background: rgba(10, 14, 10, .45); box-shadow: inset 0 0 0 1px var(--line); }
.kit img { height: 110px; width: auto; }
.kit figcaption { font-size: 14px; color: var(--dim); text-align: center; }
.kit figcaption a { font-weight: 700; }

/* ---------------------------------------------------------------- about */
.maker { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }
.lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.doc .lines { max-width: none; margin-top: 0; padding: 0; }
.lines li { font: italic 500 clamp(28px, 6.4vw, 44px)/1.18 var(--story); font-variation-settings: 'SOFT' 100, 'opsz' 72; color: var(--parchment); text-wrap: balance; }
.lines li + li { margin-top: 0; }
.lines li:nth-child(2) { color: var(--sun-text); }
.maker > p { margin-top: 26px; font-size: 18px; color: var(--dim); }
.follow {
  display: inline-block; margin-top: 22px; padding: 11px 22px 12px; border-radius: 999px; text-decoration: none;
  font: 800 16px/1 var(--body); color: var(--ink); background: linear-gradient(var(--sun-hi), var(--sun));
  box-shadow: 0 0 0 2px var(--ink), 0 3px 0 var(--ink);
}
.follow:hover { color: var(--ink); transform: translateY(-1px); }

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .petals { display: none; }
}
