/*
 * The Miraventura site. The colours and type are the game's own (copied from
 * src/ui/styles.css as values; nothing is imported): cream, paper, terracotta,
 * olive, deep blue, a serif for display.
 */

:root {
  --cream: #f6efe0;
  --paper: #fffaf0;
  --sand: #e8dcc2;
  --ink: #2a2118;
  --ink-soft: #5b4d3f;
  --terracotta: #c2553a;
  --terracotta-dark: #9e4229;
  --olive-dark: #4f5c2a;
  --blue: #1f3a5f;
  --gold: #d9a441;
  --rose: #b23a48;
  --night: #1d1a16;
  --line: rgba(42, 33, 24, 0.14);
  --shadow: 0 10px 30px rgba(42, 33, 24, 0.18), 0 2px 6px rgba(42, 33, 24, 0.1);
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}

p {
  margin: 0 0 0.75em;
}

a {
  color: var(--blue);
  text-underline-offset: 0.15em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
.done:focus-visible,
.shots:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.top,
main,
.foot {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.top {
  padding-top: 22px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--terracotta-dark);
  text-decoration: none;
}

/* The hero: what it is, and the form. */

.hero {
  max-width: 620px;
  padding: 34px 0 8px;
}

/* The shape of the game's Objectives pill: paper, a gold edge on the left. */
.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 5px 14px 5px 12px;
  border-left: 5px solid var(--gold);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(42, 33, 24, 0.12);
  color: var(--terracotta-dark);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(34px, 8.6vw, 54px);
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.lede {
  margin: 18px 0 0;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 34em;
}

.join {
  margin-top: 28px;
  scroll-margin-top: 20px;
}

/* The game's answer card: paper, rounded, a terracotta edge on top. */
.card {
  background: var(--paper);
  border-top: 5px solid var(--terracotta);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px 20px 18px;
  max-width: 460px;
}

.card h2 {
  font-size: 26px;
  color: var(--terracotta-dark);
}

.card-lede {
  margin: 8px 0 16px;
  color: var(--ink-soft);
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

input[type="email"] {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 2px solid var(--sand);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
}

input[type="email"]:focus {
  border-color: var(--blue);
}

.cf-turnstile {
  margin: 14px 0 0;
  min-height: 65px;
}

button,
.button-link {
  display: inline-block;
  min-height: 52px;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--terracotta);
  box-shadow: 0 4px 0 var(--terracotta-dark);
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

button {
  width: 100%;
  margin-top: 14px;
}

/* White on the terracotta is 4.51:1; the hover is darker, 5.33:1 (not lighter: a lighter one fails 4.5:1). */
button:hover:not(:disabled),
.button-link:hover {
  background: #b34a31;
}

button:active:not(:disabled),
.button-link:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--terracotta-dark);
}

button:disabled {
  background: var(--sand);
  box-shadow: 0 4px 0 #d3c4a4;
  color: var(--ink-soft);
  cursor: not-allowed;
}

.status {
  margin: 14px 0 0;
  min-height: 1.5em;
  color: var(--ink-soft);
  font-size: 15px;
}

.status:empty {
  display: none;
}

.status.is-error {
  padding: 10px 12px;
  border-left: 4px solid var(--rose);
  border-radius: 8px;
  background: rgba(178, 58, 72, 0.08);
  color: var(--ink);
}

.small {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.done h2 {
  color: var(--olive-dark);
}

.done {
  border-top-color: var(--olive-dark);
}

.done p {
  margin: 10px 0 4px;
}

/* How it plays: three real screens of the game. */

.plays {
  padding: 56px 0 8px;
}

.plays > h2,
.facts h2 {
  font-size: 28px;
}

.shots {
  list-style: none;
  margin: 20px -20px 0;
  padding: 0 20px 14px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(72%, 280px);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 20px;
}

.shots li {
  scroll-snap-align: start;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 6px solid var(--night);
  border-radius: 26px;
  background: var(--night);
  box-shadow: var(--shadow);
  image-rendering: auto;
}

.shots h3 {
  margin-top: 16px;
  font-size: 21px;
  color: var(--terracotta-dark);
}

.shots p {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.facts {
  display: grid;
  gap: 26px;
  padding: 44px 0 0;
}

.facts h2 {
  font-size: 22px;
}

.facts p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  max-width: 34em;
}

.again {
  margin: 40px 0 0;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 56px;
  padding-top: 20px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-soft);
}

.foot span {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--terracotta-dark);
}

/* The privacy notice. */

.notice {
  max-width: 680px;
  padding: 34px 0 0;
}

.notice h1 {
  font-size: clamp(30px, 7vw, 42px);
}

.notice h2 {
  margin-top: 30px;
  font-size: 22px;
  color: var(--terracotta-dark);
}

.notice p,
.notice ul {
  margin: 10px 0 0;
}

.notice ul {
  padding-left: 1.2em;
}

.notice li {
  margin-top: 6px;
}

.notice .dated {
  color: var(--ink-soft);
  font-size: 15px;
}

@media (min-width: 760px) {
  .top {
    padding-top: 30px;
  }

  .hero {
    padding-top: 48px;
  }

  .card {
    padding: 26px 26px 22px;
  }

  .shots {
    margin: 24px 0 0;
    padding: 0;
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 280px));
    justify-content: space-between;
    gap: 32px;
    overflow: visible;
  }

  .facts {
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    padding-top: 56px;
  }
}

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

  button:active:not(:disabled),
  .button-link:active {
    transform: none;
  }
}
