/* hoibo.hk home: a night of football on Hong Kong time, ending in daylight at the office. */
@font-face {
  font-family: "HoiBo Display";
  src: url("/fonts/hoibo-display.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
body.home { --wide: 1080px; --gap: clamp(72px, 11vw, 136px); line-height: 1.65; }
body.home header, body.home main, body.home footer { max-width: none; padding-left: 0; padding-right: 0; }
body.home main { padding-top: 0; padding-bottom: 0; }
.wrap { max-width: calc(var(--wide) + 40px); margin: 0 auto; padding: 0 20px; }
body.home header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
body.home header { border-bottom: 0; }
.home h1, .home h2, .home .time, .home .pair-a, .home .clock, .home .leagues dd { font-family: "HoiBo Display", -apple-system, "PingFang HK", "Noto Sans HK", sans-serif; font-weight: 900; }
.home h1 { font-size: clamp(38px, 6.2vw, 76px); line-height: 1.16; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.home h2 { font-size: clamp(29px, 4vw, 48px); line-height: 1.22; margin: 0 0 16px; text-wrap: balance; }
.home:lang(zh) h1, .home:lang(zh) h2, .home:lang(zh) h3 { word-break: keep-all; overflow-wrap: anywhere; }
.home h3 { font-size: 21px; line-height: 1.4; margin: 0 0 6px; color: var(--white); }
.home p { margin: 0 0 14px; max-width: 34em; }
.home .lead { font-size: clamp(18px, 1.7vw, 21px); color: #dfe7e3; }
.home a:focus-visible, .home button:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.home section { padding: var(--gap) 0 0; }

/* Hero */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(32px, 6vw, 88px); align-items: center; padding-top: clamp(24px, 4vw, 56px); }
.hero-grid .lead { margin-top: 24px; }
.status { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--white); border-left: 4px solid var(--lime); padding-left: 12px; }

/* The phone */
.phone { position: relative; justify-self: center; width: min(100%, 330px); aspect-ratio: 330 / 640; border-radius: 48px; border: 9px solid #26352e; background: #17251f; overflow: hidden; display: flex; flex-direction: column; padding: 20px 12px 18px; }
.phone svg.pitch { position: absolute; inset: 0; width: 100%; height: 100%; }
.phone > *:not(svg) { position: relative; }
.phone .day { text-align: center; font-size: 15px; color: #dfe7e3; margin: 30px 0 0; max-width: none; }
.phone .clock { text-align: center; font-size: 78px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.phone .stack { margin-top: auto; display: grid; gap: 10px; }
.note { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; background: rgba(49, 67, 58, 0.96); border-radius: 20px; padding: 11px 13px; text-align: left; }
.note .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--carbon); display: grid; place-items: center; }
.note .ico img { width: 26px; }
.note b { display: block; font-size: 15px; line-height: 1.35; color: var(--white); }
.note span { display: block; font-size: 14px; line-height: 1.4; color: #dfe7e3; }
.activity { background: var(--carbon); border: 1px solid var(--line); border-radius: 22px; padding: 13px 16px 14px; }
.activity .row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; font-weight: 700; }
.activity .row > :last-child { text-align: right; }
.activity .score { font-size: 27px; font-weight: 800; font-variant-numeric: tabular-nums; }
.activity .sub { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.activity .sub i { font-style: normal; color: var(--lime); font-weight: 700; }
.phone-caption { font-size: 14px; color: var(--muted); text-align: center; margin: 14px auto 0; max-width: 330px; }
.replay { display: block; margin: 18px auto 0; }
.btn { font: inherit; font-weight: 700; border: 0; border-radius: 999px; background: var(--lime); color: var(--carbon); padding: 12px 22px; cursor: pointer; min-height: 48px; }
@keyframes arrive { from { transform: translateY(-26px) scale(0.96); opacity: 0; } }
.arrive { animation: arrive 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.15) 0.7s backwards; }

/* Sounds */
.sounds { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.sounds li { margin: 0; }
.sounds button { font: inherit; font-size: 18px; font-weight: 700; color: var(--white); background: transparent; border: 2px solid var(--line); border-radius: 999px; padding: 10px 22px; min-height: 52px; cursor: pointer; }
.sounds button:hover { border-color: var(--muted); }
.sounds button.on { background: var(--lime); border-color: var(--lime); color: var(--carbon); }
.small { font-size: 15px; color: var(--muted); }

/* The night */
.beat { display: grid; grid-template-columns: 190px minmax(0, 1fr) minmax(0, 370px); gap: 20px clamp(20px, 4vw, 56px); align-items: center; padding: 44px 0; }
.beat .time { font-size: clamp(40px, 4.6vw, 58px); line-height: 1; font-variant-numeric: tabular-nums; }
.beat .island { justify-self: center; display: flex; align-items: center; gap: 20px; background: #000; border-radius: 999px; padding: 11px 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 14px; }
.beat .island i { font-style: normal; color: var(--lime); }
.demo { display: grid; }

/* Morning: the page turns to daylight */
.morning { background: var(--white); margin-top: var(--gap); padding: 0 0 8px !important; }
.morning, .morning h3, .morning .time { color: var(--carbon); }
.morning p { color: #31433a; }
.morning .beat { padding: 84px 0; }
.morning .note { background: #eef1ef; }
.morning .note b { color: var(--carbon); }
.morning .note span { color: #31433a; }

/* Momentum and commentary */
.follow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart figcaption { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.chart figcaption b { color: var(--white); }
.chart figcaption b.h::before, .chart figcaption b.a::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; background: var(--lime); }
.chart figcaption b.a::before { background: var(--muted); }
.lines { list-style: none; margin: 22px 0 0; padding: 0; }
.lines li { display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); margin: 0; }
.lines li > :first-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.lines li.goal { color: var(--lime); font-weight: 800; }

/* Names */
.modes { display: inline-flex; border: 2px solid var(--line); border-radius: 999px; padding: 4px; margin: 8px 0 30px; }
.modes button { font: inherit; font-weight: 700; color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 9px 18px; min-height: 46px; cursor: pointer; }
.modes button[aria-pressed="true"] { background: var(--lime); color: var(--carbon); }
.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px 28px; margin: 0; padding: 0; list-style: none; }
.pairs li { margin: 0; min-height: 66px; }
.pair-a { display: block; font-size: clamp(27px, 3.2vw, 40px); line-height: 1.2; color: var(--white); }
.pair-b { display: block; color: var(--muted); }

/* Leagues */
.leagues { margin: 26px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 10px 48px; align-items: start; }
.leagues > div { display: grid; grid-template-columns: 128px 1fr; gap: 16px; align-items: baseline; }
.leagues dt { color: var(--muted); }
.leagues dd { margin: 0; font-size: clamp(20px, 2.3vw, 29px); line-height: 1.5; }
.leagues dd span { margin-right: 0.9em; white-space: nowrap; }

/* The rest */
.more { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 34px 56px; margin-top: 34px; }
.more p { margin: 0; }
.close { padding-bottom: var(--gap) !important; }
body.home footer { border-top: 1px solid var(--line); }
body.home footer p { max-width: none; color: var(--muted); font-size: 14px; }

@media (max-width: 860px) {
  .hero-grid, .follow { grid-template-columns: minmax(0, 1fr); }
  .beat { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 34px 0; }
  .morning .beat { padding: 60px 0; }
  .leagues { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .leagues > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  body.home header .wrap { flex-wrap: wrap; }
}
@media (max-width: 560px) { .pairs { grid-template-columns: 1fr 1fr; gap: 14px 18px; } .pair-b { font-size: 15px; } }
@media (max-width: 420px) { .modes { display: flex; } .modes button { flex: 1; padding: 9px 6px; } }
@media (prefers-reduced-motion: reduce) { .arrive { animation: none; } }
