/* Terrace: floodlit night, pitch green, broadcast headlines and Liquid Glass, as in the app. */
:root {
  color-scheme: dark;
  --night: #080d1a;
  --night-2: #0d1426;
  --pitch: #2ee06b;
  --live: #ff3d33;
  --text: #f4f7fb;
  --muted: rgba(244, 247, 251, 0.66);
  --faint: rgba(244, 247, 251, 0.12);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-edge: rgba(255, 255, 255, 0.16);
  --radius: 26px;
  --display: "Barlow Condensed", "SF Pro Display", -apple-system, system-ui, sans-serif;
  --body: -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  /* The tilted phone and floating Live Activity never widen the page. */
  overflow-x: clip;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

/* Broadcast type */
.display {
  font-family: var(--display);
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.92;
}
.eyebrow {
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pitch);
}
.slant {
  display: inline-block;
  transform: skewX(-12deg);
  background: var(--pitch);
  color: #000;
  padding: 2px 10px;
}
.slant > span { display: inline-block; transform: skewX(12deg); }

/* The drifting floodlit backdrop, like Matchday Live */
.backdrop {
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(40% 40% at 20% 20%, rgba(220, 30, 40, 0.55), transparent 70%),
    radial-gradient(45% 45% at 80% 30%, rgba(30, 90, 220, 0.45), transparent 70%),
    radial-gradient(50% 50% at 50% 90%, rgba(46, 224, 107, 0.25), transparent 70%),
    var(--night);
  filter: blur(40px) saturate(1.3);
  animation: drift 26s ease-in-out infinite alternate;
}
.pitch-lines {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.06;
  background:
    radial-gradient(circle at 50% 50%, transparent 119px, #fff 120px, #fff 122px, transparent 123px),
    linear-gradient(90deg, transparent calc(50% - 1px), #fff calc(50% - 1px), #fff calc(50% + 1px), transparent calc(50% + 1px));
  pointer-events: none;
}
@keyframes drift {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  50% { transform: translate(4%, -3%) rotate(8deg) scale(1.08); }
  100% { transform: translate(-3%, 4%) rotate(-6deg) scale(1.02); }
}

/* Liquid Glass */
.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--glass-edge);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 20px 50px rgba(0, 0, 0, 0.35);
}

/* Navigation */
.nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  max-width: 1120px;
  margin: 14px auto 0;
  padding: 10px 12px 10px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { font-size: 24px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-weight: 600; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.3, 1.4, .5, 1);
}
.button:active { transform: scale(0.96); }
.button.primary { background: var(--pitch); color: #000; }
.button.secondary { color: var(--text); }
.nav .button { padding: 10px 18px; font-size: 14px; }

/* Layout */
.section { max-width: 1120px; margin: 0 auto; padding: 110px 24px 0; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(44px, 7vw, 76px); margin: 10px 0 14px; }
.section-head p { font-size: 19px; line-height: 1.5; color: var(--muted); margin: 0; }

/* Hero */
.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero h1 { font-size: clamp(64px, 10vw, 128px); margin: 14px 0 22px; }
.hero h1 em { font-style: italic; color: var(--pitch); }
.hero .lede { font-size: 21px; line-height: 1.5; color: var(--muted); max-width: 520px; margin: 0 0 30px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.soon { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* Phone mockup */
.stage { position: relative; display: grid; place-items: center; min-height: 640px; }
.phone {
  width: 300px;
  height: 620px;
  border-radius: 52px;
  padding: 12px;
  background: linear-gradient(145deg, #2a2f3a, #0c0f16);
  box-shadow: 0 0 0 2px #3a3f4a, 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 120px rgba(46, 224, 107, 0.15);
  transform: rotate(-4deg);
}
.screen {
  position: relative;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background: #f2f3f7;
  color: #0b0d12;
  padding: 50px 12px 12px;
}
.screen .island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 28px;
  border-radius: 20px;
  background: #000;
}
.screen h3 { font-size: 30px; margin: 4px 4px 12px; }
.mock-card { border-radius: 18px; margin-bottom: 10px; overflow: hidden; }
.match-hero {
  height: 150px;
  position: relative;
  color: #fff;
  background: linear-gradient(115deg, #0b6b3a 0 49%, #c8102e 51% 100%);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px;
  text-align: center;
}
.match-hero .crest {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  margin: 0 auto 6px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  color: #111;
  font-family: var(--display);
  font-weight: 900;
  font-size: 15px;
}
.match-hero .team { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 16px; }
.match-hero .vs { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 30px; }
.match-hero .live-pill {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.take-card {
  background: radial-gradient(120% 90% at 0% 0%, rgba(239, 65, 53, 0.65), transparent 60%), #0d1222;
  color: #fff;
  padding: 14px;
}
.take-card .call { font-family: var(--display); font-weight: 800; letter-spacing: 0.12em; font-size: 11px; color: #ff9f0a; }
.take-card .headline { font-size: 21px; margin: 6px 0 10px; }
.take-card .meta { font-size: 11px; color: rgba(255, 255, 255, 0.6); }
.actions-row { display: flex; gap: 6px; margin-top: 10px; }
.chip {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255, 61, 51, 0.7); animation: pulse 1.4s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 9px rgba(255, 61, 51, 0); } }

/* Dynamic Island Live Activity */
.live-activity {
  position: absolute;
  top: 6px;
  right: -10px;
  z-index: 2;
  width: 260px;
  border-radius: 34px;
  background: #000;
  color: #fff;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
  transform: rotate(3deg);
  animation: float 6s ease-in-out infinite;
}
.live-activity .abbr { font-family: var(--display); font-weight: 900; font-size: 13px; letter-spacing: 0.05em; }
.live-activity .score { font-family: var(--display); font-weight: 900; font-size: 34px; font-variant-numeric: tabular-nums; }
.live-activity .minute { display: flex; gap: 5px; align-items: center; justify-content: center; font-size: 11px; color: rgba(255, 255, 255, 0.75); }
.swatch { width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 4px; }
@keyframes float { 50% { transform: rotate(3deg) translateY(-10px); } }

/* Live ticker */
.ticker {
  margin-top: 70px;
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  overflow: hidden;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.25);
}
.ticker-track { display: inline-flex; gap: 48px; padding: 18px 0; animation: ticker 40s linear infinite; }
.ticker-item { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 22px; font-style: italic; text-transform: uppercase; }
.ticker-item .min { font-size: 15px; color: var(--live); }
.ticker-item .ft { font-size: 15px; color: var(--muted); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Post type cards, dropping in like the composer's */
.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kind {
  border-radius: var(--radius);
  padding: 22px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.kind .icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 26px;
}
.kind h3 { font-size: 30px; margin: 8px 0 0; }
.kind p { margin: 0; color: var(--muted); line-height: 1.45; font-size: 15px; }
.kind .watermark { position: absolute; right: -14px; bottom: -26px; font-size: 130px; opacity: 0.07; transform: rotate(-12deg); }

.drop { opacity: 0; transform: translateY(-50px) scale(1.25) rotate(-5deg); }
.drop.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.2s ease-out, transform 0.7s cubic-bezier(.34, 1.56, .64, 1);
}

/* Feature splits */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.panel { border-radius: 32px; padding: 26px; }

/* Matchday Live panel */
.matchday-live {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  color: #fff;
  background:
    radial-gradient(70% 60% at 15% 20%, rgba(239, 1, 7, 0.75), transparent 70%),
    radial-gradient(70% 60% at 85% 80%, rgba(18, 52, 155, 0.8), transparent 70%),
    #0b0f1c;
}
.matchday-live .score-big { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 92px; text-align: center; margin: 12px 0; }
.matchday-live .teams { display: flex; justify-content: space-between; font-family: var(--display); font-weight: 900; font-style: italic; font-size: 22px; text-transform: uppercase; }
.moment {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  margin-top: 10px;
  font-weight: 600;
  font-size: 15px;
}
.moment .minute { font-family: var(--display); font-weight: 900; font-size: 20px; color: var(--pitch); min-width: 40px; }
.rise { opacity: 0; transform: translateY(24px); }
.rise.in { opacity: 1; transform: none; transition: opacity 0.5s ease-out, transform 0.7s cubic-bezier(.2, .9, .3, 1); }

/* Comparison panel */
.compare-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-weight: 900; font-style: italic; font-size: 24px; text-transform: uppercase; }
.compare-head .vs { background: var(--pitch); color: #000; padding: 2px 10px; transform: skewX(-12deg); }
.radar { width: 100%; max-width: 300px; margin: 16px auto; display: block; }
.dna { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trait { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; }
.trait i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 14px; }

/* Ask Terrace */
.chat { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 85%; padding: 14px 16px; border-radius: 22px; line-height: 1.45; font-size: 15px; }
.bubble.me { align-self: flex-end; background: var(--pitch); color: #000; font-weight: 600; border-bottom-right-radius: 6px; }
.bubble.ai { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.ai b { color: var(--pitch); }
.sparkle { display: inline-block; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Predictor table */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table td { padding: 12px 6px; border-bottom: 1px solid var(--faint); }
.table td:first-child { font-family: var(--display); font-weight: 900; font-size: 20px; width: 34px; color: var(--muted); }
.table tr.you td { color: var(--pitch); }
.table td.pts { text-align: right; font-family: var(--display); font-weight: 900; font-size: 22px; }

/* Closing call to action */
.cta {
  margin: 120px auto 0;
  max-width: 1072px;
  border-radius: 40px;
  padding: 70px 30px;
  text-align: center;
  background: radial-gradient(80% 120% at 50% 0%, rgba(46, 224, 107, 0.35), transparent 70%), rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-edge);
}
.cta img { width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 22px; box-shadow: 0 20px 50px rgba(46, 224, 107, 0.3); }
.cta h2 { font-size: clamp(48px, 8vw, 88px); margin: 0 0 16px; }
.cta p { font-size: 19px; color: var(--muted); margin: 0 auto 28px; max-width: 560px; line-height: 1.5; }

footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 50px 24px 60px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}

/* Shared-link pages (posts, invites, games) */
.share {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.share-card { width: 100%; max-width: 560px; border-radius: 34px; padding: 34px 30px; }
.share-card .brand { margin-bottom: 28px; }
.share-card h1 { font-size: clamp(40px, 8vw, 58px); margin: 12px 0 16px; }
.share-card p { font-size: 18px; line-height: 1.5; color: var(--muted); margin: 0 0 28px; }
.share-card .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Smaller screens */
@media (max-width: 900px) {
  .hero, .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .hero { padding-top: 50px; text-align: left; }
  .stage { min-height: 600px; }
  .kinds { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav .button { margin-left: auto; }
}
@media (max-width: 560px) {
  .kinds { grid-template-columns: 1fr; }
  /* Centred with margins, since the floating animation owns the transform. */
  .live-activity { right: auto; left: calc(50% - 120px); width: 240px; }
}

/* Reduce Motion: everything in place, nothing drifting */
@media (prefers-reduced-motion: reduce) {
  .backdrop, .ticker-track, .live-activity, .dot, .sparkle { animation: none; }
  .drop, .rise { opacity: 1; transform: none; }
}
