/* BracketJam's game-night palette, from App/Design/JamStyle.swift, with its dark and increased-contrast variants.
   Like the app, every fill is a solid color, and cards and buttons sit on a solid lip. */
:root {
  color-scheme: light dark;
  --paper: #f7efe4;
  --surface: #fffcf7;
  --inset: #f0e5d6;
  --ink: #271c40;
  --muted: #6d6480;
  --line: #e6daca;
  --lip: #e0d2be;
  --accent: #4e22b0;
  --on-accent: #ffffff;
  --grape: #4e22b0;
  --grape-lip: #2a1166;
  --grape-copy: #e4dafb;
  --mint: #3dd6a8;
  --sticker-ink: #271c40;
  --frame: #271c40;
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1523;
    --surface: #262033;
    --inset: #201a2b;
    --ink: #f7f1ea;
    --muted: #b8afc8;
    --line: #3b3349;
    --lip: #0f0b16;
    --accent: #c3a8ff;
    --on-accent: #1a1523;
    --frame: #0f0b16;
  }
}
@media (prefers-contrast: more) {
  :root { --muted: #4f4762; --line: #b9aa95; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --muted: #d8d1e4; --line: #6a5f7d; }
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--mint); color: var(--sticker-ink); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 2; padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--on-accent); text-decoration: none; }
.skip:focus { top: 12px; }

/* Header and footer */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0; }
.brand { display: flex; align-items: center; gap: 12px; font: 900 24px/1 var(--rounded); letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 3px 0 var(--lip); }
.masthead nav { display: flex; flex-wrap: wrap; gap: 8px; }
.masthead nav a {
  padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); box-shadow: 0 3px 0 var(--lip);
  font: 800 15px/1.2 var(--rounded); color: var(--ink); text-decoration: none;
}
.masthead nav a:hover { border-color: var(--accent); }
.masthead nav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding: 28px 0 40px; border-top: 1.5px solid var(--line); color: var(--muted); font-size: 14px; }
footer a { color: var(--muted); font-weight: 500; text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }

/* Type */
h1, h2, h3 { font-family: var(--rounded); color: var(--ink); text-wrap: balance; }
h1 { margin: 18px 0 20px; font-size: clamp(44px, 6.2vw, 76px); font-weight: 900; line-height: 1.02; letter-spacing: -.025em; }
h2 { margin: 0 0 14px; font-size: clamp(30px, 3.6vw, 42px); font-weight: 900; line-height: 1.08; letter-spacing: -.02em; }
h3 { margin: 0 0 8px; font-size: 21px; font-weight: 800; line-height: 1.2; }
p, li { font-size: 17px; line-height: 1.6; }
p { margin: 0 0 14px; max-width: 64ch; text-wrap: pretty; }
.intro { font-size: 20px; line-height: 1.55; color: var(--muted); }
.note { font-size: 15px; color: var(--muted); }
.sticker {
  display: inline-block; margin: 0; padding: 5px 14px; border-radius: 999px; background: var(--mint); color: var(--sticker-ink);
  font: 900 14px/1.3 var(--rounded); transform: rotate(-2deg);
}
.sticker.grape { background: var(--grape); color: #ffffff; }

/* Device frames around app screenshots, solid like the app's cards */
.tablet { margin: 0; padding: 11px; border-radius: 30px; background: var(--frame); box-shadow: 0 6px 0 var(--lip); }
.tablet img { width: 100%; border-radius: 20px; }
.phone { position: relative; margin: 0; padding: 8px; border-radius: 44px; background: var(--frame); box-shadow: 0 6px 0 var(--lip); }
.phone img { width: 100%; border-radius: 37px; }
/* The Dynamic Island, which simulator captures leave out. */
.phone::after { content: ""; position: absolute; top: calc(8px + 2.3%); left: 50%; width: 29%; aspect-ratio: 3.4; transform: translateX(-50%); border-radius: 999px; background: #000000; }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; padding: 40px 0 88px; }
.hero .note { margin-top: 24px; }
.devices { position: relative; padding: 0 9% 13% 0; }
.devices .phone { position: absolute; right: 0; bottom: 0; width: 31%; transform: rotate(5deg); }

.section { padding: 72px 0; border-top: 1.5px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 50%;
  background: var(--grape); color: #ffffff; box-shadow: 0 3px 0 var(--grape-lip); font: 900 19px/1 var(--rounded);
}
.steps p { color: var(--muted); }

.card { padding: 26px; border-radius: 24px; background: var(--surface); border: 1.5px solid var(--line); box-shadow: 0 4px 0 var(--lip); }
.card p:last-child { margin-bottom: 0; }

.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.feature + .feature { margin-top: 88px; }
.feature.flip .copy { order: 2; }
.feature .copy p:not(.sticker) { color: var(--muted); }
.feature .copy .sticker { margin-bottom: 14px; }
.feature.portrait { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.feature.portrait.flip { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.feature.portrait .phone { width: min(100%, 330px); margin: 0 auto; }

.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin: 0; }
.compare figure { margin: 0; }
.compare figcaption { margin-top: 18px; }
.compare figcaption p:not(.sticker) { margin: 12px 0 0; color: var(--muted); font-size: 16px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.grid .card p { color: var(--muted); font-size: 16px; }

.band { padding: 48px; border-radius: 30px; background: var(--grape); color: #ffffff; box-shadow: 0 6px 0 var(--grape-lip); }
.band h2 { color: #ffffff; }
.band p:not(.sticker) { color: var(--grape-copy); }
.band .tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 30px 0 26px; }
.band .tier { padding: 24px 26px; border-radius: 22px; background: #ffffff; color: #271c40; box-shadow: 0 4px 0 var(--grape-lip); }
.band .tier h3 { color: #271c40; }
.band .tier p:not(.sticker) { margin: 0; color: #4f4762; font-size: 16px; }
.band .tier .sticker { margin-bottom: 12px; }
.band .links a { color: #ffffff; }
.band .note { color: var(--grape-copy); margin: 0; }
.links { display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 22px 0; }
.links a { font-size: 17px; text-decoration: none; }
.links a:hover { text-decoration: underline; }

/* Support and privacy */
.document { max-width: 780px; padding: 40px 0 72px; }
.document h1 { font-size: clamp(40px, 5vw, 56px); }
.document section { margin-top: 44px; }
.document section[id] { scroll-margin-top: 24px; }
.document h2 { font-size: 27px; font-weight: 800; letter-spacing: -.01em; }
.document ul, .document ol { margin: 0 0 14px; padding-left: 24px; max-width: 64ch; }
.document li { margin-bottom: 10px; }
.document li::marker { color: var(--muted); font-weight: 700; }
.summary { margin: 28px 0 0; padding: 24px 26px; border-radius: 24px; background: var(--inset); border: 1.5px solid var(--line); box-shadow: 0 4px 0 var(--lip); }
.summary p { margin: 0; }
.summary p + p { margin-top: 10px; }
.summary .sticker { margin-bottom: 12px; }
.button {
  display: inline-block; margin-top: 16px; padding: 12px 22px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  box-shadow: 0 3px 0 var(--lip); font: 800 16px/1.2 var(--rounded); text-decoration: none;
}
.document .contents { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 0; padding: 0; list-style: none; }
.document .contents li { margin: 0; font-size: 15px; }
.contents a {
  display: inline-block; padding: 6px 13px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line);
  font: 700 14px/1.3 var(--rounded); color: var(--ink); text-decoration: none;
}
.contents a:hover { border-color: var(--accent); }
.updated { margin-top: 44px; font-size: 14px; color: var(--muted); }

@media (max-width: 920px) {
  .hero, .feature, .feature.portrait, .feature.portrait.flip { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 24px 0 64px; }
  .feature.flip .copy { order: 0; }
  .feature + .feature { margin-top: 64px; }
  .steps, .grid { grid-template-columns: 1fr; }
  .grid { gap: 18px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .masthead { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px 0; }
  .masthead nav a { padding: 7px 14px; font-size: 14px; }
  h1 { font-size: clamp(40px, 12vw, 52px); }
  .intro { font-size: 18px; }
  .section { padding: 52px 0; }
  .tablet { padding: 7px; border-radius: 20px; }
  .tablet img { border-radius: 14px; }
  .phone { padding: 6px; border-radius: 34px; }
  .phone img { border-radius: 29px; }
  .phone::after { top: calc(6px + 2.3%); }
  .compare { grid-template-columns: 1fr; gap: 28px; }
  .band { padding: 30px 22px; border-radius: 24px; }
  .band .tiers { grid-template-columns: 1fr; gap: 16px; }
  .card, .summary { padding: 20px; }
  .document { padding: 24px 0 56px; }
  .document h1 { font-size: 40px; }
  footer { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
