/* The public site around the game: same paper, ink and fonts as the home screen of the app. Pages are made by scripts/build-site.py. */
:root {
  --ink: #2a211b;
  --plum: #2b2a4c;
  --paper: #fffaf0;
  --cream: #fbeeda;
  --sky: #b4dff5;
  --sky-low: #fff3d6;
  --red: #c0392b;
  --blue: #1d3fa0;
  --marker: #ffd34d;
  --mint: #d8f3e6;
  --muted: #5b5148;
  --display: "Secular One", "Arial Hebrew", system-ui, sans-serif;
  --body: "Varela Round", "Arial Hebrew", system-ui, sans-serif;
  --hand: "Gveret Levin", "Varela Round", cursive;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.0625rem/1.7 var(--body); overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 4.4vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.3em; }
li { margin-bottom: .35em; }
.wrap { width: min(100%, 1080px); margin-inline: auto; padding-inline: 16px; }
.narrow { width: min(100%, 760px); }
section { padding-block: 44px; }
section.tint { background: var(--paper); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* top bar */
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 30; padding: 8px 14px; background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; }
.skip:focus { top: 8px; }
.bar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 3px solid var(--ink); }
.bar .wrap { display: flex; align-items: center; gap: 6px 18px; min-height: 58px; }
.logo { color: var(--red); font: 400 1.75rem/1 var(--display); text-decoration: none; }
.bar nav { display: flex; gap: 2px 14px; margin-inline-start: auto; align-items: center; }
.bar nav a:not(.btn) { padding: 10px 2px; color: var(--ink); text-decoration: none; font-size: .98rem; white-space: nowrap; }
.bar nav a:not(.btn):hover { color: var(--red); }
.bar .btn { min-height: 42px; padding: 6px 16px; font-size: 1rem; box-shadow: 0 3px 0 var(--ink); }

/* buttons, the same as on the home screen of the app */
.btn { display: inline-grid; place-items: center; min-height: 56px; padding: 10px 26px; border: 3px solid var(--ink); border-radius: 16px; background: var(--paper); color: var(--ink); font: 400 1.25rem/1.15 var(--display); text-decoration: none; text-align: center; cursor: pointer; box-shadow: 0 5px 0 var(--ink); }
.btn.red { background: var(--red); color: #fff; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; margin-block: 8px 18px; }

.ribbon { display: inline-block; margin: 0 0 12px; padding: 4px 16px 5px; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; color: var(--blue); font: 400 1.35rem/1.15 var(--hand); transform: rotate(-1.5deg); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }

/* hero of the home page: on a phone it is the app's own first screen, on a computer the app itself plays inside a phone */
.hero { padding: 0; background: linear-gradient(var(--sky), var(--sky-low)); }
.hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; padding-block: 34px 44px; }
.hero h1 { margin-bottom: .3em; }
.lead { font-size: 1.2rem; max-width: 34em; }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 4px 26px; }
.ticks li { margin: 0; padding-inline-start: 1.5em; position: relative; }
.ticks li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: #1f8f5c; font-weight: 700; }
.phone { position: relative; width: min(360px, calc((100vh - 130px) * .49)); min-width: 300px; aspect-ratio: 9 / 18.4; padding: 10px; border-radius: 42px; background: var(--plum); box-shadow: 0 16px 34px rgba(43, 42, 76, .35); }
.phone > * { width: 100%; height: 100%; border: 0; border-radius: 32px; overflow: hidden; display: block; object-fit: cover; object-position: top; background: var(--cream); }
.scan { display: flex; align-items: center; gap: 14px; margin-top: 18px; max-width: 26em; font-size: .98rem; line-height: 1.45; }
.scan img { width: 104px; height: 104px; padding: 6px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; flex: none; }
.scan p { margin: 0; }

/* cards of the games */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; padding: 0; margin: 20px 0 0; list-style: none; }
.games li { margin: 0; }
.game { display: flex; flex-direction: column; height: 100%; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); overflow: hidden; color: inherit; text-decoration: none; transition: transform .14s; }
.game:hover { transform: translateY(-3px); }
.game img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: center 35%; border-bottom: 3px solid var(--ink); }
.game div { padding: 12px 14px 14px; }
.game h3 { margin: 0 0 4px; color: var(--red); }
.game p { margin: 0; font-size: .98rem; line-height: 1.5; color: var(--muted); }

.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px 28px; margin-top: 18px; }
.perks h3 { margin-bottom: .2em; }
.perks p { margin: 0; color: var(--muted); }

/* how to put it on the phone */
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 18px; }
.way { padding: 18px 18px 8px; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); }
.way h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 1.45rem; }
.way.mine { order: -1; background: #fff; }
.mine-tag { display: none; padding: 1px 10px; background: var(--marker); border: 2px solid var(--ink); border-radius: 99px; font: 400 .9rem/1.5 var(--body); }
.way.mine .mine-tag { display: inline-block; }
.way ol { list-style: none; counter-reset: s; padding: 0; }
.way ol li { counter-increment: s; position: relative; min-height: 34px; padding-inline-start: 44px; margin-bottom: 12px; line-height: 1.5; }
.way ol li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 400 1rem/1 var(--display); }
.ico { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.2em; }
.warn { margin-top: 18px; padding: 12px 16px; background: var(--marker); border: 3px solid var(--ink); border-radius: 12px; }
.warn p { margin: 0 0 8px; }
.warn p:last-child { margin: 0; }
.warn button { font: inherit; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; }
.stores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.store { display: block; padding: 12px 16px; border: 2px dashed var(--ink); border-radius: 12px; line-height: 1.45; color: inherit; text-decoration: none; }
.store b { display: block; font: 400 1.1rem var(--display); }
a.store { border-style: solid; background: var(--paper); }

/* inner pages */
.crumbs { margin: 0 0 12px; font-size: .92rem; color: var(--muted); }
.crumbs a { color: inherit; }
.head { padding-block: 26px 30px; background: linear-gradient(var(--sky), var(--sky-low)); }
.head.split .wrap { display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: center; }
.head .phone { width: min(300px, calc((100vh - 130px) * .49)); min-width: 260px; }
.body h2 { margin-top: 1.3em; }
.body h2:first-child { margin-top: 0; }
.steps-table { width: 100%; border-collapse: collapse; margin-bottom: 1em; background: var(--paper); }
.steps-table th, .steps-table td { padding: 10px 12px; border: 2px solid var(--ink); text-align: start; vertical-align: top; line-height: 1.5; }
.steps-table th { background: var(--marker); font: 400 1rem var(--display); }
.table-scroll { overflow-x: auto; }
details { padding: 12px 16px; margin-bottom: 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; }
summary { font: 400 1.12rem/1.4 var(--display); cursor: pointer; }
details p { margin: 10px 0 2px; }
.cta { padding: 22px; margin-top: 26px; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); }
.cta h2 { margin-top: 0; }
.cta .btns { margin-bottom: 4px; }

/* footer */
.foot { padding-block: 30px 90px; background: var(--plum); color: #f4efe6; font-size: .98rem; }
.foot .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px 30px; }
.foot h2 { margin: 0 0 8px; font-size: 1.1rem; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 0; }
.foot a { display: inline-block; padding: 4px 0; color: inherit; }
.foot .fine { margin: 20px 0 0; font-size: .9rem; opacity: .85; }

@media (max-width: 899px) {
  html { scroll-padding-top: 66px; }
  .bar .wrap { gap: 10px; }
  .bar nav { gap: 2px 12px; }
  .bar nav a:not(.btn) { font-size: .92rem; }
  .bar nav .wide { display: none; }
  .hero { background: #e9d9c9 url(/sprites/home2.webp) center top / cover no-repeat; }
  .hero .wrap { display: flex; flex-direction: column; justify-content: space-between; min-height: calc(100svh - 61px); padding-block: 16px 18px; text-align: center; }
  .hero h1 { display: inline-block; max-width: 100%; margin: 0; padding: 4px 14px 6px; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; font-size: clamp(1.45rem, 6.6vw, 2.2rem); transform: rotate(-1deg); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }
  .hero .ribbon, .hero .lead, .hero .ticks, .hero .scan, .hero .phone { display: none; }
  .hero-main { display: contents; }
  .hero .btns { flex-direction: column; margin: 0; }
  .hero .btns .btn { width: 100%; }
  .hero .btns .red { min-height: 72px; font-size: 1.7rem; }
  .head.split .wrap { display: block; }
  .head .phone { width: 62%; min-width: 0; margin: 20px auto 0; }
  .ways, .stores { grid-template-columns: minmax(0, 1fr); }
  section { padding-block: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* The accessibility button: on a computer the drawn phone stands on its usual side, on a phone it must not sit on the big buttons */
@media (min-width: 900px) {
  #a11y-toggle, #a11y-panel { left: auto !important; right: 18px !important; }
}
@media (max-width: 899px) {
  #a11y-toggle { width: 44px !important; height: 44px !important; font-size: 22px !important; bottom: 10px !important; }
  .hero .wrap { padding-bottom: 66px; }
  .hero .btns { width: 100%; }
}
