/* Mythicshot website: every style.
   Colours are tokens. The dark set is the default and matches the app and the
   artwork; the light set follows the visitor's setting. scripts/check.mjs works
   out the contrast of both sets from these tokens, so no colour may be written
   anywhere else in this file. */

:root {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-glow: #10233a;
  --surface: #121c30;
  --border: #2a3a57;
  --text: #e6edf7;
  --muted: #a5b4cb;
  --link: #5fd4f0;
  --primary-bg: #5fd4f0;
  --primary-text: #06121f;
  --badge-bg: #1c2b47;
  --badge-text: #b9d4ff;
  --focus: #8fe3ff;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  --radius: 14px;
  --gap: 1.25rem;
  --width: 68rem;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f5f8fc;
    --bg-glow: #e3eef8;
    --surface: #ffffff;
    --border: #c5d0e0;
    --text: #0f1b2e;
    --muted: #47566e;
    --link: #0b6a85;
    --primary-bg: #0f2a4a;
    --primary-text: #ffffff;
    --badge-bg: #e1ebf8;
    --badge-text: #1f3b63;
    --focus: #0b6a85;
  }
}

/* ---------- base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 7vw, 3.6rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

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

.skip {
  position: absolute;
  left: var(--gap);
  top: -4rem;
  z-index: 2;
  padding: 0.6rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.skip:focus {
  top: 0.75rem;
}

/* ---------- buttons and badges ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  border-color: var(--link);
}

.button.primary {
  background: var(--primary-bg);
  border-color: var(--primary-bg);
  color: var(--primary-text);
}

.button.primary:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.button.small {
  min-height: 2.25rem;
  padding: 0.3rem 0.9rem;
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
  vertical-align: 0.1em;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

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

.menu-button {
  min-height: 2.75rem;
  padding: 0.4rem 1rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-nav a.invite {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding-inline: 1rem;
  font-weight: 600;
}

.site-nav a.invite:hover {
  border-color: var(--link);
  text-decoration: none;
}

/* With JavaScript, phone widths get a menu button; without it the links stay open. */
@media (max-width: 43.99rem) {
  .js .site-nav {
    display: none;
    width: 100%;
  }

  .js .site-nav.open {
    display: block;
  }

  .js .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding-block: 0.25rem 0.5rem;
  }

  .js .site-nav a.invite {
    justify-content: center;
    margin-top: 0.4rem;
  }
}

@media (min-width: 44rem) {
  .menu-button {
    display: none;
  }
}

/* ---------- sections ---------- */

main > section {
  padding-block: clamp(3rem, 9vw, 5.5rem);
}

main > section + section {
  border-top: 1px solid var(--border);
}

.section-title {
  margin-bottom: 2rem;
  text-align: center;
}

.hero {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--bg-glow), var(--bg) 75%);
  text-align: center;
}

.hero .lead {
  max-width: 38rem;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2.8vw, 1.3rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.fine {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* The tour: a fixed shape, so the page does not jump; the poster shows until
   (and behind) the frame. */
figure {
  margin: 0;
}

.tour {
  max-width: 60rem;
  margin: clamp(2.5rem, 7vw, 4rem) auto 0;
}

.tour-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.tour-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tour-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.tour figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- feature cards ---------- */

.cards {
  display: grid;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--muted);
}

.card p + p,
.steps p + p {
  margin-top: 0.6rem;
}

@media (min-width: 48rem) {
  .cards,
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- how it works ---------- */

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

.steps li {
  counter-increment: step;
}

.steps h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.steps h3::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--link);
  border-radius: 50%;
  color: var(--link);
  font-size: 1rem;
}

.steps p {
  color: var(--muted);
}

/* ---------- pricing and invite ---------- */

.panel {
  max-width: 40rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.panel .lead {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.invite-address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin-top: 1.25rem;
  color: var(--muted);
}

.invite-address .address {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
  user-select: all;
}

/* ---------- plain pages: download, drafts, not found ---------- */

.page {
  padding-block: clamp(2.5rem, 8vw, 4.5rem);
}

.prose {
  max-width: 44rem;
}

.prose h1 {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.4rem;
}

.prose p,
.prose ul,
.prose dl {
  margin-top: 1rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose .lead {
  color: var(--muted);
  font-size: 1.15rem;
}

.notice {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--link);
  border-radius: 8px;
  background: var(--surface);
}

.notice strong {
  display: block;
}

.facts {
  display: grid;
  gap: 0.25rem 1.5rem;
  margin-bottom: 0;
}

.facts dt {
  color: var(--muted);
  font-size: 0.95rem;
}

.facts dd {
  margin: 0 0 0.75rem;
}

.facts .button {
  margin-left: 0.5rem;
}

@media (min-width: 36rem) {
  .facts {
    grid-template-columns: max-content 1fr;
  }

  .facts dt {
    padding-top: 0.1rem;
  }
}

.centred {
  text-align: center;
}

.centred .prose {
  margin-inline: auto;
}

.centred img {
  width: 10rem;
  margin: 0 auto 1.5rem;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.5rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .button,
  .site-nav a {
    transition: border-color 120ms ease;
  }
}

/* Buttons follow the text's side on plain pages. */
.prose .actions {
  justify-content: flex-start;
}

.centred .prose .actions {
  justify-content: center;
}
