/* Page structure: container, centred-split header, drawer, tab bar, footer,
 * section rhythm. Moved from the approved mockup A "Mojo Deck". */

.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ── header: centred split (mockup) ─────────────────────────────────────── */
.site-header { position: fixed; inset: 0 0 auto; z-index: var(--z-header); transition: background-color .3s, border-color .3s; }
.site-header::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgb(16 20 29 / .75), transparent); transition: opacity .3s;
}
.site-header.is-scrolled, .site-header--solid { background: rgb(16 20 29 / .82); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.site-header.is-scrolled::before, .site-header--solid::before { opacity: 0; }
.header-inner { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--header-h); transition: height .3s var(--ease); }
.is-scrolled .header-inner { height: 62px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav--right { justify-content: flex-end; }
.nav .link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: var(--radius-pill); color: var(--color-text-2); font-weight: 500; font-size: .94rem;
  text-decoration: none; white-space: nowrap; transition: color .2s, background-color .2s;
}
.nav .link:hover { color: #fff; background: rgb(255 255 255 / .06); }
.nav .link[aria-current="page"] { color: #fff; }
.nav .link[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 6px; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--color-accent);
}
.nav .btn { margin-left: 6px; }

.logo {
  display: inline-flex; align-items: center; padding: 6px 18px; min-height: 44px; padding-block: 8px;
  font-size: 1.55rem; text-decoration: none;
  transition: transform .3s var(--ease);
}
/* wordmark image scales with the logo's font-size (header, drawer, footer, age gate) */
.logo .logo__img { display: block; }
.logo .logo__img img { display: block; width: auto; height: 1.3em; }
.logo:hover { transform: scale(1.03); }
.is-scrolled .logo { transform: scale(.9); }

.user-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; margin-left: 6px;
  border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: rgb(16 20 29 / .35);
  color: #fff; font-weight: 600; font-size: .9rem; text-decoration: none; transition: border-color .2s, background-color .2s;
}
.user-chip:hover { border-color: var(--color-brand); background: var(--tint-brand); }
.user-chip__ava {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--color-button); font-family: var(--font-display); font-size: .8rem; font-weight: 600;
}
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgb(16 20 29 / .45); color: var(--color-text-2);
  transition: color .2s, border-color .2s, background-color .2s;
}
.icon-btn:hover { color: #fff; border-color: var(--color-brand); background: var(--tint-brand); }
.icon-btn .icon { width: 20px; height: 20px; }

.header-actions { display: none; }
.burger { display: none; }

/* ── drawer (mobile menu, an overlay of app.js) ─────────────────────────── */
.drawer {
  position: fixed; inset: 0; z-index: var(--z-drawer); display: grid; grid-template-rows: auto 1fr;
  padding: 0 var(--gutter); background: rgb(16 20 29 / .97); backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .3s var(--ease);
  overflow-y: auto;
}
.drawer.is-open { opacity: 1; transform: none; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.drawer__top .logo { padding: 6px 0; font-size: 1.3rem; }
.drawer nav { display: flex; flex-direction: column; padding-top: 12px; }
.drawer nav a {
  display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 4px;
  border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: 1.15rem; text-decoration: none;
}
.drawer nav a[aria-current="page"] { color: var(--color-accent); }
.drawer nav a .icon { width: 20px; height: 20px; color: var(--color-text-2); }
.drawer__cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 24px 0 32px; }
.drawer__links { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-bottom: 32px; font-size: var(--fs-small); color: var(--color-text-2); }
.drawer__links a { text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }

/* ── tab bar (phones) ───────────────────────────────────────────────────── */
.tabbar { display: none; }

/* ── sections ───────────────────────────────────────────────────────────── */
main { display: block; }
.section { padding-block: var(--section-y); }
.section--tight { padding-top: 0; }
.section--band { background: var(--surface-1); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; margin-bottom: 36px; }
.section-head > * { min-width: 0; max-width: 100%; }   /* scrollable tab rows shrink instead of widening the page */
.kicker {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--color-accent);
}
.section h2, .h2 { font-size: var(--fs-h2); font-weight: 600; letter-spacing: -.035em; }
.section-lead { margin-top: 12px; max-width: 58ch; color: var(--color-text-2); }

/* inner-page hero (added, in the mockup's language: photo + tinted overlay + spark kicker) */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--header-h) + 64px) 0 56px; border-bottom: 1px solid var(--line); }
.page-hero__bg { position: absolute; inset: 0; z-index: -2; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.page-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(16 20 29 / .97) 0%, rgb(16 20 29 / .86) 45%, rgb(16 20 29 / .55) 100%),
              linear-gradient(0deg, var(--color-bg) 0%, rgb(16 20 29 / 0) 60%);
}
.page-hero h1 { font-size: var(--fs-page-h1); font-weight: 800; letter-spacing: -.045em; max-width: 20ch; }
.page-hero h1 .accent { color: var(--color-accent); }
.page-hero__lead { margin-top: 18px; max-width: 60ch; font-size: clamp(1rem, .95rem + .3vw, 1.18rem); color: var(--color-text-2); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: var(--fs-small); color: var(--color-text-2); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.page-hero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

/* ── footer: 3 columns + a wide data band ───────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-1); padding: 64px 0 calc(32px + env(safe-area-inset-bottom)); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 48px; }
.footer-brand .logo { padding: 0; }
.footer-brand p { margin-top: 16px; max-width: 40ch; font-size: var(--fs-small); color: var(--color-text-2); }
.footer-age { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.footer-age img { width: 44px; height: 44px; }
.footer-age a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-small); font-weight: 600; color: #fff; text-underline-offset: 4px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-cols h2 { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 14px; }
.footer-cols ul { display: grid; gap: 2px; }
.footer-cols a { display: inline-flex; align-items: center; min-height: 36px; color: var(--color-text-2); text-decoration: none; font-size: .95rem; transition: color .2s; }
.footer-cols a:hover { color: #fff; }

.footer-data {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 32px;
  margin-top: 48px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-0);
}
.footer-data div { min-width: 0; }
.footer-data dt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-2); }
.footer-data dd { margin: 4px 0 0; font-size: var(--fs-small); color: #fff; overflow-wrap: anywhere; }
.footer-data a { color: #fff; text-underline-offset: 3px; }

.footer-pay { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.footer-pay span { display: grid; place-items: center; height: 36px; padding: 0 12px; border-radius: var(--radius-sm); background: #fff; }
.footer-pay img { height: 18px; width: auto; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--color-text-2); }
.footer-bottom p { max-width: 80ch; }
.linklike { border: 0; background: none; padding: 0; min-height: 44px; color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgb(183 192 208 / .4); }
.linklike:hover { color: var(--color-accent); }

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .nav .link { padding: 0 10px; font-size: .88rem; }
  .logo { padding: 6px 10px; font-size: 1.4rem; }
}
@media (max-width: 1100px) {
  .nav--right .link { display: none; }
}
@media (max-width: 1023px) {
  :root { --header-h: 64px; }
  .nav { display: none; }
  .header-inner { grid-template-columns: auto 1fr auto; height: 64px; }
  .is-scrolled .header-inner { height: 58px; }
  .site-header .logo { padding: 6px 0; font-size: 1.3rem; grid-column: 1; }
  .header-actions { grid-column: 3; display: flex; gap: 6px; align-items: center; }
  .burger {
    display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
    border: 1px solid var(--line-strong); background: rgb(16 20 29 / .5);
  }
  .burger .icon { width: 22px; height: 22px; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .footer-data { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-tabbar);
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgb(22 27 38 / .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px;
    border-radius: 12px; font-size: .7rem; font-weight: 600; color: var(--color-text-2); text-decoration: none;
  }
  .tabbar a .icon { width: 20px; height: 20px; }
  .tabbar a[aria-current="page"] { color: #fff; }
  .tabbar a[aria-current="page"] .icon { color: var(--color-accent); }
  .tabbar a.join { background: var(--color-button); color: #fff; }
  body { padding-bottom: 72px; }
  .footer-pay { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-pay span { padding: 0 6px; }
  .footer-pay img { max-width: 100%; object-fit: contain; }
}
@media (max-width: 640px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols > div:last-child { grid-column: 1 / -1; }
  .footer-data { grid-template-columns: 1fr; }
  .header-actions .btn { padding: 0 14px; }
}
@media (max-width: 389px) {
  .header-actions .btn--sm { display: none; }
}
