/* Dreamfield landing page.
 *
 * The page follows one night on the farm: a night sky over the hill from the app icon,
 * the farm by day, the night farm, then the soil underfoot. Panels and buttons copy the
 * Cute Fantasy UI pack's frame (ink outline, light rim, a darker lip below) as 9-slice
 * SVGs, so they stay crisp at --px screen pixels per art pixel. */

@font-face {
  font-family: "Pixelify Sans";
  src: url("/fonts/pixelify-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

/* Pixelify's 5 reads as an S and its 0 as an 8, so digits and "$" come from Jersey 10,
 * scaled to match. */
@font-face {
  font-family: "Pixelify Sans";
  src: url("/fonts/jersey-10-digits.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0024, U+0030-0039;
  size-adjust: 118%;
}

@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --ink: #3f2832;
  --ink-night: #15122e;
  --cream: #fff2d6;
  --paper: #fbe8c4;
  --tan: #e4a672;
  --tan-rim: #ead4aa;
  --soil: #b86f50;
  --soil-dark: #743f39;
  --gold: #ffcc4d;
  --moon: #ffe28c;
  --star: #fff4c8;
  --ribbon: #e0603e;

  /* The icon's sky, in six flat bands. */
  --sky-1: #2b285c;
  --sky-2: #332e65;
  --sky-3: #3b346f;
  --sky-4: #433a78;
  --sky-5: #4b4082;
  --sky-6: #54468c;

  --hill: #489650;
  --hill-light: #62b05c;
  --grass-tuft: #3e8948;
  --night-farm: #1f3d36;
  --night-farm-tuft: #1a342e;

  /* Screen pixels per art pixel for frames, and for the hero's hill. */
  --px: 4px;
  --s: 2;

  --display: "Pixelify Sans", ui-rounded, system-ui, sans-serif;
  --body: "Nunito", ui-rounded, system-ui, -apple-system, sans-serif;
  --wrap: 1120px;
}

@media (min-width: 720px) {
  :root { --s: 3; }
}

@media (min-width: 1680px) {
  :root { --s: 4; }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--sky-1);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Pixelify's "fi" ligature looks like an "A". */
  font-variant-ligatures: none;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 800;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid var(--moon);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------------------------
 * Frames. A 12x12 SVG cut 4 / 4 / 4: stepped corners, a rim of light on the top and
 * sides, and a two-row lip along the bottom, like the UI pack's panels. */

.frame,
.btn {
  border-style: solid;
  border-width: calc(4 * var(--px));
  border-image-slice: 4 fill;
  border-image-width: calc(4 * var(--px));
  border-image-repeat: stretch;
  border-image-outset: 0;
}

.frame-tan {
  border-image-source: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath fill='%233f2832' d='M2 0h8v1h1v1h1v8h-1v1h-1v1H2v-1H1v-1H0V2h1V1h1z'/%3E%3Cpath fill='%23ead4aa' d='M2 1h8v1h1v7H1V2h1z'/%3E%3Cpath fill='%23e4a672' d='M2 2h8v6H2z'/%3E%3Cpath fill='%23b86f50' d='M1 9h10v1h-1v1H2v-1H1z'/%3E%3C/svg%3E");
}

.frame-cream {
  border-image-source: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath fill='%233f2832' d='M2 0h8v1h1v1h1v8h-1v1h-1v1H2v-1H1v-1H0V2h1V1h1z'/%3E%3Cpath fill='%23fffaf0' d='M2 1h8v1h1v7H1V2h1z'/%3E%3Cpath fill='%23fff2d6' d='M2 2h8v6H2z'/%3E%3Cpath fill='%23ead4aa' d='M1 9h10v1h-1v1H2v-1H1z'/%3E%3C/svg%3E");
}

.frame-night {
  border-image-source: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath fill='%2315122e' d='M2 0h8v1h1v1h1v8h-1v1h-1v1H2v-1H1v-1H0V2h1V1h1z'/%3E%3Cpath fill='%2354468c' d='M2 1h8v1h1v7H1V2h1z'/%3E%3Cpath fill='%23332e65' d='M2 2h8v6H2z'/%3E%3Cpath fill='%23201c48' d='M1 9h10v1h-1v1H2v-1H1z'/%3E%3C/svg%3E");
  color: var(--cream);
}

.frame-ribbon {
  border-image-source: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath fill='%233f2832' d='M2 0h8v1h1v1h1v8h-1v1h-1v1H2v-1H1v-1H0V2h1V1h1z'/%3E%3Cpath fill='%23f4a07a' d='M2 1h8v1h1v7H1V2h1z'/%3E%3Cpath fill='%23e0603e' d='M2 2h8v6H2z'/%3E%3Cpath fill='%23a8402c' d='M1 9h10v1h-1v1H2v-1H1z'/%3E%3C/svg%3E");
  color: var(--cream);
}

/* ---------------------------------------------------------------------------------
 * Buttons */

.btn {
  --px: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 2px 14px 0;
  font-family: var(--display);
  font-size: clamp(1.05rem, 4.4vw, 1.25rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  background: none;
  transition: transform 80ms ease, filter 120ms ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(var(--px));
  filter: brightness(0.97);
}

.btn[disabled],
.btn[aria-busy="true"] {
  cursor: progress;
  filter: saturate(0.6);
}

.btn-gold {
  border-image-source: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath fill='%233f2832' d='M2 0h8v1h1v1h1v8h-1v1h-1v1H2v-1H1v-1H0V2h1V1h1z'/%3E%3Cpath fill='%23fff0b0' d='M2 1h8v1h1v7H1V2h1z'/%3E%3Cpath fill='%23ffcc4d' d='M2 2h8v6H2z'/%3E%3Cpath fill='%23d9902e' d='M1 9h10v1h-1v1H2v-1H1z'/%3E%3C/svg%3E");
}

.btn-cream {
  border-image-source: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath fill='%233f2832' d='M2 0h8v1h1v1h1v8h-1v1h-1v1H2v-1H1v-1H0V2h1V1h1z'/%3E%3Cpath fill='%23fffaf0' d='M2 1h8v1h1v7H1V2h1z'/%3E%3Cpath fill='%23fff2d6' d='M2 2h8v6H2z'/%3E%3Cpath fill='%23ead4aa' d='M1 9h10v1h-1v1H2v-1H1z'/%3E%3C/svg%3E");
}

.btn-small {
  min-height: 44px;
  font-size: 1.05rem;
  padding-inline: 8px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn .price {
  opacity: 0.75;
}

/* ---------------------------------------------------------------------------------
 * Small pieces */

.ribbon {
  --px: 3px;
  display: inline-block;
  padding: 1px 6px 0;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Cream text with an ink outline, like the game's captions, for text straight on
 * grass or sky. */
.outlined {
  color: var(--cream);
  text-shadow:
    0 3px 0 var(--ink),
    3px 0 0 var(--ink),
    -3px 0 0 var(--ink),
    0 -3px 0 var(--ink),
    3px 3px 0 var(--ink),
    -3px 3px 0 var(--ink),
    3px -3px 0 var(--ink),
    -3px -3px 0 var(--ink),
    0 6px 0 rgba(21, 18, 46, 0.45);
}

.outlined-thin {
  color: var(--cream);
  text-shadow:
    0 2px 0 var(--ink),
    2px 0 0 var(--ink),
    -2px 0 0 var(--ink),
    0 -2px 0 var(--ink),
    2px 2px 0 var(--ink),
    -2px 2px 0 var(--ink),
    2px -2px 0 var(--ink),
    -2px -2px 0 var(--ink);
}

.pixel-icon {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  flex: none;
}

/* ---------------------------------------------------------------------------------
 * Night sky: the icon's six bands, a moon and twinkling stars. */

.sky {
  position: relative;
  background: linear-gradient(
    var(--sky-1) 0 16.6%,
    var(--sky-2) 0 33.3%,
    var(--sky-3) 0 50%,
    var(--sky-4) 0 66.6%,
    var(--sky-5) 0 83.3%,
    var(--sky-6) 0
  );
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}

.stars {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.stars i {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--star);
  animation: twinkle 3.2s steps(2, jump-none) infinite;
}

.stars i:nth-child(3n) {
  animation-duration: 4.4s;
  animation-delay: -1.2s;
}

.stars i:nth-child(4n + 1) {
  animation-delay: -2.1s;
}

/* Every fifth star is a bigger plus sign. */
.stars i:nth-child(5n) {
  width: 12px;
  height: 12px;
  background:
    linear-gradient(var(--star), var(--star)) 4px 0 / 4px 12px no-repeat,
    linear-gradient(var(--star), var(--star)) 0 4px / 12px 4px no-repeat;
}

@keyframes twinkle {
  0%, 60% { opacity: 1; }
  80% { opacity: 0.25; }
  100% { opacity: 1; }
}

.moon {
  position: absolute;
  width: 48px;
  height: 56px;
  z-index: -1;
}

.moon::before {
  /* Its glow. */
  content: "";
  position: absolute;
  inset: -90px;
  background: radial-gradient(closest-side, rgba(255, 226, 140, 0.22), rgba(255, 226, 140, 0.08) 60%, transparent);
}

.moon svg {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ---------------------------------------------------------------------------------
 * Header */

/* Sits over the top of the first night sky. */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 16px 0;
}

.hero,
.page-hero {
  padding-top: 80px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  image-rendering: pixelated;
  box-shadow: 0 0 0 3px var(--ink-night);
}

.brand-word {
  width: 123px; /* 41 art pixels x 3 */
  height: auto;
  image-rendering: pixelated;
}

.site-nav {
  display: none;
  margin-left: auto;
  gap: 26px;
  font-weight: 800;
}

.site-nav a {
  color: var(--cream);
  text-decoration: none;
  opacity: 0.85;
}

.site-nav a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-header .btn {
  margin-left: auto;
}

@media (min-width: 860px) {
  .site-nav { display: flex; }
  .site-header .btn { margin-left: 8px; }
}

/* ---------------------------------------------------------------------------------
 * Hero */

/* Room at the bottom for the hill. */
.hero {
  padding-bottom: calc(76px * var(--s));
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
  padding-top: 20px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--moon);
  letter-spacing: 0.02em;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--moon);
  box-shadow: 0 0 0 3px rgba(255, 226, 140, 0.25);
}

.hero h1 {
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  max-width: 13ch;
}

.hero .lede {
  margin-top: 20px;
  max-width: 34rem;
  font-size: 1.2rem;
  color: #e9e3ff;
}

/* The two pitches under test (docs/ValidationPlan.md): an inline script in <head>
 * sets data-pitch from ?pitch= before the page paints. */
.pitch-sleep {
  display: none;
}

[data-pitch="sleep"] .pitch-game {
  display: none;
}

[data-pitch="sleep"] .pitch-sleep {
  display: revert;
}

.hero-actions {
  display: grid;
  gap: 14px;
  margin-top: 30px;
  max-width: 30rem;
}

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #c9c1f0;
}

.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 3px;
  background: rgba(201, 193, 240, 0.25);
}

.hero-note {
  margin-top: 18px;
  font-size: 0.92rem;
  color: #c9c1f0;
}

/* The phone that plays the real footage. */
.phone {
  position: relative;
  z-index: 3;
  margin: 0 auto;
  width: min(300px, 78vw);
}

.phone-body {
  position: relative;
  padding: 10px;
  border-radius: 46px;
  background: #0f0c22;
  box-shadow:
    0 0 0 2px #3a3470,
    0 0 0 6px #0f0c22,
    0 30px 60px rgba(8, 6, 24, 0.55);
}

.phone-body::before {
  /* The island. */
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 2;
  width: 30%;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: #0f0c22;
}

.phone video {
  width: 100%;
  aspect-ratio: 1206 / 2474;
  object-fit: cover;
  border-radius: 36px;
  background: var(--night-farm);
}

.phone figcaption {
  margin-top: 18px;
  font-size: 0.85rem;
  text-align: center;
  color: #c9c1f0;
}

.sound-toggle {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 12, 34, 0.72);
  color: var(--cream);
  font: 800 0.85rem var(--body);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sound-toggle img {
  width: 20px;
  height: 16px;
  image-rendering: pixelated;
  filter: invert(94%) sepia(9%) saturate(552%) hue-rotate(320deg);
}

/* Muted: the crossed-out speaker and "Tap for sound". Playing: the speaker and
 * "Sound on". */
.sound-toggle[aria-pressed="false"] .on,
.sound-toggle[aria-pressed="true"] .off {
  display: none;
}

/* The hill from the icon, continued in flat color past the picture's edges. */
.hill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: calc(84px * var(--s));
  background:
    url("/art/hill.png") center bottom / calc(360px * var(--s)) auto no-repeat,
    linear-gradient(to top, var(--hill) calc(12px * var(--s)), var(--hill-light) 0 calc(13px * var(--s)), transparent 0);
  image-rendering: pixelated;
  pointer-events: none;
}

.hill .zz {
  position: absolute;
  left: calc(50% + 2px * var(--s));
  bottom: calc(58px * var(--s));
  font-family: var(--display);
  font-weight: 700;
  font-size: calc(8px * var(--s));
  color: var(--star);
  opacity: 0;
  animation: drift 4.5s ease-out infinite;
}

.hill .zz:nth-child(2) {
  animation-delay: 1.5s;
}

.hill .zz:nth-child(3) {
  animation-delay: 3s;
}

@keyframes drift {
  0% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(10px * var(--s)), calc(-22px * var(--s))); }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    padding-top: 36px;
  }

  .phone {
    width: 320px;
    margin-right: 0;
  }
}

/* ---------------------------------------------------------------------------------
 * Sections */

.section {
  position: relative;
  padding: 88px 0;
}

.section-head {
  max-width: 44rem;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head .ribbon {
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: clamp(2.1rem, 6vw, 3.25rem);
}

.section-head p {
  margin-top: 16px;
  font-size: 1.15rem;
  font-weight: 700;
}

/* The farm by day: the hill's green with a scatter of darker tufts. */
.grass {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' shape-rendering='crispEdges'%3E%3Cpath fill='%233e8948' d='M5 6h1v1H5zM7 5h1v2H7zM9 6h1v1H9zM4 7h7v1H4zM26 25h1v1h-1zM28 24h1v2h-1zM30 25h1v1h-1zM25 26h7v1h-7zM17 15h2v1h-2zM34 9h1v1h-1zM33 10h3v1h-3zM12 31h1v1h-1zM11 32h3v1h-3z'/%3E%3C/svg%3E") 0 0 / 160px 160px,
    var(--hill);
  image-rendering: pixelated;
}

/* The farm at night, from the demo's night tint. */
.night-farm {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' shape-rendering='crispEdges'%3E%3Cpath fill='%231a342e' d='M5 6h1v1H5zM7 5h1v2H7zM9 6h1v1H9zM4 7h7v1H4zM26 25h1v1h-1zM28 24h1v2h-1zM30 25h1v1h-1zM25 26h7v1h-7zM17 15h2v1h-2zM34 9h1v1h-1zM33 10h3v1h-3zM12 31h1v1h-1zM11 32h3v1h-3z'/%3E%3C/svg%3E") 0 0 / 160px 160px,
    var(--night-farm);
  image-rendering: pixelated;
  color: var(--cream);
}

.paper {
  background: var(--paper);
}

.fireflies {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.fireflies i {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #e6ff9e;
  box-shadow: 0 0 10px 4px rgba(214, 255, 120, 0.35);
  animation: float 7s ease-in-out infinite alternate;
}

.fireflies i:nth-child(2n) {
  animation-duration: 9s;
  animation-delay: -3s;
}

.fireflies i:nth-child(3n) {
  animation-duration: 11s;
  animation-delay: -6s;
}

@keyframes float {
  0% { transform: translate(0, 0); opacity: 0.3; }
  50% { opacity: 1; }
  100% { transform: translate(24px, -36px); opacity: 0.5; }
}

/* ---------------------------------------------------------------------------------
 * How a night works */

.steps {
  display: grid;
  gap: 28px;
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  display: flex;
  flex-direction: column;
  padding: 6px 6px 10px;
}

.step-shot {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--night-farm);
  box-shadow: 0 0 0 3px var(--ink);
}

.step-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step h3 {
  margin-top: 20px;
  font-size: 1.6rem;
}

.step h3::before {
  counter-increment: step;
  content: counter(step) ". ";
  color: var(--soil-dark);
}

.step p {
  margin-top: 8px;
}

@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------------------------------------------------------------------------
 * Feature rows: text beside a phone */

.feature {
  display: grid;
  gap: 40px;
  align-items: center;
}

.feature + .feature {
  margin-top: 96px;
}

.feature h2 {
  font-size: clamp(2rem, 5.5vw, 3rem);
  margin-top: 18px;
}

.feature-copy > p {
  margin-top: 16px;
  font-size: 1.12rem;
  max-width: 32rem;
}

.feature .phone figcaption {
  color: #b7d6c4;
}

.visitor-card {
  position: absolute;
  z-index: 4;
  left: -34%;
  bottom: 14%;
  width: 52%;
  transform: rotate(-4deg);
  box-shadow: 0 0 0 3px var(--ink), 0 18px 36px rgba(0, 0, 0, 0.4);
}

@media (max-width: 520px) {
  .visitor-card {
    left: -12%;
    width: 46%;
  }
}

.stage-key {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  max-width: 26rem;
}

.stage-key li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.stage-key i {
  width: 36px;
  height: 12px;
  flex: none;
  box-shadow: 0 0 0 3px var(--ink-night);
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
  }

  .feature.flip .feature-copy {
    order: 2;
  }
}

/* ---------------------------------------------------------------------------------
 * Kind to your sleep */

.promises {
  display: grid;
  gap: 24px;
}

.promise {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 8px 8px 12px;
}

.promise h3 {
  font-size: 1.35rem;
}

.promise p {
  margin-top: 6px;
}

@media (min-width: 780px) {
  .promises { grid-template-columns: 1fr 1fr; }
}

.trackers {
  display: grid;
  gap: 24px;
  align-items: center;
  margin-top: 64px;
  padding: 10px 12px 14px;
}

.trackers h3 {
  font-size: 1.6rem;
}

.trackers p {
  margin-top: 8px;
  color: #e9e3ff;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 6px 12px 5px;
  font-family: var(--display);
  font-weight: 600;
  background: var(--sky-4);
  color: var(--cream);
  box-shadow:
    0 -3px 0 0 var(--ink-night),
    0 3px 0 0 var(--ink-night),
    -3px 0 0 0 var(--ink-night),
    3px 0 0 0 var(--ink-night);
}

@media (min-width: 860px) {
  .trackers { grid-template-columns: 1.1fr 1fr; padding: 18px 24px 22px; }
}

/* ---------------------------------------------------------------------------------
 * Founders call to action */

.founders-band {
  padding: 96px 0 104px;
  text-align: center;
}

.founders-band .frame {
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 18px 22px;
  color: var(--ink);
}

.founders-band h2 {
  font-size: clamp(2rem, 6vw, 2.8rem);
}

.founders-band .price-tag {
  display: block;
  margin: 14px 0 6px;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
}

.founders-band .price-tag strong {
  font-size: 3.2rem;
  line-height: 1;
  vertical-align: -0.12em;
}

.founders-band p {
  max-width: 30rem;
  margin: 0 auto;
}

.founders-band .btn {
  margin-top: 22px;
}

.founders-band .small {
  margin-top: 14px;
  font-size: 0.92rem;
}

/* ---------------------------------------------------------------------------------
 * FAQ */

.faq {
  display: grid;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}

.faq details {
  padding: 2px 6px 6px;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 4px;
  line-height: 1.25;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  /* A pixel plus that turns into a minus. */
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(var(--ink), var(--ink)) 6px 0 / 4px 16px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 6px / 16px 4px no-repeat;
}

.faq details[open] summary::after {
  background: linear-gradient(var(--ink), var(--ink)) 0 6px / 16px 4px no-repeat;
}

.faq details p {
  padding: 0 4px 8px;
}

.faq details p + p {
  margin-top: 10px;
}

/* ---------------------------------------------------------------------------------
 * Footer: the soil under the farm. */

.site-footer {
  padding: 56px 0 40px;
  color: var(--tan-rim);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath fill='%23643631' d='M3 4h2v1H3zM20 9h3v1h-3zM11 18h2v1h-2zM27 23h2v1h-2zM6 27h3v1H6z'/%3E%3Cpath fill='%23845043' d='M3 3h2v1H3zM20 8h3v1h-3zM11 17h2v1h-2zM27 22h2v1h-2zM6 26h3v1H6z'/%3E%3C/svg%3E") 0 0 / 128px 128px,
    #743f39;
  image-rendering: pixelated;
  box-shadow: inset 0 8px 0 #5c312d;
}

.site-footer .wrap {
  display: grid;
  gap: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 800;
}

.footer-links a {
  color: var(--cream);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-fine {
  font-size: 0.88rem;
  opacity: 0.85;
}

.footer-fine a {
  color: inherit;
}

@media (min-width: 860px) {
  .site-footer .wrap {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .footer-links {
    justify-content: flex-end;
  }

  .footer-fine {
    grid-column: 1 / -1;
  }
}

/* ---------------------------------------------------------------------------------
 * Forms */

.signup {
  display: grid;
  gap: 12px;
}

.signup-row {
  display: grid;
  gap: 12px;
}

@media (min-width: 520px) {
  .signup-row {
    grid-template-columns: 1fr auto;
  }
}

.field {
  /* Inset so the outline, drawn as shadows outside the box, fits the row. */
  width: calc(100% - 6px);
  min-height: 56px;
  margin: 3px;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: #fffaf0;
  color: var(--ink);
  font: 700 1.05rem var(--body);
  box-shadow:
    0 -3px 0 0 var(--ink),
    0 3px 0 0 var(--ink),
    -3px 0 0 0 var(--ink),
    3px 0 0 0 var(--ink),
    inset 0 4px 0 var(--tan-rim);
  -webkit-appearance: none;
  appearance: none;
}

.field::placeholder {
  color: #9b7d74;
  font-weight: 600;
}

.field:focus {
  outline: none;
  box-shadow:
    0 -3px 0 0 var(--ink),
    0 3px 0 0 var(--ink),
    -3px 0 0 0 var(--ink),
    3px 0 0 0 var(--ink),
    0 0 0 7px var(--moon),
    inset 0 4px 0 var(--tan-rim);
}

.form-error {
  font-weight: 800;
  color: #ffb4a0;
}

.on-light .form-error {
  color: #a8402c;
}

.form-done {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 8px 8px;
  font-weight: 800;
}

.form-done img {
  width: 36px;
  height: 36px;
}

[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------------------------
 * Mobile: a pre-order bar once the hero's button has scrolled away. */

.sticky-cta {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 50;
  transform: translateY(160%);
  transition: transform 220ms ease;
}

.sticky-cta.shown {
  transform: none;
}

.sticky-cta .btn {
  width: 100%;
  box-shadow: 0 12px 30px rgba(8, 6, 24, 0.45);
}

@media (min-width: 860px) {
  .sticky-cta { display: none; }
}

/* ---------------------------------------------------------------------------------
 * The pre-order page */

.page-hero {
  padding-bottom: calc(76px * var(--s));
  text-align: center;
}

.page-hero h1 {
  max-width: 16ch;
  margin: 18px auto 0;
  font-size: clamp(2.4rem, 8vw, 4rem);
}

.page-hero .lede {
  max-width: 36rem;
  margin: 20px auto 0;
  font-size: 1.15rem;
  color: #e9e3ff;
}

.tiers {
  display: grid;
  gap: 28px;
  align-items: start;
  margin-top: -16px;
}

.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 14px;
}

.tier-featured {
  padding-top: 26px;
}

.tier .ribbon {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.tier h2 {
  font-size: 1.8rem;
}

.tier .tier-price {
  margin-top: 10px;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
}

.tier .tier-price strong {
  display: block;
  font-size: 3rem;
  line-height: 1;
}

.tier .tier-sub {
  margin-top: 8px;
  font-weight: 800;
}

.perks {
  display: grid;
  gap: 10px;
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
}

.perks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.perks li::before {
  content: "";
  flex: none;
  width: 20px;
  height: 14px;
  margin-top: 6px;
  background: url("/art/icon-check.svg") center / contain no-repeat;
  image-rendering: pixelated;
}

.tier .btn,
.tier .signup {
  margin-top: auto;
}

.tier .btn {
  font-size: 1.1rem;
}

.tier .small {
  margin-top: 12px;
  font-size: 0.9rem;
  text-align: center;
}

.tier-featured {
  order: -1;
}

@media (min-width: 960px) {
  .tiers {
    grid-template-columns: 1.08fr 1fr 1fr;
    align-items: stretch;
  }

  .tier-featured {
    order: 0;
    transform: translateY(-14px);
  }
}

.plus-list {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plus-list li {
  padding: 6px 8px 10px;
}

.plus-list h3 {
  font-size: 1.25rem;
}

.plus-list p {
  margin-top: 4px;
}

@media (min-width: 780px) {
  .plus-list { grid-template-columns: 1fr 1fr; }
}

.fine-print {
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 14px 16px;
}

.fine-print h2 {
  font-size: 1.6rem;
}

.fine-print ul {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 22px;
}

/* ---------------------------------------------------------------------------------
 * Thank-you page */

.thanks-card {
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 14px 18px;
}

.thanks-card h2 {
  font-size: 1.6rem;
}

.thanks-card > p {
  margin-top: 8px;
}

.question {
  margin: 26px 0 0;
  padding: 0;
  border: 0;
}

.question legend {
  padding: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
}

.question .hint {
  font-size: 0.9rem;
  color: #6b4c48;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: inline-block;
  padding: 8px 14px 7px;
  font-weight: 800;
  background: #fffaf0;
  cursor: pointer;
  user-select: none;
  box-shadow:
    0 -3px 0 0 var(--ink),
    0 3px 0 0 var(--ink),
    -3px 0 0 0 var(--ink),
    3px 0 0 0 var(--ink),
    inset 0 -4px 0 var(--tan-rim);
}

.choice input:checked + span {
  background: var(--gold);
  box-shadow:
    0 -3px 0 0 var(--ink),
    0 3px 0 0 var(--ink),
    -3px 0 0 0 var(--ink),
    3px 0 0 0 var(--ink),
    inset 0 -4px 0 #d9902e;
}

.choice input:focus-visible + span {
  outline: 3px solid var(--sky-5);
  outline-offset: 6px;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 24px;
}

/* ---------------------------------------------------------------------------------
 * Plain text pages (privacy) */

.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 18px 22px;
}

.prose h2 {
  margin-top: 32px;
  font-size: 1.5rem;
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose p,
.prose ul {
  margin-top: 12px;
}

.prose li + li {
  margin-top: 6px;
}

/* ---------------------------------------------------------------------------------
 * Motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .stars i,
  .hill .zz,
  .fireflies i {
    animation: none;
  }

  .hill .zz {
    display: none;
  }

  .btn,
  .sticky-cta {
    transition: none;
  }
}

/* On phones the copy fills the sky, so the moon and most stars would sit behind the
 * words and read as stray punctuation. Only the stars marked .m stay, round the phone. */
.hero-moon {
  display: none;
}

@media (max-width: 959px) {
  .hero > .stars i:not(.m),
  .page-hero > .stars i:not(.m) {
    display: none;
  }
}

@media (min-width: 960px) {
  .hero-moon {
    display: block;
    right: 3.5%;
    top: 120px;
  }
}

.night-farm > .wrap {
  position: relative;
}
