/*
Theme Name: Made by Rich
Theme URI: https://madebyrich.uk
Author: Rich
Author URI: https://madebyrich.uk
Description: Custom theme for madebyrich.uk — home of Rich at the Movies and Early Morning Barking.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Private
Text Domain: madebyrich
*/

/* ── DESIGN TOKENS ── */
:root {
  /* Backgrounds */
  --bg:           #0e0e16;
  --bg-warm:      #13131e;
  --surface:      #1a1a28;
  --surface2:     #222234;
  --surface3:     #2a2a40;

  /* RATM — Gold / Blue */
  --gold:         #b38c1e;
  --gold-light:   #e3bb48;
  --gold-dim:     #7a5c10;
  --gold-rule:    rgba(179,140,30,0.18);
  --gold-glow:    rgba(179,140,30,0.07);
  --blue:         #0a0d7a;
  --blue-mid:     #1219a0;
  --blue-deep:    #060849;

  /* EMB — Yellow */
  --yellow:       #f5d800;
  --yellow-dim:   #a89500;
  --yellow-rule:  rgba(245,216,0,0.15);
  --yellow-glow:  rgba(245,216,0,0.06);

  /* Everything Else — Green */
  --green:        #34a853;
  --green-dim:    #1e7a35;
  --green-rule:   rgba(52,168,83,0.18);
  --green-glow:   rgba(52,168,83,0.07);

  /* Typography */
  --cream:        #f0ecff;
  --cream-dim:    #a8a4be;
  --text:         #ddd8f0;
  --text-dim:     #7a7490;
  --text-body:    #c4c0d8;
  --dark-text:    #0a0a14;

  /* Structure */
  --rule:         rgba(220,216,255,0.07);
  --nav-height:   72px;
  --max-width:    1100px;
  --gap:          24px;

  /* Typography scale */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-serif:   'DM Serif Display', Georgia, serif;
  --font-cinema:  'Bebas Neue', impact, sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box;}
html { scroll-behavior: smooth; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }

/* ── BASE ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.15;
}

p { color: var(--text-body); }

/* ── LAYOUT UTILITIES ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── SITE HEADER ── */
/* ── WORDPRESS ADMIN BAR — sits above the site header, not over it ── */
/* WordPress adds its own margin-top to <body> — we let it do that,
   but we also need our fixed header to drop below the bar. */
.admin-bar .site-header {
  top: 32px; /* standard WP admin bar height */
}
@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px; /* mobile WP admin bar height */
  }
}
/* WordPress also adds margin-top to #wpadminbar's sibling — override to 0
   so the page body doesn't double-shift. We handle offset via top: only. */
.admin-bar body {
  margin-top: 0 !important;
}

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(14,14,22,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.3s;
}
.site-header.is-scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,0.4);
}

/* Logo */
.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo__made {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
}
.site-logo__rich {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 33px;
  color: var(--cream);
  letter-spacing: 0.02em;
}

/* Primary nav wrapper */
.primary-nav-wrapper {
  display: flex;
  align-items: center;
}

/* Primary nav list */
.primary-nav {
  display: flex;
  gap: 36px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.primary-nav a:hover,
.primary-nav .current-menu-item a { color: var(--cream); }

/* Member button */
.nav-member-btn {
  background: var(--gold) !important;
  color: var(--dark-text) !important;
  padding: 8px 20px;
	margin-right: 10px;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.14em !important;
  transition: opacity 0.2s !important;
  text-decoration: none !important;
}
.nav-member-btn:hover {
  opacity: 0.88 !important;
  color: var(--dark-text) !important;
}

/* Mobile menu toggle — hidden on desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--cream);
  z-index: 210;
  line-height: 0;
}

/* ── SITE FOOTER ── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer__note {
  font-size: 14px;
  color: var(--text-dim);
}
.footer-nav__list {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav__list a {
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-nav__list a:hover { color: var(--cream); }

/* ── COMMON ELEMENTS ── */

/* Section labels */
.section-label {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Section header row */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-link {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.section-link:hover { color: var(--gold); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s, opacity 0.2s, transform 0.2s;
  font-family: var(--font-body);
}
.btn--gold       { background: var(--gold); color: var(--dark-text); padding: 12px 28px; }
.btn--gold:hover { background: var(--gold-light); color: var(--dark-text); }
.btn--outline    { border: 1px solid var(--gold-rule); color: var(--gold-dim); padding: 11px 28px; background: none; }
.btn--outline:hover { border-color: var(--gold); color: var(--gold-light); }
.btn--blue       { background: var(--blue); color: var(--gold-light); padding: 12px 28px; }
.btn--blue:hover { background: var(--blue-mid); color: var(--gold-light); }
.btn--yellow     { background: var(--yellow); color: var(--dark-text); padding: 12px 28px; }
.btn--yellow:hover { opacity: 0.88; color: var(--dark-text); }

/* Content type badges */
.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 10px;
  font-weight: 500;
  font-family: var(--font-body);
}
.badge--gold    { background: var(--gold); color: var(--dark-text); }
.badge--blue    { background: rgba(10,13,122,0.85); color: var(--gold-light); }
.badge--outline { border: 1px solid var(--gold-rule); color: var(--gold-dim); }
.badge--member  { background: var(--gold); color: var(--dark-text); }
.badge--yellow  { background: var(--yellow); color: var(--dark-text); }

/* Dividers */
.content-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 48px 0 40px;
}
.content-divider__line { flex: 1; height: 1px; background: var(--gold-rule); }
.content-divider__label { font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold-dim); white-space: nowrap; }

/* Pull quote */
.pull-quote {
  margin: 40px 0;
  padding: 28px 32px;
  border-left: 3px solid var(--gold);
  background: var(--gold-glow);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--cream);
  line-height: 1.5;
}

/* ── SHOW IDENTITY HELPERS ── */
.show-ratm { --show-accent: var(--gold); --show-accent-lite: var(--gold-light); --show-accent-dim: var(--gold-dim); --show-rule: var(--gold-rule); --show-glow: var(--gold-glow); }
.show-emb  { --show-accent: var(--yellow); --show-accent-lite: #fdf0a0; --show-accent-dim: var(--yellow-dim); --show-rule: var(--yellow-rule); --show-glow: var(--yellow-glow); }


/* ── MEMBER GATE ── */
.member-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 32px;
  text-align: center;
  background: rgba(14,14,22,0.90);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.member-gate--video {
  position: absolute;
  inset: 0;
}
.member-gate__icon  { font-size: 28px; }
.member-gate__title { font-family: var(--font-display); font-size: 20px; color: var(--cream); margin-bottom: 4px; }
.member-gate__text  { font-size: 14px; color: var(--text-dim); max-width: 300px; line-height: 1.6; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}
@keyframes livepulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.animate-fadeup { animation: fadeUp 0.6s ease both; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Card scroll reveal */
.will-animate {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.will-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .site-header { padding: 0 32px; }
}

@media (max-width: 1250px) {
  /* Hide desktop nav, show hamburger */
  .primary-nav-wrapper {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(14,14,22,0.98);
    padding: 24px 20px;
    border-bottom: 1px solid var(--rule);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 199;
  }
  .primary-nav-wrapper.is-open {
    display: flex;
  }
  .primary-nav {
    flex-direction: column;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
  }
  .primary-nav a {
    font-size: 15px;
    padding: 4px 0;
  }
  .nav-member-btn {
    margin-top: 8px;
    padding: 8px 20px !important;
  }
  .menu-toggle { display: block; }
}

@media (max-width: 768px) {
  :root { --nav-height: 60px; }
  .container { padding: 0 20px; }
  .site-header { padding: 0 20px; }
  .site-footer { padding: 32px 20px; flex-direction: column; align-items: flex-start; }
}

/* ── EPISODE TAGS — no bullet points ── */
.episode-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ep-tag {
  list-style: none;
  display: inline-flex;
}

/* ── BREADCRUMB — no bullet points ── */
.breadcrumb {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

/* ── CARD MEMBERS-ONLY INLINE BADGE ── */
.card-members-badge-inline {
  display: inline-block;
  margin-bottom: 6px;
}

/* ── MEDIA TYPE BADGE ON CARDS ── */
.card-media-type {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-left: 4px;
}

/* ── BUNNY VIDEO EMBED ── */
.bunny-video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  background: var(--surface2);
}
.bunny-video-wrapper__iframe {
  border: none;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

/* ── AMAZON AFFILIATE BUTTON ── */
.btn--amazon {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--gold);
  color: var(--dark-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 16px;
  text-decoration: none;
  transition: opacity 0.2s;
  margin-top: 12px;
}
.btn--amazon:hover { opacity: 0.85; }
