/* tourneyjourney.com: the app's paper scorebook (poolplay-ios docs/design.md).
   Paper, navy ink and one clay accent (live, yours, the one call to action);
   rules instead of cards; Newsreader titles; the double rule under a
   section head is the one ornament. Dark mode is the night game. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #F4EFE4;
  --leaf: #FBF8F1;
  --ink: #16223A;
  --muted: #4F5869;
  --faint: #7E8594;
  --clay: #A8431C;
  --rule: rgba(22, 34, 58, 0.16);
  --strong: #16223A;
  --bezel: #0C1018;
  --bezel-ring: transparent;
  --phone-shadow: 0 30px 60px -34px rgba(22, 34, 58, 0.5);
  --serif: "Newsreader", "New York", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 20px;
  --max: 1120px;
  --phone: min(320px, 80vw);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101B30;
    --leaf: #18253B;
    --ink: #ECE3CF;
    --muted: #B3AC9C;
    --faint: #9A9586;
    --clay: #EE8A5A;
    --rule: rgba(236, 227, 207, 0.18);
    --strong: rgba(236, 227, 207, 0.8);
    --bezel: #05070C;
    --bezel-ring: rgba(236, 227, 207, 0.16);
    --phone-shadow: 0 0 0 0 transparent;
  }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

@media (min-width: 960px) {
  :root { --gutter: 40px; --phone: 360px; }
}

*, *::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: 17px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--clay); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p, dd { text-wrap: pretty; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.kbd { font-weight: 600; color: var(--ink); }

/* The double rule (1.5 pt over 0.5 pt) under a section head. */
.double::after {
  content: "";
  display: block;
  height: 4px;
  margin-top: 14px;
  border-top: 1.5px solid var(--strong);
  border-bottom: 0.5px solid var(--strong);
}

/* ---- Header and footer ---- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.mark { width: 28px; height: auto; flex: none; color: var(--ink); }

.site-nav { display: flex; gap: 8px; font-size: 16px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  text-decoration: none;
  color: var(--muted);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; }

.site-foot {
  margin-top: 96px;
  border-top: 1px solid var(--rule);
  padding: 16px 0 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 28px;
  color: var(--muted);
  font-size: 15px;
}
.site-foot nav { display: flex; flex-wrap: wrap; column-gap: 22px; }
@media (max-width: 599px) {
  .site-foot { flex-direction: column; align-items: flex-start; }
}
.site-foot a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.site-foot a:hover { color: var(--ink); }
.site-foot a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---- The one call to action ---- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  background: var(--clay);
  color: var(--paper);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 12px;
}
.button:hover { filter: brightness(1.06); }
.button .time { font-weight: 500; opacity: 0.8; }
.play-glyph {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
}

/* ---- Phones (the real app, at the screenshot's own proportions) ---- */

.phone {
  position: relative;
  width: var(--phone);
  padding: calc(var(--phone) * 0.034);
  border-radius: calc(var(--phone) * 0.165);
  background: var(--bezel);
  box-shadow: var(--phone-shadow), 0 0 0 1px var(--bezel-ring);
  margin: 0;
  flex: none;
}
.phone::before {
  /* The Dynamic Island, over the status bar's empty middle. */
  content: "";
  position: absolute;
  top: calc(var(--phone) * 0.034 + var(--phone) * 0.026);
  left: 50%;
  width: calc(var(--phone) * 0.29);
  height: calc(var(--phone) * 0.086);
  transform: translateX(-50%);
  background: #000;
  border-radius: 999px;
  z-index: 1;
}
.phone img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--phone) * 0.135);
}

/* ---- Home: hero ---- */

.hero {
  display: grid;
  gap: 48px;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 72px;
}
.hero h1 { font-size: clamp(46px, 9vw, 88px); line-height: 0.98; letter-spacing: -0.02em; }
.lede { font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 30em; margin-top: 22px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 32px; }
.cta .soon { color: var(--muted); font-size: 15px; }
.hero .phone { justify-self: center; }

@media (min-width: 960px) {
  .hero { grid-template-columns: 1fr auto; gap: 64px; padding-top: 64px; padding-bottom: 104px; }
  .hero .phone { justify-self: end; }
}

/* ---- Home: video ---- */

.section-head { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.1; }
.video { padding-top: 16px; padding-bottom: 40px; }
.player {
  position: relative;
  margin-top: 28px;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--leaf);
}
.player video { width: 100%; height: 100%; background: #000; }

/* The title card over the player: flat, in the page's own colors. */
.poster { display: none; }
/* The play script hides the card once the video starts; [hidden] alone
   loses to the display below. */
.js .poster[hidden] { display: none; }
.js .poster {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 36px);
  width: 100%;
  padding: clamp(16px, 4%, 48px);
  border: 0;
  background: var(--leaf);
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.poster-question { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 4.4vw, 44px); line-height: 1.1; }
.poster-stats { display: flex; justify-content: center; gap: clamp(22px, 6vw, 72px); }
.poster-stats span { display: grid; font-size: clamp(11px, 1.3vw, 14px); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.poster-stats b { font-family: var(--serif); font-size: clamp(30px, 5vw, 64px); line-height: 1.05; letter-spacing: 0; color: var(--ink); text-transform: none; }
.poster-play { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: clamp(15px, 1.6vw, 18px); }
.poster-play .disc { display: grid; place-items: center; width: clamp(40px, 4.4vw, 52px); aspect-ratio: 1; border-radius: 50%; background: var(--clay); color: var(--paper); }
.poster-play .play-glyph { margin-left: 3px; }
.poster:hover .disc { filter: brightness(1.06); }

.transcript { margin-top: 14px; color: var(--muted); font-size: 15px; }
.transcript summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.transcript p { max-width: 42em; margin-top: 6px; }

/* ---- Home: features, rows divided by rules ---- */

.feature {
  display: grid;
  gap: 36px;
  border-top: 1px solid var(--rule);
  padding-top: 56px;
  padding-bottom: 64px;
}
.feature h2 { font-size: clamp(34px, 5vw, 52px); line-height: 1.04; }
.feature .copy p { margin-top: 18px; font-size: 19px; color: var(--muted); max-width: 28em; }
.feature figure { margin: 0; justify-self: center; }

@media (min-width: 960px) {
  .feature { --media: var(--phone); grid-template-columns: minmax(0, 1fr) var(--media); column-gap: 80px; align-items: start; padding-top: 88px; padding-bottom: 88px; }
  .feature .copy { position: sticky; top: 48px; }
  .feature figure { justify-self: end; }
  .feature.flip { grid-template-columns: var(--media) minmax(0, 1fr); }
  .feature.flip .copy { order: 2; }
  .feature.flip figure { justify-self: start; }

}

/* The bracket as a detail of the screen. */
.detail { width: min(var(--phone), 100%); }
.detail img { width: 100%; height: auto; }

/* Alerts as a short list, in the app's own wording. */
.alerts { list-style: none; margin: 8px 0 0; padding: 0; }
.alerts li:last-child { border-bottom: 0; }
.alerts li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 18px;
  padding: 13px 0 14px;
  border-bottom: 1px solid var(--rule);
}
.alerts strong { font-weight: 600; font-size: 16px; line-height: 1.4; }
.alerts span { color: var(--muted); font-size: 15px; }
.alerts time { color: var(--muted); font-size: 14px; grid-column: 2; grid-row: 1; padding-top: 1px; }
.feature .copy p.after { margin-top: 22px; }

/* Widgets, as they sit on a Home Screen. */
.widgets { display: grid; gap: 16px; width: min(var(--phone), 100%); }
.widgets picture { display: block; }
.widgets img { height: auto; box-shadow: 0 0 0 1px var(--rule); }
.widgets .w-seed img { width: 100%; border-radius: 7.5% / 16.1%; }
.widgets .w-next img { width: 46.7%; border-radius: 16.1%; }

/* ---- Home: privacy ---- */

.promise { border-top: 1px solid var(--rule); padding-top: 56px; }
.promise h2 { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.1; }
.promise p { margin-top: 18px; color: var(--muted); font-size: 19px; max-width: 32em; }

/* ---- Documents: support, testing, privacy ---- */

.doc { max-width: 680px; padding-top: 48px; }
.doc h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1.02; letter-spacing: -0.02em; }
.doc .lede { margin-top: 18px; }
.doc section { margin-top: 56px; }
.doc h2 { font-size: clamp(26px, 3.6vw, 32px); line-height: 1.15; }
.doc section > p { margin-top: 18px; color: var(--muted); }
.doc section > p + p { margin-top: 12px; }
.doc .updated { color: var(--muted); margin-top: 10px; font-size: 15px; }
.contact-line { margin-top: 14px; font-size: 19px; }
.contact-line a { font-weight: 600; }

/* Lists and questions: rows divided by hairlines. */
.rows { list-style: none; margin: 4px 0 0; padding: 0; color: var(--muted); }
.rows li { padding: 12px 0 13px; border-bottom: 1px solid var(--rule); }
.rows li:last-child { border-bottom: 0; }
.rows strong { color: var(--ink); font-weight: 600; }

.qa { margin: 4px 0 0; }
.qa > div { padding: 18px 0 20px; border-bottom: 1px solid var(--rule); }
.qa > div:last-child { border-bottom: 0; }
.qa dt { font-weight: 600; font-size: 18px; line-height: 1.4; }
.qa dd { margin: 6px 0 0; color: var(--muted); }
.qa dd p + p { margin-top: 10px; }

/* Numbered steps, like a scorebook's column of innings. */
.steps { list-style: none; margin: 4px 0 0; padding: 0; counter-reset: step; }
.steps > li:last-child { border-bottom: 0; }
.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 16px;
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--rule);
}
.steps > li::before {
  content: counter(step);
  grid-column: 1;
  grid-row: 1 / span 9;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 38px;
  line-height: 1;
  color: var(--ink);
}
.steps > li > * { grid-column: 2; }
.steps h3 { font-family: var(--sans); font-weight: 600; font-size: 19px; line-height: 1.35; letter-spacing: 0; }
.steps p { color: var(--muted); margin-top: 6px; }
.steps .button { margin-top: 14px; justify-self: start; }

@media (max-width: 420px) {
  body { font-size: 16.5px; }
  .lede, .feature .copy p, .promise p { font-size: 18px; }
  .steps > li { grid-template-columns: 34px 1fr; column-gap: 12px; }
  .steps > li::before { font-size: 30px; }
}

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