/* Parlay Tracker — parlaytracker.app
   The world is a printed sportsbook ticket on a felt table. Barlow throughout:
   the condensed cut for headlines and the slip (scoreboard, terminal printout),
   the regular cut for reading. Colours come from the app: its felt green, the
   About page's paper (#F0E8D8), and the win-probability bands. */

@font-face { font-family: "Barlow"; src: url("assets/fonts/Barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/Barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/Barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/Barlow-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("assets/fonts/BarlowCondensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("assets/fonts/BarlowCondensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("assets/fonts/BarlowCondensed-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: light dark;
  --felt: #1f4d38;
  --felt-2: #285c44;
  --felt-ink: #e9f2ec;
  --felt-ink-2: #a9c7b5;
  --paper: #f0e8d8;
  --paper-2: #e6dcc7;
  --slip: #fbf8f1;
  --slip-edge: #d8cfbd;
  --ink: #23251f;
  --ink-2: #5d635b;
  --green: #1c5c3d;
  --green-hi: #6bc78c;
  --red: #a12b21;
  --orange: #d9822b;
  --orange-soft: #e7a868;
  --blue: #3f78b5;
  --line: #d6ccb6;
  --card: #fffdf8;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --wrap: 72rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12261c;
    --paper-2: #173024;
    --ink: #ecefe6;
    --ink-2: #a9b5a8;
    --green: #6bc78c;
    --line: #2b4537;
    --card: #1a3328;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
}

img, video, svg, canvas { display: block; max-width: 100%; }
/* Keep each picture's own shape when it is narrowed (its width/height attributes
   would otherwise pin the height). */
img { height: auto; }
a { color: var(--green); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--card); color: var(--ink); padding: 0.5rem 1rem; z-index: 10; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--cond); font-weight: 700; line-height: 1.02; letter-spacing: -0.005em; margin: 0 0 1rem; text-wrap: balance; }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.1rem); }
.display { font-weight: 800; }
p { margin: 0 0 1rem; max-width: 36rem; }
.lede { font-size: 1.25rem; color: var(--ink-2); }

/* ---------- Header (sits on the felt) ---------- */

.site-head { background: var(--felt); color: var(--felt-ink); padding: 1.1rem 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: inherit; text-decoration: none; font-family: var(--cond); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.01em; }
.brand img { border-radius: 8px; }
.site-nav { display: flex; gap: 1.4rem; }
.site-nav a { color: var(--felt-ink-2); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--felt-ink); }

/* ---------- Hero: the felt table and the live slip ---------- */

.hero {
  background:
    radial-gradient(ellipse 80% 70% at 70% 40%, var(--felt-2), transparent 70%),
    var(--felt);
  color: var(--felt-ink);
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(3.2rem, 7.4vw, 6rem); line-height: 0.92; margin-bottom: 1.4rem; }
.hero .lede { color: var(--felt-ink-2); max-width: 32rem; }

.get { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.8rem; }
.get small { color: inherit; opacity: 0.8; font-size: 0.95rem; }

.slip-col { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }

.slip {
  position: relative;
  width: min(100%, 25.5rem);
  transform: rotate(1.6deg);
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.35));
}
.slip-face {
  background: var(--slip);
  color: #23251f;
  padding: 1.6rem 1.3rem 1.3rem;
  /* Torn thermal-paper edges, top and bottom. */
  --tooth: 9px;
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(var(--tooth) * 2) var(--tooth) repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - var(--tooth) * 2) no-repeat;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(var(--tooth) * 2) var(--tooth) repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - var(--tooth) * 2) no-repeat;
  transition: background-color 0.5s;
}
.slip[data-state="won"] .slip-face { background: #f1f8f1; }
.slip[data-state="lost"] .slip-face { opacity: 0; transition: opacity 0.15s; }
.slip[data-state="lost-done"] .slip-face { background: #f7ece9; }

.fx { position: absolute; inset: -40% -30%; width: 160%; height: 180%; max-width: none; pointer-events: none; }

.slip-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 0.8rem; border-bottom: 2px dashed var(--slip-edge); }
.slip-title { font-family: var(--cond); font-weight: 800; font-size: 1.55rem; line-height: 1; }
.slip-sub { font-size: 0.85rem; color: #6b6f66; margin-top: 0.25rem; }
.slip-money { text-align: right; font-family: var(--cond); }
.slip-pay { font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.slip-odds { color: #6b6f66; font-weight: 600; }

.legs { list-style: none; margin: 0; padding: 0; }
.leg { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.8rem; padding: 0.7rem 0; border-bottom: 1px solid #ebe4d4; }
.leg-pick { font-family: var(--cond); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.leg-pick .odds { font-weight: 600; color: #6b6f66; margin-left: 0.35rem; font-variant-numeric: tabular-nums; }
.leg-game { font-size: 0.82rem; color: #6b6f66; font-variant-numeric: tabular-nums; }
.leg-right { grid-row: span 2; text-align: right; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 0.2rem; }
.chip {
  font-family: var(--cond); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.1rem 0.5rem; border-radius: 999px; background: #ece6d9; color: #6b6f66; white-space: nowrap;
}
.pct { font-family: var(--cond); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; color: #8a8e85; }
.leg[data-band="red"] .pct, .leg[data-band="red"] .chip { color: var(--red); }
.leg[data-band="orange"] .pct, .leg[data-band="orange"] .chip { color: var(--orange); }
.leg[data-band="orange-soft"] .pct, .leg[data-band="orange-soft"] .chip { color: var(--orange-soft); }
.leg[data-band="blue"] .pct, .leg[data-band="blue"] .chip { color: var(--blue); }
.leg[data-band="green"] .pct, .leg[data-band="green"] .chip { color: #1c5c3d; }
.leg[data-band="red"] .chip { background: #f6e0dc; }
.leg[data-band="orange"] .chip, .leg[data-band="orange-soft"] .chip { background: #fbeedd; }
.leg[data-band="blue"] .chip { background: #e2ecf6; }
.leg[data-band="green"] .chip { background: #dff0e4; }
.leg[data-result="hit"] .chip { background: #1c5c3d; color: #fff; }
.leg[data-result="miss"] .chip { background: var(--red); color: #fff; }

/* The header graphic's progress bar: how far the stat has got toward the line. */
.bar { grid-column: 1; position: relative; height: 7px; border-radius: 4px; background: #ebe4d4; margin-top: 0.35rem; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; width: 0; background: #b9b3a5; }
.bar-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #23251f; }
.leg[data-band="green"] .bar-fill { background: #3f9a63; }
.leg[data-band="blue"] .bar-fill { background: #6f9fd0; }
.leg[data-band="orange"] .bar-fill, .leg[data-band="orange-soft"] .bar-fill { background: #e7a868; }
.leg[data-band="red"] .bar-fill { background: #d06a5f; }

.slip-foot { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 0.9rem; }
.foot-label { font-size: 0.82rem; color: #6b6f66; }
.foot-value { font-family: var(--cond); font-weight: 800; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.foot-status { font-family: var(--cond); font-weight: 700; font-size: 1.15rem; color: #6b6f66; }
.slip[data-state="won"] .foot-status, .slip[data-state="won"] .foot-value { color: #1c5c3d; }
.slip[data-state="lost-done"] .foot-status, .slip[data-state="lost-done"] .foot-value { color: var(--red); }

.btn {
  font: inherit; font-family: var(--cond); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.02em;
  background: var(--slip); color: var(--felt); border: 0; border-radius: 999px;
  padding: 0.65rem 1.6rem; cursor: pointer;
}
.btn:hover { background: #fff; }
.btn:disabled { opacity: 0.55; cursor: default; }
.slip-note { color: var(--felt-ink-2); font-size: 0.95rem; text-align: center; min-height: 3em; margin: 0; max-width: 24rem; }

/* ---------- Sections ---------- */

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.two-col.reverse .copy { order: 2; }

.shot { margin: 0; }
.shot img { border-radius: 26px; background: #fff; box-shadow: 0 1px 0 var(--line), 0 20px 40px -24px rgba(0, 0, 0, 0.35); }
.shot-tilt img { transform: rotate(-1.5deg); }
.shot figcaption, .strip figcaption, .ipad figcaption { margin-top: 0.9rem; }
figcaption b { display: block; font-family: var(--cond); font-weight: 700; font-size: 1.3rem; line-height: 1.15; }
figcaption span { display: block; color: var(--ink-2); font-size: 1rem; }

.ways-list { margin: 1.8rem 0 0; display: grid; gap: 1.1rem; }
.ways-list div { border-left: 3px solid var(--green); padding-left: 1rem; }
.ways-list dt { font-family: var(--cond); font-weight: 700; font-size: 1.35rem; line-height: 1.1; }
.ways-list dd { margin: 0.2rem 0 0; color: var(--ink-2); max-width: 32rem; }
.two-col .shot img { max-width: 22rem; margin-inline: auto; }

.live { background: var(--paper-2); }
.center-narrow { max-width: 34rem; }
.live-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2.2rem); margin-top: 2.4rem; }

.watch { background: var(--felt); color: var(--felt-ink); }
.watch p { color: var(--felt-ink-2); }
.watch-row { display: flex; gap: 0.9rem; justify-content: center; }
.watch-row img { width: calc((100% - 1.8rem) / 3); max-width: 11rem; border-radius: 22%; box-shadow: 0 0 0 7px #0b0f0c, 0 0 0 9px #3a4a40, 0 18px 30px rgba(0, 0, 0, 0.35); }
.watch-row img:nth-child(2) { transform: translateY(-1.2rem); }

.numbers-head { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: end; margin-bottom: 2.4rem; }
.ipad { margin: 0; }
.ipad img { border-radius: 18px; border: 1px solid var(--line); background: #fff; box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.5); }
.ipad-small { margin-top: 3rem; max-width: 52rem; }

.screens { background: var(--paper-2); }
.screens-intro { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.screens-intro p { color: var(--ink-2); margin: 0; }
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(14rem, 16.5rem); gap: 1.6rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 1.6rem 0.2rem 1.2rem; margin-top: 0.6rem;
}
.strip figure { margin: 0; scroll-snap-align: start; }
.strip .frame img { border-radius: 22px; background: #fff; box-shadow: 0 1px 0 var(--line), 0 16px 30px -22px rgba(0, 0, 0, 0.35); }

/* Squares board: a 10 x 10 grid with the winning squares lit as quarters end. */
.board { margin: 0; display: flex; flex-direction: column; align-items: center; }
.board figcaption { max-width: 24rem; }
.board-grid {
  display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px;
  width: min(100%, 24rem); padding: 0.9rem; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
}
.board-grid span {
  aspect-ratio: 1; border-radius: 3px; background: var(--paper-2);
  display: grid; place-items: center; font-family: var(--cond); font-weight: 700; font-size: 0.8rem; color: var(--ink-2);
}
.board-grid .axis { background: transparent; color: var(--green); }
.board-grid .mine { background: color-mix(in srgb, var(--green) 22%, transparent); }
.board-grid .win { background: var(--green); color: var(--card); }
.board-grid .win.mine { background: #d9a520; color: #23251f; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px #d9a520; }

.privacy { background: var(--felt); color: var(--felt-ink); }
.privacy h2 { font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 0.95; }
.privacy p { color: var(--felt-ink-2); }
.privacy a { color: var(--felt-ink); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; }
.facts li { padding-top: 1rem; border-top: 1px solid rgba(233, 242, 236, 0.18); }
.facts b { display: block; font-family: var(--cond); font-weight: 700; font-size: 1.35rem; }
.facts span { color: var(--felt-ink-2); }

.notebook { padding-bottom: 1rem; }
.notebook p { color: var(--ink-2); font-size: 1.2rem; }

.closing { text-align: left; padding-top: 3rem; }
.closing h2 { font-size: clamp(3rem, 8vw, 6rem); line-height: 0.9; }
.closing small { color: var(--ink-2); opacity: 1; }

.site-foot { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--ink-2); font-size: 0.95rem; }
.site-foot p { max-width: 46rem; }
.site-foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-foot a { color: var(--ink-2); }

/* ---------- Text pages (support, privacy) ---------- */

.page { padding: clamp(2.5rem, 6vw, 4.5rem) 0 5rem; }
.page .wrap { max-width: 46rem; }
.page h1 { font-size: clamp(2.8rem, 6vw, 4rem); font-weight: 800; }
.page h2 { font-size: 1.75rem; margin-top: 2.6rem; margin-bottom: 0.6rem; }
.page p, .page li { max-width: 40rem; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: 0.35rem; }
.updated { color: var(--ink-2); font-size: 0.95rem; }
.mail { display: inline-block; margin: 0.3rem 0 0.5rem; font-family: var(--cond); font-weight: 700; font-size: 1.3rem; background: var(--felt); color: var(--felt-ink); padding: 0.55rem 1.3rem; border-radius: 999px; text-decoration: none; }
.faq dt { font-family: var(--cond); font-weight: 700; font-size: 1.3rem; margin-top: 1.4rem; }
.faq dd { margin: 0.3rem 0 0; color: var(--ink-2); max-width: 40rem; }

/* ---------- Small screens ---------- */

@media (max-width: 880px) {
  .hero .wrap, .two-col, .numbers-head { grid-template-columns: 1fr; }
  .two-col.reverse .copy { order: 0; }
  .live-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(14rem, 70%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.8rem; }
  .live-grid figure { scroll-snap-align: start; }
  .slip { transform: rotate(0.8deg); }
}

@media (max-width: 520px) {
  body { font-size: 1.0625rem; }
  .nav-optional { display: none; }
  .site-nav { gap: 1rem; }
  .slip-face { padding: 1.4rem 1rem 1.1rem; }
  .leg-pick { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
