/* Colours match the game's classic pebble theme in src/index.css. */
:root {
  color-scheme: light;
  --bg: #efe6d6;
  --surface: #fbf7f0;
  --ink: #3e3a34;
  --muted: #5c564e;
  --accent: #2e3f73;
  --accent-deep: #24325c;
  --stone: #cfcac0;
  --rake: #e4d5be;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='200' viewBox='0 0 320 200'><path d='M-10 36C70 8 150 70 330 24' fill='none' stroke='%23E4D5BE' stroke-width='1.4' stroke-linecap='round'/><path d='M-10 108C90 150 170 70 330 120' fill='none' stroke='%23E4D5BE' stroke-width='1.4' stroke-linecap='round'/><path d='M-10 168C80 140 190 190 330 156' fill='none' stroke='%23E4D5BE' stroke-width='1.2' stroke-linecap='round'/></svg>");
  background-size: 320px 200px;
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

::selection {
  background: #d9d6e6;
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

.skip {
  position: absolute;
  left: max(0.75rem, env(safe-area-inset-left));
  top: max(0.75rem, env(safe-area-inset-top));
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  transform: translateY(-200%);
  z-index: 2;
}

.skip:focus {
  transform: none;
}

.page {
  width: min(68rem, calc(100% - 2rem));
  margin: 0 auto;
  padding:
    max(1.5rem, env(safe-area-inset-top))
    max(0px, env(safe-area-inset-right))
    max(1.75rem, env(safe-area-inset-bottom))
    max(0px, env(safe-area-inset-left));
}

.hero {
  display: grid;
  gap: 2.25rem;
  align-items: center;
}

.mark {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.15rem;
  display: block;
}

h1 {
  margin: 1rem 0 0;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.05;
  text-transform: uppercase;
}

h1 span {
  display: block;
}

h1 .sub {
  margin-top: 0.35rem;
  color: var(--accent);
  font-size: 1.05rem;
  letter-spacing: 0.28em;
}

p {
  margin: 0;
}

.tagline {
  margin: 1.05rem 0 0;
  max-width: 36rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.45;
}

.lede {
  margin: 0.85rem 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.why {
  margin: 0;
}

.why h2 {
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.why-list {
  display: grid;
  gap: 0.9rem;
}

.why article {
  margin: 0;
  padding: 1.05rem 1.1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--stone);
  border-radius: 1.25rem;
}

.why h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
}

.why .problem {
  margin: 0 0 0.55rem;
  color: var(--muted);
}

.why .answer {
  margin: 0;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 24rem;
  margin-top: 1.5rem;
}

.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  min-height: 3.25rem;
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover,
.btn.primary:active {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.btn.ghost {
  background: var(--surface);
  border-color: var(--stone);
  color: var(--accent);
}

.btn .note {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
}

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

figure {
  margin: 0;
}

figure img {
  display: block;
  width: min(100%, 20rem);
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--stone);
  border-radius: 1.5rem;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(46, 63, 115, 0.12);
}

figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 2.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--stone);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-underline-offset: 0.22em;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

a:focus-visible,
.skip:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.btn.primary:focus-visible {
  outline: 3px solid var(--bg);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--accent);
}

@media (min-width: 900px) {
  .page {
    padding-top: max(3.5rem, env(safe-area-inset-top));
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  }

  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
  }

  h1 {
    font-size: 2.6rem;
  }

  h1 .sub {
    font-size: 1.35rem;
  }

  .tagline {
    font-size: 1.35rem;
  }

  .why-list {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .shots {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
  }

  .why {
    grid-column: 1 / -1;
  }

  figure img {
    width: 100%;
  }
}

@media (max-width: 359px) {
  h1 {
    font-size: 1.55rem;
    letter-spacing: 0.1em;
  }

  .btn {
    letter-spacing: 0.04em;
    font-size: 0.72rem;
  }
}

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