/* ═══════════════════════════════════════════════════════════
   Kesser Shem Tov Publishing — version 2

   The layout grammar is borrowed from airmee.com: one action alone
   in a tinted field, full-bleed plates between sections, statements
   that start at full strength and continue in a muted tone, oversized
   figures, and equal columns with pill links. Everything about the
   register is turned classic — serif for display, wine and gold for
   the flat greys, hairline rules where it had none.
   Self-contained: version 1 does not load this file.
   ═══════════════════════════════════════════════════════════ */

:root {
  --ink:        #241417;
  --ink-mid:    #7d6a68;
  --ink-soft:   #a1908c;
  --burgundy:   #7a1b31;

  --wine-1:     #4a0e16;
  --wine-2:     #380c13;
  --wine-3:     #280910;
  --gold:       #c9a346;
  --gold-lt:    #e6c76c;
  --gold-hi:    #f1c66c;
  --cream:      #f4e9ce;
  --cream-dim:  rgba(244, 233, 206, .74);
  --gold-rule:  rgba(201, 163, 70, .34);

  --paper:      #fbf8f2;
  --paper-2:    #f2ece0;
  --paper-3:    #e9e1d1;
  --rule:       #ddd2bf;

  --display: "Frank Ruhl Libre", Georgia, serif;
  --body:    "Spectral", Georgia, serif;
  --util:    "Archivo", system-ui, sans-serif;

  --gut:  clamp(1.25rem, 5vw, 5.5rem);
  --wide: 82rem;
}

*, *::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: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 clamp(1rem, .95rem + .25vw, 1.1rem)/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--burgundy); text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--wine-2); color: var(--cream); padding: .7rem 1rem; font-family: var(--util); }
.skip:focus { left: 0; }

.he { font-family: var(--display); font-weight: 500; }

.eyebrow {
  margin: 0 0 1.4rem;
  font: 500 .7rem/1 var(--util);
  letter-spacing: .26em; text-transform: uppercase; color: var(--burgundy);
}

/* ── the two-tone statement ─────────────────────────────────
   Airmee's one real signature: the sentence lands at full strength,
   then keeps going in a lighter tone. Serif here instead of grotesque. */
.two-tone {
  margin: 0;
  font: 700 clamp(2rem, 1.1rem + 3.6vw, 4.2rem)/1.12 var(--display);
  letter-spacing: -.022em; color: var(--ink);
  max-width: 24ch;
}
.two-tone span { display: block; color: var(--ink-soft); font-weight: 400; max-width: 26ch; }
.two-tone--sm {
  font: 600 clamp(1.15rem, 1rem + .7vw, 1.5rem)/1.35 var(--display);
  letter-spacing: -.01em; max-width: none;
}
.two-tone--sm span {
  margin-top: .5rem;
  font: 300 1rem/1.62 var(--body); color: var(--ink-mid); max-width: 34ch;
}
.two-tone--dark { color: var(--cream); }
.two-tone--dark span { color: var(--cream-dim); }

/* ── pills ──────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .85em 1.9em;
  border: 1px solid var(--burgundy); border-radius: 999px;
  font: 500 .82rem/1 var(--util);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--burgundy); text-decoration: none; background: transparent;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.pill:hover { background: rgba(122, 27, 49, .07); transform: translateY(-1px); }
.pill--solid { background: var(--burgundy); color: var(--paper); border-color: var(--burgundy); }
.pill--solid:hover { background: var(--wine-1); color: #fff; }
.pill--gold { border-color: var(--gold); color: var(--gold-lt); }
.pill--gold:hover { background: rgba(201, 163, 70, .14); }

/* the hero actions — Airmee's giant lozenge, in gold */
.pill--hero {
  padding: clamp(1rem, 2.2vw, 1.6rem) clamp(1.8rem, 4vw, 3.4rem);
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, rgba(230,199,108,.1), rgba(201,163,70,.03));
  color: var(--gold-lt);
  font: 400 clamp(1rem, .8rem + .9vw, 1.5rem)/1 var(--display);
  letter-spacing: .01em; text-transform: none;
}
.pill--hero:hover { background: rgba(230, 199, 108, .14); color: var(--gold-hi); }
.pill--hero-solid {
  background: linear-gradient(180deg, var(--gold-lt), var(--gold));
  border-color: var(--gold-lt); color: var(--wine-3); font-weight: 500;
  box-shadow: 0 10px 30px -14px rgba(230, 199, 108, .55);
}
.pill--hero-solid:hover { background: var(--gold-hi); color: var(--wine-3); }

/* ── top bar ────────────────────────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 3rem);
  padding: .7rem var(--gut);
  background: rgba(40, 9, 16, .95); backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--gold-rule);
}
.bar__mark { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.bar__mark img { width: 2.5rem; }
.bar__mark span { display: grid; line-height: 1.05; }
.bar__mark b { font: 700 1rem/1 var(--display); color: var(--gold-lt); }
.bar__mark i {
  font: 400 .58rem/1 var(--util); font-style: normal;
  letter-spacing: .3em; text-transform: uppercase; color: rgba(244, 233, 206, .55);
}
/* Airmee stacks a label over a caption in the nav — kept, in serif */
.bar__nav { display: flex; gap: clamp(1rem, 2.5vw, 2.4rem); margin-left: auto; }
.bar__nav a { text-decoration: none; display: grid; line-height: 1.15; }
.bar__nav b { font: 500 .88rem/1.2 var(--display); color: var(--cream); }
.bar__nav i {
  font: 400 .68rem/1.3 var(--util); font-style: normal; color: rgba(244, 233, 206, .5);
}
.bar__nav a:hover b { color: var(--gold-lt); }
.bar__alt {
  flex: none; padding: .5em 1.1em;
  border: 1px solid var(--gold-rule); border-radius: 999px;
  font: 400 .72rem/1 var(--util); color: var(--cream-dim); text-decoration: none;
}
.bar__alt:hover { border-color: var(--gold); color: var(--gold-lt); }
@media (max-width: 60rem) {
  .bar { flex-wrap: wrap; gap: .8rem; }
  .bar__nav { margin-left: 0; width: 100%; gap: 1.2rem; flex-wrap: wrap; }
  .bar__nav i { display: none; }
}

/* ── opening field ──────────────────────────────────────── */
.opening {
  position: relative; text-align: center;
  padding: clamp(3rem, 8vw, 6.5rem) var(--gut) clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(120% 95% at 50% -8%, rgba(132, 31, 45, .55), rgba(0, 0, 0, 0) 62%),
    linear-gradient(var(--wine-1) 0%, var(--wine-2) 62%, var(--wine-3) 100%);
  color: var(--cream);
}
.bsd {
  position: absolute; top: 1rem; right: var(--gut); margin: 0;
  font: 400 .74rem/1 var(--display); color: rgba(230, 199, 108, .7);
}
.opening__logo {
  width: clamp(7.5rem, 13vw, 11.5rem); margin: 0 auto;
  filter: drop-shadow(0 0 30px rgba(230, 199, 108, .22));
}

/* The name in struck gold: a gradient poured through the letterforms, so the
   strokes catch light the way tooling on a cover does. */
.opening__name {
  margin: clamp(.8rem, 2vw, 1.6rem) 0 0;
  font: 900 clamp(3rem, 13vw, 12rem)/.95 var(--display);
  color: var(--gold-lt);
  background: linear-gradient(168deg, #f7e6b0 4%, var(--gold-lt) 34%, var(--gold) 62%, #f3dfa4 88%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 42px rgba(230, 199, 108, .22));
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .opening__name { -webkit-text-fill-color: var(--gold-lt); background: none; }
}

/* hairline with a small lozenge at its centre */
.rule {
  margin: clamp(1.4rem, 3vw, 2.2rem) auto 0;
  width: min(26rem, 62%); height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-rule) 22%, var(--gold-rule) 78%, transparent);
  position: relative;
}
.rule span {
  position: absolute; top: 50%; left: 50%;
  width: .42rem; height: .42rem; margin: -.21rem 0 0 -.21rem;
  background: var(--gold); transform: rotate(45deg);
}

.pasuk { margin: clamp(1.6rem, 3.5vw, 2.6rem) auto 0; max-width: 48rem; }
.pasuk .he {
  margin: 0; font-size: clamp(1.15rem, 2vw, 1.8rem); line-height: 1.5; color: var(--cream);
}
.pasuk figcaption { margin-top: .7rem; font-size: .95rem; font-style: italic; font-weight: 300; color: var(--cream-dim); }
.pasuk figcaption span {
  display: block; margin-top: .45rem;
  font: 400 .66rem/1 var(--util); font-style: normal;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gold-lt);
}

.opening__lede {
  max-width: 60ch; margin: clamp(1.6rem, 3.5vw, 2.6rem) auto 0;
  font-weight: 300; font-size: clamp(1.02rem, 1.35vw, 1.28rem); line-height: 1.66;
  color: var(--cream-dim);
}
.opening__actions {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap;
}

/* ── full-bleed plate ─────────────────────────────────────
   The renders arrive as hard rectangles. A mask fades their own alpha at the
   edges, so the photograph dissolves into the field instead of being pasted
   onto it — and the band itself melts down into the paper below. */
.plate {
  position: relative; margin: 0;
  background: var(--wine-3);
  isolation: isolate;
}
.plate img {
  width: 100%;
  -webkit-mask-image:
    linear-gradient(to right,  transparent, #000 7%, #000 93%, transparent),
    linear-gradient(to bottom, transparent, #000 6%, #000 88%, transparent);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(to right,  transparent, #000 7%, #000 93%, transparent),
    linear-gradient(to bottom, transparent, #000 6%, #000 88%, transparent);
          mask-composite: intersect;
}
.plate::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 22%;
  background: linear-gradient(to bottom, rgba(40, 9, 16, 0), var(--paper));
  pointer-events: none;
}

/* ── statement + figures ────────────────────────────────── */
.statement { padding: clamp(3.5rem, 8vw, 7rem) var(--gut) clamp(3rem, 6vw, 5rem); max-width: var(--wide); margin: 0 auto; }
.figures {
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2.5rem;
}
.figures div { margin: 0; }
.figures dt {
  font: 700 clamp(3.5rem, 2rem + 6vw, 7rem)/.9 var(--display);
  letter-spacing: -.04em; color: var(--burgundy);
}
.figures dd {
  margin: .7rem 0 0;
  font: 300 1rem/1.4 var(--body); color: var(--ink-mid);
}

/* ── three columns ──────────────────────────────────────── */
.columns {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  border-top: 1px solid var(--rule);
}
.columns article {
  padding: clamp(2.2rem, 4vw, 3.4rem) clamp(1.4rem, 3vw, 2.6rem) clamp(3rem, 5vw, 4rem);
  background: var(--paper-2);
  border-right: 1px solid var(--rule);
}
.columns article:nth-child(2) { background: var(--paper-3); }
.columns article:last-child { border-right: 0; }
.columns__label {
  margin: 0 0 clamp(3rem, 6vw, 5rem);
  font: 400 .7rem/1 var(--util);
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft);
}
.columns__label b {
  font: 600 .92rem/1 var(--display);
  letter-spacing: .02em; text-transform: none; color: var(--burgundy);
}

/* ── the library ────────────────────────────────────────── */
.library { padding: clamp(3.5rem, 8vw, 7rem) 0 0; }
.library__intro { padding: 0 var(--gut) clamp(2.5rem, 5vw, 4rem); max-width: var(--wide); margin: 0 auto; }

.work {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--gut);
  border-top: 1px solid var(--rule);
}
.work--flip .work__plate { order: 2; }
@media (max-width: 58rem) {
  .work { grid-template-columns: 1fr; }
  .work--flip .work__plate { order: 0; }
}
/* Each book floats on the page: no panel behind it, just a faint warm pool of
   light, with the render's dark surround masked away at the edges. */
.work__plate { position: relative; margin: 0; }
.work__plate::before {
  content: ''; position: absolute; inset: 6%;
  background: radial-gradient(closest-side, rgba(122, 27, 49, .09), transparent 78%);
  pointer-events: none;
}
.work__plate img {
  width: 100%; position: relative;
  -webkit-mask-image:
    linear-gradient(to right,  transparent, #000 11%, #000 89%, transparent),
    linear-gradient(to bottom, transparent, #000 7%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(to right,  transparent, #000 11%, #000 89%, transparent),
    linear-gradient(to bottom, transparent, #000 7%, #000 90%, transparent);
          mask-composite: intersect;
}

/* RTL keeps the character order; the block still starts at the column edge
   so the Hebrew sits directly over its English title. */
.work__he {
  margin: 0; text-align: left;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem); color: var(--burgundy); line-height: 1.3;
}
.work__body h3 {
  margin: .3rem 0 .4rem;
  font: 700 clamp(1.8rem, 1.2rem + 2vw, 2.9rem)/1.1 var(--display);
  letter-spacing: -.02em;
}
.work__edition {
  margin: 0 0 1.2rem;
  font: 400 .72rem/1.4 var(--util);
  letter-spacing: .18em; text-transform: uppercase; color: var(--burgundy);
}
.work__copy { margin: 0; font-weight: 300; color: var(--ink-mid); max-width: 44ch; }

.work__vols { margin: 1.6rem 0 0; padding: 0; list-style: none; display: grid; gap: .1rem; }
.work__vols li {
  display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap;
  padding: .75rem 0; border-top: 1px solid var(--rule);
}
.work__vols li:last-child { border-bottom: 1px solid var(--rule); }
.work__name { font: 600 1.02rem/1.3 var(--display); }
.work__fmt {
  font: 400 .68rem/1.4 var(--util);
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
}
.work__links { margin-left: auto; display: flex; gap: .9rem; }
.work__links a {
  font: 500 .76rem/1 var(--util); color: var(--burgundy); text-decoration: none;
  border-bottom: 1px solid rgba(122, 27, 49, .3); padding-bottom: 2px;
}
.work__links a:hover { border-bottom-color: var(--gold); }

/* ── dedicate ───────────────────────────────────────────── */
.patron {
  padding: clamp(3.5rem, 8vw, 7rem) var(--gut);
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(201, 163, 70, .16), transparent 60%),
    linear-gradient(175deg, var(--wine-1), var(--wine-3));
  color: var(--cream);
}
.patron__intro { max-width: var(--wide); margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); }
.patron .eyebrow { color: var(--gold-lt); }

.waiting {
  max-width: var(--wide); margin: 0 auto; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--gold-rule); border: 1px solid var(--gold-rule);
}
@media (max-width: 64rem) { .waiting { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 40rem) { .waiting { grid-template-columns: 1fr; } }
.waiting li { background: linear-gradient(175deg, var(--wine-1), var(--wine-3)); }
.waiting li > a, .waiting li > :not(a) { display: block; padding: clamp(1.4rem, 3vw, 2.1rem); }
.waiting li > a { text-decoration: none; height: 100%; transition: background .25s ease; }
.waiting li > a:hover { background: rgba(201, 163, 70, .08); }
.waiting .he { margin: 0; font-size: 1.45rem; color: var(--gold-lt); line-height: 1.4; }
.waiting h3 { margin: .5rem 0 .2rem; font: 700 1.2rem/1.2 var(--display); color: var(--cream); }
.waiting .who {
  margin: 0; font: 400 .68rem/1.5 var(--util);
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.waiting .why { margin: .8rem 0 0; font-size: .93rem; font-weight: 300; color: rgba(244, 233, 206, .72); }

/* each waiting sefer now shows its real cover and links to its sponsor page */
.waiting__cover { margin: 0 0 1.1rem; }
.waiting__cover img {
  width: min(11rem, 60%); margin: 0 auto;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
  border-radius: 2px;
}
.waiting__go {
  margin: 1rem 0 0;
  font: 500 .74rem/1 var(--util);
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold-lt);
}
.waiting li > a:hover .waiting__go { color: var(--gold-hi); }
.patron__cta { max-width: var(--wide); margin: clamp(2rem, 4vw, 3rem) auto 0; }

/* ── suggest ────────────────────────────────────────────── */
.suggest {
  padding: clamp(3.5rem, 8vw, 7rem) var(--gut);
  max-width: calc(var(--wide) + 2 * var(--gut)); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
@media (max-width: 56rem) { .suggest { grid-template-columns: 1fr; } }
.suggest__form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin: 0; }
.field { margin: 0; grid-column: 1 / -1; display: grid; gap: .4rem; }
.field--half { grid-column: span 1; }
@media (max-width: 34rem) { .field--half { grid-column: 1 / -1; } }
.field label {
  font: 500 .7rem/1 var(--util);
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mid);
}
.field label span { text-transform: none; letter-spacing: .02em; opacity: .7; font-style: italic; }
.field input, .field textarea {
  width: 100%; padding: .75rem .85rem;
  border: 1px solid var(--rule); border-radius: 2px;
  background: #fff; color: var(--ink); font: 400 1rem/1.5 var(--body);
}
.field input:focus, .field textarea:focus { border-color: var(--burgundy); }
.field textarea { resize: vertical; }
.field--submit { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.field__note { font-size: .88rem; font-style: italic; color: var(--ink-mid); }

/* ── footer ─────────────────────────────────────────────── */
.foot {
  padding: clamp(3rem, 6vw, 4.5rem) var(--gut);
  background: linear-gradient(var(--wine-2), var(--wine-3));
  border-top: 1px solid var(--gold-rule);
  color: var(--cream-dim); text-align: center;
}
.foot__mark { width: clamp(7rem, 15vw, 9rem); margin: 0 auto 1.3rem; }
.foot .he { margin: 0; font-size: 1.6rem; color: var(--gold-lt); }
.foot__line { margin: 1rem 0 0; font-weight: 300; }
.foot__line a, .foot__fine a { color: var(--gold-lt); }
.foot__fine {
  margin: 1.6rem 0 0;
  font: 400 .7rem/1.6 var(--util); letter-spacing: .06em; color: rgba(244, 233, 206, .5);
}
