/* wordpunch.com: the app's look on the web. Dark ground only; the page sets
   its own background. Tokens are the game's. */

:root {
  --ground: #1C1917;
  --cream: #F4F1EA;
  --ink: #241E1B;
  --gold: #FFC214;
  --gold-edge: #C48C0A;
  --green: #52CC61;
  --green-edge: #2E8C3C;
  --blue: #3C78E6;
  --blue-edge: #2A5AC0;
  --grey: #6E655F;        /* the app's #786E68 one step darker: 5.0:1 on cream, 5.6:1 on white */
  --grey-ground: #B3A89F; /* secondary text on the dark ground: 7.5:1 */
  --ok-text: #1F6B2C;     /* the success state on cream: 5.8:1 */
  --error-text: #8A6200;  /* the error state on cream: 4.9:1 */
  --display: 'Lilita One', 'Arial Black', sans-serif;
  --text: 'Fredoka', 'Trebuchet MS', sans-serif;
  --edge: 6px;      /* the darker bottom edge on buttons and cards */
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--cream);
  font: 500 18px/1.45 var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, p, picture { margin: 0; }

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

.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: .01em;
}

/* The page: the name, the bag on the app's sunburst, the pitch, the form */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 56px 0 48px;
  text-align: center;
}
.name {
  font-size: clamp(56px, 13vw, 92px);
  color: var(--gold);
  text-shadow: 0 var(--edge) 0 var(--gold-edge);
}

/* The bag, with the sunburst turning behind it (centred on the bag, fading
   into the ground 500px out; the hero clips it). The asset carries its own
   soft shadow and 48px of transparent padding a side: no CSS filter here,
   Safari draws a drop-shadow filter on this WebP as a box. */
.bag-wrap { position: relative; width: 244px; margin: 28px auto 0; }
.bag img { width: 100%; height: auto; }
.sunburst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1000px;
  height: 1000px;
  margin: -500px 0 0 -500px;
  z-index: -1;
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg, var(--gold-edge) 0deg 12deg, var(--gold) 12deg 24deg);
  opacity: .42;
  -webkit-mask-image: radial-gradient(circle closest-side, #000 0%, rgba(0, 0, 0, .55) 40%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, #000 0%, rgba(0, 0, 0, .55) 40%, transparent 100%);
  animation: turn 45s linear infinite;
}
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .sunburst { animation: none; }
}

.pitch {
  margin-top: 24px;
  text-wrap: balance;
  font-size: clamp(20px, 4.8vw, 30px);
  line-height: 1.15;
}

/* Cream card */
.card {
  background: var(--cream);
  color: var(--ink);
  border-radius: 24px;
  padding: 22px 22px 24px;
  box-shadow: 0 var(--edge) 0 rgba(36, 30, 27, .18);
}
.kicker {
  font-size: 13px;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--grey);
}

/* The wishlist form */
.wishlist { position: relative; max-width: 560px; margin: 28px auto 0; text-align: left; }
.wishlist .row { display: grid; gap: 12px; margin-top: 12px; }
.field {
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  border: 3px solid var(--grey);
  border-radius: 18px;
  background: #fff;
  font: 500 20px var(--text);
  color: var(--ink);
  outline: none;
}
.field::placeholder { color: var(--grey); opacity: 1; }
.field:focus { border-color: var(--blue); }
.btn {
  height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 18px;
  background: var(--green);
  color: var(--ink);
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 var(--edge) 0 var(--green-edge);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(var(--edge)); box-shadow: 0 0 0 var(--green-edge); }
.btn:disabled { opacity: .65; cursor: default; }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.status {
  min-height: 1.2em;
  margin-top: 10px;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ok-text);
}
.status[data-kind="error"] { color: var(--error-text); }
.note { margin-top: 10px; color: var(--grey); font-size: 15px; }  /* inside the cream card, off the rays */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Footer */
.foot { padding: 24px var(--gutter) 64px; text-align: center; color: var(--grey-ground); font-size: 16px; }
.foot p + p { margin-top: 10px; }
.foot .platforms { font-family: var(--display); font-size: 20px; line-height: 1; letter-spacing: .01em; color: var(--cream); }  /* written in its own case: "iOS" */
.foot a { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }
.foot .mark { font-size: 15px; letter-spacing: .06em; color: var(--gold); text-decoration: none; }

/* Privacy and the 404 */
.legal { padding-top: 32px; padding-bottom: 64px; }
.legal .nothing { margin: 48px 0 28px; font-size: clamp(34px, 8vw, 56px); color: var(--cream); }
.legal .home { display: inline-block; font-size: 28px; color: var(--gold); text-decoration: none; text-shadow: 0 4px 0 var(--gold-edge); }
.legal .card { max-width: 680px; margin: 28px auto 0; padding: 28px 24px 32px; }
.legal h1 { font-size: 36px; margin-bottom: 6px; }
.legal p + p { margin-top: 14px; }
.legal a { color: var(--blue-edge); }
a.btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }  /* after .legal a, so the 404's button keeps ink */

@media (min-width: 560px) {
  .wishlist .row { grid-template-columns: 1fr auto; }
}
@media (min-width: 900px) {
  .hero { padding: 64px 0 56px; }
  .bag-wrap { width: 318px; }
}
