/* Page-level structure: container, header, footer, section rhythm.
 * Numbers come from the mockup frames (лотто 17.fig): the desktop frame is
 * 1440 wide with 80px side padding, so the content column is exactly 1280;
 * the mobile frame is 390 with 20px padding → 350.
 */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--container-pad) * 2);   /* 1280 + 80×2 = 1440 */
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Section rhythm from the mockup: 48px top/bottom on desktop, 32 on mobile. */
.section { padding-block: var(--section-pad-y); background: var(--color-bg); }
.section--tight { padding-block: var(--space-32); }
.section--white { background: var(--color-surface); }
.section--tint { background: var(--color-tint); }

/* Eyebrow label above a section heading: "ONLINE BETTING AUSTRALIA / 01". */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-2xs);
  font-weight: 700;
  line-height: 15px;
  letter-spacing: var(--ls-wide);
  color: var(--color-brand);
}
.eyebrow--ink { color: var(--color-ink); }
.eyebrow--12 { font-size: var(--fs-xs); line-height: 16.39px; }   /* полоса оплаты [14:259] */
.eyebrow--on-dark { color: var(--color-on-dark-70); }
.eyebrow--light { color: var(--color-on-dark); }

/* Two-tone condensed headings: first line brand, second line ink. */
.display {
  display: flex; flex-direction: column;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  color: var(--color-ink);
}
.display > span { display: block; }
.display__accent { color: var(--color-brand); }
.display--90 { font-size: 90px; line-height: 90px; }
.display--80 { font-size: 80px; line-height: 80px; }
.display--72 { font-size: var(--fs-h1); line-height: 86.4px; }
.display--48 { font-size: var(--fs-h2); line-height: 58px; }
.display--36 { font-size: var(--fs-h3); line-height: 43px; }

/* ── header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--color-surface);
}

/* utility strip [7:4] — 36px, the age line first (TZ.md п.1) */
.utility-strip {
  background: var(--color-surface);
  box-shadow: inset 0 -1px 0 var(--color-border-strong);
}
.utility-strip__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-16);
  width: 100%;
  max-width: calc(var(--container) + var(--container-pad) * 2);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  min-height: 36px;
}
.utility-strip__age {
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 15px;
  color: rgb(17 23 42 / .7);
}
.utility-strip__links {
  display: flex; align-items: center; gap: var(--space-16);
  font-size: var(--fs-xs); line-height: 16px; color: var(--color-muted);
}
.utility-strip__links a {
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.utility-strip__links a:hover { color: var(--color-brand); }

/* main nav [7:11] — 88px */
.main-nav {
  background: var(--color-surface);
  box-shadow: inset 0 -1px 0 var(--color-border);
}
.main-nav__inner {
  display: grid; grid-template-columns: 242px auto 1fr; align-items: center; gap: 0;
  width: 100%;
  max-width: calc(var(--container) + var(--container-pad) * 2);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  min-height: 88px;
}

.brand {
  display: inline-flex; align-items: center; gap: var(--space-10);
  text-decoration: none; color: var(--color-brand);
}
.brand__dot { width: 10px; height: 10px; border-radius: var(--radius-pill); background: currentColor; }
.brand__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-h5); line-height: 31px;
}
.brand__rule { width: 1px; height: 24px; background: currentColor; }

.nav { display: flex; }
.nav__list { display: flex; align-items: center; gap: var(--space-28); line-height: 19px; }
.nav__item { display: flex; }
.nav__link {
  position: relative;
  font-size: var(--fs-base); font-weight: 500; line-height: 19px; letter-spacing: .004em;
  color: var(--color-ink); text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.nav__link::after {                       /* tap target, not padding */
  content: ""; position: absolute; inset: 50% 0 auto 0; translate: 0 -50%;
  height: 24px;
}
.nav__link:hover { color: var(--color-brand); }
.nav__link.is-current { color: var(--color-brand); font-weight: 700; }

.main-nav__actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-12); }
/* Имя вошедшего — подпись, а не ссылка: кабинета в макете нет. */
.main-nav__user { font-size: var(--fs-base); font-weight: 700; line-height: 19px; color: var(--color-ink); }
/* Макет ставит nav на x=322 при бренде 133px: 322 − 80 (контейнер) − 133 = 109. */


.burger {
  display: none;
  width: 24px; height: 24px; padding: 0;
  border: 0; background: none; color: var(--color-ink); cursor: pointer;
}
.burger__box, .burger__box::before, .burger__box::after {
  display: block; width: 16px; height: 2px; background: currentColor;
  transition: transform var(--dur-base) var(--ease), opacity var(--dur-fast) var(--ease);
}
.burger__box { position: relative; margin-inline: auto; }
.burger__box::before, .burger__box::after { content: ""; position: absolute; left: 0; }
.burger__box::before { top: -5px; }
.burger__box::after { top: 5px; }
.burger[aria-expanded="true"] .burger__box { background: transparent; }
.burger[aria-expanded="true"] .burger__box::before { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__box::after { transform: translateY(-5px) rotate(-45deg); }

/* ── footer [7:308] ───────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-64);
  background: var(--grad-footer);
  color: var(--color-on-dark);
}
.site-footer__grain {
  position: absolute; inset: 0; z-index: 0;
  opacity: .06;   /* макет [7:309]: зерно едва заметно, .5 забивало градиент */
  pointer-events: none;
}
.site-footer__grain img { width: 100%; height: 100%; object-fit: cover; }
.site-footer__inner {
  position: relative; z-index: 1;
  width: 100%;
  max-width: calc(var(--container) + var(--container-pad) * 2);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  display: flex; flex-direction: column; gap: var(--space-48);
}
.site-footer__mark {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-mark); line-height: 120px;
  color: var(--color-on-dark); opacity: .12;
  margin-bottom: calc(var(--space-48) * -1 + 48px);
}

/* The mockup draws five columns that overflow 1280 (LEGAL starts at x=1432 and
   is cut off in the reference render) — laid out as a real grid instead. */
.footer-grid {
  display: grid;
  grid-template-columns: minmax(320px, 520px) repeat(4, minmax(0, 1fr));
  gap: var(--space-32);
}
.footer-brand { display: flex; flex-direction: column; gap: var(--space-12); }
.footer-brand__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-lg); line-height: 26px;
}
.footer-brand__line { font-size: var(--fs-base); line-height: 19px; color: var(--color-on-dark-70); }
.footer-brand__harm { font-size: var(--fs-sm); line-height: 18px; color: var(--color-on-dark-50); }
.footer-brand__rg { display: flex; flex-direction: column; gap: var(--space-8); font-size: var(--fs-base); line-height: 19px; }
.footer-brand__warning { color: var(--color-on-dark-60); }
.footer-brand__rg a { position: relative; text-decoration: none; }
.footer-brand__rg a::after,
.footer-col__link::after,
.legal-info__limit::after {
  content: ""; position: absolute; inset: 50% 0 auto 0; translate: 0 -50%;
  height: 24px;
}
.footer-col__link, .legal-info__limit { position: relative; }
.footer-brand__rg a:hover { text-decoration: underline; }

.footer-col { display: flex; flex-direction: column; gap: var(--space-12); }
.footer-col__title {
  font-size: var(--fs-xs); line-height: 16px; font-weight: 700;
  letter-spacing: var(--ls-wide);
  color: var(--color-on-dark-40);
}
.footer-col__list { display: flex; flex-direction: column; gap: var(--space-12); }
.footer-col__list li { display: flex; }   /* блочный li добавляет свой line-box поверх строки ссылки */
.footer-col__link {
  font-size: var(--fs-base); line-height: 19px;
  color: var(--color-on-dark-80); text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.footer-col__link:hover { color: var(--color-on-dark); }

.site-footer__rule { height: 1px; border: 0; background: var(--color-on-dark-10); margin: 0; }

.legal-info { display: flex; flex-direction: column; gap: var(--space-12); }
.legal-info p { font-size: var(--fs-sm); line-height: 18px; color: var(--color-on-dark-50); }
.legal-info__ids { font-size: var(--fs-xs) !important; line-height: 16px !important; color: var(--color-on-dark-40) !important; }
.legal-info__limit { color: var(--color-on-dark-50); text-decoration: underline; }

  position: relative;
  color: var(--color-on-dark-70); text-decoration: underline;
  transition: color var(--dur-fast) var(--ease);
}

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-16);
  font-size: var(--fs-xs); line-height: 16px; color: var(--color-on-dark-40);
}

/* ── tablet: no mockup frame, derived from the container and the splits ─── */
@media (max-width: 1199px) {
  :root { --container-pad: 40px; }
  .main-nav__inner { display: flex; justify-content: space-between; gap: var(--space-24); }
  .nav { display: none; }
  .burger { display: inline-flex; align-items: center; justify-content: center; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

/* ── mobile frame [66:4]: strip 44, header 64, padding 20 ───────────────── */
@media (max-width: 767px) {
  :root { --container-pad: var(--container-pad-mobile); --section-pad-y: var(--section-pad-y-mobile); }

  .eyebrow { font-size: var(--fs-4xs); line-height: 12.29px; }   /* мобильные надзаголовки [66:194] */
  .utility-strip__inner { min-height: 44px; padding-block: var(--space-8); gap: var(--space-8); }
  .utility-strip__age { font-size: var(--fs-4xs); line-height: 12px; }
  .utility-strip__links { gap: var(--space-8); font-size: var(--fs-3xs); line-height: 14px; }
  .utility-strip__wide { display: none; }          /* mobile strip keeps BetStop + helpline only */
  .utility-strip__betstop { color: var(--color-brand); font-weight: 700; }

  .main-nav__inner { min-height: 64px; }
  .brand__dot { width: 8px; height: 8px; }
  .brand__name { font-size: var(--fs-lg); line-height: 26px; }
  .brand__rule { display: none; }
  .main-nav__actions { gap: var(--space-10); }

  .site-footer { padding-block: 40px; background: var(--grad-footer-mobile); }
  .site-footer__inner { gap: var(--space-32); }
  .site-footer__mark { font-size: var(--fs-h2); line-height: 58px; margin-bottom: 0; }
  /* Мобильный футер [66:295]: группы в один столбец, компактная типографика —
     заголовок 11/15.03, ссылки 13/18, внутренний шаг 8. */
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-24); }
  .footer-col { gap: var(--space-8); }
  .footer-col__title { font-size: var(--fs-2xs); line-height: 15.03px; color: var(--color-on-dark-50); }
  .footer-col__list { gap: var(--space-8); }
  .footer-col__link { font-size: var(--fs-sm); line-height: 18px; }
  /* Мобильный фрейм не рисует заголовок LEGAL и ставит колонку в 10px под RESPONSIBLE.
     Заголовок оставляем для скринридера — на него ссылается aria-labelledby. */
  .footer-col:last-child { margin-top: -14px; }
  .footer-col:last-child .footer-col__title {
    position: absolute; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .footer-brand { min-height: 190px; }        /* мобильный фрейм [66:287] */
  .footer-brand__rg { gap: var(--space-6); }
  .legal-info { min-height: 126px; gap: var(--space-10); }   /* [66:318] */
  .site-footer__mark { font-size: var(--fs-h2); line-height: 58px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: var(--space-10); min-height: 42px; }   /* [66:320] */
}

/* Mobile frame headline sizes [66:37] / [66:196] — the mobile mockup drops the
   display scale to 40 and 36; below the frame width they shrink once more. */
@media (max-width: 1199px) {
  .display--90 { font-size: 56px; line-height: 56px; }
  .display--80 { font-size: 52px; line-height: 52px; }
  .display--72 { font-size: var(--fs-h2); line-height: 50px; }
}
@media (max-width: 767px) {
  .display--90 { font-size: 36px; line-height: 34.2px; }
  .display--80 { font-size: 40px; line-height: 38px; }
  .display--72 { font-size: 40px; line-height: 36px; }
  .display--48 { font-size: 36px; line-height: 34.2px; }
}
@media (max-width: 359px) {
  .display--90, .display--80, .display--72 { font-size: 32px; line-height: 32px; }
}
