/* retromidway.app. Colours come from the game's HUD and app icon. Pixel art is never smoothed. The type is the app's:
   Jersey 15 for the big words, Jersey 10 for titles and names, Silkscreen for buttons and small labels. */

@font-face {
  font-family: "Silkscreen";
  src: url("fonts/Silkscreen-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Jersey 10";
  src: url("fonts/Jersey10-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Jersey 15";
  src: url("fonts/Jersey15-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --night: #0b0b1e;
  --night-2: #16163a;
  --violet: #2a2160;
  --gold: #ffd250;           /* the one gold: the app menu title's, for every gold title, tag, number and label */
  --gold-light: var(--gold);
  --red: #c9442f;
  --maroon: #7a2b2e;
  --cream: #f4ecd8;
  --text: #f4ecd8;
  --muted: #b9b3d6;
  --line: #34306a;
  --pixel: "Silkscreen", ui-monospace, monospace;       /* the app's small type */
  --large: "Jersey 10", "Silkscreen", ui-monospace, monospace;
  --title: "Jersey 15", "Jersey 10", "Silkscreen", ui-monospace, monospace;
  --button: #f4e3c3; --button-text: #4a1f12;   /* the app's cream buttons */
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; image-rendering: pixelated; }

a { color: var(--gold-light); }
a:hover { color: #ffe08a; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, .pixel {
  font-family: var(--large);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
}
h1, h2 { font-family: var(--title); }
h2 { font-size: clamp(40px, 6vw, 56px); margin: 0 0 12px; color: var(--gold-light); }
h3 { font-size: 28px; margin: 0 0 8px; color: var(--gold); }

.skip { position: absolute; left: -9999px; }
/* read by screen readers and search engines, not shown */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { left: 12px; top: 12px; background: var(--gold); color: var(--night); padding: 8px 12px; z-index: 10; }

/* Header */
.top {                         /* a near-black bar the game's roof hangs straight from */
  position: sticky; top: 0; z-index: 5;
  background: #05050f;
}
/* the name never shrinks; if the links don't fit beside it (a large minimum font size, say), they drop to a second line
   rather than run over it */
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 60px; padding-top: 8px; padding-bottom: 8px; gap: 6px 16px; }
.brand {                    /* the app menu's title: Jersey 15 in its gold, capitals, a hard shadow */
  flex-shrink: 0; color: var(--gold-light); text-decoration: none; text-transform: uppercase;
  font-family: var(--title); font-weight: 400; font-size: 27px; line-height: 1; letter-spacing: 0.02em;
  text-shadow: 2px 2px 0 #05050f;
}
.brand:hover { color: #ffe08a; }
.top nav { display: flex; gap: 18px; font-family: var(--pixel); font-size: 14px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--gold-light); }
/* all five links on wide screens; Rounds, Unlock and Contact in the middle; Rounds and Contact on phones */
@media (max-width: 700px) { .top nav a.wide { display: none; } }
@media (max-width: 560px) { .top nav a.mid { display: none; } }
.brand { white-space: nowrap; }
@media (max-width: 420px) { .top nav { gap: 12px; font-size: 12px; } }
@media (max-width: 360px) { .brand { font-size: 24px; } .top nav { gap: 10px; font-size: 11px; } }   /* the smallest phones: name and two links still fit */

/* Hero: a night on the midway. The game's own pictures at whole-number scales, flat squares drawn here (the stars are
   SVG rectangles, crisp at any size), the game's roof along its top, and along its foot ChatGPT's circus midway (img/midway.png, tents, a
   ferris wheel and a carousel, cut where its ends match), repeating across at half its pixels. */
.hero {
  position: relative;
  padding: 0 0 184px;          /* room for the midway along the foot */
  background:
    url("img/midway.png?v=20261120") repeat-x 50% 100% / 602.5px 152px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='180' shape-rendering='crispEdges'%3E%3Cg fill='%23f4ecd8'%3E%3Crect x='18' y='30' width='3' height='3'/%3E%3Crect x='96' y='12' width='3' height='3' opacity='.6'/%3E%3Crect x='150' y='66' width='3' height='3'/%3E%3Crect x='210' y='24' width='3' height='3' opacity='.5'/%3E%3Crect x='60' y='108' width='3' height='3' opacity='.5'/%3E%3Crect x='186' y='138' width='3' height='3' opacity='.7'/%3E%3Crect x='117' y='159' width='3' height='3' opacity='.4'/%3E%3C/g%3E%3C/svg%3E") repeat,
    linear-gradient(180deg, #0b0a24 0%, #10155d calc(100% - 152px));   /* into the midway's own sky */
  border-bottom: 6px solid #071c5e;
}
/* the game's own striped, scalloped roof (the menu's, img/roof.png: two stripes of it, cut where its ends match),
   lining the top and repeating across, a texel to a CSS pixel: two device pixels on a 2x screen, as on an iPhone */
.hero .awning {
  height: 51px;
  background: url("img/roof.png?v=20261120") repeat-x 50% 0 / 186px 51px;
  filter: drop-shadow(0 4px 0 rgba(5, 5, 15, 0.45));
  position: relative; z-index: 1;
}
.hero .wrap {
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
  padding-top: 32px; padding-bottom: 8px;
}
.hero h1 {
  font-family: var(--title); font-size: 81px; line-height: 0.9; margin: 0 0 18px;   /* 3 px a font pixel */
  color: var(--gold-light); text-transform: uppercase; letter-spacing: 0.02em;
  text-shadow: 3px 3px 0 #05050f;
}
.hero .kicker { font-family: var(--pixel); font-size: 16px; color: var(--cream); margin: 0 0 16px; letter-spacing: 0.04em; }
.hero .lede { font-size: clamp(17px, 2vw, 20px); max-width: 30em; margin: 0 0 28px; color: #ddd6f3; }
.hero-shot .phone { width: 301.5px; }       /* the capture at half its pixels: whole device pixels on a 2x screen */
/* Pick a lane: the app menu's pictures of the rounds, each at its own pixels */
.hero .lanes { display: block; padding-top: 36px; }
.lanes .pick { font-family: var(--pixel); font-size: 16px; color: var(--muted); letter-spacing: 0.2em; text-transform: uppercase; margin: 0 0 14px; }
.lanes ul { list-style: none; margin: 0; padding: 0 0 6px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; }
.lanes li { flex: 0 0 auto; scroll-snap-align: start; }
.lanes a { display: block; width: 103px; text-decoration: none; text-align: center; }
.lanes img { display: block; width: 97px; height: 129px; border: 3px solid #120d33; box-shadow: 0 4px 0 #120d33; }
.lanes a:hover img, .lanes a:focus-visible img { border-color: var(--gold-light); }
.lanes span { display: block; margin-top: 8px; font-family: var(--large); font-size: 19px; line-height: 1; color: var(--cream); }

.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {                         /* the app's cream button, drawn flat: a hard edge and a hard shadow */
  display: inline-block;
  font-family: var(--pixel); font-weight: 400; font-size: 16px; letter-spacing: 0.06em;
  padding: 12px 22px; min-width: 140px; text-align: center;
  background: var(--button); color: var(--button-text); text-decoration: none;
  border: 3px solid var(--button-text); border-radius: 6px;
  box-shadow: 0 5px 0 var(--button-text);
}
.btn:hover { background: #fff1d6; color: var(--button-text); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--button-text); }
.btn.ghost { background: transparent; color: var(--cream); border-color: var(--cream); box-shadow: none; }
.btn.ghost:hover { background: rgba(244, 236, 216, 0.12); color: var(--cream); }

/* Phone frame for screenshots */
.phone {
  display: block;
  border: 6px solid #000;
  border-radius: 34px;
  overflow: hidden;
  background: #000;
  box-shadow: 8px 8px 0 rgba(11, 11, 30, 0.7);
}
.phone img { display: block; width: 100%; }

section { padding: 72px 0; scroll-margin-top: 60px; }
section.alt { background: var(--night-2); }
.intro { max-width: 40em; color: var(--muted); margin: 0 0 36px; }

/* How it plays */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--violet); border: 2px solid var(--line); padding: 22px; }
.steps .num { display: inline-grid; place-items: center; width: 36px; height: 36px; font-family: var(--large); font-size: 28px; line-height: 1; color: var(--night); background: var(--gold); margin-bottom: 12px; }   /* every number on the same square */
.steps p { margin: 0; color: var(--cream); }

/* Rounds */
.rounds { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 24px; list-style: none; padding: 0; margin: 0; }
.rounds figure { margin: 0; }
.rounds .phone { border-width: 5px; border-radius: 26px; }
.rounds figcaption { margin-top: 12px; }
.rounds figcaption h3 { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }   /* an Unlock tag sits under the name */
.rounds figcaption p { margin: 0; color: var(--muted); font-size: 15px; }
.tag {
  font-family: var(--pixel); font-size: 12px; font-weight: 400;
  padding: 2px 7px; letter-spacing: 0.04em;
  background: var(--cream); color: var(--night);
}
.tag.unlock { background: var(--gold); }
.note { color: var(--muted); font-size: 14px; margin-top: 24px; }

/* Prize counter */
.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: center; }
.split .phone { max-width: 300px; justify-self: center; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; }
.ticks li { padding-left: 28px; position: relative; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 8px; width: 12px; height: 12px; background: var(--gold); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan { background: var(--violet); border: 3px solid var(--line); padding: 26px; display: flex; flex-direction: column; }
.plan.best { border-color: var(--gold); box-shadow: 6px 6px 0 var(--maroon); }
.plan .kicker { font-family: var(--pixel); font-size: 12px; color: var(--gold); margin: 0 0 6px; }
.plan h3 { font-size: 34px; color: var(--gold); }
.plan ul { padding-left: 20px; margin: 12px 0 0; }
.plan li { margin-bottom: 6px; }
.fine { color: var(--muted); font-size: 14px; margin-top: 28px; max-width: 52em; }

/* Platforms */
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.platform { border: 2px solid var(--line); padding: 22px; }
.platform h3 { color: var(--gold-light); }
.platform p { margin: 0; color: var(--muted); }

/* Contact */
.contact { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; }
form { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-family: var(--pixel); font-size: 13px; color: var(--gold); }
input, textarea {
  font: 16px/1.5 var(--body);
  color: var(--cream);
  background: var(--night);
  border: 2px solid var(--line);
  padding: 12px;
  width: 100%;
}
input:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
textarea { min-height: 150px; resize: vertical; }
button.btn { cursor: pointer; justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.flash { padding: 14px 16px; border: 2px solid; font-weight: 600; }
.flash.ok { border-color: var(--gold); background: rgba(255, 210, 80, 0.12); }
.flash.err { border-color: var(--red); background: rgba(201, 68, 47, 0.15); }
.flash[hidden] { display: none; }

/* Footer */
footer { border-top: 2px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* Privacy page */
.doc { max-width: 760px; padding-top: 56px; padding-bottom: 72px; }
.doc h1 { font-size: clamp(44px, 7vw, 64px); color: var(--gold-light); margin: 0 0 8px; }
.doc h2 { font-size: 36px; margin-top: 40px; }
.doc .updated { color: var(--muted); margin: 0 0 32px; }
.doc .summary { background: var(--violet); border: 2px solid var(--line); padding: 18px 22px; }
.doc .summary p { margin: 0; }
.doc li { margin-bottom: 8px; }

@media (max-width: 860px) {
  .split, .contact { grid-template-columns: 1fr; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; text-align: center; padding-top: 24px; }
  .hero .badges { justify-content: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero-shot { justify-self: center; }
  .hero h1 { font-size: 54px; }               /* 2 px a font pixel */
  .steps, .plans, .platforms { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .rounds { grid-template-columns: 1fr 1fr; gap: 16px; }
  .rounds figcaption p { font-size: 14px; }
}
@media (max-width: 560px) {
  .hero-shot .phone { width: 201px; }          /* a third of its pixels: whole device pixels on a 3x phone */
  .hero .kicker { font-size: 13px; }
  .btn { min-width: 120px; }
}
