/* ============================================================
   БУКМЕКЕРЫ В РОССИИ — App Shell (header, footer, page layout)
   Used by all portal screens. Built on portal-tokens +
   portal-components.
   ============================================================ */

html { scroll-behavior: smooth; }
body { background: var(--bg-page); color: var(--text-primary); min-height: 100vh; }
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.wrap { max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--space-6); }
.wrap-sm { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6); }

.wrap-sm { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6); }

/* ── AGE GATE ── */
body.age-gate-open { overflow: hidden; }
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.age-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}
.age-gate__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: var(--space-7) var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-card);
}
.age-gate__badge {
  width: 56px;
  height: 56px;
  font-size: var(--text-lg);
  margin: 0 auto var(--space-5);
}
.age-gate__title {
  font-family: var(--font-sans);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}
.age-gate__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}
.age-gate__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.age-gate__actions .btn {
  width: 100%;
  justify-content: center;
}
.age-gate-decline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.age-gate-decline:hover {
  color: var(--text-primary);
  border-color: var(--color-gold-dim);
  background: var(--bg-elevated);
}
.age-gate.is-blocked .age-gate__text { margin-bottom: 0; }

/* ── HEADER ── */
.app-header { position: sticky; top: 0; z-index: 50; background: rgba(15,15,26,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-subtle); }
.app-header .wrap { display: flex; align-items: center; gap: var(--space-6); height: 72px; }
.logo { display: flex; flex-direction: column; gap: var(--space-2); line-height: 1.15; flex: none; }
.logo .l1 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; color: var(--color-gold-pale); }
.logo .l1 span { color: var(--color-gold); }
.logo .l2 { font-size: 9px; text-transform: uppercase; letter-spacing: var(--tracking-widest); color: var(--text-tertiary); margin-top: 0; }
.main-nav { display: flex; align-items: center; gap: var(--space-2); margin-right: auto; }
.main-nav a { padding: 8px 14px; border-radius: var(--radius-sm); font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary); transition: all var(--duration-md) var(--ease); }
.main-nav a:hover { color: var(--text-primary); background: var(--bg-elevated); }
.main-nav a.is-active { color: var(--color-gold); }
.header-search { position: relative; width: 240px; }
.header-search input { width: 100%; padding: 10px 14px 10px 38px; border-radius: var(--radius-sm); background: var(--bg-elevated); border: 1px solid var(--border-subtle); color: var(--text-primary); font-family: var(--font-body); font-size: var(--text-sm); }
.header-search input::placeholder { color: var(--text-tertiary); }
.header-search input:focus { outline: none; border-color: var(--color-gold); }
.header-search .si { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); }
.header-cab { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--color-gold); font-family: var(--font-sans); font-weight: 600; font-size: var(--text-sm); flex: none; transition: all var(--duration-md) var(--ease); }
.header-cab:hover { background: var(--color-gold-glow); }
.header-cab-ic { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; }
.header-cab-ic svg { width: 100%; height: 100%; }

.menu-toggle { display: none; }

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.mobile-nav-drawer {
  display: none;
  flex-direction: column;
  align-items: stretch;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  margin: 0;
  padding: var(--space-4);
  gap: var(--space-1);
  background: rgba(15, 15, 26, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  overflow-y: auto;
}
.mobile-nav-drawer a {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--duration-md) var(--ease);
}
.mobile-nav-drawer a:hover { color: var(--text-primary); background: var(--bg-elevated); }
.mobile-nav-drawer a.is-active { color: var(--color-gold); background: var(--color-gold-glow); }

/* ── HERO ── */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border-subtle); background: radial-gradient(120% 100% at 80% 0%, rgba(47,128,237,0.10), transparent 55%), radial-gradient(120% 120% at 10% 20%, rgba(201,150,58,0.10), transparent 50%), var(--color-dark); }
.hero .wrap { padding-top: var(--space-9); padding-bottom: var(--space-9); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-8); align-items: center; }
.hero h1 { font-family: var(--font-display); font-size: clamp(2.6rem, 4.4vw, 4.25rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.03em; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--color-gold); }
.hero .sub { font-size: var(--text-lg); color: var(--text-secondary); line-height: var(--leading-relaxed); margin-top: var(--space-6); max-width: 52ch; }
.hero .hero-cta { display: flex; gap: var(--space-3); margin-top: var(--space-6); flex-wrap: wrap; }
.hero-stats { display: flex; gap: var(--space-7); margin-top: var(--space-8); }
.hero-stats .hs { display: flex; flex-direction: column; gap: 4px; }
.hero-stats .hs .v { font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 700; color: var(--color-gold-pale); line-height: 1; }
.hero-stats .hs .k { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-tertiary); }

/* ── PAGE STRUCTURE ── */
.page-head { padding: var(--space-8) 0 var(--space-6); border-bottom: 1px solid var(--border-subtle); }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: var(--text-xs); color: var(--text-tertiary); margin-bottom: var(--space-4); }
.breadcrumb a { color: var(--text-tertiary); }
.breadcrumb a:hover { color: var(--color-gold); }
.page-title { font-family: var(--font-sans); font-size: var(--text-5xl); font-weight: 800; letter-spacing: var(--tracking-tight); }
.page-sub { font-size: var(--text-lg); color: var(--text-secondary); margin-top: var(--space-3); max-width: 70ch; line-height: var(--leading-relaxed); }

.section { padding: var(--space-8) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.section-head .sh-l { display: flex; flex-direction: column; gap: 8px; }
.section-head .kick { font-family: var(--font-sans); font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-widest); text-transform: uppercase; color: var(--color-gold); }
.section-head h2 { font-family: var(--font-sans); font-size: var(--text-3xl); font-weight: 700; letter-spacing: -0.02em; }
.section-head .more { font-family: var(--font-sans); font-weight: 600; font-size: var(--text-sm); color: var(--color-gold); white-space: nowrap; }
.section-head .more:hover { color: var(--color-gold-light); }

/* toolbar (filters + sort) */
.toolbar { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-6); }
.toolbar .chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.toolbar .spacer { margin-left: auto; }
.sort { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--text-tertiary); }
.sort select { background: var(--bg-elevated); border: 1px solid var(--border-subtle); color: var(--text-primary); border-radius: var(--radius-sm); padding: 8px 12px; font-family: var(--font-body); font-size: var(--text-sm); }

/* layout columns */
.col-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.col-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.with-aside { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-7); align-items: start; }
.with-aside-l { display: grid; grid-template-columns: 280px 1fr; gap: var(--space-7); align-items: start; }
.aside-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: var(--space-5); }
.aside-card h4 { font-family: var(--font-sans); font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-4); display: flex; align-items: center; gap: 10px; }
.aside-card h4::before { content: ''; width: 3px; height: 16px; background: var(--color-gold); border-radius: 2px; }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-3); }

/* sidebar nav (cabinet) */
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm); font-family: var(--font-sans); font-weight: 600; font-size: var(--text-sm); color: var(--text-secondary); transition: all var(--duration-md) var(--ease); }
.side-nav a:hover { color: var(--text-primary); background: var(--bg-elevated); }
.side-nav a.is-active { color: var(--color-gold); background: var(--color-gold-glow); }
.side-nav .ic { width: 18px; text-align: center; opacity: .8; }

/* promo / ad block */
.promo-block { position: relative; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-gold-dim); background: linear-gradient(120deg, rgba(201,150,58,0.12), rgba(47,128,237,0.08)); padding: var(--space-6); }
.promo-block .ad-tag { position: absolute; top: 10px; right: 12px; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-tertiary); }
.promo-block .pb-bonus { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--text-3xl); font-weight: 800; color: var(--color-gold-pale); }

/* ── FOOTER ── */
.app-footer { border-top: 1px solid var(--border-subtle); background: #0a0a14; margin-top: var(--space-9); }
.footer-disclaimer { padding: var(--space-6) 0; border-bottom: 1px solid var(--border-subtle); }
.footer-main { padding: var(--space-8) 0; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--space-7); }
.footer-col h5 { font-family: var(--font-sans); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-tertiary); font-weight: 700; margin-bottom: var(--space-4); }
.footer-col a { display: block; color: var(--text-secondary); font-size: var(--text-sm); padding: 5px 0; }
.footer-col a:hover { color: var(--color-gold); }
.footer-col p { font-size: var(--text-sm); color: var(--text-tertiary); line-height: var(--leading-normal); }
.footer-bottom { padding: var(--space-5) 0; border-top: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); font-size: var(--text-xs); color: var(--text-tertiary); flex-wrap: wrap; }

/* featured news hero card */
.news-card--featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.news-card--featured .news-thumb {
  aspect-ratio: auto;
  min-height: 280px;
}
.news-card--featured .news-body {
  justify-content: center;
  padding: var(--space-7);
}
.news-featured-title {
  font-family: var(--font-sans);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.2;
  margin: var(--space-3) 0;
  text-wrap: pretty;
}
.news-card--featured .news-excerpt { font-size: var(--text-base); }
.news-card--featured .news-meta { margin-top: var(--space-4); }

/* responsive */
@media (max-width: 960px) {
  .hero-grid, .with-aside, .with-aside-l, .col-2, .col-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: var(--text-6xl); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .main-nav, .header-search { display: none; }
  body.menu-open { overflow: hidden; }
  body.menu-open .mobile-nav-drawer:not([hidden]) { display: flex; }
  body.menu-open .menu-toggle {
    color: var(--color-gold);
    border-color: var(--color-gold-dim);
  }
  .app-header .wrap { gap: var(--space-3); padding-left: var(--space-4); padding-right: var(--space-4); }
  .logo .l1 { font-size: var(--text-lg); }
  .header-cab { margin-left: auto; flex-shrink: 0; }
  .menu-toggle { display: inline-flex; margin-left: 0; flex-shrink: 0; }
  .hero-aside { display: none; }
  .mobile-nav-drawer { align-items: center; }
  .mobile-nav-drawer a { width: 100%; max-width: 280px; text-align: center; }
  .news-card--featured { grid-template-columns: 1fr; }
  .news-card--featured .news-thumb { aspect-ratio: 16/9; min-height: 0; }
  .news-card--featured .news-body { padding: var(--space-5); }
  .news-featured-title { font-size: var(--text-2xl); }
}
@media (max-width: 560px) {
  .page-title { font-size: var(--text-4xl); }
  .footer-main { grid-template-columns: 1fr; }
  .hero h1 { font-size: var(--text-5xl); }
  .chips,
  .toolbar .chips { justify-content: center; }
  .tabs {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    border-bottom: none;
    padding-bottom: var(--space-2);
  }
  .tab {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  .tab.is-active {
    background: var(--color-gold);
    color: var(--color-dark);
    border-color: var(--color-gold);
    border-bottom-color: var(--color-gold);
  }
  .tab-long { display: none; }
  .news-featured-title { font-size: var(--text-xl); }
}
@media (max-width: 480px) {
  .logo .l2 { display: none; }
  .logo .l1 { font-size: var(--text-base); }
  .header-cab { width: 40px; height: 40px; padding: 0; justify-content: center; background: var(--bg-elevated); border-color: var(--border-subtle); color: var(--text-secondary); }
  .header-cab:hover { color: var(--color-gold); background: var(--bg-elevated); }
  .header-cab-ic { width: 20px; height: 20px; }
  .header-cab-label { display: none; }
}
