/* =====================================================================
   Club FM — public site styles
   Palette from the logo: ink #17181c · paper #f3f3ef · signal orange #ff7417
   ===================================================================== */

:root {
  --orange: #ff7417;
  --orange-2: #ff9a4d;
  --orange-soft: rgba(255, 116, 23, .12);
  --ink: #17181c;
  --paper: #f3f3ef;

  --font-display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --footer-h: 44px;
  --header-top: 12px;
  --header-h: 64px;

  /* light theme (default) */
  --bg: #f4f3ef;
  --bg-2: #ebe9e3;
  --surface: rgba(255, 255, 255, .7);
  --surface-solid: #ffffff;
  --surface-2: rgba(23, 24, 28, .035);
  --text: #17181c;
  --text-2: #4b4d55;
  --muted: #7f828b;
  --line: rgba(23, 24, 28, .08);
  --line-2: rgba(23, 24, 28, .15);
  --glass: rgba(246, 245, 241, .66);
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 16px 40px -18px rgba(20, 20, 30, .18);
  --glow: rgba(255, 116, 23, .35);
  --grid-line: rgba(23, 24, 28, .05);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0d0e11;
  --bg-2: #131418;
  --surface: rgba(30, 31, 37, .62);
  --surface-solid: #1b1c21;
  --surface-2: rgba(255, 255, 255, .035);
  --text: #f3f3ef;
  --text-2: #b6b8bf;
  --muted: #7c7f88;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .14);
  --glass: rgba(14, 15, 18, .58);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 48px -20px rgba(0, 0, 0, .7);
  --glow: rgba(255, 116, 23, .4);
  --grid-line: rgba(255, 255, 255, .04);
  color-scheme: dark;
}

/* No-JS fallback follows the system preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0d0e11; --bg-2: #131418; --surface: rgba(30, 31, 37, .62); --surface-solid: #1b1c21;
    --surface-2: rgba(255, 255, 255, .035); --text: #f3f3ef; --text-2: #b6b8bf; --muted: #7c7f88;
    --line: rgba(255, 255, 255, .075); --line-2: rgba(255, 255, 255, .14); --glass: rgba(14, 15, 18, .58);
    --grid-line: rgba(255, 255, 255, .04); color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--footer-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-x: clip;
  transition: background-color .5s var(--ease), color .3s;
}
body.no-scroll { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--orange); color: var(--ink); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 8px; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
[hidden] { display: none !important; }

.container { width: min(1240px, 100% - 32px); margin-inline: auto; }
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px;
  background: var(--orange); color: var(--ink); font-weight: 700; transition: top .3s var(--ease);
}
.skip-link:focus { top: 16px; }
.muted { color: var(--muted); }
main:focus { outline: none; }

/* ---------- Ambient background ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
/* Static soft glows (no blur filters or animation — cheap to render on phones) */
.orb { position: absolute; border-radius: 50%; }
.orb--1 { width: 110vmax; height: 110vmax; left: -55vmax; top: -60vmax; background: radial-gradient(circle, rgba(255, 116, 23, .22), rgba(255, 116, 23, .06) 35%, transparent 60%); }
.orb--2 { width: 80vmax; height: 80vmax; right: -45vmax; top: 10vh; background: radial-gradient(circle, rgba(255, 154, 77, .12), transparent 55%); }
[data-theme="dark"] .orb--1 { opacity: .8; }
[data-theme="dark"] .orb--2 { opacity: .7; }
.bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 85% 60% at 50% 0%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 85% 60% at 50% 0%, #000 25%, transparent 75%);
}

/* ---------- Header (floating glass island) ---------- */
.site-header {
  position: fixed;
  top: var(--header-top);
  left: 50%;
  z-index: 50;
  width: min(1240px, 100% - 32px);
  height: var(--header-h);
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 10px 0 20px;
  border-radius: 20px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 30px -14px rgba(0, 0, 0, .2);
  transition: box-shadow .4s var(--ease), background-color .4s, height .4s var(--ease), top .4s var(--ease);
}
[data-theme="dark"] .site-header { box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 8px 30px -14px rgba(0, 0, 0, .6); }
.site-header.is-scrolled { --header-h: 58px; box-shadow: var(--shadow); }

.brand { display: flex; align-items: center; flex: none; transition: transform .4s var(--ease-spring); }
.logo { height: 30px; width: auto; }
.logo--dark { display: none; }
[data-theme="dark"] .logo--light { display: none; }
[data-theme="dark"] .logo--dark { display: block; }

.nav {
  position: relative; display: flex; gap: 2px; margin-inline: auto; padding: 4px;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line);
}
.nav-link {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 10px; font-weight: 700; font-size: .93rem; color: var(--text-2);
  transition: color .25s;
}
.nav-link:hover, .nav-link.is-active { color: var(--text); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 16px; height: 3px; border-radius: 2px;
  background: var(--orange); translate: -50% 0; transform: skewX(-24deg);
}
.nav-pill {
  position: absolute; z-index: 0; top: 4px; left: 0; height: calc(100% - 8px); width: 0;
  border-radius: 10px; background: var(--surface-solid); opacity: 0;
  box-shadow: 0 2px 10px -2px rgba(0, 0, 0, .12);
}
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* Icon buttons, theme toggle, burger */
.icon-btn {
  position: relative; width: 42px; height: 42px; display: inline-grid; place-items: center; flex: none;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  transition: background .3s, border-color .3s, transform .3s var(--ease), color .3s;
}
.icon-btn:hover { border-color: var(--line-2); background: var(--surface-solid); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .icon { width: 19px; height: 19px; }
.theme-toggle { overflow: hidden; }
.theme-toggle .ti { position: absolute; inset: 0; display: grid; place-items: center; }
.ti--sun { color: var(--orange); }
:root:not([data-theme="dark"]) .ti--moon { opacity: 0; }
[data-theme="dark"] .ti--sun { opacity: 0; }

.burger { display: none; }
.burger span {
  position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .5s var(--ease), top .5s var(--ease);
}
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 23px; right: 16px; }
.burger[aria-expanded="true"] span:first-child { top: 19.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 19.5px; right: 12px; transform: rotate(-45deg); }

/* Mobile navigation sheet */
.mobile-nav {
  position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; justify-content: center;
  padding: 110px 24px calc(var(--footer-h) + 40px);
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
  opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility .45s;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; }
.mobile-nav nav { display: flex; flex-direction: column; }
.m-link {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font: italic 800 clamp(1.9rem, 9vw, 2.6rem)/1.1 var(--font-display); letter-spacing: -.03em;
}
.m-link .icon { width: 28px; height: 28px; color: var(--muted); transition: transform .4s var(--ease), color .3s; }
.m-link:hover .icon, .m-link.is-active .icon { color: var(--orange); }
.m-link.is-active { color: var(--orange); }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--orange); --b-fg: var(--ink);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 26px; border: 0; border-radius: 14px;
  background: var(--b-bg); color: var(--b-fg);
  font: 800 .98rem/1 var(--font-body); letter-spacing: .01em; white-space: nowrap;
  transform: skewX(-8deg);
  box-shadow: 0 12px 32px -14px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), background .3s, color .3s;
}
.btn > * { transform: skewX(8deg); }
.btn .icon { width: 19px; height: 19px; }
.btn:hover { box-shadow: 0 18px 40px -14px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn--ghost {
  --b-bg: var(--surface); --b-fg: var(--text);
  border: 1px solid var(--line-2); box-shadow: none;
}
.btn--ghost:hover { border-color: var(--orange); box-shadow: 0 12px 30px -16px var(--glow); }

.btn--sm { height: 40px; padding: 0 16px; font-size: .86rem; border-radius: 11px; gap: 8px; }
.btn--sm .icon { width: 17px; height: 17px; }
.btn--block { width: 100%; }

/* ---------- Shared typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin: 0;
  font: 700 .76rem/1 var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--orange);
}
.eyebrow::before { content: ""; width: 24px; height: 3px; border-radius: 2px; background: currentColor; transform: skewX(-24deg); }
.h2 {
  margin: 18px 0 0; font: italic 800 clamp(1.9rem, 4.4vw, 3.4rem)/1.04 var(--font-display);
  letter-spacing: -.035em;
}
.section { position: relative; padding: clamp(72px, 11vw, 128px) 0; }

.section-pad-bottom { padding-bottom: clamp(64px, 9vw, 110px); }

/* ---------- Inner page hero ---------- */
.page-hero { padding-top: calc(var(--header-top) + var(--header-h) + clamp(48px, 8vw, 96px)); padding-bottom: clamp(32px, 5vw, 52px); }
.page-title { margin: 18px 0 16px; font: italic 800 clamp(2.3rem, 6vw, 4.6rem)/1 var(--font-display); letter-spacing: -.045em; }
.page-lead { max-width: 42rem; margin: 0; color: var(--text-2); font-size: clamp(1.02rem, 1.4vw, 1.14rem); }

/* ---------- Search field and filter chips ---------- */
.search { position: relative; flex: 1 1 280px; max-width: 460px; display: block; }
.search > .icon { position: absolute; left: 15px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 48px; padding: 0 44px 0 46px; border-radius: 15px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font: 600 .95rem var(--font-body);
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.search input::placeholder { color: var(--muted); font-weight: 500; }
.search input:focus { outline: none; border-color: var(--orange); background: var(--surface-solid); box-shadow: 0 0 0 4px var(--orange-soft); }

.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line-2); font-weight: 700; font-size: .88rem; color: var(--text-2);
  transition: border-color .3s, color .3s, background .3s, transform .4s var(--ease);
}
.chip .icon { width: 16px; height: 16px; }
.chip .count { padding: 2px 8px; border-radius: 999px; background: var(--surface-2); font: 700 .72rem/1.4 var(--font-mono); color: var(--muted); }
.chip:hover { border-color: var(--orange); color: var(--text); }
.chip.is-active { background: var(--orange); border-color: var(--orange); color: var(--ink); box-shadow: 0 8px 20px -10px var(--glow); }
.chip.is-active .count { background: rgba(0, 0, 0, .12); color: var(--ink); }

/* Empty state */
.empty { display: grid; justify-items: center; gap: 6px; padding: 72px 20px; text-align: center; color: var(--muted); font-weight: 600; }
.empty p { margin: 0; }

/* ---------- Error page ---------- */
.error { min-height: calc(100svh - var(--footer-h)); display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--header-h) + 60px); padding-bottom: 60px; }
.error-scope { width: min(600px, 100%); height: 120px; margin-bottom: 20px; }
.error-scope svg { width: 100%; height: 100%; overflow: visible; }
.error-line { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.error .page-lead { margin-bottom: 34px; }

/* ---------- Footer (thin, always visible) ---------- */
.site-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--footer-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--glass); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
}
.footer-inner { height: var(--footer-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.copy { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; font-weight: 600; color: var(--muted); }
.socials { display: flex; gap: 2px; flex: none; }
.social {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--text-2);
  transition: color .3s, background .3s, transform .45s var(--ease-spring);
}
.social .icon { width: 18px; height: 18px; }
.social:hover { color: var(--orange); background: var(--orange-soft); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 16px; bottom: calc(var(--footer-h) + env(safe-area-inset-bottom) + 16px); z-index: 39;
  width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 14px;
  background: var(--orange); color: var(--ink); box-shadow: 0 10px 26px -10px var(--glow);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s, background .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--orange-2); }
.to-top .icon { width: 22px; height: 22px; }
@media (min-width: 1300px) { .to-top { right: max(16px, calc((100vw - 1240px) / 2 - 64px)); } }
@media (max-width: 640px) {  .to-top { width: 44px; height: 44px; right: 12px; } }

/* ---------- Menu extras ---------- */
.nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-link { white-space: nowrap; }
.nav-link .icon { width: 16px; height: 16px; }
.nav-link .nav-ext { width: 13px; height: 13px; margin-left: -4px; opacity: .6; }
.nav-link--admin { color: var(--orange); }
.nav-link--admin:hover { color: var(--orange); }
.m-link--admin { color: var(--orange); font-size: clamp(1.2rem, 5.5vw, 1.6rem); border-bottom: 0; margin-top: 8px; }
.m-link--admin .icon { color: var(--orange); width: 24px; height: 24px; }
.mobile-nav { overflow-y: auto; justify-content: safe center; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .nav { display: none; }
  .burger { display: inline-grid; }
  .header-actions { margin-left: auto; }
}

@media (max-width: 640px) {
  :root { --header-top: 10px; --header-h: 56px; }
  .site-header { padding: 0 7px 0 14px; border-radius: 17px; }
  .site-header.is-scrolled { --header-h: 52px; }
  .icon-btn { width: 40px; height: 40px; }
  .logo { height: 22px; }
  .btn { height: 50px; padding: 0 22px; }
  .section { padding: 64px 0; }
  .search { max-width: none; flex-basis: 100%; }
  .copy { font-size: .72rem; }
  .social { width: 30px; height: 30px; }
}

/* Phones in landscape: little height, so everything gets compact */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --header-top: 6px; --header-h: 50px; --footer-h: 36px; }
  .site-header.is-scrolled { --header-h: 50px; }
  .logo { height: 22px; }
  .icon-btn { width: 38px; height: 38px; }
  .page-hero { padding-top: calc(var(--header-top) + var(--header-h) + 32px); }
  .mobile-nav { padding: 72px 24px calc(var(--footer-h) + 16px); }
  .m-link { padding: 10px 0; font-size: 1.5rem; }
  .copy { font-size: .72rem; }
  .social { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; filter: none; }
}

@media print {
  .site-header, .site-footer, .bg-fx, .mobile-nav { display: none !important; }
  body { padding: 0; background: #fff; color: #000; }
}
