/*
Theme Name: Airwave
Theme URI: https://example.com/airwave
Author: Your Name
Description: A podcast and audio magazine theme. Episodes get a play button everywhere, a waveform that fills as they play, and a sticky player that keeps going while listeners browse. Includes a featured-episode hero, a new-episodes carousel, a most-played chart, show tiles, stories, light and dark modes, and one-click demo content with original artwork.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: airwave
Tags: blog, news, entertainment, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --bg: #f7f2f8;
  --surface: #ffffff;
  --surface-2: #efe6f2;
  --text: #1f1027;
  --text-2: #4b3a56;
  --muted: #76687f;
  --line: #e3d7e8;
  --accent: #7a2e8f;
  --accent-ink: #ffffff;
  --play: #ffb347;
  --play-ink: #2a1633;
  --band: #2a1633;
  --band-2: #1d0f24;
  --band-text: #f7eefa;
  --live: #ff5147;
  --wave-off: #d8c9df;
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --w-display: 600;
  --track-display: -0.02em;
  --lh-display: 1.1;
  --radius: 14px;
  --radius-ui: 999px;
  --footer-bg: var(--band-2);
  --footer-text: var(--band-text);
  --footer-muted: #b9a6c4;
  --footer-line: rgba(255,255,255,.12);
  --accent-hover: var(--text);
  --accent-hover-ink: var(--bg);
}
:root[data-theme="dark"] {
  --bg: #170d1c;
  --surface: #211327;
  --surface-2: #2b1a33;
  --text: #f5ecf8;
  --text-2: #d6c6dd;
  --muted: #a594af;
  --line: #3a2746;
  --accent: #d9b8ff;
  --accent-ink: #1f1027;
  --band: #26122e;
  --band-2: #10080f;
  --wave-off: #4a3656;
  --accent-hover: #ffffff;
  --accent-hover-ink: #1f1027;
}

body { font-size: 17px; }
.brand__name { font-size: 1.28rem; font-weight: 700; letter-spacing: -.03em; }
.brand__mark { width: 38px; height: 38px; }
.site-header { border-bottom-color: transparent; box-shadow: 0 1px 0 var(--line); }
.primary-menu > li > a { font-size: .95rem; }
.header-cta { background: var(--band); color: var(--band-text); }
.header-cta:hover { background: var(--play); color: var(--play-ink); }
[data-theme="dark"] .header-cta { background: var(--play); color: var(--play-ink); }

.cat { color: var(--accent); font-weight: 600; font-size: .84rem; }
.section-title { font-size: clamp(1.3rem, 2.3vw, 1.7rem); }
.card__title, .aw-card__title, .aw-row__title, .mini__title { font-size: 1.02rem; line-height: 1.25; }
.card__title { font-size: 1.12rem; }

/* ---------- Play buttons ---------- */
.aw-play {
  --size: 48px;
  display: inline-grid; place-items: center; width: var(--size); height: var(--size); flex: 0 0 auto;
  border: 0; border-radius: 50%; background: var(--play); color: var(--play-ink); cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(42,22,51,.6); transition: transform .15s ease, background-color .15s;
}
.aw-play:hover { transform: scale(1.06); }
.aw-play .icon { width: 20px; height: 20px; grid-area: 1 / 1; }
.aw-play .icon-play { transform: translateX(1px); }
.aw-play .icon-pause, .aw-play.is-playing .icon-play { display: none; }
.aw-play.is-playing .icon-pause { display: block; }
.aw-play--big { width: auto; height: auto; display: inline-flex; gap: .6rem; padding: .95rem 1.5rem .95rem 1.2rem; border-radius: 999px; font-family: var(--font-body); font-weight: 700; font-size: 1rem; }
.aw-play--big .icon { width: 22px; height: 22px; }
.aw-play--big:hover { transform: none; background: #ffc56e; }
.aw-badge { position: absolute; left: 10px; top: 10px; z-index: 1; padding: .25rem .6rem; border-radius: 999px; background: rgba(29,15,36,.72); color: #fff; font-size: .75rem; font-weight: 600; backdrop-filter: blur(4px); }

/* ---------- Waveform ---------- */
.aw-wave { display: flex; align-items: center; gap: 3px; height: 64px; cursor: pointer; }
.aw-wave i { flex: 1 1 0; min-width: 2px; height: calc(var(--h) * 100%); border-radius: 3px; background: var(--wave-off); transition: background-color .2s; }
.aw-wave i.is-on { background: var(--play); }

/* ---------- Hero ---------- */
.aw-hero { position: relative; overflow: hidden; background: var(--band); color: var(--band-text); isolation: isolate; }
.aw-hero__glow { position: absolute; inset: -20%; z-index: -1; background-size: cover; background-position: center; filter: blur(70px) saturate(1.3); opacity: .45; }
.aw-hero__inner { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; padding-block: clamp(40px, 6vw, 84px); }
@media (min-width: 860px) { .aw-hero__inner { grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); } }
.aw-hero__cover { display: block; border-radius: 22px; overflow: hidden; aspect-ratio: 1; box-shadow: 0 40px 80px -30px rgba(0,0,0,.7); max-width: 400px; }
.aw-hero__cover img { width: 100%; height: 100%; object-fit: cover; }
.aw-hero__body { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.aw-hero__show { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; font-weight: 600; font-size: .95rem; color: #d7c4e0; }
.aw-hero__cat { color: var(--play); font-weight: 700; }
.aw-hero__cat:hover { text-decoration: underline; }
.aw-hero__title { font-size: clamp(1.9rem, 4.2vw, 3.3rem); line-height: 1.04; color: #fff; }
.aw-hero__title a:hover { color: var(--play); }
.aw-hero__excerpt { font-size: 1.1rem; line-height: 1.55; color: rgba(247,238,250,.82); max-width: 56ch; }
.aw-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin-top: .3rem; }
.aw-hero__len { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: #e6d7ee; }
.aw-hero__notes { font-weight: 700; text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.aw-hero__notes:hover { color: var(--play); }
.aw-hero .aw-wave { --wave-off: rgba(255,255,255,.22); margin-top: .6rem; }

.aw-listen { background: var(--surface); border-bottom: 1px solid var(--line); }
.aw-listen__inner { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.5rem; min-height: 60px; padding-block: .6rem; }
.aw-listen__label { color: var(--muted); font-size: .92rem; }
.aw-listen ul { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.aw-listen a { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .95rem; }
.aw-listen a:hover { color: var(--accent); }
.aw-listen .icon { width: 18px; height: 18px; }

/* ---------- New episodes carousel ---------- */
.aw-scroll { display: flex; gap: .5rem; }
.aw-track { display: grid; grid-auto-flow: column; grid-auto-columns: min(250px, 72vw); gap: clamp(18px, 2vw, 28px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.aw-card { scroll-snap-align: start; display: flex; flex-direction: column; gap: .85rem; min-width: 0; }
.aw-card__art { position: relative; }
.aw-card__art .media { border-radius: 16px; }
.aw-card__art .aw-play { position: absolute; right: 12px; bottom: 12px; z-index: 2; }
.aw-card__body { display: flex; flex-direction: column; gap: .45rem; }
.aw-card__title a:hover, .aw-row__title a:hover { color: var(--accent); }

/* ---------- Most played + shows ---------- */
.aw-split { padding-top: 0; }
.aw-split__inner { display: grid; gap: clamp(36px, 5vw, 64px); }
@media (min-width: 1024px) { .aw-split__inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } }
.aw-top__list { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.aw-top__list > li { counter-increment: rank; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); align-items: center; gap: .6rem; padding-block: .8rem; border-top: 1px solid var(--line); }
.aw-top__list > li:first-child { border-top: 0; padding-top: 0; }
.aw-top__list > li::before { content: counter(rank); font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--accent); }
.aw-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 1rem; }
.aw-row .media { border-radius: 10px; }
.aw-row__body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.aw-row .aw-play { --size: 42px; box-shadow: none; }
.aw-shows__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.aw-show { position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 1; padding: 1rem; border-radius: 16px; overflow: hidden; color: #fff; isolation: isolate; background: var(--band); }
.aw-show__art { position: absolute; inset: 0; z-index: -2; }
.aw-show__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.aw-show::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(29,15,36,0) 35%, rgba(29,15,36,.85)); }
.aw-show:hover .aw-show__art img { transform: scale(1.05); }
.aw-show__name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.15; }
.aw-show__count { font-size: .85rem; opacity: .85; margin-top: .2rem; }

/* ---------- Stories and call to action ---------- */
.aw-stories { background: var(--surface); border-block: 1px solid var(--line); }
.aw-cta { padding-block: clamp(40px, 6vw, 76px); }
.signup--band { display: grid; gap: 1.5rem; align-items: center; background: var(--band); color: var(--band-text); padding: clamp(28px, 5vw, 56px); border-radius: 28px; position: relative; overflow: hidden; }
@media (min-width: 900px) { .signup--band { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.signup--band::before { content: ""; position: absolute; right: -40px; top: -40px; width: 240px; height: 240px; border-radius: 50%; border: 36px solid var(--play); opacity: .9; }
.signup--band .signup__copy, .signup--band .signup__form, .signup--band .signup__status, .signup--band .signup__admin { position: relative; }
.signup--band .signup__title { font-size: clamp(1.5rem, 3vw, 2.2rem); max-width: 16ch; }
.signup--band .signup__button, .signup--sidebar .signup__button, .signup--footer .signup__button { background: var(--play); color: var(--play-ink); }
.signup--band .signup__button:hover { background: #fff; }
.signup--sidebar { background: var(--band); color: var(--band-text); }
.site-footer .signup { background: rgba(255,255,255,.06); color: var(--band-text); padding: 1.4rem; }
.site-footer .signup__title { font-size: 1.1rem; }

/* ---------- Single episode ---------- */
.aw-episode { margin-bottom: clamp(28px, 4vw, 44px); }
.aw-episode__card { display: grid; gap: clamp(20px, 3vw, 36px); align-items: center; max-width: 760px; margin-inline: auto; padding: clamp(18px, 3vw, 30px); border-radius: 24px; background: var(--band); color: var(--band-text); --wave-off: rgba(255,255,255,.22); }
@media (min-width: 720px) { .aw-episode__card { grid-template-columns: 200px minmax(0, 1fr); } }
.aw-episode__cover img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
.aw-episode__body { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.aw-episode__meta { display: flex; gap: 1.2rem; font-weight: 600; color: #dcc9e6; }
.aw-episode__actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.aw-episode .btn--ghost { color: var(--band-text); }
.aw-episode .btn--ghost:hover { background: var(--band-text); color: var(--band); border-color: var(--band-text); }
.entry-content blockquote { border-left-color: var(--play); }

/* ---------- Sticky player ---------- */
.aw-player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--band-2); color: var(--band-text); box-shadow: 0 -18px 40px -20px rgba(0,0,0,.5); padding-bottom: env(safe-area-inset-bottom, 0px); }
.aw-player__inner { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; grid-template-areas: "cover info toggle close" "bar bar bar bar"; align-items: center; gap: .5rem 1rem; padding-block: .7rem; }
@media (min-width: 900px) { .aw-player__inner { grid-template-columns: 56px minmax(0, 260px) auto minmax(0, 1fr) auto; grid-template-areas: "cover info toggle bar close"; } }
.aw-player__cover { grid-area: cover; width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--band); }
.aw-player__info { grid-area: info; display: flex; flex-direction: column; min-width: 0; }
.aw-player__title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-player__show { font-size: .85rem; color: #b9a6c4; }
.aw-player__toggle { grid-area: toggle; width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--play); color: var(--play-ink); cursor: pointer; }
.aw-player__toggle .icon { width: 20px; height: 20px; grid-area: 1 / 1; }
.aw-player__toggle .icon-pause, .aw-player.is-playing .aw-player__toggle .icon-play { display: none; }
.aw-player.is-playing .aw-player__toggle .icon-pause { display: block; }
.aw-player__bar { grid-area: bar; display: flex; align-items: center; gap: .8rem; }
.aw-player__time { font-size: .8rem; font-variant-numeric: tabular-nums; color: #cdb9d8; min-width: 3.2em; }
.aw-player__seek { flex: 1; accent-color: var(--play); }
.aw-player__close { grid-area: close; border-color: rgba(255,255,255,.2); color: var(--band-text); }
body.has-player { padding-bottom: 140px; }
@media (min-width: 900px) { body.has-player { padding-bottom: 84px; } }

.site-footer { margin-top: 0; }
.site-footer .brand__name { color: var(--band-text); }
