/*
 * The bainwabain.com site (D-65), in the game's Party Pop language: a grape table with a faint dot
 * print, cream stickers with an ink outline and a hard shadow, tomato for the one action, Marhey only
 * for big words. The colour values are copied from apps/web/src/styles.css; keep them in step.
 */

@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url("/fonts/readex-pro-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF,
    U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url("/fonts/readex-pro-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Marhey";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/marhey-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF,
    U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "Marhey";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/marhey-latin.woff2") format("woff2");
  unicode-range: U+0021-007E, U+00D7, U+2013-2014, U+2018-201D, U+2026, U+2190-2193, U+2212;
}

:root {
  color-scheme: dark;
  --ink: #231a55;
  --ink-raised: #2f2470;
  --dot-print: rgb(255 243 220 / 8%);
  --paper: #fff3dc;
  --on-paper: #120c2e;
  --on-paper-2: rgb(18 12 46 / 72%);
  --outline: #120c2e;
  --edge: 0.1875rem solid var(--outline);
  --lift: 0.25rem 0.25rem 0 var(--outline);
  --lift-l: 0.375rem 0.375rem 0 var(--outline);
  --text: #fff3dc;
  --text-2: rgb(255 243 220 / 78%);
  --ember: #ff5a36;
  --ember-hover: #ff7350;
  --gold: #ffd23f;
  --sky: #5ec8ff;
  --pink: #ff8ad8;
  --mint: #62e6a8;
  --lilac: #c3a6ff;
  --font: "Readex Pro", "Geeza Pro", "Noto Sans Arabic", Tahoma, sans-serif;
  --font-display: "Marhey", var(--font);
  --radius-s: 1rem;
  --radius-m: 1.5rem;
  --radius-pill: 999px;
  --page: 64rem;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background-color: var(--ink);
  background-image: radial-gradient(var(--dot-print) 1.5px, transparent 1.6px);
  background-size: 1.5rem 1.5rem;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.75;
  /* A word longer than the column (the email address, a big heading at a raised text size) breaks
     instead of pushing the page sideways. */
  overflow-wrap: break-word;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold);
  text-underline-offset: 0.2em;
  /* A link is often an address with no spaces (the email, play.bainwabain.com/tv). Inside a flex or
     grid item only «anywhere» lets it break, so at a raised text size it wraps instead of widening
     its card or the footer past the screen. */
  overflow-wrap: anywhere;
}

a:focus-visible {
  outline: 0.1875rem solid var(--text);
  outline-offset: 0.25rem;
  border-radius: 0.25rem;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  line-height: 1.35;
  margin: 0 0 0.75rem;
  /* Lines of a heading come out even, so no single word is left alone on the last one. */
  text-wrap: balance;
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.15rem;
}

p,
li {
  text-wrap: pretty;
}

p {
  margin: 0 0 1rem;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: 1rem;
}

/* --- Header and footer ----------------------------------------------------------------------- */

.top {
  display: flex;
  /* With a raised text size the links drop under the name instead of pushing the page sideways. */
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.5rem;
  /* Keeps its one line beside the links; only a text size too big for the screen wraps it. */
  flex-shrink: 0;
  max-width: 100%;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
}

.top nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

/* A finger-sized target: the padding grows the tap area without moving the text. */
.top nav a {
  padding-block: 0.6rem;
  color: var(--text-2);
  white-space: nowrap;
}

/* The narrowest phones: the name and both links still fit on one line. */
@media (max-width: 23rem) {
  .top {
    column-gap: 0.75rem;
  }

  .brand {
    gap: 0.4rem;
    font-size: 1.3rem;
  }

  .brand img {
    width: 1.9rem;
    height: 1.9rem;
  }

  .top nav {
    gap: 0.9rem;
    font-size: 0.9rem;
  }
}

.foot {
  margin-top: 4rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid rgb(255 243 220 / 14%);
  color: var(--text-2);
  font-size: 0.95rem;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}

.foot a {
  padding-block: 0.6rem;
  color: var(--text);
}

/* --- Stickers and the one action -------------------------------------------------------------- */

.sticker {
  color: var(--on-paper);
  background: var(--paper);
  border: var(--edge);
  border-radius: var(--radius-m);
  box-shadow: var(--lift-l);
  padding: 1.5rem;
}

.sticker a {
  color: var(--on-paper);
}

.play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.5rem 2.25rem;
  color: var(--on-paper);
  background: var(--ember);
  border: var(--edge);
  border-radius: var(--radius-pill);
  box-shadow: var(--lift);
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.play:hover {
  background: var(--ember-hover);
}

.play:active {
  transform: translate(0.25rem, 0.25rem);
  box-shadow: 0 0 0 var(--outline);
}

.note {
  margin-top: 0.75rem;
  color: var(--text-2);
  font-size: 0.95rem;
}

/* --- Home ------------------------------------------------------------------------------------- */

.hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-block: 2rem 3rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 14vw, 5.5rem);
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

.tagline {
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 600;
  margin: 0.25rem 0 0.5rem;
  text-wrap: balance;
}

.lead {
  color: var(--text-2);
  margin-bottom: 1.75rem;
}

.phone {
  justify-self: center;
  width: min(18rem, 78vw);
  overflow: hidden;
  border: var(--edge);
  border-radius: 1.75rem;
  box-shadow: var(--lift-l);
  rotate: -2deg;
}

section {
  padding-block: 2.5rem;
}

.steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--on-paper);
  background: var(--gold);
  border: var(--edge);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1;
}

.shots {
  display: grid;
  gap: 2rem;
  margin: 0;
}

.shots figure {
  margin: 0;
}

.shots img {
  width: min(17rem, 78vw);
  margin-inline: auto;
  border: var(--edge);
  border-radius: 1.5rem;
  box-shadow: var(--lift-l);
}

.shots figcaption {
  margin-top: 1rem;
  text-align: center;
  font-weight: 600;
}

.packs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.packs li {
  padding: 0.35rem 1.1rem;
  color: var(--on-paper);
  background: var(--paper);
  border: var(--edge);
  border-radius: var(--radius-pill);
  box-shadow: 0.1875rem 0.1875rem 0 var(--outline);
  font-weight: 600;
}

.packs li:nth-child(5n + 1) { background: var(--pink); }
.packs li:nth-child(5n + 2) { background: var(--sky); }
.packs li:nth-child(5n + 3) { background: var(--mint); }
.packs li:nth-child(5n + 4) { background: var(--gold); }
.packs li:nth-child(5n + 5) { background: var(--lilac); }

.faq {
  display: grid;
  gap: 1rem;
}

.faq details {
  padding: 1rem 1.25rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details p {
  margin: 0.75rem 0 0;
  color: var(--on-paper-2);
}

.again {
  text-align: center;
}

/* --- Business --------------------------------------------------------------------------------- */

.cards {
  display: grid;
  gap: 1.5rem;
}

.cards h2,
.cards h3 {
  font-size: 1.3rem;
}

.cards p {
  margin: 0;
  color: var(--on-paper-2);
}

/* The packs page: three sample prompts on each pack's card. */
.samples {
  margin: 0;
  padding-inline-start: 1.25rem;
  color: var(--on-paper-2);
}

.samples li {
  margin-bottom: 0.35rem;
}

.points {
  padding-inline-start: 1.25rem;
}

.points li {
  margin-bottom: 0.5rem;
}

/* --- Text pages: privacy, terms, not found ---------------------------------------------------- */

.doc {
  max-width: 42rem;
  padding-block: 1.5rem 0;
}

.doc h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2.5rem;
}

.doc h2 {
  font-size: 1.3rem;
  margin-top: 2.25rem;
}

.doc ul {
  padding-inline-start: 1.25rem;
}

.doc li {
  margin-bottom: 0.5rem;
}

.updated {
  color: var(--text-2);
  font-size: 0.95rem;
}

/* --- Wider screens ---------------------------------------------------------------------------- */

@media (min-width: 48rem) {
  .hero {
    grid-template-columns: 1.2fr 1fr;
    padding-block: 3rem 4rem;
  }

  .shots {
    grid-template-columns: 1fr 1fr;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Large desktops: everything grows a step, so the page is not a small strip in the middle. Media
   queries in rem read the browser's default size, so this does not change the breakpoints above. */
@media (min-width: 100rem) {
  html {
    font-size: 112.5%;
  }
}

@media (min-width: 140rem) {
  html {
    font-size: 125%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .play {
    transition: none;
  }
}
