/* One sheet for pierline.app, bookbind.app and scrapquilt.app.
   Each page takes its colours and its display face from the game it sells, so the page, the store listing and the
   game look like one thing. The body class picks the game. */

@font-face {
  font-family: "Lilita One";
  src: url("/shared/fonts/LilitaOne-Regular.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "Baloo 2";
  src: url("/shared/fonts/Baloo2-ExtraBold.woff") format("woff");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/shared/fonts/Fraunces-Black.woff") format("woff");
  font-weight: 900;
  font-display: swap;
}

/* Pier Line is the default: the game's water, sky, white panels and navy outlines. */
:root,
.pierline {
  --display: "Lilita One", ui-rounded, system-ui, sans-serif;
  --display-weight: 400;
  --body: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* the game's deep water, a shade darker so the small type on it passes contrast */
  --field: #0c66ae;
  --field-end: #0a4f8a;
  --on-field: #ffffff;
  --on-field-soft: #d9eeff;
  --accent: #ffe36b;
  --page: #62d4ff;
  --text: #12305a;
  --soft: #0b3c6e;
  --label: #0b3c6e;
  --surface: #ffffff;
  --card-border: 3px solid #12305a;
  --card-shadow: 0 6px 0 rgb(18 48 90 / 0.28);
  --radius: 22px;
  --strip: #ffe36b;
  --on-strip: #12305a;
  --button: #ffe36b;
  --on-button: #12305a;
  --footer: #0b3c6e;
  --ink: #12305a;
}
.bookbind {
  --display: "Baloo 2", ui-rounded, system-ui, sans-serif;
  --display-weight: 800;
  --field: #5a3a82;
  --field-end: #4b2e6b;
  --on-field: #fff4e2;
  --on-field-soft: #eedcf3;
  --accent: #ffe6a0;
  --page: #fff4e2;
  --text: #3a2346;
  --soft: #5e4a6c;
  --label: #b92f25;
  --surface: #fffbf3;
  --card-border: 2px solid #dcc7a6;
  --card-shadow: 0 5px 0 #d9c3a0;
  --radius: 18px;
  --strip: #9c5f33;
  --on-strip: #fff4e2;
  --button: #ffe6a0;
  --on-button: #3a2346;
  --footer: #3a2346;
  --ink: #3a2346;
}
.scrapquilt {
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --display-weight: 900;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --field: #0e1550;
  --field-end: #1c2b8f;
  --on-field: #eef2ff;
  --on-field-soft: #c9cff7;
  --accent: #ffd36b;
  --page: #1c2b8f;
  --text: #eef2ff;
  --soft: #c9cff7;
  --label: #ffd36b;
  --surface: #141d6f;
  --card-border: 2px dashed #6572e0;
  --card-shadow: none;
  --radius: 20px;
  --strip: #ffd36b;
  --on-strip: #0e1550;
  --button: #ffd36b;
  --on-button: #0e1550;
  --footer: #0e1550;
  --ink: #0e1550;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  /* a section link, or a link reached by keyboard, is never left under the sticky bar */
  scroll-padding-top: 76px;
}
body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--page);
}
img {
  max-width: 100%;
}
a {
  color: inherit;
}
/* The ring takes the link's own text colour, which already contrasts with whatever it sits on. */
a:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
  border-radius: 6px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.brand {
  font-family: var(--display);
  font-weight: var(--display-weight);
}
.shell {
  overflow-x: clip;
}
.skip {
  position: fixed;
  top: -64px;
  left: 12px;
  z-index: 30;
  padding: 10px 14px;
  color: #111;
  background: #fff;
  border-radius: 8px;
}
.skip:focus {
  top: 12px;
}
.bar,
.wrap,
.hero-grid {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

/* Header: stays in reach on the whole page, and stays thin. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  color: var(--on-field);
  background: var(--field-end);
}
.scrapquilt .site-header {
  background: var(--field);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
}
.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
  font-weight: 600;
}
.nav a {
  text-decoration: none;
}
.nav a:not(.button):hover {
  color: var(--accent);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  font-weight: 700;
  color: var(--on-button);
  background: var(--button);
  border-radius: 999px;
  text-decoration: none;
}
.button:hover {
  background: #ffffff;
  color: var(--ink);
}
/* The header button goes straight to the visitor's own store when the device names one. */
.cta-apple,
.cta-play {
  display: none;
}
.on-apple .cta-apple,
.on-android .cta-play {
  display: inline-flex;
}
.on-apple .cta-any,
.on-android .cta-any {
  display: none;
}

/* Hero */
.hero {
  color: var(--on-field);
  background: linear-gradient(180deg, var(--field), var(--field-end));
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
  padding: 52px 0 60px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
}
.hero .eyebrow,
.closing .eyebrow {
  color: var(--accent);
}
.hero h1 {
  margin: 12px 0 18px;
  font-size: clamp(44px, 5.6vw, 78px);
  line-height: 1.02;
  text-wrap: balance;
}
.pierline .hero h1 {
  text-shadow: 0 4px 0 rgb(9 44 82 / 0.55);
}
.hero-copy {
  max-width: 30em;
  font-size: 20px;
  line-height: 1.45;
  color: var(--on-field-soft);
}
.hero-art {
  display: flex;
  justify-content: center;
}
.hero-art img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(76vh, 680px);
  border-radius: 28px;
  box-shadow: 0 22px 50px rgb(0 0 0 / 0.3);
}
.scrapquilt .hero-art img {
  outline: 2px solid rgb(255 211 107 / 0.45);
  outline-offset: -2px;
}

/* Store buttons: the two official badges at one height. On a phone or a Mac the visitor's own store is the badge
   and the other store drops to a text link under it. */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 26px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  text-decoration: none;
}
.store-badge img {
  display: block;
  width: auto;
  height: 54px;
}
/* Google's artwork carries its own clear space (41 of 250 px on each side). Size by the badge inside it, and do
   not let the general picture rule narrow it: the link is only as wide as the badge, so max-width: 100% squashed it. */
.store-badge.play img {
  height: 80px;
  max-width: none;
  margin: -13px;
}
/* The ring takes the surrounding text colour, so it shows on the dark field and on the light sections alike. */
.store-badge:hover {
  box-shadow: 0 0 0 3px currentColor;
}
.store-alt {
  display: none;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.on-apple .store-badge.play img,
.on-android .store-badge.apple img {
  display: none;
}
.on-apple .store-badge.play .store-alt,
.on-android .store-badge.apple .store-alt {
  display: inline;
}
/* With a store chosen, the pair stacks: the badge, then the other store as a text link flush under it. */
.on-apple .store-badges,
.on-android .store-badges {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.on-apple .closing .store-badges,
.on-android .closing .store-badges {
  align-items: center;
}
.on-apple .store-badge.play,
.on-android .store-badge.apple {
  min-height: 44px;
  padding: 0 8px;
  margin-left: -8px;
  border-radius: 8px;
}
.on-apple .closing .store-badge.play,
.on-android .closing .store-badge.apple {
  margin-left: 0;
}
.on-apple .store-badge.play:hover,
.on-android .store-badge.apple:hover {
  box-shadow: none;
  color: var(--on-strip);
  background: var(--strip);
}
.availability {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--on-field);
}
/* For a visitor at a computer: a code that opens this page on their phone, where the right store is one tap away. */
.to-phone {
  display: none;
}
@media (min-width: 821px) {
  .to-phone {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
    font-size: 15px;
    font-weight: 600;
    color: var(--on-field-soft);
  }
  .to-phone img {
    width: 88px;
    height: 88px;
    border-radius: 10px;
  }
}

/* Three facts the store listing already states */
.proof {
  color: var(--on-strip);
  background: var(--strip);
}
.proof ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 40px;
  margin: 0 auto;
  padding: 16px 24px;
  width: min(1120px, 100%);
  list-style: none;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

/* Sections */
.section {
  padding: 76px 0;
}
.section + .section {
  padding-top: 0;
}
.section h2,
.closing h2 {
  margin-top: 10px;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.06;
  text-wrap: balance;
}
.lede {
  max-width: 40em;
  margin-top: 14px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--soft);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}
.step {
  padding: 24px;
  background: var(--surface);
  border: var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: 18px;
  color: var(--on-strip);
  background: var(--strip);
  border-radius: 50%;
}
.step h3 {
  margin-top: 14px;
  font-size: 22px;
  line-height: 1.15;
}
.step p {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--soft);
}
.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}
.feature.flip .feature-art {
  order: 2;
}
.feature-art {
  display: flex;
  justify-content: center;
}
.feature-art img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 520px;
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgb(0 0 0 / 0.22);
}
.feature-copy p:not(.eyebrow) {
  max-width: 34em;
  margin-top: 14px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--soft);
}
.feature-copy .store-badges {
  margin-top: 24px;
}

/* Closing band */
.closing {
  padding: 64px 0;
  color: var(--on-field);
  background: linear-gradient(180deg, var(--field), var(--field-end));
  text-align: center;
}
.closing p:not(.eyebrow) {
  margin-top: 12px;
  font-size: 18px;
  color: var(--on-field-soft);
}
.closing .store-badges {
  justify-content: center;
}
.footer {
  padding: 28px 0;
  font-size: 15px;
  color: #ffffff;
  background: var(--footer);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}
.footer a {
  color: inherit;
}
.footer a:hover {
  color: var(--accent);
}

/* A section link from the header lands below the sticky bar. */
#how,
#daily,
#collection,
#download {
  scroll-margin-top: 76px;
}

/* 404 */
.not-found {
  padding: 16vh 0;
}
.not-found h1 {
  margin: 16px 0 32px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 1;
}

@media (max-width: 820px) {
  .bar,
  .wrap,
  .hero-grid {
    width: min(100% - 32px, 560px);
  }
  .nav a:not(.button) {
    display: none;
  }
  .bar {
    min-height: 56px;
  }
  .button {
    min-height: 44px;
  }
  .brand {
    font-size: 18px;
  }
  .hero-grid,
  .feature {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero-grid {
    padding: 32px 0 44px;
  }
  .hero h1 {
    font-size: clamp(40px, 12vw, 56px);
  }
  .hero-copy {
    font-size: 18px;
  }
  .hero-art img {
    max-height: none;
    width: 100%;
    border-radius: 22px;
  }
  .proof ul {
    flex-direction: column;
    gap: 4px;
    padding: 14px 20px;
  }
  .section {
    padding: 56px 0;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 26px;
  }
  .feature.flip .feature-art {
    order: 0;
  }
  .feature-copy {
    order: -1;
  }
  .feature-art img {
    max-height: 460px;
  }
  .closing {
    padding: 52px 0;
  }
  .footer .wrap {
    flex-direction: column;
  }
  .footer a {
    display: inline-block;
    padding: 10px 0;
  }
  /* On a phone the other store is offered once, in the closing band, not beside every badge. */
  .on-apple .hero .store-badge.play,
  .on-apple #daily .store-badge.play,
  .on-android .hero .store-badge.apple,
  .on-android #daily .store-badge.apple {
    display: none;
  }
}
