/* ================================================
   The Brothers WISP — Stylesheet
   Brand: navy #0a1628, cyan #00b4d8, blue #1a6ee8
   ================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:      #0a1628;
  --navy-card: #0d1f3c;
  --navy-mid:  #112040;
  --border:    #1a3a5c;
  --cyan:      #00b4d8;
  --blue:      #1a6ee8;
  --white:     #ffffff;
  --muted:     #8ba3c4;
  --font-head: 'Rajdhani', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --radius:    10px;
  --transition: 0.22s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--white); }

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

/* ---- Container ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ================================================
   Header / Navigation
   ================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.logo-img { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.07);
}

.nav-patreon {
  color: #f96835 !important;
  border: 1px solid rgba(249, 104, 53, 0.4);
}

.nav-patreon:hover {
  background: rgba(249, 104, 53, 0.12) !important;
  color: #f96835 !important;
  border-color: #f96835;
}

.nav-icon {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.5rem;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: var(--transition);
}

/* ================================================
   Hero Section
   ================================================ */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  background: var(--navy-mid) url('/public/img/banner.png') center center / cover no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,22,40,0.92) 0%, rgba(10,22,40,0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 1.25rem;
}

.hero-logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin: 0 auto 1.5rem;
  border-radius: 16px;
  filter: drop-shadow(0 0 24px rgba(0, 180, 216, 0.4));
}

@keyframes pulse {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(0, 180, 216, 0.35)); }
  50%       { filter: drop-shadow(0 0 36px rgba(0, 180, 216, 0.7)); }
}
.pulse { animation: pulse 3.5s ease-in-out infinite; }

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ================================================
   Buttons
   ================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--cyan);
  color: var(--navy);
}

.btn-primary:hover {
  background: #00d0f8;
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 180, 216, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--cyan);
  border: 2px solid var(--cyan);
}

.btn-secondary:hover {
  background: rgba(0, 180, 216, 0.12);
  color: var(--white);
  border-color: var(--white);
  transform: translateY(-2px);
}

/* ================================================
   Episodes Section
   ================================================ */
.episodes-section { padding: 3rem 0 4rem; }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-title {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--white);
}

.episode-count {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ================================================
   Episode Grid
   ================================================ */
.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.episode-card {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.episode-card:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 180, 216, 0.15);
}

.card-link {
  display: block;
  color: inherit;
}

.card-link:hover { color: inherit; }

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy-mid);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.episode-card:hover .card-thumb img { transform: scale(1.04); }

.card-duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.75);
  color: var(--white);
  font-size: 0.78rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.card-body { padding: 1rem 1.1rem 1.25rem; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.card-date {
  font-size: 0.82rem;
  color: var(--muted);
}

.card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-both {
  background: rgba(0, 180, 216, 0.18);
  color: var(--cyan);
  border: 1px solid rgba(0, 180, 216, 0.35);
}

.badge-youtube {
  background: rgba(255, 48, 48, 0.15);
  color: #ff6060;
  border: 1px solid rgba(255, 48, 48, 0.3);
}

.badge-yt { /* keep for backwards compat */
  background: rgba(255, 48, 48, 0.15);
  color: #ff6060;
  border: 1px solid rgba(255, 48, 48, 0.3);
}

.badge-spotify {
  background: rgba(29, 185, 84, 0.15);
  color: #1db954;
  border: 1px solid rgba(29, 185, 84, 0.3);
}

.card-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--white);
  letter-spacing: 0.01em;
}

/* ================================================
   Loading State
   ================================================ */
.loading-state {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--muted);
}

.loading-icon {
  margin: 0 auto 1.5rem;
  color: var(--cyan);
  opacity: 0.7;
}

.loading-state h3 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

/* ================================================
   Pagination
   ================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.2rem;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cyan);
  transition: background var(--transition), border-color var(--transition);
}

a.page-btn:hover {
  background: var(--border);
  border-color: var(--cyan);
  color: var(--white);
}

.page-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  color: var(--muted);
}

.page-info {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ================================================
   Episode Detail Page
   ================================================ */
.episode-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  background: var(--navy-mid) var(--thumb) center center / cover no-repeat;
  overflow: hidden;
}

.episode-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,22,40,1) 0%, rgba(10,22,40,0.6) 60%, rgba(10,22,40,0.3) 100%);
}

.episode-hero-content {
  position: relative;
  z-index: 1;
  padding: 2.5rem 1.25rem;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  transition: color var(--transition);
}

.back-link:hover { color: var(--cyan); }

.episode-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.episode-title {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.episode-body { padding: 3rem 0 4rem; }

.episode-layout { max-width: 860px; }

.embed-wrap { position: relative; border-radius: var(--radius); overflow: hidden; }

.embed-yt { aspect-ratio: 16 / 9; }

.embed-yt iframe, .embed-spotify iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.podcast-section { margin-top: 2rem; }

.podcast-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.podcast-label {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.podcast-external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cyan);
  white-space: nowrap;
}

.podcast-external-link:hover { color: var(--white); }

.embed-spotify {
  height: 160px;
  background: var(--navy-card);
}

.embed-spotify iframe { position: static; height: 160px; width: 100%; }

.episode-description {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.episode-description h2 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.episode-description p {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.75;
}

/* ================================================
   Page Hero (About / Contact)
   ================================================ */
.page-hero {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: center;
  background: var(--navy-mid) url('/public/img/banner.png') center center / cover no-repeat;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,22,40,0.82);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  padding: 3rem 1.25rem;
}

.page-hero-content h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-hero-content p { color: var(--muted); font-size: 1.1rem; }

/* ================================================
   About Page
   ================================================ */
.about-section { padding: 3rem 0; }

.about-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

.about-logo { width: 200px; border-radius: 16px; box-shadow: 0 0 40px rgba(0,180,216,0.2); }

.about-text h2 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  margin: 1.5rem 0 0.6rem;
}

.about-text h2:first-child { margin-top: 0; }

.about-text p { color: var(--muted); line-height: 1.75; }

.stats-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat-card {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.75rem;
  text-align: center;
  min-width: 120px;
}

.stat-number {
  display: block;
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.hosts-section { padding: 3rem 0; border-top: 1px solid var(--border); }

.hosts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.host-card {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
}

.host-photo-wrap { margin: 0 auto 1.25rem; width: 90px; height: 90px; border-radius: 50%; overflow: hidden; border: 3px solid var(--cyan); }

.host-photo { width: 100%; height: 100%; object-fit: cover; }

.host-name {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.host-bio { color: var(--muted); font-size: 0.92rem; line-height: 1.65; }

.cta-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta-inner h2 {
  font-family: var(--font-head);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.cta-inner p { color: var(--muted); margin-bottom: 1.75rem; }

.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ================================================
   Patreon Section
   ================================================ */
.patreon-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  background: linear-gradient(135deg, rgba(249, 104, 53, 0.08) 0%, rgba(10, 22, 40, 0) 60%);
}

.patreon-inner h2 {
  font-family: var(--font-head);
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.patreon-inner p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
}

.patreon-inner p strong { color: var(--text); }

.patreon-inner .btn-primary {
  background: #f96835;
  border-color: #f96835;
}

.patreon-inner .btn-primary:hover {
  background: #e0532a;
  border-color: #e0532a;
}

/* ================================================
   Contact Page
   ================================================ */
.contact-section { padding: 3rem 0 4rem; }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-card, .contact-links-card {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-card h2, .contact-links-card h2 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.contact-email-wrap { margin-top: 1.25rem; }

.contact-label { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }

/* CSS email obfuscation — @ is \0040, . is \002E */
.email-display::before {
  content: attr(data-user) "\0040" attr(data-domain);
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.01em;
}

.email-display::after {
  content: "\002E" attr(data-tld);
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cyan);
}

.contact-note {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-platform-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--muted);
  font-size: 0.97rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.contact-platform-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.05);
  border-color: var(--border);
}

.contact-platform-patreon { color: #f96835; }
.contact-platform-patreon:hover { color: #f96835; background: rgba(249,104,53,0.08); border-color: rgba(249,104,53,0.35); }

/* ================================================
   404 Page
   ================================================ */
.error-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-content {
  text-align: center;
  padding: 3rem 1rem;
}

.error-code {
  font-family: var(--font-head);
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
  opacity: 0.25;
  margin-bottom: 0.25rem;
}

.error-content h1 {
  font-family: var(--font-head);
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.error-content p { color: var(--muted); margin-bottom: 2rem; }

/* ================================================
   Footer
   ================================================ */
.site-footer {
  background: var(--navy-card);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-logo-img { width: 32px; height: 32px; object-fit: contain; border-radius: 5px; }

.footer-tagline { color: var(--muted); font-size: 0.88rem; }

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.88rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--cyan); }
.footer-patreon-link { color: #f96835 !important; }
.footer-patreon-link:hover { color: #ffb49a !important; }

.footer-copy { color: var(--muted); font-size: 0.82rem; }

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: fixed;
    inset: 64px 0 0;
    background: rgba(10,22,40,0.98);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 1rem;
    gap: 0.5rem;
    z-index: 99;
  }

  .main-nav.open { display: flex; }

  .nav-toggle { display: flex; }

  .nav-link { font-size: 1.15rem; width: 100%; text-align: center; padding: 0.75rem; }

  .about-layout { grid-template-columns: 1fr; }
  .about-logo-wrap { text-align: center; }
  .about-logo { margin: 0 auto; }

  .contact-layout { grid-template-columns: 1fr; }

  .episodes-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 480px) {
  .episodes-grid { grid-template-columns: 1fr; }
  .hero { min-height: 380px; }
}
