/*
Theme Name: Come A Yaad
Theme URI: https://comeayaad.com
Author: Come A Yaad
Description: Editorial newsletter theme for the Come A Yaad platform — free weekly editorial up front, premium "Inner Circle" behind the wall. Built-in sections for the latest YouTube video, the "Come A Yaad: The Blueprint" podcast, partner sites (YaadBuilt & JamAcre), and a premium tier with coming-soon countdown. Everything wired to the Customizer.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: come-a-yaad
Tags: blog, news, custom-logo, custom-menu, featured-images, two-columns
*/

/* ============================================================
   TOKENS — drawn from the badge: gold lettering on warm black,
   Jamaica green field, aged-paper wear.
   ============================================================ */
:root {
  --ink: #17150f;
  --ink-soft: #26221a;
  --gold: #e8a93b;
  --gold-deep: #c9862a;
  --green: #14813f;
  --green-deep: #0b5a2e;
  --paper: #f4eddc;
  --paper-edge: #e7dcc2;
  --paper-dim: #6f6653;

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Newsreader', Georgia, serif;
  --font-utility: 'Archivo', 'Helvetica Neue', sans-serif;

  --measure: 68ch;
  --wrap: 1160px;
  --radius: 10px;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

/* Eyebrow: rule ✕ LABEL ✕ rule — echoes the flag marks on the badge */
.eyebrow {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--font-utility);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 1.2rem;
}
.eyebrow::before, .eyebrow::after {
  content: "\2715"; /* ✕ */
  color: var(--gold-deep);
  font-size: 0.8em;
}
.eyebrow .rule { flex: 0 0 42px; height: 2px; background: currentColor; opacity: 0.4; }
.on-dark .eyebrow { color: var(--gold); }
.on-dark .eyebrow::before, .on-dark .eyebrow::after { color: var(--green); }

/* Soundwave divider — the arcs from the badge */
.wave-divider { display: flex; justify-content: center; gap: 6px; padding: 2.4rem 0; }
.wave-divider span {
  width: 5px; border-radius: 3px; background: var(--gold-deep); opacity: 0.85;
}
.wave-divider span:nth-child(1), .wave-divider span:nth-child(7) { height: 10px; }
.wave-divider span:nth-child(2), .wave-divider span:nth-child(6) { height: 18px; background: var(--green); }
.wave-divider span:nth-child(3), .wave-divider span:nth-child(5) { height: 26px; }
.wave-divider span:nth-child(4) { height: 34px; background: var(--green-deep); }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-utility);
  font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--ink); color: var(--ink); }
.btn--green { background: var(--green); color: #fff; }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { box-shadow: 0 4px 0 currentColor; color: inherit; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 4px solid var(--gold);
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 0.9rem 0;
}
.site-brand { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; color: var(--paper); }
.site-brand img.custom-logo, .site-brand img { width: 58px; height: 58px; border-radius: 50%; transition: transform 0.6s ease; }
.site-brand:hover img { transform: rotate(12deg); }
.site-brand__name { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold); line-height: 1; }
.site-brand__tag { font-family: var(--font-utility); font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--paper); opacity: 0.7; }

.site-nav ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--font-utility); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--paper); text-decoration: none;
  padding-bottom: 3px; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex; background: none; border: 2px solid var(--gold);
    color: var(--gold); border-radius: 8px; padding: 0.4rem 0.8rem;
    font-family: var(--font-utility); font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; cursor: pointer;
  }
  .site-nav { display: none; width: 100%; padding-bottom: 1rem; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.8rem; }
  .site-header__bar { flex-wrap: wrap; }
}

/* ============================================================
   HERO — the masthead's one job: get the email.
   ============================================================ */
.hero {
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(20, 129, 63, 0.35), transparent 60%),
    var(--ink);
  color: var(--paper);
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero__badge { width: clamp(120px, 16vw, 170px); margin: 0 auto 1.6rem; filter: drop-shadow(0 6px 24px rgba(0,0,0,0.5)); }
.hero h1 { color: var(--gold); margin-bottom: 0.4em; }
.hero__dek {
  max-width: 56ch; margin: 0 auto 2rem;
  font-size: clamp(1.1rem, 2vw, 1.3rem); font-style: italic;
  color: var(--paper); opacity: 0.9;
}
.hero__motto {
  font-family: var(--font-utility); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--green);
  display: flex; align-items: center; justify-content: center; gap: 0.8rem;
  margin-bottom: 1.4rem;
}
.hero__motto::before, .hero__motto::after { content: ""; width: 48px; height: 2px; background: var(--gold-deep); }

/* Signup panel */
.signup-panel {
  max-width: 620px; margin: 0 auto;
  background: rgba(244, 237, 220, 0.06);
  border: 1px solid rgba(232, 169, 59, 0.45);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2rem);
}
.signup-panel .signup-note {
  font-family: var(--font-utility); font-size: 0.8rem;
  letter-spacing: 0.04em; opacity: 0.75; margin: 0.9rem 0 0;
}
/* Make common embedded form plugins look at home */
.signup-panel input[type="email"], .signup-panel input[type="text"],
.wall input[type="email"], .wall input[type="text"] {
  width: 100%; padding: 0.9rem 1.1rem; border-radius: 8px;
  border: 2px solid var(--gold-deep); background: var(--paper); color: var(--ink);
  font-family: var(--font-utility); font-size: 1rem; margin-bottom: 0.8rem;
}
.signup-panel input[type="submit"], .signup-panel button[type="submit"],
.wall input[type="submit"], .wall button[type="submit"] {
  font-family: var(--font-utility); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.85rem 1.7rem; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--gold); color: var(--ink); cursor: pointer;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section--dark { background: var(--ink); color: var(--paper); }
.section--green {
  background: linear-gradient(160deg, var(--green-deep), var(--green));
  color: #fff;
}
.section__head { max-width: var(--measure); margin-bottom: 2.2rem; }
.section__head p { font-size: 1.15rem; opacity: 0.85; margin: 0; }

/* Editorial cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.8rem; }
.post-card {
  background: #fffdf6;
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(23, 21, 15, 0.12); }
.post-card__thumb { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.post-card__body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.post-card__meta {
  font-family: var(--font-utility); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--green-deep);
  display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap;
}
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--green-deep); }
.post-card__excerpt { font-size: 1rem; margin: 0; color: var(--ink-soft); }
.post-card__more {
  margin-top: auto; font-family: var(--font-utility); font-size: 0.82rem;
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.badge-premium {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--ink); color: var(--gold);
  font-family: var(--font-utility); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.25rem 0.6rem; border-radius: 999px;
}

/* Media split (YouTube / Podcast) */
.media-split { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 900px) { .media-split { grid-template-columns: 1fr; } }
.media-frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 3px solid var(--gold); background: #000;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}
.media-frame--video { aspect-ratio: 16/9; }
.media-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-frame--embed iframe { position: static; width: 100%; min-height: 152px; display: block; }
.media-copy .btn { margin-top: 1.2rem; margin-right: 0.6rem; }
.media-copy p { opacity: 0.9; }

/* ============================================================
   TIERS
   ============================================================ */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: stretch; }
@media (max-width: 860px) { .tiers { grid-template-columns: 1fr; } }
.tier {
  border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.4rem);
  display: flex; flex-direction: column; gap: 0.4rem; position: relative;
}
.tier--free { background: #fffdf6; border: 2px solid var(--paper-edge); color: var(--ink); }
.tier--premium { background: var(--ink); color: var(--paper); border: 2px solid var(--gold); }
.tier__kicker {
  font-family: var(--font-utility); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.4rem;
}
.tier--free .tier__kicker { color: var(--green-deep); }
.tier--premium .tier__kicker { color: var(--gold); }
.tier__price { font-family: var(--font-display); font-size: 1.5rem; color: inherit; margin: 0.2rem 0 0.8rem; }
.tier ul { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.tier li { padding: 0.55rem 0 0.55rem 1.7rem; position: relative; border-bottom: 1px dashed rgba(120, 110, 80, 0.3); font-size: 1.02rem; }
.tier li:last-child { border-bottom: 0; }
.tier li::before { content: "\2715"; position: absolute; left: 0; top: 0.6rem; font-size: 0.75rem; font-weight: 700; }
.tier--free li::before { color: var(--green); }
.tier--premium li::before { color: var(--gold); }
.tier .btn { align-self: flex-start; margin-top: auto; }
.tier__soon {
  position: absolute; top: -14px; right: 18px;
  background: var(--gold); color: var(--ink);
  font-family: var(--font-utility); font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.35rem 0.8rem; border-radius: 999px; border: 2px solid var(--ink);
}
.tier__rule {
  font-size: 0.92rem; font-style: italic; opacity: 0.8; margin-top: 1rem;
}

/* Countdown */
.countdown { display: flex; gap: 0.9rem; margin: 0.6rem 0 1.4rem; flex-wrap: wrap; }
.countdown__unit {
  min-width: 68px; text-align: center;
  background: rgba(232, 169, 59, 0.12); border: 1px solid rgba(232, 169, 59, 0.5);
  border-radius: 8px; padding: 0.55rem 0.5rem;
}
.countdown__num { font-family: var(--font-display); font-size: 1.7rem; color: var(--gold); line-height: 1; }
.countdown__label { font-family: var(--font-utility); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.75; margin-top: 0.25rem; }

/* ============================================================
   PARTNERS
   ============================================================ */
.partners { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .partners { grid-template-columns: 1fr; } }
.partner-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius); padding: 2rem;
  color: #fff;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.partner-card h3 { color: var(--gold); }
.partner-card p { margin: 0 0 1.2rem; opacity: 0.92; }
.partner-card .btn { align-self: flex-start; margin-top: auto; }

/* ============================================================
   SINGLE / ARCHIVE / PAGES
   ============================================================ */
.entry-header { padding: clamp(2.5rem, 6vw, 4rem) 0 1rem; max-width: var(--measure); margin: 0 auto; }
.entry-header .eyebrow { justify-content: flex-start; }
.entry-meta { font-family: var(--font-utility); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--paper-dim); }
.entry-content { max-width: var(--measure); margin: 0 auto; padding: 1rem 0 3.5rem; }
.entry-content > * { margin-top: 0; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote {
  border-left: 4px solid var(--gold); margin: 1.6em 0; padding: 0.4em 0 0.4em 1.2em;
  font-style: italic; color: var(--ink-soft);
}
.entry-thumb { max-width: var(--wrap); margin: 1.5rem auto 0; padding: 0 clamp(1rem, 4vw, 2.5rem); }
.entry-thumb img { border-radius: var(--radius); width: 100%; }
.archive-header { padding: clamp(2.5rem, 6vw, 4rem) 0 0.5rem; }

/* Premium wall */
.wall {
  position: relative; max-width: var(--measure); margin: 0 auto 3.5rem;
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--gold); border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 2.8rem); text-align: center;
}
.wall::before {
  content: ""; position: absolute; left: 0; right: 0; top: -110px; height: 110px;
  background: linear-gradient(to bottom, rgba(244, 237, 220, 0), var(--paper));
  pointer-events: none;
}
.wall h3 { color: var(--gold); }
.wall p { max-width: 46ch; margin: 0 auto 1.2rem; opacity: 0.9; }
.wall .btn { margin: 0.3rem; }
.gated .entry-content { position: relative; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--ink); color: var(--paper); border-top: 4px solid var(--green); padding: 3rem 0 2rem; }
.site-footer .footer__logo { width: 84px; height: 84px; border-radius: 50%; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--gold); font-size: 1rem; letter-spacing: 0.1em; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; font-size: 0.98rem; }
.site-footer__disclaimer {
  margin-top: 2.2rem; font-size: 0.85rem; line-height: 1.6;
  opacity: 0.6; max-width: 90ch;
}
.site-footer__motto {
  margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(232, 169, 59, 0.3);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--font-utility); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.75;
}

/* Utilities */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; overflow: hidden; position: absolute !important;
}
.aligncenter { margin-left: auto; margin-right: auto; }
.pagination { display: flex; gap: 0.6rem; justify-content: center; padding: 0 0 3rem; font-family: var(--font-utility); }
.pagination .page-numbers {
  padding: 0.5rem 0.9rem; border: 2px solid var(--ink); border-radius: 8px;
  text-decoration: none; color: var(--ink); font-weight: 700;
}
.pagination .page-numbers.current { background: var(--gold); }
