/* Racehorse Rummy: Southshire Edition — one small stylesheet for all three pages.
   The colours come from the autumn picture of the house: cream sky, brick,
   pumpkin, olive and the dark roof. No fonts or scripts are loaded from anywhere else
   (the one script, scene.js, is our own: it draws the leaves and the cardinal). */
:root {
  --paper: #fbf4e6;
  --paper-deep: #f3e5ca;
  --white: #fffaf0;
  --ink: #3a291c;
  --ink-soft: #6a5440;
  --brick: #a3402b;
  --brick-deep: #853120;
  --pumpkin: #c8691f;
  --amber: #e3a43c;
  --olive: #5f6d36;
  --roof: #33302e;
  --line: #e2cfab;
  --display: Rockwell, "Rokkitt Web", "Roboto Slab", Georgia, serif;
  --body: var(--display);
}
/* The game's lettering is Rockwell, which comes with iPhones, iPads and Macs.
   Where a browser has no Rockwell (or will not use it), Rokkitt stands in: a
   free font of the same family of shapes, kept in the fonts folder. It runs a
   little small, so it is drawn a touch larger to match. */
@font-face { font-family: "Rokkitt Web"; font-style: normal; font-weight: 100 900; font-display: swap; size-adjust: 108%; src: url("fonts/rokkitt.woff2") format("woff2"); }
@font-face { font-family: "Rokkitt Web"; font-style: italic; font-weight: 100 900; font-display: swap; size-adjust: 108%; src: url("fonts/rokkitt-italic.woff2") format("woff2"); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
a { color: var(--brick); }
a:hover { color: var(--pumpkin); }
img { max-width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }

h1, h2, h3 { font-family: var(--display); line-height: 1.15; color: var(--ink); }
h2 { margin: 0 0 12px; font-size: clamp(26px, 4vw, 34px); }
h3 { margin: 0 0 6px; font-size: 21px; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 6px; }
strong { color: var(--brick-deep); }

/* The top of every page: the game's name and the three links. */
.bar { background: var(--paper); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; padding-top: 12px; padding-bottom: 12px; }
.bar .name { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 20px; }
.bar .name img { width: 38px; height: 38px; border-radius: 9px; }
.bar nav a { margin-left: 22px; color: var(--ink-soft); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 16px; }
.bar nav a:first-child { margin-left: 0; }
.bar nav a:hover { color: var(--brick); }

/* The house, with the title on a cream card that sits over the lawn. */
/* --s is how tall the whole painting is at this width, --h how tall the window
   onto it is, and --lap how far the title card comes up over the picture. */
.hero { background: var(--paper); --s: calc(100vw * 1696 / 2528); --h: clamp(200px, 56vw, min(88vh, 860px)); --lap: 84px; }
/* .scene is the window you look through; .stage is the whole painting behind it.
   Places on the painting are given in its own pixels (2528 wide, 1696 tall),
   the same numbers the game uses, so the swing and flag land where they belong. */
.hero .scene { position: relative; overflow: hidden; height: var(--h); background: var(--roof); }
/* In a short window the painting slides up, giving up sky, so the porch and its
   swing always show above the title card. */
.hero .stage { position: absolute; left: 0; top: min(calc(var(--s) * -0.02), calc(var(--h) - var(--lap) - var(--s) * 0.61)); width: 100%; aspect-ratio: 2528 / 1696; container-type: inline-size; }
.hero .house { display: block; width: 100%; height: 100%; }
.hero .swing, .hero .flag { position: absolute; height: auto; transform-origin: 50% 0; }
.hero .swing { left: calc(659 / 2528 * 100%); top: calc(796 / 1696 * 100%); width: calc(167 / 2528 * 100%); animation: rock 1.8s ease-in-out infinite alternate; }
.hero .flag { left: calc(1276 / 2528 * 100%); top: calc(790 / 1696 * 100%); width: calc(49 / 2528 * 100%); animation: stir 7s ease-in-out infinite; }
/* The swing leans from the porch ceiling down, so its chains stay hooked. */
@keyframes rock { from { transform: skewX(-3.4deg); } to { transform: skewX(3.4deg); } }
/* The flag stirs in a light, uneven breeze. */
@keyframes stir {
  0% { transform: skewX(0.6deg); } 14% { transform: skewX(2.6deg); } 30% { transform: skewX(0.4deg); }
  44% { transform: skewX(1.6deg); } 62% { transform: skewX(-2.4deg); } 78% { transform: skewX(-0.6deg); }
  90% { transform: skewX(-1.6deg); } 100% { transform: skewX(0.6deg); }
}
/* Wood smoke: soft puffs that rise from the chimney one after another, swell,
   lean with the breeze and thin away. --u is one pixel of the painting. */
.hero .smoke { position: absolute; left: calc(1518 / 2528 * 100%); top: calc(256 / 1696 * 100%); --u: calc(100cqw / 2528); }
.hero .smoke i {
  position: absolute;
  left: calc(-63 * var(--u)); top: calc(-63 * var(--u));
  width: calc(126 * var(--u)); height: calc(126 * var(--u));
  border-radius: 50%;
  background: radial-gradient(circle closest-side, rgba(244, 242, 240, 0.85) 0%, rgba(244, 242, 240, 0.5) 50%, rgba(244, 242, 240, 0) 100%);
  opacity: 0;
  animation: puff 8s linear infinite;
  animation-delay: calc(var(--n) * -0.667s);
}
@keyframes puff {
  0% { transform: translate(0, 0) scale(0.2); opacity: 0; }
  8% { transform: translate(calc(3 * var(--u)), calc(-20 * var(--u))) scale(0.27); opacity: 0.75; }
  50% { transform: translate(calc((45 + var(--w) * 0.5) * var(--u)), calc(-125 * var(--u))) scale(0.6); opacity: 0.32; }
  100% { transform: translate(calc((120 + var(--w)) * var(--u)), calc(-250 * var(--u))) scale(1); opacity: 0; }
}
/* For people who have asked their device for less motion: a still picture. */
@media (prefers-reduced-motion: reduce) {
  .hero .swing, .hero .flag { animation: none; }
  .hero .smoke { display: none; }
}
.hero .title {
  position: relative;
  max-width: 760px;
  margin: calc(-1 * var(--lap)) auto 0;
  padding: 28px 26px 30px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(58, 41, 28, 0.2);
}
.hero h1 { margin: 0; font-size: clamp(36px, 7vw, 60px); line-height: 1.05; color: var(--brick); }
.hero .edition { margin: 6px 0 0; font-family: var(--display); font-style: italic; letter-spacing: 0.08em; font-size: clamp(18px, 3vw, 25px); color: var(--olive); }
.hero .line { margin: 14px auto 0; max-width: 560px; }

.soon {
  display: inline-block;
  margin-top: 18px;
  padding: 11px 26px;
  border-radius: 999px;
  background: var(--roof);
  color: var(--white);
  font-family: var(--display);
  font-weight: 700;
  text-decoration: none;
}
a.soon:hover { background: var(--pumpkin); color: var(--white); }

/* The sections of the home page. */
.band { padding: 58px 0; }
.band.tinted { background: var(--paper-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.center { text-align: center; }

.leaves { display: block; width: 96px; height: 28px; margin: 0 auto 16px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 30px 28px; }
.feature { text-align: center; }
.feature .suit { display: block; font-size: 38px; line-height: 1; margin-bottom: 8px; color: var(--roof); }
.feature .suit.red { color: var(--brick); }
.feature p { margin: 0; font-size: 18px; color: var(--ink-soft); }

.show { display: grid; grid-template-columns: 3fr 2fr; gap: 34px; align-items: center; margin-top: 40px; }
.show:first-child { margin-top: 0; }
.show.flip { grid-template-columns: 2fr 3fr; }
.show.flip .words { order: -1; }
.show img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 10px 26px rgba(58, 41, 28, 0.28); }
.show p { margin: 0; color: var(--ink-soft); }

.story { display: grid; grid-template-columns: 2fr 3fr; gap: 36px; align-items: center; }
.story .porch { position: relative; border-radius: 16px; border: 6px solid var(--white); box-shadow: 0 10px 26px rgba(58, 41, 28, 0.25); overflow: hidden; }
.story .porch img { display: block; width: 100%; height: auto; }
.story .porch svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.story p:last-child { margin-bottom: 0; }

@media (max-width: 760px) {
  .band { padding: 42px 0; }
  .show, .story { grid-template-columns: 1fr; gap: 16px; }
  .show.flip .words { order: 0; }
  .hero { --lap: 46px; }
  .hero .title { margin-left: 16px; margin-right: 16px; padding: 22px 18px 24px; }
}

/* Support and Privacy. */
.page { padding-top: 34px; padding-bottom: 50px; max-width: 800px; }
.page h1 { margin: 0 0 2px; font-size: clamp(32px, 6vw, 46px); color: var(--brick); }
.page .dated { color: var(--ink-soft); font-size: 17px; margin-bottom: 22px; }
.page h2 { font-size: 26px; margin-bottom: 8px; }
.page h3 { margin-top: 22px; font-size: 20px; color: var(--brick-deep); }
.card { margin: 18px 0; padding: 22px 24px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.card > :last-child { margin-bottom: 0; }

footer { background: var(--roof); color: #e9dcc3; font-size: 16px; text-align: center; padding: 28px 0 34px; }
footer p { margin: 0 0 6px; }
footer .wrap > p:first-child { font-family: var(--display); font-weight: 700; color: var(--amber); }
footer a { margin: 0 8px; color: #f6ead2; text-decoration: none; }
footer a:hover { color: var(--amber); }
footer .managed { margin-top: 14px; font-size: 14px; opacity: 0.85; }
footer .managed a { margin: 0; text-decoration: underline; }

/* The list of tests on the Fair Play page: what was promised, then what was found. */
.checks { margin: 0; }
.checks dt { margin-top: 18px; font-weight: 700; font-size: 20px; color: var(--brick-deep); }
.checks dd { margin: 4px 0 0; padding-left: 16px; border-left: 4px solid var(--amber); }
