:root {
  --bg: #faf9f7;
  --panel: #ffffff;
  --ink: #16150f;
  --muted: #6b675c;
  --line: rgba(0,0,0,.08);
  --accent: #018678;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101014;
    --panel: #17171d;
    --ink: #f4f2ee;
    --muted: #9b978d;
    --line: rgba(255,255,255,.1);
    --accent: #018678;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Black on html as well as body so Safari's area behind the address bar
   and below the page is dark too */
html {
  background: #000;
  color-scheme: dark;
}

body {
  background: #000;
  color: var(--ink);
  font: 400 17px/1.6 monospace;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  width: 100%;
}

/* Desktop: screenshot on the left, logo + heading and text on the right,
   centred vertically against the screenshot */
.hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas:
    "image ."
    "image title"
    "image text"
    "image .";
  column-gap: 48px;
}

/* Wider than the other sections' 1000px column */
.section.hero {
  max-width: 1200px;
}

.title-row  { grid-area: title; }
.hero-text  { grid-area: text; min-width: 0; }

.hero-image {
  grid-area: image;
  width: 360px;
  max-width: 100%;
  height: auto;
  align-self: center;
}

/* Mobile: logo + heading at the top, then screenshot, then text */
@media (max-width: 700px) {
  .hero {
    grid-template-columns: minmax(0, 460px);
    grid-template-rows: auto;
    grid-template-areas:
      "title"
      "image"
      "text";
    justify-content: center;
    row-gap: 32px;
  }

  .hero .title-row {
    margin-bottom: 0;          /* the row gap handles spacing on mobile */
    justify-self: center;
  }

  .hero-image {
    justify-self: center;
  }

  /* Logo centred with a small "BoxSets" underneath, no grey strip */
  .hero .title-row {
    flex-direction: column;
    gap: 10px;
  }

  .hero .title-row .logo {
    width: 88px;
  }

  .hero .title-row h1 {
    font-size: 1rem;
    letter-spacing: .02em;
    background: none;
    padding: 0;
    transform: none;
  }

  .badge-row {
    text-align: center;
  }
}

/* Full-width bands: give each wrapper its own background colour */
.wrapper {
  width: 100%;
  background: black;
}

.wrapper-header {
  background: black;
}

.wrapper-intro {
  background: black;

}

.rotated {
    display: inline-block;       /* transform has no effect on plain inline text */
    transform: rotate(-0.75deg);    /* negative = anticlockwise, positive = clockwise */
  }

 .rotated2 {
  padding-left: 30px;
    display: inline-block;       /* transform has no effect on plain inline text */
    transform: rotate(1.5deg);    /* negative = anticlockwise, positive = clockwise */
  }

  .rotated3 {
    display: inline-block;       /* transform has no effect on plain inline text */
    transform: rotate(-0.50deg);    /* negative = anticlockwise, positive = clockwise */
  }

/* Big statement under the BoxSets heading */
.tagline {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  font-weight: bold;
  color: #fff;
  margin: 0 0 32px;
}

/* Fanzine cut-out strips: grey background hugs each line of text */
.hero .lede {
  line-height: 1.9;            /* leaves a gap of black between the strips */
}

.zine {
  background: #222;
  color: #fff;
  padding: 0.2em 0.45em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone; /* gives every line its own padding */
}

/* Content inside each band stays in a centred 1000px column */
header,
.section {
  max-width: 1000px;
  margin: 0 auto;
}

header {
  padding: 40px 20px 20px 20px;
  text-align: center;
}

.section {
  padding: 40px 20px 20px 20px;
  /* Keep clear of the notch in landscape (viewport-fit=cover) */
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* The privacy page has no footer, so clear the home indicator here */
.section.privacy {
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

/* Rounded square so the logo reads as an app icon */
.logo {
  width: 64px;
  height: auto;
  display: block;
  flex: none;
  border-radius: 22.37%;
  box-shadow: 0 0 0 1px var(--line);
}

/* Logo and BoxSets heading side by side */
.title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.title-row h1 {
  margin: 0;
}

h1 {
  font-size: 1.8em;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 0 0 20px;
  color: #fff;
  font-weight: 700;
}

.lede {
  font-size: clamp(1.1rem, 3.4vw, 1.35rem);
  color: #fff;
  margin: 0 auto 40px auto;
  max-width: 1000px;
}

.lede-small {
  font-size: 0.9em;
}

.badge {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 32px;
}
.app-store-badge {
  height: 66px;
  width: auto;
}

ul {
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
  border-top: 1px solid var(--line);
}
li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  align-items: baseline;
}
li b { font-weight: 600; }
li span { color: var(--muted); }
@media (max-width: 480px) {
  li { flex-direction: column; gap: 4px; }
}

.section {

}

/* "< BoxSets" link back to the home page, top left */
.back-link {
  display: inline-block;
  margin-bottom: 32px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.back-link:hover {
  text-decoration: underline;
}

footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  background: black;
  /* Clear the home indicator now the page runs edge to edge (viewport-fit=cover) */
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}
footer a { color: inherit; }
.links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.links a:hover { text-decoration: underline; }
