/* ============================================
   RIFF — Radio Rock Associative
   Design tokens
   ============================================ */
:root {
  --bg:        #121212;
  --bg-alt:    #191919;
  --bg-card:   #1e1c1c;
  --line:      #322c2c;
  --red:       #c81e1e;
  --red-dark:  #7a0000;
  --red-glow:  rgba(200, 30, 30, 0.35);
  --cream:     #f2ede3;
  --muted:     #9c9691;
  --gold:      #d9a441;

  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --radius: 3px;
  --player-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  line-height: 1.6;
  padding-bottom: var(--player-h);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 400;
  line-height: 1.05;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); color: var(--red); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

/* Justified body copy — keeps paragraphs from looking ragged, without
   justifying short single-line UI text where it'd have no visible effect
   anyway, or headings/nav where it'd look wrong. */
p {
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}
h1, h2, h3, .eyebrow, .brand, nav.main-nav a, .btn, code, .modal-meta {
  hyphens: none;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--gold);
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

hr.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1100px;
}

.brand {
  display: flex;
  align-items: center;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 8px 12px;
  cursor: pointer;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
nav.main-nav a:hover,
nav.main-nav a[aria-current="page"] { color: var(--cream); text-decoration: none; }
nav.main-nav a[aria-current="page"] { border-bottom: 2px solid var(--red); padding-bottom: 4px; }

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  nav.main-nav {
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
  }
  nav.main-nav li { border-bottom: 1px solid var(--line); }
  nav.main-nav a { display: block; padding: 14px 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 56px;
  background:
    radial-gradient(ellipse at top left, var(--red-dark) 0%, transparent 55%),
    var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(180deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero .eyebrow { display: block; margin-bottom: 14px; }
.hero p.lead {
  max-width: 620px;
  font-size: 1.1rem;
  color: var(--cream);
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 8px;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 20px;
  border-radius: var(--radius);
  display: inline-block;
  border: 1px solid var(--line);
  color: var(--cream);
  transition: border-color .15s, background .15s;
}
.btn:hover { text-decoration: none; border-color: var(--red); }
.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }

/* ---------- Sections ---------- */
main { padding: 56px 0 72px; }
main > .hero { margin-top: -56px; margin-bottom: 56px; }
section + section { margin-top: 64px; }

.callout {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  padding: 24px 28px;
  border-radius: var(--radius);
  margin: 1.6em 0;
}

/* ---------- Post / forum lists ---------- */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color .15s;
}
.post-card:hover { border-color: var(--red); }
.post-card .date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.post-card h3 { margin: 6px 0 8px; }
.post-card h3 a { color: var(--cream); }
.post-card h3 a:hover { color: var(--red); text-decoration: none; }
.post-card p { color: var(--muted); margin: 0; }

.forum-list { list-style: none; margin: 0; padding: 0; }
.forum-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.forum-list li:last-child { border-bottom: none; }
.forum-list .date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

/* ---------- Schedule "ticket stub" grid ---------- */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.ticket {
  position: relative;
  background: var(--bg-card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, border-color .15s;
  width: 100%;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}
.ticket:hover { border-color: var(--red); transform: translateY(-3px); }
.ticket { cursor: pointer; text-align: left; font: inherit; color: inherit; }
.ticket:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Schedule modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
}
.modal-card {
  position: relative;
  max-width: 560px;
  margin: 8vh auto 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  max-height: 78vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: none;
  border: 1px solid var(--line);
  color: var(--cream);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.modal-close:hover { border-color: var(--red); }
.modal-card h2 { margin-bottom: 4px; }
.modal-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
  display: block;
}
.modal-body p:last-child { margin-bottom: 0; }
.ticket .art {
  aspect-ratio: 16/9;
  background-color: #0d0d0d;
  background-size: cover;
  background-position: center;
  position: relative;
}
.ticket .art::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.75) 100%);
}
.ticket .body { padding: 14px 16px 18px; position: relative; }
.ticket .day {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.ticket .time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  float: right;
}
.ticket h3 { margin: 6px 0 4px; font-size: 1.05rem; }
.ticket .sub { color: var(--muted); font-size: 0.85rem; margin: 0; }
.ticket::before, .ticket::after.notch {
  /* perforation notches */
}
.ticket .notch {
  position: absolute;
  width: 14px; height: 14px;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}
.ticket .notch.left { left: -8px; }
.ticket .notch.right { right: -8px; }

/* ---------- Stream / listen page ---------- */
.stream-options {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 1.5em 0;
}
.stream-option {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stream-option .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.tag-green { background: rgba(70, 180, 90, 0.15); color: #5fd479; }
.tag-yellow { background: rgba(217, 164, 65, 0.15); color: var(--gold); }
.tag-red { background: rgba(200, 30, 30, 0.15); color: #f16b6b; }
.stream-option code {
  display: block;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
  color: var(--cream);
  margin-top: 8px;
}

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.feature-list li {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.92rem;
}

.spec-columns { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 1.5em 0; }
.spec-columns ul { margin: 0; padding-left: 1.2em; color: var(--muted); }

/* ---------- Membership tiers ---------- */
.tiers { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 1.6em 0; }
.tier {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.tier h3 { margin-bottom: 8px; }
.tier .price {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: block;
}
.donate-embed {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 1.2em 0;
}
.donate-embed iframe { width: 100%; min-height: 900px; border: 0; border-radius: var(--radius); background: #fff; }

/* ---------- Article page ---------- */
.article-meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
article.post-body { max-width: 680px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 0.82rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--cream); }

/* ---------- Utility ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ---------- Pager (Actualités) ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.pager-link {
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--cream);
}
.pager-link:hover { border-color: var(--red); text-decoration: none; }
.pager-link.is-disabled { opacity: 0.4; pointer-events: none; }
.pager-status { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
