/* The landing page: the game's title screen, opened up. */

:root {
  --night: #050f33;
  --blue-1: #1a46b8;
  --blue-2: #0d2f8c;
  --blue-3: #071a52;
  --cream: #f2e5cc;
  --pale: #d6e0ff;
  --mist: #9fb8ff;
  --tan: #dcbb92;
  --tan-2: #b48e66;
  --wood-1: #d9b98e;
  --wood-2: #c9a477;
  --wood-edge: #6b4a2c;
  --brown: #3a2a20;
  --amber: #ffcf5a;
  --orange: #ff9a3c;
  --phosphor: #8cf59a;
  --phosphor-dim: #4f9a5a;
  --term-bg: #0b120e;
  --blood: #c4101e;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: "Pixelify Sans", "Silkscreen", ui-monospace, monospace;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: none;
}
a { color: var(--amber); }
canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  min-height: min(94vh, 900px);
  display: flex; flex-direction: column;
  background:
    radial-gradient(ellipse 80% 70% at 50% 42%, var(--blue-1) 0%, var(--blue-2) 48%, var(--blue-3) 100%);
  overflow: hidden;
}
.hero::after {
  /* CRT scanlines and a vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .17) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at center, transparent 55%, rgba(2, 6, 24, .55) 100%);
}
.bar {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 18px; padding-bottom: 18px;
  font-family: "VT323", monospace; font-size: 21px; letter-spacing: 4px; color: var(--mist);
}
.status {
  display: inline-flex; align-items: center; gap: 9px; letter-spacing: 2px;
  padding: 3px 12px 1px; border: 2px solid currentColor; color: var(--phosphor);
  background: rgba(3, 10, 32, .55);
}
.status i { width: 9px; height: 9px; background: currentColor; box-shadow: 0 0 8px currentColor; animation: blink 1.6s steps(2) infinite; }
.status.maintenance { color: var(--amber); }
.status.checking { color: var(--mist); }
.status.checking i { animation: none; opacity: .5; }

.hero-inner {
  position: relative; z-index: 1;
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-bottom: 56px;
}
.logo { margin: 0 0 6px; display: grid; place-items: center; }
#logo { display: block; filter: drop-shadow(0 6px 0 rgba(4, 12, 40, .55)); }
.tagline { margin: 8px 0 0; font-family: "VT323", monospace; font-size: clamp(19px, 2.6vw, 26px); letter-spacing: 4px; color: var(--pale); }
.lede { max-width: 640px; margin: 18px auto 0; font-size: clamp(17px, 2vw, 20px); color: #e4ebff; }
.cta { display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.fine { margin: 26px 0 0; font-family: "VT323", monospace; font-size: 19px; letter-spacing: 1px; color: var(--mist); }

/* wooden buttons, as in the game */
.plank-btn {
  display: inline-block; min-width: 168px; padding: 13px 28px 11px; text-decoration: none; text-align: center;
  font-family: "Pixelify Sans", monospace; font-size: 24px; letter-spacing: 1px; color: var(--brown);
  background: linear-gradient(#cfa877, #b08559); border: 4px solid #5c3d22;
  box-shadow: inset 0 0 0 2px #e2c397, 0 6px 0 rgba(0, 0, 0, .45);
  transition: transform .08s steps(2), box-shadow .08s steps(2);
}
.plank-btn.big { min-width: 230px; font-size: 32px; padding: 16px 40px 13px; }
.plank-btn:hover { background: linear-gradient(#dcb889, #be9467); transform: translateY(-2px); box-shadow: inset 0 0 0 2px #ecd2aa, 0 8px 0 rgba(0, 0, 0, .45); }
.plank-btn:active { transform: translateY(4px); box-shadow: inset 0 0 0 2px #e2c397, 0 2px 0 rgba(0, 0, 0, .45); }
.plank-btn small { display: block; font-size: 15px; letter-spacing: 0; opacity: .8; margin-top: 2px; }
.ghost-btn {
  font-family: "VT323", monospace; font-size: 22px; letter-spacing: 3px; color: var(--pale); text-decoration: none;
  padding: 8px 4px; border-bottom: 2px dashed rgba(214, 224, 255, .45);
}
.ghost-btn:hover { color: #fff; border-bottom-color: #fff; }
a:focus-visible, .plank-btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }

/* maintenance notice: a plank nailed across the door */
.closed {
  margin-top: 30px; width: min(520px, 100%); padding: 22px 26px 18px; text-align: center; color: var(--brown);
  background: repeating-linear-gradient(0deg, rgba(90, 60, 30, .08) 0 2px, transparent 2px 9px), linear-gradient(var(--wood-1), var(--wood-2));
  border: 4px solid var(--wood-edge);
  box-shadow: inset 0 0 0 3px #e7cda4, inset 0 0 0 7px #b48c60, 0 8px 0 rgba(0, 0, 0, .4);
  transform: rotate(-1.2deg);
}
.closed-head { display: flex; align-items: center; justify-content: center; gap: 12px; }
.closed-head canvas { width: 27px; height: 27px; }
.closed h2 { margin: 0; font-size: 28px; letter-spacing: 1px; }
.closed p { margin: 10px 0 0; font-size: 19px; }
.closed .back { font-family: "VT323", monospace; font-size: 22px; letter-spacing: 1px; color: #7a3410; }
.closed .back:empty { display: none; }
.closed small { display: block; margin-top: 12px; font-size: 15px; opacity: .8; }

/* offerings: the tip jar and $CADENCE, at the foot of the hero */
.offerings { position: relative; z-index: 1; padding-bottom: 38px; }
.offer-head {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 16px;
  font-family: "VT323", monospace; font-size: 21px; letter-spacing: 4px; color: var(--mist);
}
.offer-head canvas { width: 18px; height: 18px; }
.offer-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 1080px; margin: 0 auto; }
.offer {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 16px 18px;
  background: rgba(5, 15, 51, .58); border: 3px solid rgba(159, 184, 255, .35);
  box-shadow: inset 0 0 0 2px rgba(5, 15, 51, .7), 0 6px 0 rgba(0, 0, 0, .32);
}
/* a little scene drawn from the game's sprites, k screen pixels per sprite pixel */
.offer-art {
  --k: 3; position: relative; width: calc(31px * var(--k)); height: calc(30px * var(--k));
  background: radial-gradient(ellipse 46% 26% at 46% 86%, #2d4419 0 96%, transparent 100%);
}
.offer-art .who {
  position: absolute; left: calc(3px * var(--k)); bottom: calc(2px * var(--k));
  width: calc(20px * var(--k)); height: calc(21px * var(--k)); animation: bob 1.3s steps(2) infinite;
}
.offer-art .gift { position: absolute; right: 0; bottom: calc(3px * var(--k)); width: calc(9px * var(--k)); height: calc(9px * var(--k)); }
.offer-art .float {
  position: absolute; right: calc(1px * var(--k)); top: 0; width: calc(7px * var(--k)); height: calc(7px * var(--k));
  animation: rise 2.6s steps(8) infinite;
}
.offer-art .chirp {
  position: absolute; left: calc(15px * var(--k)); top: 0; padding: 3px 4px; line-height: 0;
  background: #c6dbdb; border: 3px solid #26323a;
}
.offer-art .chirp canvas { width: calc(6px * var(--k)); height: calc(6px * var(--k)); }
.offer-art .chirp ~ .float { right: auto; left: 0; top: calc(4px * var(--k)); }
.offer h3 { margin: 0; font-family: "Silkscreen", monospace; font-weight: normal; font-size: 18px; letter-spacing: 1px; color: var(--amber); }
.offer p { margin: 2px 0 10px; font-size: 16px; line-height: 1.4; color: #e4ebff; }
.offer .label { display: block; font-family: "VT323", monospace; font-size: 16px; letter-spacing: 2px; color: var(--mist); }
.addr-row { display: flex; gap: 10px; align-items: stretch; margin-top: 3px; }
.addr {
  flex: 1; min-width: 0; padding: 6px 9px 4px; font-family: "VT323", monospace; font-size: 19px; line-height: 1.15;
  letter-spacing: .5px; color: var(--phosphor); background: var(--term-bg); border: 2px solid #1d3a26;
  overflow-wrap: anywhere; user-select: all;
}
.copy-btn {
  flex: none; width: 112px; padding: 6px 8px 4px; cursor: pointer;
  font-family: "Pixelify Sans", monospace; font-size: 16px; letter-spacing: 1px; color: var(--brown);
  background: linear-gradient(#cfa877, #b08559); border: 3px solid #5c3d22;
  box-shadow: inset 0 0 0 2px #e2c397, 0 4px 0 rgba(0, 0, 0, .45);
}
.copy-btn:hover { background: linear-gradient(#dcb889, #be9467); }
.copy-btn:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px #e2c397, 0 1px 0 rgba(0, 0, 0, .45); }
.copy-btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.copy-btn.done { background: linear-gradient(#b7e8a4, #78b866); box-shadow: inset 0 0 0 2px #d6f5c8, 0 4px 0 rgba(0, 0, 0, .45); }
.offer-note { max-width: 1080px; margin: 14px auto 0; text-align: center; font-family: "VT323", monospace; font-size: 17px; letter-spacing: 1px; color: rgba(159, 184, 255, .78); }

/* ---------------------------------------------------------------- the clearing */
.diorama { background: #24331a; border-top: 4px solid var(--tan-2); border-bottom: 4px solid var(--tan-2); }
.diorama .frame { overflow: hidden; display: flex; justify-content: center; box-shadow: inset 0 0 0 3px #2b1f17; }
#field { display: block; flex: none; }
.caption {
  margin: 0; padding: 9px var(--gutter) 10px; text-align: center; background: var(--brown);
  font-family: "VT323", monospace; font-size: 19px; letter-spacing: 1px; color: var(--tan);
}

/* ---------------------------------------------------------------- sections */
main { background: linear-gradient(var(--blue-3), var(--night) 380px); }
/* section rhythm: .wrap's padding shorthand would otherwise zero the top */
main > section.wrap { padding-top: 96px; }
.heading {
  display: flex; align-items: center; gap: 16px; margin: 0 0 28px;
  font-family: "Silkscreen", monospace; font-weight: normal; font-size: clamp(22px, 3.4vw, 32px);
  letter-spacing: 2px; color: var(--amber); text-shadow: 3px 3px 0 rgba(0, 0, 0, .45);
}
.heading::after {
  content: ""; flex: 1; height: 6px; min-width: 40px;
  background: repeating-linear-gradient(90deg, rgba(255, 207, 90, .55) 0 6px, transparent 6px 12px);
}

/* the 404 page: a centred heading, without the trailing rule */
.heading.alone { justify-content: center; margin-bottom: 4px; }
.heading.alone::after { display: none; }

.section-intro { margin: -8px 0 24px; max-width: 720px; font-size: 18px; color: #d8e0f6; }

.intro { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; }
.intro p { margin: 0 0 16px; font-size: 19px; color: #e8ecf8; }
.intro em { color: var(--amber); font-style: normal; }
.intro b { color: #fff; font-weight: 600; }
.portrait {
  margin: 0; position: relative; display: grid; place-items: center; padding: 70px 20px 8px;
  background:
    radial-gradient(circle 104px at 50% 150px, #3f5a24 0 98%, transparent 100%),
    radial-gradient(circle 124px at 50% 150px, #2d4419 0 98%, transparent 100%);
}
.portrait .big-cadlet { width: 160px; height: 168px; animation: bob 1.2s steps(2) infinite; }
.portrait .bubble {
  position: absolute; top: 6px; left: 50%; transform: translateX(-6%);
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: #c6dbdb; border: 4px solid #26323a; color: #26323a; font-family: "VT323", monospace; font-size: 28px;
}
.portrait .bubble::after { content: ""; position: absolute; left: 14px; bottom: -14px; border: 7px solid transparent; border-top-color: #26323a; border-left-color: #26323a; }
.portrait .bubble canvas { width: 32px; height: 32px; }
.portrait figcaption { margin-top: 42px; font-family: "VT323", monospace; font-size: 18px; color: var(--mist); letter-spacing: 1px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.card {
  position: relative; padding: 22px 22px 18px; color: var(--brown);
  background: repeating-linear-gradient(0deg, rgba(90, 60, 30, .07) 0 2px, transparent 2px 9px), linear-gradient(var(--wood-1), var(--wood-2));
  border: 4px solid var(--wood-edge);
  box-shadow: inset 0 0 0 3px #e7cda4, 0 7px 0 rgba(0, 0, 0, .4);
  transition: transform .12s steps(3);
}
.card:hover { transform: translateY(-4px) rotate(-.4deg); }
.card .slot {
  display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 12px;
  background: var(--brown); border: 3px solid #2b1f17; box-shadow: inset 0 0 0 3px #5c4535;
}
.card .slot canvas { width: 36px; height: auto; }
.card h3 { margin: 0 0 8px; font-family: "Silkscreen", monospace; font-weight: normal; font-size: 18px; letter-spacing: 1px; color: #5b2a10; }
.card p { margin: 0; font-size: 17px; line-height: 1.45; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.steps li {
  padding: 22px; background: rgba(13, 47, 140, .35); border: 3px solid rgba(159, 184, 255, .35);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .35);
}
.step-art { display: flex; align-items: flex-end; gap: 10px; height: 64px; margin-bottom: 14px; }
.step-art canvas { width: 36px; height: auto; }
.step-art canvas[data-icon="egg"] { width: 44px; }
.step-art.mind {
  align-items: center; align-self: flex-start; width: fit-content; height: auto; padding: 6px 14px 4px; margin-top: 12px; margin-bottom: 26px;
  font-family: "VT323", monospace; font-size: 26px; letter-spacing: 1px; color: var(--phosphor);
  background: var(--term-bg); border: 3px solid var(--phosphor-dim);
}
.step-art.mind i { width: 11px; height: 11px; background: var(--phosphor); box-shadow: 0 0 7px var(--phosphor); }
.steps h3 { margin: 0 0 8px; font-family: "Silkscreen", monospace; font-weight: normal; font-size: 18px; letter-spacing: 1px; color: #fff; }
.steps h3 b { color: var(--amber); margin-right: 6px; }
.steps p { margin: 0; font-size: 17px; color: #d8e0f6; }

/* kind, cruel, kind again: a three-panel story with a little crowd in each */
.story { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.story-step {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 22px 18px 20px; color: var(--brown);
  background: repeating-linear-gradient(0deg, rgba(90, 60, 30, .07) 0 2px, transparent 2px 9px), linear-gradient(var(--wood-1), var(--wood-2));
  border: 4px solid var(--wood-edge); box-shadow: inset 0 0 0 3px #e7cda4, 0 7px 0 rgba(0, 0, 0, .4);
}
.story-step.cruel {
  color: #f3c9b4;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 9px), linear-gradient(#41201a, #2a110d);
  border-color: #120604; box-shadow: inset 0 0 0 3px #5a2a20, 0 7px 0 rgba(0, 0, 0, .4);
}
.story-step:not(:last-child)::after {
  /* the arrow to the next panel */
  content: ""; position: absolute; top: 50%; right: -36px; transform: translateY(-50%);
  border: 11px solid transparent; border-left: 15px solid var(--amber); border-right: 0;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .45));
}
.story-icons { display: flex; gap: 8px; height: 30px; align-items: center; }
.story-icons canvas { width: 27px; height: auto; }
.story-step h3 { margin: 10px 0 12px; font-family: "Silkscreen", monospace; font-weight: normal; font-size: 17px; letter-spacing: 1px; color: #5b2a10; }
.story-step.cruel h3 { color: #ff8a78; }
.crowd { display: block; margin: 0 auto 10px; }
.story-step p { margin: 4px 0 0; font-size: 18px; line-height: 1.4; }
.story-step p b { color: #7a3410; font-weight: 600; }
.story-step.cruel p b { color: #ff6a5c; }

.faq dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.faq dl > div { padding: 18px 0 16px; border-bottom: 2px dashed rgba(159, 184, 255, .22); }
.faq dl > div:nth-last-child(-n+2) { border-bottom: 0; } /* the last row closes the list cleanly */
.faq dt { font-family: "Silkscreen", monospace; font-size: 16px; letter-spacing: 1px; color: var(--amber); margin-bottom: 6px; }
.faq dd { margin: 0; font-size: 17px; color: #d8e0f6; }

/* the last call: its own breathing room, under a small divider */
main section.final { margin-top: 96px; padding-top: 72px; padding-bottom: 104px; text-align: center; position: relative; }
.final::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(240px, 60%); height: 6px;
  background: repeating-linear-gradient(90deg, rgba(255, 207, 90, .55) 0 6px, transparent 6px 12px);
}
.final-egg { display: block; margin: 0 auto; width: 60px; height: auto; animation: wobble 2.4s steps(4) infinite; transform-origin: 50% 90%; }
.final p { margin: 18px 0 28px; font-family: "VT323", monospace; font-size: 28px; letter-spacing: 3px; color: var(--pale); }

footer { background: #030a24; border-top: 3px solid #13245e; }
.foot { padding-top: 26px; padding-bottom: 30px; font-family: "VT323", monospace; font-size: 19px; letter-spacing: .5px; color: var(--mist); }
.foot p { margin: 3px 0; }
.foot b { color: var(--amber); font-weight: normal; letter-spacing: 2px; }

@keyframes blink { 50% { opacity: .3; } }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes wobble { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes rise { 0% { transform: translateY(8px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-6px); opacity: 0; } }

@media (max-width: 860px) {
  .intro { grid-template-columns: 1fr; gap: 10px; }
  .portrait { order: -1; }
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 124px 1fr; column-gap: 18px; align-items: center; }
  .steps li .step-art { grid-row: span 2; margin: 0; height: auto; align-items: center; }
  .steps li .step-art.mind { margin: 0; align-self: center; }
  .story { grid-template-columns: 1fr; gap: 46px; max-width: 460px; margin: 0 auto; }
  .story-step:not(:last-child)::after {
    top: auto; right: auto; left: 50%; bottom: -36px; transform: translateX(-50%);
    border: 11px solid transparent; border-top: 15px solid var(--amber); border-bottom: 0;
  }
  .faq dl { grid-template-columns: 1fr; gap: 0; }
  .faq dl > div:nth-last-child(2) { border-bottom: 2px dashed rgba(159, 184, 255, .22); }
  .offer-list, .offer-note { grid-template-columns: 1fr; max-width: 560px; }
}
@media (max-width: 520px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .bar { font-size: 17px; letter-spacing: 2px; }
  .plank-btn.big { min-width: 200px; font-size: 28px; }
  /* the address row takes the card's full width, under the scene and the words */
  .offer { gap: 4px 12px; padding: 14px; align-items: start; }
  .offer-body { display: contents; }
  .offer-art { --k: 2; grid-row: span 3; align-self: center; }
  .offer .addr-row { grid-column: 1 / -1; margin-top: 6px; }
  .addr { font-size: 17px; }
  .copy-btn { width: 96px; font-size: 15px; }

  main > section.wrap { padding-top: 68px; }
  main section.final { margin-top: 64px; padding-top: 56px; padding-bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
