/* Melbay - Match Assistant
   Palette mirrors the Android app: void black, charcoal surfaces, scoreboard yellow. */

:root {
  --bg: #000000;
  --bg-soft: #0b0b0b;
  --surface: #1a1a1a;
  --surface-2: #242424;
  --surface-3: #2c2c2c;
  --line: #2a2a2a;
  --text: #ffffff;
  --muted: #9a9a9a;
  --faint: #6b6b6b;
  --yellow: #ffd400;
  --yellow-ink: #161200;
  --yellow-dim: #c9a800;
  --green: #34c759;
  --radius: 22px;
  --radius-sm: 14px;
  --dock-h: 72px;
  --ticker-h: 40px;
  --max: 1120px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Bebas Neue", "Oswald", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: calc(var(--dock-h) + 36px);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

/* Repeating barbell watermark — same idea as the in-app wallpaper */
.pattern {
  position: relative;
  isolation: isolate;
}

.pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.07;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.4'%3E%3Ccircle cx='18' cy='36' r='7'/%3E%3Ccircle cx='54' cy='36' r='7'/%3E%3Cpath d='M25 36h22M11 36h2M59 36h2'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
}

/* ===== Ticker / scoreboard chrome ===== */
.ticker {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--ticker-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: #050505;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.live-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--yellow-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #111;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.ticker-track {
  display: flex;
  gap: 36px;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

.ticker-track span {
  font-size: 12px;
  letter-spacing: 0.12em;
  word-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticker-track strong {
  color: var(--yellow);
  font-weight: 600;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Layout helpers ===== */
.wrap {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

.section {
  padding: 72px 0;
  scroll-margin-top: 52px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  word-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 12px;
}

.kicker svg {
  width: 14px;
  height: 14px;
}

h1, h2, .display {
  font-family: var(--display);
  letter-spacing: 0.04em;
  word-spacing: 0.16em;
  line-height: 0.92;
  font-weight: 400;
}

h2 {
  font-size: clamp(40px, 7vw, 72px);
  margin-bottom: 16px;
}

.lede {
  color: var(--muted);
  font-size: 17px;
  max-width: 58ch;
}

/* ===== Hero jumbotron ===== */
.hero {
  padding: 56px 0 28px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mark {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
}

.wordmark {
  font-family: var(--display);
  font-size: clamp(56px, 12vw, 132px);
  line-height: 0.82;
}

.wordmark span {
  display: block;
  color: var(--yellow);
  font-size: 0.38em;
  letter-spacing: 0.2em;
  word-spacing: 0.35em;
  margin-top: 8px;
}

.score-bug {
  min-width: 168px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
}

.score-bug p {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.score-bug strong {
  display: block;
  margin-top: 6px;
  font-family: var(--display);
  font-size: 34px;
  letter-spacing: 0.04em;
}

.score-bug strong b {
  color: var(--yellow);
  font-weight: 400;
}

.hero-copy {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 36px;
}

.hero-copy h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hero-copy p {
  font-size: clamp(18px, 2.2vw, 22px);
  color: #d6d6d6;
  max-width: 40ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.06em;
  word-spacing: 0.12em;
  text-transform: uppercase;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-yellow {
  background: var(--yellow);
  color: var(--yellow-ink);
}

.btn-yellow:hover {
  filter: brightness(1.06);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--yellow);
}

/* ===== Phone rail ===== */
.rail-wrap {
  position: relative;
}

.rail-wrap::after,
.rail-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 24px;
  width: 48px;
  z-index: 2;
  pointer-events: none;
}

.rail-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}

.rail-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}

.phone-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 36px 28px;
  scrollbar-width: none;
}

.phone-rail::-webkit-scrollbar {
  display: none;
}

.phone-card {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: min(260px, 72vw);
}

.phone-card figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.12em;
  word-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.phone {
  position: relative;
  border-radius: 34px;
  padding: 10px;
  background: #111;
  border: 1px solid #2f2f2f;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.phone::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 8px;
  border-radius: 99px;
  background: #000;
  z-index: 2;
}

.phone img {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  object-position: top;
  border-radius: 26px;
  background: #000;
}

/* ===== Chat commentary (the unique feature block) ===== */
.chat-stage {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
}

.thread {
  display: grid;
  gap: 14px;
  max-width: 720px;
}

.bubble {
  max-width: min(520px, 92%);
  padding: 16px 18px;
  border-radius: 20px;
  font-size: 16px;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.6s ease forwards;
}

.bubble.bot {
  background: var(--surface-3);
  color: #ececec;
  border-bottom-left-radius: 6px;
}

.bubble.user {
  justify-self: end;
  background: #fff;
  color: #111;
  border-bottom-right-radius: 6px;
}

.bubble .tag {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.55;
}

.bubble.d2 { animation-delay: 0.08s; }
.bubble.d3 { animation-delay: 0.16s; }
.bubble.d4 { animation-delay: 0.24s; }
.bubble.d5 { animation-delay: 0.32s; }
.bubble.d6 { animation-delay: 0.4s; }
.bubble.d7 { animation-delay: 0.48s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

.ask-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}

.chip:hover,
.chip.is-on {
  border-color: var(--yellow);
  color: var(--yellow);
}

.reply-slot {
  margin-top: 16px;
  min-height: 72px;
}

/* ===== Sports belt ===== */
.sports-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.sport-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 14px 18px;
  text-align: center;
  min-height: 150px;
}

.sport-tile svg {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
}

.sport-tile h3 {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sport-tile p {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* ===== Periods / how it works ===== */
.periods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.period {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.period::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 18px solid rgba(255, 212, 0, 0.08);
}

.period-no {
  font-family: var(--display);
  font-size: 42px;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 12px;
}

.period h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.period p {
  color: var(--muted);
  font-size: 15px;
}

/* ===== Feature facts under screenshots ===== */
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.fact {
  padding: 20px 18px;
  border-top: 3px solid var(--yellow);
  background: var(--surface);
  border-radius: 0 0 16px 16px;
}

.fact b {
  display: block;
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  color: var(--yellow);
}

.fact span {
  color: #c8c8c8;
  font-size: 14px;
  line-height: 1.4;
}

/* ===== Download band ===== */
.cta {
  background: var(--yellow);
  color: var(--yellow-ink);
  border-radius: 28px;
  padding: 36px 32px;
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 20px;
  align-items: center;
}

.cta h2 {
  color: inherit;
  margin-bottom: 8px;
}

.cta p {
  max-width: 50ch;
  opacity: 0.8;
}

.cta .btn {
  background: #111;
  color: var(--yellow);
}

/* ===== Inner legal / contact pages ===== */
.page-hero {
  padding: 48px 0 20px;
}

.page-hero h1 {
  font-size: clamp(48px, 9vw, 96px);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 14px;
}

.paper {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(22px, 4vw, 40px);
}

.paper h2 {
  font-size: 34px;
  margin: 28px 0 10px;
}

.paper h2:first-child {
  margin-top: 0;
}

.paper p,
.paper li {
  color: #d2d2d2;
  margin-bottom: 12px;
}

.paper ul {
  padding-left: 18px;
  margin-bottom: 16px;
}

.paper li + li {
  margin-top: 8px;
}

/* ===== Contacts ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}

.vcard,
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 28px;
}

.v-row {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.v-row:last-child {
  border-bottom: 0;
}

.v-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #111;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.v-ico svg {
  width: 18px;
  height: 18px;
}

.v-row small {
  display: block;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.v-row a,
.v-row span {
  color: var(--text);
  font-size: 16px;
  word-break: break-word;
}

label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.field {
  margin-bottom: 14px;
}

input,
textarea {
  width: 100%;
  background: #111;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 14px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--yellow);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

.form-ok {
  display: none;
  margin-top: 12px;
  color: var(--green);
  font-size: 14px;
}

.form-ok.show {
  display: block;
}

/* ===== Footer ===== */
.site-foot {
  padding: 28px 0 16px;
  color: var(--faint);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.site-foot a:hover {
  color: var(--yellow);
}

/* ===== App-like bottom dock ===== */
.dock {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 50;
  width: min(520px, calc(100% - 20px));
  height: var(--dock-h);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.dock a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8d8d8d;
}

.dock a svg {
  width: 22px;
  height: 22px;
}

.dock a.is-on,
.dock a:hover {
  color: var(--text);
}

.dock a.is-on svg path,
.dock a.is-on svg circle,
.dock a.is-on svg rect {
  stroke: var(--yellow);
}

/* Yellow field line accent */
.rule {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--yellow), transparent);
  opacity: 0.45;
  margin: 8px 0;
}

/* Belt of repeating sport marks */
.icon-belt {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  opacity: 0.22;
  padding: 10px 0 0;
}

.icon-belt svg {
  width: 22px;
  height: 22px;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: 0.55s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (min-width: 1100px) {
  .phone-rail {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
    padding: 8px 0 28px;
  }

  .phone-card {
    width: auto;
  }

  .rail-wrap::before,
  .rail-wrap::after {
    display: none;
  }
}

@media (max-width: 860px) {
  .hero-top,
  .hero-copy,
  .contact-grid,
  .cta,
  .sports-grid,
  .periods,
  .facts {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .score-bug {
    display: none;
  }

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

  .sports-grid .sport-tile:last-child {
    grid-column: 1 / -1;
  }

  .chat-head {
    flex-direction: column;
  }

  .section {
    padding: 52px 0;
  }
}

@media (max-width: 520px) {
  .wrap {
    width: min(var(--max), calc(100% - 24px));
  }

  .cta {
    padding: 26px 20px;
  }

  .phone-card {
    width: min(230px, 78vw);
  }

  .dock {
    border-radius: 22px;
  }
}
