/* Duo Carnival: the site's one stylesheet. No web fonts, no scripts, no external requests. */

:root {
  color-scheme: light dark;

  /* Light: ink on warm paper. */
  --paper: #fbf7f0;
  --ink: #1d1420;
  --ink2: #5c5160;       /* 7.2:1 on paper */
  --rule: #e2d8cc;
  --card: #f2ebe1;
  --accent: #5b2386;     /* marquee purple, 9.6:1 on paper */
  --on-accent: #ffffff;
  --field: #ffffff;
  --plate: #0d0518;      /* behind pictures, in both themes */

  --sans: system-ui, -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --measure: 36rem;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #140b1f;
    --ink: #f3ecf7;
    --ink2: #b7a9c2;     /* 8.4:1 on paper */
    --rule: #33233f;
    --card: #1e1230;
    --accent: #f3b23c;   /* bulb gold, 10:1 on paper */
    --on-accent: #1d1420;
    --field: #0d0518;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Skip link and focus ---------- */

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  z-index: 10;
}
.skip:focus { top: 0.5rem; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Head ---------- */

.head {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 1rem var(--gutter) 0;
}
.head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 700 1.0625rem/1.3 var(--round);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark img {
  display: block;
  width: 32px;
  height: 32px;
}
.nav ul {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  font-size: 0.9375rem;
  color: var(--ink2);
  text-decoration: none;
  padding: 0.6rem 0;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

/* ---------- Page ---------- */

main {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1, h2, h3 {
  font-family: var(--round);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2rem, 1.6rem + 1.8vw, 2.75rem);
  letter-spacing: -0.01em;
  margin: 3rem 0 0.5rem;
}
h2 {
  font-size: 1.3125rem;
  margin: 3rem 0 0.75rem;
}
h3 {
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.35rem;
}

.dek {
  margin: 0 0 2.25rem;
  color: var(--ink2);
}
.lede {
  font-size: 1.125em;
  line-height: 1.55;
}

p, ul, ol, dl { margin: 0 0 1em; }
p { text-wrap: pretty; }
ul.plain { padding-left: 1.2em; }
ul.plain li { margin-bottom: 0.35em; }
ul.plain li::marker { color: var(--ink2); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2.5px; }

.small {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink2);
}

/* ---------- Pictures: three of the game's own screens ---------- */

.shots {
  margin: 2.5rem 0;
}
.shots-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: var(--plate);
  padding: 10px;
  border-radius: 14px;
}
.shots-row img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.shots figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink2);
}

@media (max-width: 40rem) {
  /* On a phone the pictures become a strip you swipe sideways; the page itself never scrolls sideways. */
  .shots { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
  .shots-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    border-radius: 0;
    -webkit-overflow-scrolling: touch;
  }
  .shots-row img {
    flex: 0 0 68%;
    width: 68%;
    scroll-snap-align: center;
  }
  .shots figcaption { padding: 0 var(--gutter); }
}

@media (min-width: 64rem) {
  h1 { margin-top: 4.5rem; }
  .shots { margin-left: -4rem; margin-right: -4rem; }
}

/* ---------- The seven cabinets, and questions ---------- */

.cabinets, .qa { margin: 0 0 1em; }
.cabinets dt, .qa dt {
  font: 700 1.0625rem/1.3 var(--round);
  margin-top: 1.25rem;
  margin-bottom: 0.2rem;
}
.qa dt { margin-top: 1.75rem; margin-bottom: 0.35rem; }
.cabinets dd, .qa dd { margin: 0; }
.qa dd p:last-child { margin-bottom: 0; }

/* ---------- App Store link under the dek ---------- */

.get { margin: -1rem 0 2.25rem; }
a.key {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* ---------- Store line ---------- */

.store {
  margin: 2.5rem 0 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.store .small { display: block; margin-top: 0.35rem; }

/* ---------- Contact form ---------- */

.card {
  background: var(--card);
  border-radius: 14px;
  margin: 3rem 0 0;
  padding: 1.5rem 1.25rem 1.75rem;
}
.card h2 { margin-top: 0; }

@media (min-width: 40rem) {
  .card { padding: 2rem 2rem 2.25rem; }
}

.field { margin: 0 0 1.25rem; }
.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9375rem;
}
.field label .opt {
  font-weight: 400;
  color: var(--ink2);
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.7rem;
  font: 400 1.0625rem/1.45 var(--sans);
  color: var(--ink);
  background: var(--field);
  border: 1.5px solid var(--ink2);
  border-radius: 8px;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea {
  min-height: 9.5rem;
  resize: vertical;
}

.key {
  display: inline-block;
  min-height: 48px;
  min-width: 96px;
  padding: 0.7rem 1.5rem;
  font: 700 1rem/1.2 var(--round);
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.key:hover { filter: brightness(1.08); }

/* Honeypot: out of sight and out of the tab order; people never see it. */
.hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Privacy page details ---------- */

.updated {
  font-size: 0.9375rem;
  color: var(--ink2);
  margin: 0 0 2rem;
}
.summary {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 0 0 2rem;
}

/* ---------- Foot ---------- */

.foot {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 4rem auto 0;
  padding: 0 var(--gutter) 2.5rem;
}
.foot-inner {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink2);
}
.foot-inner p { margin: 0 0 0.5rem; }
.foot nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}
.foot nav a { color: var(--ink); }

@media print {
  .nav, .skip, .card form { display: none; }
  body { background: #fff; color: #000; }
}
