/* ============================================================
   AT THE SEPHARDI TABLE — Western Sephardi home singing
   Recordings: Jonathan Cohen and family
   Scoped feature styles (sts-*), layered on top of styles.css.
   Palette inherited from styles.css (burgundy / cream / gold).
   ============================================================ */

/* Beit Alef fonts (Itamar Natan / beitalef.com), self-hosted:
   body Hebrew = BA Venezia · display titles + hero = BA Afikoman. */
@font-face {
  font-family: "BA Venezia";
  src: url("assets/fonts/BA-Venezia-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "BA Afikoman";
  src: url("assets/fonts/BAAfikoman-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  --hebrew:         "BA Venezia", "Frank Ruhl Libre", "Source Serif 4", "Times New Roman", serif;
  --hebrew-display: "BA Afikoman", "BA Venezia", "Frank Ruhl Libre", serif;
}

/* ---------------------------------------------------------- HERO */
.sts-hero {
  position: relative;
  margin: 0 0 2.4rem;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(100, 26, 43, 0.22), 0 0 0 1px rgba(100, 26, 43, 0.16);
  isolation: isolate;
  min-height: clamp(23rem, 62vh, 42rem);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.sts-hero__img {
  position: absolute; inset: 0;
  background-position: center 42%;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -2;
}
/* Veil: clear over the top of the painting, darkening only toward the text */
.sts-hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(40, 8, 16, 0) 34%, rgba(40, 8, 16, 0.42) 64%, rgba(33, 6, 13, 0.93) 100%),
    linear-gradient(105deg, rgba(40, 8, 16, 0.36) 0%, rgba(40, 8, 16, 0) 60%);
}
.sts-hero__inner {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2.6rem) clamp(1.4rem, 4vw, 3rem) 0.4rem;
  max-width: 44rem;
}
.sts-hero__credit {
  position: relative; margin: 0; max-width: 54rem;
  padding: 0.55rem clamp(1.4rem, 4vw, 3rem) 1rem;
  font-family: var(--sans); font-size: 0.66rem; line-height: 1.45;
  letter-spacing: 0.02em; color: rgba(255, 248, 239, 0.74);
}
.sts-hero__credit em { font-style: italic; color: rgba(255, 248, 239, 0.9); }
.sts-hero__kicker {
  font-family: var(--sans); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(255, 248, 239, 0.82); margin: 0 0 0.9rem;
}
.sts-hero__he {
  font-family: var(--hebrew-display); direction: rtl;
  font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.15;
  color: #FFF8EF; margin: 0 0 0.5rem; font-weight: 500;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.30);
}
.sts-hero__title {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(1.7rem, 4.4vw, 2.7rem); line-height: 1.12;
  color: #FFF8EF; margin: 0 0 1rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.30);
}
.sts-hero__lede {
  font-family: var(--display); font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.6; color: rgba(255, 248, 239, 0.94); margin: 0; max-width: 38rem;
}

/* ---------------------------------------------------------- INTRO / CREDIT ISLAND */
.sts-intro {
  margin: 0 0 2.6rem;
  padding: 1.7rem clamp(1.2rem, 3vw, 2.3rem);
  background: linear-gradient(180deg, rgba(149, 24, 41, 0.055), rgba(149, 24, 41, 0.02));
  border-left: 3px solid var(--burgundy);
  border-radius: 2px;
  max-width: 64rem;
}
.sts-intro__label {
  font-family: var(--sans); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--burgundy-light); margin: 0 0 0.8rem; display: block;
}
.sts-intro p {
  font-family: var(--display); font-size: 1.04rem; line-height: 1.66;
  color: var(--ink-on-dark); margin: 0 0 0.85em; max-width: 62ch;
}
.sts-intro p:last-child { margin-bottom: 0; }
.sts-intro em { color: var(--burgundy-light); font-style: italic; }
.sts-intro a { color: var(--burgundy-light); text-decoration: underline; text-underline-offset: 2px; }
.sts-intro a:hover { color: var(--burgundy); }

/* ---------------------------------------------------------- SONG GRID */
.sts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1.1rem;
  margin: 1.8rem 0 0;
  counter-reset: sts;
}
.sts-card {
  position: relative; display: flex; flex-direction: column;
  padding: 1.3rem 1.3rem 1.05rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 3px;
  box-shadow: 0 8px 22px rgba(100, 26, 43, 0.06);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.sts-card:hover { border-color: var(--burgundy); transform: translateY(-3px); box-shadow: 0 18px 38px rgba(100, 26, 43, 0.15); }
.sts-card__num {
  counter-increment: sts;
  position: absolute; top: 1rem; right: 1.1rem;
  font-family: var(--display); font-size: 0.82rem; font-style: italic;
  color: var(--burgundy-light); opacity: 0.5;
}
.sts-card__num::before { content: counter(sts, decimal-leading-zero); }
.sts-card__head { display: block; text-decoration: none; color: inherit; }
.sts-card__he {
  font-family: var(--hebrew-display); direction: rtl;
  font-size: 1.74rem; line-height: 1.3; color: var(--burgundy);
  font-weight: 500; margin: 0 0 0.25rem; padding-left: 1.4rem;
}
.sts-card__translit {
  font-family: var(--display); font-style: italic; font-size: 1.14rem;
  color: var(--ink-on-dark); margin: 0 0 0.12rem; line-height: 1.2;
}
.sts-card__head:hover .sts-card__translit { color: var(--burgundy-light); }
.sts-card__en {
  font-family: var(--sans); font-size: 0.79rem; color: var(--ink-dim);
  margin: 0 0 0.7rem; line-height: 1.4;
}
.sts-card__occasion {
  font-family: var(--sans); font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--burgundy-light); margin: 0 0 1rem;
}
.sts-card__foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  gap: 0.6rem; padding-top: 0.75rem; border-top: 1px solid var(--rule);
}
.sts-card__link {
  font-family: var(--sans); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--burgundy-light); text-decoration: none; white-space: nowrap;
}
.sts-card__link:hover { color: var(--burgundy); }
.sts-card__link::after { content: " \2192"; }

/* ---------------------------------------------------------- PLAY BUTTON (inline, index + page) */
.sts-play {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--burgundy); background: transparent; color: var(--burgundy);
  border-radius: 999px; padding: 0.34rem 0.85rem 0.34rem 0.7rem;
  font-family: var(--sans); font-size: 0.63rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase; cursor: pointer;
  transition: background 180ms ease, color 180ms ease; -webkit-appearance: none; appearance: none;
}
.sts-play:hover, .sts-play.is-playing { background: var(--burgundy); color: #FFF8EF; }
.sts-play__icon {
  display: inline-block; width: 0; height: 0;
  border-style: solid; border-width: 5px 0 5px 9px;
  border-color: transparent transparent transparent currentColor;
}
.sts-play.is-playing .sts-play__icon {
  width: 9px; height: 10px; border: 0;
  border-left: 3px solid currentColor; border-right: 3px solid currentColor;
}
.sts-play__label::after { content: "Listen"; }
.sts-play.is-playing .sts-play__label::after { content: "Pause"; }

/* ---------------------------------------------------------- SONG PAGE: HEADER */
.sts-back { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.04em; margin: 0 0 1.4rem; }
.sts-back a { color: var(--burgundy-light); text-decoration: none; }
.sts-back a:hover { color: var(--burgundy); text-decoration: underline; }

.sts-song__occasion {
  font-family: var(--sans); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--burgundy-light); margin: 0 0 0.8rem; display: block;
}
.sts-song__he {
  font-family: var(--hebrew-display); direction: rtl;
  font-size: clamp(2.6rem, 7vw, 4rem); line-height: 1.1;
  color: var(--burgundy); font-weight: 500; margin: 0 0 0.35rem;
}
.sts-song__translit {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem); color: var(--ink-on-dark); margin: 0 0 0.3rem;
}
.sts-song__en {
  font-family: var(--display); font-size: 1.1rem; color: var(--ink-dim);
  font-style: italic; margin: 0 0 1.6rem;
}

/* ---------------------------------------------------------- AUDIO PLAYER CARD */
.sts-player {
  margin: 0 0 2.4rem;
  padding: 1.3rem clamp(1.1rem, 2.5vw, 1.7rem);
  background: linear-gradient(180deg, rgba(100, 26, 43, 0.045), rgba(100, 26, 43, 0.015));
  border: 1px solid var(--rule); border-radius: 4px;
  max-width: 40rem;
}
.sts-player__row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.sts-player audio { width: 100%; min-width: 16rem; flex: 1; height: 40px; }
.sts-player__caption {
  margin: 0.9rem 0 0; font-family: var(--sans); font-size: 0.76rem;
  letter-spacing: 0.02em; color: var(--ink-dim);
}
.sts-player__caption strong { color: var(--burgundy-light); font-weight: 600; }

/* ---------------------------------------------------------- LAYOUT: TEXT + ABOUT */
.sts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.8rem, 4vw, 3.2rem);
  align-items: start;
  margin: 1rem 0 0;
}
@media (max-width: 860px) { .sts-layout { grid-template-columns: 1fr; gap: 2.2rem; } }

.sts-section-label {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--burgundy-light); margin: 0 0 1.2rem;
  padding-bottom: 0.6rem; border-bottom: 1px solid var(--rule);
}

/* ---- parallel text: stacked verses ---- */
.sts-verse { padding: 0 0 1.4rem; margin: 0 0 1.4rem; border-bottom: 1px solid rgba(100, 26, 43, 0.12); }
.sts-verse:last-child { border-bottom: 0; margin-bottom: 0; }
.sts-verse__es {
  font-family: var(--display); font-size: clamp(1.12rem, 2.6vw, 1.34rem);
  line-height: 1.62; color: var(--ink-on-dark); margin: 0 0 0.5rem; font-weight: 500;
}
.sts-verse__he {
  font-family: var(--hebrew); direction: rtl; text-align: right;
  font-size: clamp(1.4rem, 3vw, 1.7rem); line-height: 1.95;
  color: var(--ink-on-dark); margin: 0 0 0.55rem; font-weight: 500;
}
.sts-verse__translit {
  font-family: var(--display); font-style: italic;
  font-size: 1rem; line-height: 1.5; color: var(--burgundy-light); margin: 0 0 0.3rem;
}
.sts-verse__en {
  font-family: var(--display); font-size: 1rem; line-height: 1.55;
  color: var(--ink-on-dark); margin: 0;
}
.sts-text__note {
  margin: 1.4rem 0 0; font-family: var(--sans); font-size: 0.82rem;
  line-height: 1.5; color: var(--ink-dim); font-style: italic;
}

/* ---- about / notes ---- */
.sts-about p {
  font-family: var(--display); font-size: 1.02rem; line-height: 1.68;
  color: var(--ink-on-dark); margin: 0 0 1em;
}
.sts-about p:last-child { margin-bottom: 0; }
.sts-about em { color: var(--burgundy-light); font-style: italic; }
.sts-about .sts-about__meta {
  margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  font-family: var(--sans); font-size: 0.82rem; line-height: 1.6; color: var(--ink-dim);
}
.sts-about__meta strong { color: var(--burgundy-light); font-weight: 600; }

/* optional illustrative figure at the top of the About column (e.g. the Menorah on Lamnatzeaḥ) */
.sts-song__sidefig { margin: 0 0 1.5rem; }
.sts-song__sidefig img {
  display: block; width: 100%; max-width: 18rem; height: auto;
  border-radius: 3px; box-shadow: 0 10px 30px rgba(100, 26, 43, 0.22);
}
.sts-song__sidefig figcaption {
  font-family: var(--sans); font-size: 0.74rem; line-height: 1.5;
  color: var(--ink-dim); font-style: italic; margin: 0.6rem 0 0; max-width: 18rem;
}

/* ---------------------------------------------------------- CREDIT / KZZ STRIP */
.sts-credit {
  margin: 3rem 0 0; padding: 1.8rem clamp(1.3rem, 3vw, 2.4rem);
  background: linear-gradient(180deg, rgba(149, 24, 41, 0.05), rgba(149, 24, 41, 0.02));
  border: 1px solid var(--rule); border-left: 3px solid var(--burgundy); border-radius: 2px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.4rem 2rem; align-items: center;
}
@media (max-width: 680px) { .sts-credit { grid-template-columns: 1fr; } }
.sts-credit__label {
  font-family: var(--sans); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--burgundy-light); margin: 0 0 0.5rem;
}
.sts-credit p { font-family: var(--display); font-size: 1rem; line-height: 1.6; color: var(--ink-on-dark); margin: 0; }
.sts-credit a { color: var(--burgundy-light); }
.sts-credit a:hover { color: var(--burgundy); }
.sts-kzz {
  display: inline-flex; flex-direction: column; text-decoration: none;
  padding: 0.9rem 1.3rem; border: 1px solid var(--burgundy); border-radius: 3px;
  background: #fff; min-width: 13rem; transition: background 180ms, transform 180ms, box-shadow 180ms;
}
.sts-kzz:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(100, 26, 43, 0.16); }
.sts-kzz__kicker { font-family: var(--sans); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--burgundy-light); }
.sts-kzz__name { font-family: var(--display); font-size: 1.05rem; color: var(--burgundy); margin-top: 0.2rem; }
.sts-kzz__sub { font-family: var(--sans); font-size: 0.7rem; color: var(--ink-dim); margin-top: 0.25rem; }

/* ---------------------------------------------------------- prev/next nav ---- */
.sts-pager { display: flex; justify-content: space-between; gap: 1rem; margin: 2.4rem 0 0; flex-wrap: wrap; }
.sts-pager a { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--burgundy-light); text-decoration: none; }
.sts-pager a:hover { color: var(--burgundy); text-decoration: underline; }
.sts-pager__all { font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.68rem; }

/* ---- a singing translation (full poem, e.g. Adon Olam / Yigdal) ---- */
.sts-text__lead {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim);
  margin: 0 0 0.9rem;
}
.sts-singing { margin: 1.9rem 0 0; }
.sts-singing__label {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--burgundy-light);
  margin: 0 0 1.1rem; padding-top: 1.2rem; border-top: 1px solid var(--rule);
}
.sts-singing__stanza {
  font-family: var(--display); font-size: 1.04rem; line-height: 1.6;
  color: var(--ink-on-dark); margin: 0 0 1.15rem;
}
.sts-singing__stanza:last-of-type { margin-bottom: 0; }
.sts-singing__credit {
  font-family: var(--sans); font-size: 0.76rem; letter-spacing: 0.02em;
  color: var(--ink-dim); font-style: italic; margin: 1.3rem 0 0;
  padding-top: 0.9rem; border-top: 1px solid var(--rule);
}

@media (prefers-reduced-motion: reduce) {
  .sts-card, .sts-kzz, .sts-play { transition: none; }
}

/* ============================================================
   SEPHARDIC LITURGICAL CLASSICS (Hazzan Daniel Halfon) — slc-*
   ============================================================ */
.slc-bio { display: grid; grid-template-columns: minmax(0,13rem) minmax(0,1fr); gap: clamp(1.4rem,3vw,2.4rem); align-items: start; margin: 0 0 2.6rem; }
@media (max-width: 680px){ .slc-bio { grid-template-columns: 1fr; max-width: 22rem; } }
.slc-bio__figure { margin: 0; }
.slc-bio__figure img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); border-radius: 3px; box-shadow: 0 12px 30px rgba(100,26,43,0.14); }
.slc-bio__figure figcaption { margin-top: 0.5rem; font-family: var(--sans); font-size: 0.72rem; line-height: 1.45; color: var(--ink-dim); }
.slc-bio__label { font-family: var(--sans); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; color: var(--burgundy-light); margin: 0 0 0.7rem; }
.slc-bio p { font-family: var(--display); font-size: 1.0rem; line-height: 1.66; color: var(--ink-on-dark); margin: 0 0 0.85em; }
.slc-bio p:last-child { margin-bottom: 0; }
.slc-bio em { color: var(--burgundy-light); font-style: italic; }
.slc-bio a { color: var(--burgundy-light); }

.slc-album { margin: 0 0 2.6rem; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; background: #fff; box-shadow: 0 10px 28px rgba(100,26,43,0.08); }
.slc-album__banner { display: block; width: 100%; height: auto; }
.slc-album__body { padding: 1.5rem clamp(1.2rem,3vw,2rem) 1.7rem; }
.slc-album__kicker { font-family: var(--sans); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--burgundy-light); margin: 0 0 0.4rem; }
.slc-album__title { font-family: var(--display); font-style: italic; font-size: clamp(1.5rem,3.4vw,2rem); color: var(--burgundy); margin: 0 0 0.7rem; }
.slc-album p { font-family: var(--display); font-size: 1rem; line-height: 1.62; color: var(--ink-on-dark); margin: 0 0 1rem; max-width: 62ch; }
.slc-buy { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.slc-buy a { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; padding: 0.5rem 1rem; border: 1px solid var(--burgundy); border-radius: 999px; color: var(--burgundy); transition: background 160ms, color 160ms; }
.slc-buy a:hover { background: var(--burgundy); color: #FFF8EF; }

.slc-arch { margin: 1.2rem 0 0; }
.slc-arch__nav { font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.06em; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.slc-arch__nav a { color: var(--burgundy-light); text-decoration: none; font-weight: 700; padding: 0.1rem 0.3rem; }
.slc-arch__nav a:hover { color: var(--burgundy); }
.slc-arch__letter { font-family: var(--display); font-size: 1.3rem; color: var(--burgundy); margin: 1.7rem 0 0.5rem; padding-bottom: 0.3rem; border-bottom: 2px solid var(--rule); font-weight: 600; scroll-margin-top: 1rem; }
.slc-piece { padding: 0.7rem 0; border-bottom: 1px solid rgba(100,26,43,0.10); display: grid; grid-template-columns: minmax(0,16rem) minmax(0,1fr); gap: 0.4rem 1.2rem; align-items: baseline; }
@media (max-width: 640px){ .slc-piece { grid-template-columns: 1fr; } }
.slc-piece__name { font-family: var(--display); font-size: 1.05rem; color: var(--ink-on-dark); }
.slc-piece__name a { color: var(--burgundy); text-decoration: none; border-bottom: 1px solid var(--rule); }
.slc-piece__name a:hover { color: var(--burgundy-light); }
.slc-piece__name small { display: block; font-family: var(--sans); font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--burgundy-light); margin-top: 0.18rem; font-weight: 600; }
.slc-piece__plays { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.slc-mini { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--rule); background: #fff; color: var(--burgundy); border-radius: 999px; padding: 0.24rem 0.72rem 0.24rem 0.58rem; font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.02em; cursor: pointer; transition: background 150ms, color 150ms, border-color 150ms; -webkit-appearance: none; appearance: none; }
.slc-mini:hover, .slc-mini.is-playing { background: var(--burgundy); color: #FFF8EF; border-color: var(--burgundy); }
.slc-mini__icon { display: inline-block; width: 0; height: 0; border-style: solid; border-width: 4px 0 4px 7px; border-color: transparent transparent transparent currentColor; }
.slc-mini.is-playing .slc-mini__icon { width: 7px; height: 8px; border: 0; border-left: 2.5px solid currentColor; border-right: 2.5px solid currentColor; }
@media (prefers-reduced-motion: reduce) { .slc-buy a, .slc-mini { transition: none; } }
