/*
Theme Name: Blip Radio
Theme URI: https://blipradio.lovable.app
Author: Garden Groove
Description: Monthly live broadcast theme for Blip Radio. Streams via OBS → YouTube Live. All broadcast settings editable via WordPress Customizer — no code required.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: blip-radio
*/

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Design Tokens (matching Lovable source exactly) ────────── */
:root {
  /* Editable via Customizer (overridden by inline style from functions.php) */
  --blip-bg: #f7f5ee;
  --blip-fg: #1a2420;
  --blip-gradient-1: #3c8c64;
  --blip-gradient-2: #327a5a;
  --blip-gradient-3: #142d23;
  --blip-accent: #3b8b5a;
  --blip-live: #c0392b;

  --radius: 0.25rem;
  --background: var(--blip-bg);
  --foreground: var(--blip-fg);
  --card: var(--blip-bg);
  --card-foreground: var(--blip-fg);
  --muted: var(--blip-gradient-1);
  --muted-foreground: var(--blip-fg);
  --accent: var(--blip-accent);
  --destructive: var(--blip-live);
  --border: color-mix(in oklab, var(--blip-fg) 15%, transparent);
  --mist: var(--blip-gradient-1);
  --signal: var(--blip-accent);
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-display);
  font-feature-settings: "ss01", "cv11";
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  line-height: 0.9;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
input, button { font-family: var(--font-display); }

/* ─── Mist Background ──────────────────────────────────────── */
.blip-wrap {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, color-mix(in oklab, var(--blip-gradient-1) 55%, transparent), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 80%, color-mix(in oklab, var(--blip-gradient-2) 50%, transparent), transparent 65%),
    radial-gradient(ellipse 60% 70% at 70% 15%, color-mix(in oklab, var(--blip-gradient-3) 40%, transparent), transparent 60%),
    radial-gradient(ellipse 50% 60% at 20% 90%, color-mix(in oklab, var(--blip-gradient-3) 35%, transparent), transparent 65%),
    var(--background);
  filter: contrast(1.05);
}

/* Grain overlay */
.blip-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  z-index: 0;
}

/* ─── Layout ────────────────────────────────────────────────── */
.blip-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ─── Top Bar ───────────────────────────────────────────────── */
.blip-topbar {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  background: oklch(0.97 0.012 95 / 0.4);
}

.blip-topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.blip-topbar-left { display: flex; align-items: center; gap: 10px; }
.blip-topbar-right { display: flex; align-items: center; gap: 16px; }

.blip-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--destructive);
  animation: live-pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

.blip-freq { opacity: 0.6; }
.blip-clock { font-family: var(--font-mono); }
.blip-muted { opacity: 0.6; }

@media (max-width: 768px) { .blip-freq { display: none; } }

/* ─── Navigation ────────────────────────────────────────────── */
.blip-nav {
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blip-logo { display: flex; align-items: center; gap: 12px; }
.blip-logo img { height: 40px; width: auto; }

.blip-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.blip-nav-links a { opacity: 1; transition: opacity 0.2s; }
.blip-nav-links a:hover { opacity: 0.5; }

.blip-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: background 0.2s, opacity 0.2s;
  cursor: pointer;
  border: none;
}

.blip-nav-cta.is-live {
  background: var(--foreground);
  color: var(--background);
}
.blip-nav-cta.is-live:hover { opacity: 0.8; }

.blip-nav-cta.is-offline {
  background: transparent;
  border: 1px solid oklch(0.15 0.01 180 / 40%);
  color: var(--foreground);
}
.blip-nav-cta.is-offline:hover { background: oklch(0.15 0.01 180 / 5%); }

@media (max-width: 768px) { .blip-nav-links { display: none; } }

/* ─── Hero ──────────────────────────────────────────────────── */
.blip-hero {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

@media (min-width: 768px) { .blip-hero { padding: 80px 24px 96px; } }

.blip-hero-grid {
  display: grid;
  gap: 32px;
  align-items: end;
}

@media (min-width: 768px) {
  .blip-hero-grid { grid-template-columns: 7fr 5fr; }
}

.blip-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  opacity: 0.7;
  margin-bottom: 24px;
}

.blip-hero h1 {
  font-size: clamp(3rem, 11vw, 9rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.05em;
}

.blip-hero h1 em {
  font-style: italic;
  font-weight: 300;
}

.blip-hero-desc { font-size: 18px; line-height: 1.6; max-width: 420px; margin-bottom: 24px; }
@media (min-width: 768px) { .blip-hero-desc { font-size: 20px; } }

.blip-btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.blip-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: background 0.2s, opacity 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.blip-btn-primary {
  background: var(--foreground);
  color: var(--background);
}
.blip-btn-primary:hover { opacity: 0.8; }

.blip-btn-outline {
  background: transparent;
  border: 1px solid oklch(0.15 0.01 180 / 40%);
  color: var(--foreground);
}
.blip-btn-outline:hover { background: oklch(0.15 0.01 180 / 5%); }

/* ─── Ticker ────────────────────────────────────────────────── */
.blip-ticker {
  position: relative;
  z-index: 1;
  border-top: 1px solid oklch(0.15 0.01 180 / 20%);
  border-bottom: 1px solid oklch(0.15 0.01 180 / 20%);
  background: var(--foreground);
  color: var(--background);
  overflow: hidden;
}

.blip-ticker-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  padding: 12px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.blip-ticker-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 16px;
  flex-shrink: 0;
}

/* ─── Sections ──────────────────────────────────────────────── */
.blip-section {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 24px;
}

@media (min-width: 768px) { .blip-section { padding: 112px 24px; } }

.blip-section-border { border-top: 1px solid oklch(0.15 0.01 180 / 15%); }

.blip-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.blip-section-head h2 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
}

.blip-section-head h2 em {
  font-style: italic;
  font-weight: 300;
}

.blip-signal-badge {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.7;
}

@media (min-width: 768px) { .blip-signal-badge { display: flex; } }

/* ─── Watch / Player ────────────────────────────────────────── */
.blip-player-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 1024px) {
  .blip-player-grid { grid-template-columns: 2fr 1fr; }
}

.blip-video-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--foreground);
  overflow: hidden;
  border: 1px solid oklch(0.15 0.01 180 / 20%);
  box-shadow: 0 25px 60px oklch(0.15 0.01 180 / 0.2);
}

.blip-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.blip-stream-card {
  background: var(--card);
  border: 1px solid oklch(0.15 0.01 180 / 15%);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.blip-on-air-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 24px;
}

.blip-stream-card h3 { font-size: 2rem; font-weight: 700; margin-bottom: 4px; line-height: 1; }
.blip-stream-subtitle { font-family: var(--font-mono); font-size: 13px; opacity: 0.7; margin-bottom: 24px; }

.blip-stream-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin-bottom: 32px;
}

.blip-stream-stat {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid oklch(0.15 0.01 180 / 10%);
}

.blip-signal-bars { color: var(--signal); }

.blip-stream-actions { margin-top: auto; display: flex; gap: 8px; }

/* ─── Live Show Schedule (styled like the On Air card) ────────── */
.blip-schedule-card {
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--blip-fg) 15%, transparent);
  padding: 24px;
  margin-top: 24px;
}

.blip-schedule-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.blip-schedule-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in oklab, var(--blip-fg) 10%, transparent);
  font-family: var(--font-mono);
}

.blip-schedule-row:last-child { border-bottom: none; }

.blip-schedule-time {
  font-size: 13px;
  opacity: 0.7;
  letter-spacing: 0.05em;
}

.blip-schedule-artist {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.blip-schedule-segment {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
  text-align: right;
}

@media (max-width: 600px) {
  .blip-schedule-row { grid-template-columns: 60px 1fr; }
  .blip-schedule-segment { grid-column: 1 / -1; text-align: left; opacity: 0.5; }
}

.blip-btn-sm {
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, background 0.2s;
}

.blip-btn-sm.primary { background: var(--foreground); color: var(--background); flex: 1; }
.blip-btn-sm.primary:hover { opacity: 0.8; }
.blip-btn-sm.outline { background: transparent; border: 1px solid oklch(0.15 0.01 180 / 40%); color: var(--foreground); }
.blip-btn-sm.outline:hover { background: oklch(0.15 0.01 180 / 5%); }

/* Off-air placeholder */
.blip-offair {
  border: 1px solid oklch(0.15 0.01 180 / 20%);
  background: oklch(0.95 0.015 95 / 0.4);
  padding: 64px 80px;
  text-align: center;
}

@media (max-width: 768px) { .blip-offair { padding: 48px 24px; } }

.blip-offair-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  opacity: 0.5;
  margin-bottom: 16px;
}

.blip-offair h3 { font-size: clamp(1.8rem, 5vw, 3.5rem); font-weight: 700; margin-bottom: 16px; line-height: 1; }
.blip-offair p { font-size: 18px; opacity: 0.8; max-width: 520px; margin: 0 auto 32px; }
.blip-offair-btns { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ─── Next Show / Date ──────────────────────────────────────── */
.blip-date-box {
  border: 1px solid oklch(0.15 0.01 180 / 20%);
  background: oklch(0.95 0.015 95 / 0.4);
  padding: 48px;
}

@media (max-width: 768px) { .blip-date-box { padding: 32px 24px; } }

.blip-date-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 768px) { .blip-date-grid { grid-template-columns: 1fr 1fr; } }

.blip-date-label {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.7;
  margin-bottom: 8px;
}

.blip-date-value { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; line-height: 1; margin-bottom: 8px; }
.blip-date-time { font-size: 20px; opacity: 0.8; }

.blip-countdown-wrap { text-align: left; }
@media (min-width: 768px) { .blip-countdown-wrap { text-align: right; } }

.blip-countdown {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.1em;
  line-height: 1;
  margin-bottom: 8px;
}

.blip-countdown-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.5;
}

.blip-social-row { display: flex; gap: 12px; flex-wrap: wrap; }
@media (min-width: 768px) { .blip-social-row { justify-content: flex-end; } }

/* ─── About ─────────────────────────────────────────────────── */
.blip-about-grid { display: grid; gap: 48px; }
@media (min-width: 768px) { .blip-about-grid { grid-template-columns: 7fr 4fr; align-items: start; } }

.blip-about h2 { font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 700; margin-bottom: 32px; }
.blip-about h2 em { font-style: italic; font-weight: 300; }

.blip-about-body { font-size: 18px; line-height: 1.7; opacity: 0.8; max-width: 640px; margin-bottom: 16px; }
@media (min-width: 768px) { .blip-about-body { font-size: 20px; } }

.blip-about-sub { font-size: 16px; line-height: 1.7; opacity: 0.6; max-width: 640px; margin-bottom: 32px; }

/* Newsletter card */
.blip-newsletter {
  border: 1px solid oklch(0.15 0.01 180 / 20%);
  padding: 24px;
  align-self: start;
}

.blip-newsletter-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.7;
  margin-bottom: 16px;
}

.blip-newsletter p { font-size: 14px; opacity: 0.8; margin-bottom: 16px; line-height: 1.6; }

.blip-newsletter-form { display: flex; flex-direction: column; gap: 8px; }

.blip-input {
  background: transparent;
  border: 1px solid oklch(0.15 0.01 180 / 40%);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--foreground);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.blip-input::placeholder { opacity: 0.5; }
.blip-input:focus { border-color: var(--foreground); }

.blip-newsletter-btn {
  background: var(--foreground);
  color: var(--background);
  border: none;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: opacity 0.2s;
}
.blip-newsletter-btn:hover { opacity: 0.8; }
.blip-newsletter-success { color: var(--signal); font-family: var(--font-mono); font-size: 12px; margin-top: 8px; }

/* ─── Footer ────────────────────────────────────────────────── */
.blip-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid oklch(0.15 0.01 180 / 15%);
}

.blip-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

@media (min-width: 768px) {
  .blip-footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.blip-footer img { height: 48px; width: auto; }

.blip-footer-links {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.7;
}

.blip-footer-links a:hover { opacity: 0.5; }

.blip-footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.5;
}

/* ─── Animations ────────────────────────────────────────────── */
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ─── WP Admin Bar offset ───────────────────────────────────── */
.admin-bar .blip-topbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .blip-topbar { top: 46px; } }

/* ─── Customizer notice ─────────────────────────────────────── */
.blip-customizer-note { display: none; }
