/*
Theme Name: Fin AlpaOne v1
Template: fin
Author: Andrii Khimich
Version: 1.0.0
Description: Dark, minimalist podcast skin for the Fin skeleton theme — hero player, episode list, and a modern editorial news feed.
Text Domain: fin
*/

/* Colors here are variables only (--primary-color, --secondary-color,
   --text-color, --bg-color, --surface-color, --border-color, plus shades
   derived from them via color-mix()) — never a hardcoded value. See
   THEME-DEV.md in the parent theme. Fallback values below match the
   defaults functions.php seeds on activation; the Customizer's own inline
   <style> (printed after this file) always wins in practice. */
:root {
  --primary-color: #f2762e;
  --secondary-color: #d9a441;
  --text-color: #f5f1ea;
  --text-muted: #a9a398;
  --bg-color: #0e0d0c;
  --surface-color: #1a1815;
  --bg-light: #151312;
  --border-color: #2e2a26;

  /* Extra shades, mixed toward the dark background/text — never toward
     white like the parent's --ink-mid, which assumes a light theme. */
  --surface-hover: color-mix(in srgb, var(--surface-color) 85%, var(--text-color));
  --hero-scrim: color-mix(in srgb, var(--bg-color) 70%, transparent);
}

/* ─── Header — transparent, floats over the hero photo on the front page ── */
.header {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
}

body.home .header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: none;
  z-index: 20;
}

.search__overlay {
  background-color: var(--hero-scrim);
}

.search__wrapper {
  background-color: var(--surface-color);
}

.burger__item {
  background-color: var(--text-color);
}

.header__subscribe-btn {
  padding: 10px 24px;
  font-size: 14px;
  white-space: nowrap;
}

/* Menu text color — desktop nav only. The mobile full-screen overlay nav
   uses a fixed dark (--ink) background with light (--paper) text for its
   own contrast, unrelated to this setting, so it's left untouched. */
@media only screen and (min-width: 992px) {
  .header__nav .nav-list li a {
    color: var(--header-menu-text-color, var(--text-color));
  }
}

/* ─── Page/Archive header banner (archive.php) ──────────────────────────────
   The parent's ::before scrim and title color are mixed from --ink/--paper-
   light, Gazette-era aliases that assume a light theme (dark ink, light
   paper). This theme flips that direction, so those aliases produce a
   light scrim + dark title — the opposite of what's needed here. Override
   with our base dark tokens directly, same as .podcast-hero__scrim. */
.page__header-content {
  background-color: var(--surface-color);
}

.page__header-content::before {
  background: color-mix(in srgb, var(--bg-color) 70%, transparent);
}

.page__title {
  color: var(--text-color);
}

/* ─── Footer ─────────────────────────────────────────────────────────────────
   Same --ink/--paper direction problem as .page__header-content above:
   the parent's footer is a deliberately-always-dark band (dark --ink bg,
   light --paper text) — but --ink IS --text-color here, which is already
   light, so the footer flips to a light cream bg with near-invisible dark
   text. Override bg to a real dark token, and re-mix all the --paper-based
   text opacities from --text-color instead, at the same ratios. */
.footer {
  background-color: var(--surface-color);
}

.footer-widgets {
  border-bottom-color: color-mix(in srgb, var(--text-color) 10%, transparent);
}

.footer-widget__title {
  color: color-mix(in srgb, var(--text-color) 90%, transparent);
  border-bottom-color: color-mix(in srgb, var(--text-color) 12%, transparent);
}

.footer-nav li {
  border-right-color: color-mix(in srgb, var(--text-color) 15%, transparent);
}

.footer-nav li a {
  color: color-mix(in srgb, var(--text-color) 60%, transparent);
}

.footer-nav li a:hover {
  color: var(--secondary-color);
}

.footer__copyright {
  color: color-mix(in srgb, var(--text-color) 40%, transparent);
}

.footer__disclaimer {
  color: color-mix(in srgb, var(--text-color) 35%, transparent);
  border-top-color: color-mix(in srgb, var(--text-color) 6%, transparent);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn--pill {
  border-radius: 999px;
  padding: 14px 32px;
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.btn--pill:hover {
  background: color-mix(in srgb, var(--primary-color) 85%, black);
  border-color: color-mix(in srgb, var(--primary-color) 85%, black);
}

/* ─── Podcast Hero ───────────────────────────────────────────────────────── */
.podcast-hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--surface-color);
}

.podcast-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.podcast-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--hero-overlay-color, var(--bg-color)) 70%, transparent) 0%,
    color-mix(in srgb, var(--hero-overlay-color, var(--bg-color)) 20%, transparent) 50%,
    color-mix(in srgb, var(--hero-overlay-color, var(--bg-color)) 80%, transparent) 100%
  );
}

.podcast-hero__inner {
  position: relative;
  z-index: 1;
  padding: 160px 15px 64px;
  max-width: 720px;
}

.podcast-hero__title {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--hero-text-color, var(--text-color));
  margin-bottom: 20px;
}

.podcast-hero__subtitle {
  font-size: var(--text-md);
  color: var(--hero-text-color, var(--text-color));
  max-width: 52ch;
  margin-bottom: 32px;
  line-height: 1.6;
}

.podcast-hero__cta {
  display: inline-flex;
  margin-bottom: 40px;
}

.podcast-hero__player {
  max-width: 480px;
}

.podcast-hero__now-playing {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 12px;
}

.podcast-hero__now-playing-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-color);
}

.podcast-hero__now-playing-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--hero-text-color, var(--text-color));
  text-decoration: none;
}

.podcast-hero__now-playing-title:hover {
  text-decoration: underline;
}

.podcast-hero__now-playing-guest {
  font-size: var(--text-sm);
  color: color-mix(in srgb, var(--hero-text-color, var(--text-color)) 70%, var(--bg-color));
}

/* ─── Podcast Player (shared, sm/lg via modifier) ───────────────────────── */
.podcast-player {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px 20px 8px 8px;
}

.podcast-player__audio {
  display: none;
}

.podcast-player__toggle {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.podcast-player__toggle:hover {
  background: color-mix(in srgb, var(--primary-color) 85%, black);
}

.podcast-player__icon {
  width: 18px;
  height: 18px;
}

.podcast-player__icon-pause {
  display: none;
}

.podcast-player.is-playing .podcast-player__icon-play {
  display: none;
}

.podcast-player.is-playing .podcast-player__icon-pause {
  display: block;
}

.podcast-player__progress {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--border-color);
  cursor: pointer;
  position: relative;
  min-width: 60px;
}

.podcast-player__progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--primary-color);
}

.podcast-player__time {
  flex-shrink: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}

.podcast-player--lg {
  padding: 10px 28px 10px 10px;
  gap: 18px;
}

.podcast-player--lg .podcast-player__toggle {
  width: 56px;
  height: 56px;
}

.podcast-player--lg .podcast-player__icon {
  width: 22px;
  height: 22px;
}

.podcast-player--lg .podcast-player__progress {
  height: 8px;
}

.podcast-player--lg .podcast-player__time {
  font-size: var(--text-sm);
}

/* ─── Podcast List Section ───────────────────────────────────────────────── */
.podcast-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.podcast-list__item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  flex-wrap: wrap;
  transition: background 0.2s;
}

.podcast-list__item:hover {
  background: var(--surface-hover);
}

.podcast-list__cover {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-light);
  display: block;
}

.podcast-list__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podcast-list__cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
}

.podcast-list__cover-fallback .icon {
  width: 28px;
  height: 28px;
}

.podcast-list__info {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.podcast-list__title {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-color);
}

.podcast-list__guest {
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.podcast-list__player-wrap {
  flex: 1 1 280px;
  max-width: 360px;
}

.podcast-list__player-wrap .podcast-player {
  background: transparent;
  border: none;
  padding: 0;
}

.podcast-list__empty {
  color: var(--text-muted);
}

/* ─── Single Episode ─────────────────────────────────────────────────────── */
.podcast-episode__header {
  padding: 48px 0 32px;
  text-align: center;
}

.podcast-episode__cover {
  max-width: 240px;
  margin: 0 auto 24px;
  border-radius: 16px;
  overflow: hidden;
}

.podcast-episode__title {
  font-size: clamp(24px, 4vw, 40px);
  margin-bottom: 12px;
}

.podcast-episode__meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: 28px;
}

.podcast-episode__guest {
  color: var(--secondary-color);
  font-weight: 700;
}

.podcast-episode__player {
  max-width: 480px;
  margin: 0 auto;
}

.podcast-episode__notes {
  padding-bottom: 48px;
}

/* ─── News section reuses .news-card / .posts-list from the parent theme ── */
.news-section .news-card {
  background: var(--surface-color);
}

/* ─── 'tag' / 'spotlight' card styles — this theme's own card-news.php ──── */
.news-card__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-color);
  color: var(--text-color);
  transition:
    background 0.2s,
    color 0.2s;
}

.news-card__tag:hover {
  background: var(--primary-color);
  color: var(--white);
}

.news-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: auto;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--primary-color);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 700;
  transition: background 0.2s;
}

.news-card__cta svg {
  stroke: var(--white);
  flex-shrink: 0;
}

.news-card__cta:hover {
  background: color-mix(in srgb, var(--primary-color) 85%, black);
}

.news-card.news-card--spotlight {
  background-color: var(--text-color);
}

.news-card--spotlight .news-card__title,
.news-card--spotlight .news-card__link {
  color: var(--bg-color);
}

.news-card--spotlight .news-card__expert {
  color: color-mix(in srgb, var(--bg-color) 65%, var(--text-color));
}

.news-card--spotlight:hover .news-card__link {
  color: var(--primary-color);
}

.news-card--spotlight .news-card__tag {
  background: var(--primary-color);
  color: var(--white);
}

.news-card--spotlight .news-card__tag:hover {
  background: color-mix(in srgb, var(--primary-color) 85%, black);
}

/* ─── Newsletter subscribe banner (inspired by orderbriefing.com) ─────────── */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.podcast-subscribe__card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 48px;
  background: linear-gradient(135deg, var(--surface-color) 0%, var(--bg-color) 100%);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.podcast-subscribe__glow {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60%;
  background: radial-gradient(
    circle at 100% 50%,
    color-mix(in srgb, var(--primary-color) 25%, transparent) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.podcast-subscribe__pattern {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  background-image: repeating-linear-gradient(90deg, var(--border-color) 0 1px, transparent 1px 10px);
  opacity: 0.6;
  pointer-events: none;
}

.podcast-subscribe__content {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.podcast-subscribe__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary-color);
  margin-bottom: 14px;
}

.podcast-subscribe__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary-color);
  flex-shrink: 0;
}

.podcast-subscribe__title {
  font-size: clamp(24px, 3.5vw, 36px);
  line-height: 1.2;
  color: var(--text-color);
  margin-bottom: 12px;
}

.podcast-subscribe__title em {
  font-style: italic;
  color: var(--secondary-color);
  font-weight: 400;
}

.podcast-subscribe__subtitle {
  color: var(--text-muted);
  font-size: var(--text-base);
  max-width: 48ch;
}

.podcast-subscribe__form {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.podcast-subscribe__inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.podcast-subscribe__input {
  height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--bg-color) 60%, transparent);
  color: var(--text-color);
  font-size: var(--text-sm);
  min-width: 240px;
}

.podcast-subscribe__input::placeholder {
  color: var(--text-muted);
}

.podcast-subscribe__input:focus {
  outline: none;
  border-color: var(--secondary-color);
}

.podcast-subscribe__submit {
  height: 52px;
  padding: 0 28px;
  background: var(--secondary-color);
  color: var(--bg-color);
  border-color: var(--secondary-color);
  white-space: nowrap;
}

.podcast-subscribe__submit:hover {
  background: color-mix(in srgb, var(--secondary-color) 85%, black);
  border-color: color-mix(in srgb, var(--secondary-color) 85%, black);
}

@media (max-width: 767px) {
  .podcast-subscribe__card {
    padding: 32px 24px;
  }

  .podcast-subscribe__inline-form {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .podcast-subscribe__input {
    min-width: 0;
  }
  .header__subscribe-btn {
    display: none;
  }
}

/* ─── Market Pulse (Section 4 — economic widget) ────────────────────────── */
.market-pulse__eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary-color);
  margin-bottom: 8px;
}

.market-pulse__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.market-pulse__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 24px;
}

.market-pulse__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.market-pulse__value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-color);
}

.market-pulse__change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
}

.market-pulse__change--up {
  color: var(--pulse-positive-color, #4ade80);
}

.market-pulse__change--down {
  color: var(--pulse-negative-color, #f87171);
}

.market-pulse__change--flat {
  color: var(--text-muted);
}

@media (max-width: 991px) {
  .market-pulse__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 479px) {
  .market-pulse__grid {
    grid-template-columns: 1fr;
  }
}

.wpcf7-not-valid-tip {
  position: absolute;
  left: 0;
  top: -22px;
  font-size: 12px;
  color: tomato;
  width: 100%;
}
.screen-reader-response,
.hidden-fields-container {
  display: none;
}

.wpcf7-response-output {
  position: absolute;
  font-size: 12px;
  left: 0;
}
