/* Fightday website.
   Linked only from index.html and calendar.html.
   style.css is untouched and keeps serving privacy.html and support.html.
   Direction: the app's schedule screen, scaled up to a page. One alignment edge,
   hairlines instead of cards, exactly two filled surfaces (the orange button and
   the calendar feed block). */

/* ---------- reset ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, p, ul, ol, li, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; }
/* .btn sets display, which would otherwise beat the UA rule for [hidden].
   The copy buttons ship hidden and the script unhides them, so a browser with
   no navigator.clipboard never shows a dead button. */
[hidden] { display: none !important; }

/* ---------- tokens ---------- */

:root {
  --bg: #0B0B0D; --panel: #121216; --rule: #1C1C21; --edge: #2A2A30;
  --text: #F4F4F5; --body: #C9C9D0; --muted: #9A9AA3; --accent: #FF4D2E;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(20px, 5vw, 64px); --col: min(1120px, 100% - var(--gutter) * 2);
  --r-pill: 999px; --r-block: 14px;
  /* hover tints only. Same hue as --accent (9 degrees) and the same neutral
     family as --edge, so the one-accent lock still holds. */
  --accent-hi: #FF6348; --edge-hi: #3C3C44;
  color-scheme: dark;
}

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

body {
  background: var(--bg);
  color: var(--body);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* the single alignment edge: every band uses this and nothing else */
.wrap { width: var(--col); margin-inline: auto; }

section {
  border-top: 1px solid var(--rule);
  padding-block: clamp(48px, 9vw, 96px);
}

h1 {
  font-size: clamp(2.25rem, 7vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.14;
  color: var(--text);
}

p { max-width: 62ch; }
.lede { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); }
.muted { color: var(--muted); font-size: 15px; }
.strong { color: var(--text); font-weight: 600; }

.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

code, .mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }

/* filled surface 1 of 2. Near-black label on orange is 6.3:1; white would be 3.3:1 and fail. */
.btn-primary { background: var(--accent); color: #0B0B0D; }
.btn-primary:hover { background: var(--accent-hi); }

.btn-secondary { border: 1px solid var(--edge); color: var(--text); }
.btn-secondary:hover { border-color: var(--edge-hi); }

.btn-small { padding: 8px 16px; font-size: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .btn, a { transition: 0.18s cubic-bezier(0.16, 1, 0.3, 1); }
  .btn:active { transform: translateY(1px); }
}

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

.site-header { height: 64px; display: flex; align-items: center; }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 24px; height: 24px; border-radius: 6px; }
.site-header nav a { font-size: 15px; font-weight: 600; }
/* Two links sit in here now, so they need air between them. */
.site-header nav a + a { margin-left: 20px; }
.footer-links a + a { margin-left: 0; }

/* ---------- hero ---------- */

/* padding-bottom is 0 so the screenshot, which frame.py already cut off at the
   bottom, meets the next section's hairline and appears to carry on past it */
.hero { padding-bottom: 0; overflow: hidden; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: end;
}
.hero-copy { padding-bottom: clamp(48px, 9vw, 96px); }
.hero-copy h1 { margin-bottom: 18px; }
.hero-copy p { margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* the shot box stretches to the height the copy sets, and the screenshot,
   which is taller, is cut off by it at the section hairline */
.hero-shot {
  position: relative;
  align-self: stretch;
  min-height: clamp(300px, 32vw, 400px);
  overflow: hidden;
}
.hero-shot img { position: absolute; top: 0; right: 0; width: 400px; max-width: 100%; }

/* text-only hero, calendar.html */
.hero-plain { padding-bottom: clamp(48px, 9vw, 96px); overflow: visible; }
.hero-plain .wrap { display: block; }
.hero-plain h1 { max-width: 16ch; margin-bottom: 18px; }
.hero-plain p { margin-bottom: 30px; }

/* ---------- fact band ---------- */

.facts { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li {
  padding: 10px 24px;
  border-left: 1px solid var(--rule);
  color: var(--text);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts-note { margin-top: 32px; }

/* ---------- media splits ---------- */

.split .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 4vw, 40px) clamp(32px, 6vw, 72px);
  align-items: start;
}
.split h2 { margin-bottom: 16px; }
.split-shot img { width: 100%; max-width: 280px; }

/* where to watch: copy, then the country grid, with the phone alongside both */
.watch-copy, .watch-grid, .watch-note { grid-column: 1; }
.watch-shot { grid-column: 2; grid-row: 1 / span 3; }
.watch-shot img { margin-inline-start: auto; }

/* alerts: mirrored, phone in column 1 at desktop but last in source order */
.alerts-copy, .alerts-list, .alerts-note { grid-column: 2; }
.alerts-shot { grid-column: 1; grid-row: 1 / span 3; }
.alerts .wrap { grid-template-columns: 0.9fr 1.1fr; }

.countries {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 20px;
}
.countries li { display: flex; flex-direction: column; gap: 5px; }
.countries .name { color: var(--body); font-size: 15px; font-weight: 500; }

.alerts-list li { padding: 18px 0; max-width: 56ch; }
.alerts-list li:first-child { padding-top: 0; }
.alerts-list li + li { border-top: 1px solid var(--rule); }

/* ---------- calendar feed block ---------- */

.band-head { margin-bottom: 16px; }
.band-body { margin-bottom: 28px; }

/* filled surface 2 of 2 */
.feed-panel {
  background: var(--panel);
  border-radius: var(--r-block);
  padding: clamp(20px, 3vw, 26px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 24px;
}
.feed-url {
  flex: 1 1 340px;
  min-width: 0;
  font-family: var(--mono);
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.5;
  color: var(--text);
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}
.feed-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.feed-more { margin-top: 26px; font-size: 15px; font-weight: 600; }

/* ---------- calendar.html: one feed per promotion ---------- */

/* 1px gap over a rule-coloured track gives hairlines between cells and none
   around the outside. The cell count is exact, so no track is left empty. */
.feeds {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  margin-top: 36px;
}
.feeds li {
  background: var(--bg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feeds li:nth-child(odd) { padding-left: 0; }
.feeds .name { color: var(--text); font-size: 17px; font-weight: 600; }
.feeds .url {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
  line-height: 1.5;
  user-select: text;
  -webkit-user-select: text;
}
.feeds .row { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.feeds .row a { font-size: 15px; font-weight: 600; }
.feeds-note { margin-top: 28px; }
.feeds-note code { color: var(--body); overflow-wrap: anywhere; }

/* ---------- calendar.html: how to add it ---------- */

.howto {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1px;
  background: var(--rule);
  margin-top: 36px;
}
.howto li { background: var(--bg); padding: 24px; }
.howto li:first-child { grid-row: span 2; padding-left: 0; }
.howto h3 {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.howto p { font-size: 15.5px; max-width: 46ch; }

/* ---------- calendar.html: what is in it ---------- */

.whatsin {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.whatsin li { max-width: 62ch; }
.whatsin li + li { margin-top: 18px; }

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

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(40px, 6vw, 64px);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; font-weight: 600; }
.footer-fine { margin-top: 30px; color: var(--muted); font-size: 13.5px; max-width: 70ch; }
.footer-fine p { max-width: none; }
.footer-fine p + p { margin-top: 8px; }

/* ---------- mobile ---------- */

@media (max-width: 768px) {
  .hero .wrap,
  .split .wrap { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .alerts .wrap { grid-template-columns: 1fr; }

  /* every explicit placement collapses to source order, images last */
  .watch-copy, .watch-grid, .watch-note, .watch-shot,
  .alerts-copy, .alerts-list, .alerts-note, .alerts-shot {
    grid-column: 1;
    grid-row: auto;
  }
  .hero-shot {
    position: static;
    align-self: auto;
    min-height: 0;
    max-height: 320px;
  }
  .hero-shot img {
    position: static;
    width: min(320px, 78%);
    max-width: none;
    margin-inline: auto;
  }
  .split-shot img { max-width: min(260px, 70%); margin-inline: auto; }

  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts li { padding: 14px 20px; }
  .facts li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .facts li:nth-child(n + 3) { border-top: 1px solid var(--rule); padding-top: 18px; }
  .facts li:nth-child(-n + 2) { padding-bottom: 18px; }

  .countries { grid-template-columns: repeat(2, 1fr); }

  .feeds { grid-template-columns: 1fr; }
  .feeds li { padding: 20px 0; }

  .howto { grid-template-columns: 1fr; }
  .howto li { padding: 22px 0; }
  .howto li:first-child { grid-row: auto; }
}

@media (max-width: 380px) {
  .btn { font-size: 15px; padding: 13px 20px; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- statement band ---------- */

.statement p { margin-top: 16px; }

/* ---------- feedback form (hi.html) ---------- */

.say-form { max-width: 620px; display: grid; gap: 26px; }

.field { display: grid; gap: 8px; }

.field-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.field-hint { font-size: 13px; line-height: 1.5; color: var(--muted); }

.say-form textarea,
.say-form input[type="email"] {
  width: 100%;
  font: inherit;
  font-size: 16px;            /* 16px or iOS zooms the page on focus */
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--r-block);
  padding: 14px 16px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 120ms ease;
}

.say-form textarea { resize: vertical; min-height: 120px; line-height: 1.55; }

.say-form textarea::placeholder,
.say-form input::placeholder { color: var(--muted); opacity: 0.75; }

.say-form textarea:focus-visible,
.say-form input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
}

.field-error {
  margin: 0;
  font-size: 14px;
  color: var(--accent);
}

.say-form .hero-actions { margin-top: 0; }

/* ---------- session recording consent ---------- */

.consent {
  position: fixed;
  inset-inline: var(--gutter);
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 50;
  margin-inline: auto;
  max-width: 560px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--r-block);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.5);
}

.consent p {
  margin: 0;
  flex: 1 1 260px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--body);
}

.consent-actions { display: flex; gap: 8px; flex-shrink: 0; }

@media (prefers-reduced-motion: no-preference) {
  .consent { animation: consent-in 240ms ease-out both; }
  @keyframes consent-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
}

/* two name fields side by side, stacking on a phone */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.say-form input[type="text"] {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--r-block);
  padding: 14px 16px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 120ms ease;
}

.say-form input[type="text"]:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
}

.say-form > .field-hint a { color: var(--accent); }

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; gap: 26px; }
}

/* ---------- download modal (index.html) ---------- */

/* The dialog element is the box; the card inside it is the surface. Keeping the dialog itself
   transparent means the backdrop and the card can be styled without fighting each other. */
.modal {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  max-width: none;
  max-height: none;
}

.modal::backdrop { background: rgb(0 0 0 / 0.72); }

.modal-card {
  position: relative;
  width: min(400px, calc(100vw - 32px));
  /* A short window, or the on-screen keyboard eating half the screen, scrolls the card instead of
     cutting the button off the bottom of it. */
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  display: grid;
  gap: 18px;
  padding: 32px 28px 26px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--r-block);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.6);
  text-align: left;
}

.modal-card h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.modal-lede { font-size: 15px; line-height: 1.5; color: var(--muted); margin-top: -10px; }

.modal-card input[type="text"],
.modal-card input[type="email"] {
  width: 100%;
  font: inherit;
  font-size: 16px;            /* 16px or iOS zooms the page on focus */
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--edge);
  border-radius: var(--r-block);
  padding: 14px 16px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 120ms ease;
}

.modal-card input::placeholder { color: var(--muted); opacity: 0.7; }

.modal-card input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
}

.modal-go { width: 100%; }

.modal-fine { font-size: 12px; line-height: 1.5; color: var(--muted); opacity: 0.8; }

.modal-card .field-error { margin-top: -8px; }
.modal-card .field-error a { color: var(--accent); text-decoration: underline; }

/* A 44px target in the corner, which is the smallest thing a thumb should have to find. */
.modal-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--r-pill);
}

.modal-x:hover { color: var(--text); }

@media (prefers-reduced-motion: no-preference) {
  .modal[open] .modal-card { animation: modal-in 180ms ease-out both; }
  @keyframes modal-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: none; }
  }
}
.feeds a.name { text-decoration: none; } .feeds a.name:hover { color: var(--accent); }
