/* ────────────────────────────────────────────────────────────
   Bayit · marketing modules
   Reusable building blocks for any new page (stories, events,
   press, partners, blog, etc). Each module is namespaced and
   uses the same tokens as bm-style.css. Include alongside
   bm-style.css - never instead of it.
   ──────────────────────────────────────────────────────────── */

/* ── M1 · asymmetric editorial hero ──────────────────────── */
.ahero {
  display: grid; grid-template-columns: 1.4fr 1fr;
  min-height: 78vh;
  background: var(--ink); color: var(--cream);
  overflow: hidden; position: relative;
}
.ahero .ahero-image {
  position: relative; overflow: hidden;
  background: var(--ink);
}
.ahero .ahero-image img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(10%) contrast(1.05);
  transform: scale(1.05);
  transition: transform 2.2s cubic-bezier(.2,.6,.2,1);
}
.ahero.in .ahero-image img { transform: scale(1); }
.ahero .ahero-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,17,23,0.15) 0%, rgba(14,17,23,0.55) 100%);
}
.ahero .ahero-text {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(40px, 6vw, 80px);
  background: var(--ink); position: relative;
}
.ahero .ahero-text h1 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(40px, 5vw, 88px);
  letter-spacing: -0.045em; line-height: 1;
  color: var(--cream); margin-bottom: 24px;
  text-wrap: balance;
}
.ahero .ahero-text h1 em {
  font-style: normal; color: var(--brand-light); font-weight: 900;
}
.ahero .ahero-text p {
  font-family: var(--sans); font-size: var(--t-xl);
  line-height: 1.55; color: rgba(251,246,233,0.7);
  max-width: 36ch; text-wrap: pretty;
}
.ahero .ahero-vlabel {
  position: absolute; top: 50%;
  inset-inline-start: 24px; transform: rotate(-90deg);
  transform-origin: left center;
  font-family: var(--sans); font-size: 11.5px; font-weight: 700;
  color: var(--brand-light); letter-spacing: 0.3em;
  text-transform: uppercase; white-space: nowrap;
}
[dir="rtl"] .ahero .ahero-vlabel {
  transform: rotate(90deg); transform-origin: left center;
}
@media (max-width: 900px) {
  .ahero { grid-template-columns: 1fr; min-height: auto; }
  .ahero .ahero-image { aspect-ratio: 4 / 3; }
  .ahero .ahero-vlabel { display: none; }
}

/* ── M2 · vertical timeline ──────────────────────────────── */
.timeline {
  padding: var(--section-py) var(--pad);
  background: var(--paper);
}
.timeline-inner { max-width: var(--max); margin-inline: auto; position: relative; }
.timeline-line {
  position: absolute; top: 0; bottom: 0;
  inset-inline-start: 100px; width: 2px;
  background: linear-gradient(to bottom, var(--brand-light) 0%, var(--brand) 40%, transparent 100%);
  opacity: 0.35;
}
.tl-entry {
  display: grid; grid-template-columns: 92px 1fr; gap: 32px;
  padding: 24px 0;
  position: relative;
}
.tl-entry::before {
  content: ''; position: absolute;
  inset-inline-start: 93px; top: 50px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--brand);
}
.tl-entry .when {
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  color: var(--brand); letter-spacing: 0.1em;
  padding-top: 48px; text-transform: uppercase;
}
.tl-entry .what h3 {
  font-family: var(--display); font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 8px; line-height: 1.15;
  text-wrap: balance;
}
.tl-entry .what h3 em {
  font-style: normal; color: var(--brand); font-weight: 900;
}
.tl-entry .what p {
  font-family: var(--sans); font-size: var(--t-lg);
  color: var(--muted); line-height: 1.6;
  max-width: 60ch; text-wrap: pretty;
}
@media (max-width: 700px) {
  .timeline-line, .tl-entry::before { display: none; }
  .tl-entry { grid-template-columns: 1fr; gap: 8px; }
  .tl-entry .when { padding-top: 0; }
}

/* ── M3 · editorial pullquote ───────────────────────────── */
.pullquote {
  padding: var(--section-py) var(--pad);
  background: var(--paper-2);
  text-align: center;
}
.pullquote-inner { max-width: 1040px; margin-inline: auto; position: relative; }
.pullquote .pq-mark {
  display: block;
  font-family: var(--display); font-size: clamp(140px, 18vw, 240px);
  line-height: 0.7; color: var(--brand-soft);
  font-weight: 900; user-select: none;
  margin-bottom: -28px;
}
.pullquote q {
  display: block; quotes: none;
  font-family: var(--sans);
  font-size: clamp(28px, 3.4vw, 52px);
  font-weight: 500; line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink); text-wrap: balance;
  margin-bottom: 40px;
}
.pullquote q::before, .pullquote q::after { content: ''; }
.pullquote q em {
  font-style: normal; color: var(--brand);
  font-weight: 700;
}
.pullquote .pq-rule {
  width: 60px; height: 2px; background: var(--brand);
  margin: 0 auto 24px;
}
.pullquote .pq-who {
  font-family: var(--sans); font-size: 15px; font-weight: 700;
  color: var(--ink);
}
.pullquote .pq-who span {
  display: block; font-weight: 400; color: var(--muted);
  margin-top: 4px; letter-spacing: 0.04em;
}

/* ── M4 · story-grid (cards with photos) ───────────────── */
.story-section {
  padding: var(--section-py) var(--pad);
  background: var(--paper);
}
.story-section-head {
  max-width: var(--max); margin: 0 auto 48px;
  display: flex; align-items: end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.story-grid {
  max-width: var(--max); margin-inline: auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
@media (max-width: 900px) { .story-grid { grid-template-columns: 1fr; } }
.story-card {
  display: flex; flex-direction: column; gap: 16px;
  cursor: pointer; color: inherit;
  transition: transform .35s ease;
  text-decoration: none;
}
.story-card:hover { transform: translateY(-4px); }
.story-card .sc-img {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3; border-radius: 14px;
  background: var(--paper-2);
}
.story-card .sc-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s cubic-bezier(.2,.7,.1,1);
}
.story-card:hover .sc-img img { transform: scale(1.06); }
.story-card .sc-tag {
  position: absolute; top: 16px; inset-inline-start: 16px;
  background: var(--ink); color: var(--cream);
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.15em;
}
.story-card h3 {
  font-family: var(--display); font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.2; color: var(--ink);
  text-wrap: balance;
  transition: color .25s ease;
}
.story-card:hover h3 { color: var(--brand); }
.story-card .sc-byline {
  font-family: var(--sans); font-size: 13.5px; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.story-card .sc-byline::before {
  content: ''; display: inline-block; width: 12px; height: 1px;
  background: var(--muted-2);
}

/* ── M5 · featured story (hero card) ────────────────────── */
.featured {
  padding: var(--section-py) var(--pad);
  background: var(--paper);
}
.featured-inner { max-width: var(--max); margin-inline: auto; }
.featured-card {
  display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--ink); color: var(--cream);
  border-radius: 24px; overflow: hidden;
  min-height: 520px;
}
.featured-card .fc-img {
  position: relative; overflow: hidden;
  background: var(--paper-2);
}
.featured-card .fc-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.6s cubic-bezier(.2,.6,.2,1);
}
.featured-card:hover .fc-img img { transform: scale(1.04); }
.featured-card .fc-copy {
  padding: clamp(36px, 4vw, 56px);
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
}
.featured-card .fc-num {
  font-family: var(--sans); font-size: 11.5px; font-weight: 700;
  color: var(--brand-light); letter-spacing: 0.25em;
  text-transform: uppercase;
}
.featured-card h2 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(32px, 4vw, 56px);
  letter-spacing: -0.035em; line-height: 1;
  color: var(--cream); margin: 28px 0 18px;
  text-wrap: balance;
}
.featured-card h2 em {
  font-style: normal; color: var(--brand-light); font-weight: 900;
}
.featured-card .fc-excerpt {
  font-family: var(--sans); font-size: var(--t-xl);
  line-height: 1.55; color: rgba(251,246,233,0.78);
  max-width: 44ch; text-wrap: pretty;
}
.featured-card .fc-meta {
  margin-top: 32px;
  display: flex; align-items: center; gap: 14px;
}
.featured-card .fc-meta .ava {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--cream); font-weight: 700; font-size: 16px;
  background: var(--brand); flex: 0 0 auto;
}
.featured-card .fc-meta .who { display: flex; flex-direction: column; }
.featured-card .fc-meta .who strong { font-size: 14.5px; color: var(--cream); }
.featured-card .fc-meta .who span {
  font-family: var(--sans); font-size: 11px;
  color: var(--brand-light); letter-spacing: 0.18em;
  text-transform: uppercase; margin-top: 2px;
}
.featured-card .fc-read {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 28px; font-family: var(--sans); font-weight: 700;
  color: var(--brand-light); text-decoration: none;
  font-size: 14px; letter-spacing: 0.02em;
}
.featured-card .fc-read .arrow {
  direction: ltr; transition: transform .25s ease;
}
.featured-card .fc-read:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .featured-card .fc-read:hover .arrow { transform: translateX(-4px); }
@media (max-width: 900px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-card .fc-img { aspect-ratio: 4 / 3; }
}

/* ── M6 · sticky narrative ──────────────────────────────── */
.sticky-nar {
  padding: var(--section-py) var(--pad);
  background: var(--paper);
}
.sticky-nar-inner {
  max-width: var(--max); margin-inline: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  align-items: start;
}
.sticky-nar .sn-images {
  position: sticky; top: 100px;
  aspect-ratio: 4 / 5;
  border-radius: 18px; overflow: hidden;
  background: var(--paper-2);
}
.sticky-nar .sn-images img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity .8s ease, transform 1.6s ease;
  transform: scale(1.04);
}
.sticky-nar .sn-images img.active { opacity: 1; transform: scale(1); }
.sticky-nar .sn-chapters {
  display: flex; flex-direction: column;
  gap: clamp(80px, 12vw, 160px);
  padding-bottom: 40vh;
}
.sticky-nar .sn-chapter .sn-step {
  font-family: var(--sans); font-size: 11.5px; font-weight: 700;
  color: var(--brand); letter-spacing: 0.22em;
  text-transform: uppercase; margin-bottom: 16px;
}
.sticky-nar .sn-chapter h3 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(28px, 3.4vw, 48px);
  letter-spacing: -0.035em; line-height: 1.05;
  margin-bottom: 16px; text-wrap: balance;
}
.sticky-nar .sn-chapter h3 em {
  font-style: normal; color: var(--brand); font-weight: 900;
}
.sticky-nar .sn-chapter p {
  font-family: var(--sans); font-size: var(--t-xl);
  line-height: 1.55; color: var(--muted);
  max-width: 50ch; text-wrap: pretty;
}
.sticky-nar .sn-chapter p a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.sticky-nar .sn-chapter p a:hover,
.sticky-nar .sn-chapter p a:focus-visible {
  color: var(--brand-ink, var(--brand));
  border-bottom-color: currentColor;
}
@media (max-width: 900px) {
  .sticky-nar-inner { grid-template-columns: 1fr; }
  .sticky-nar .sn-images { position: static; aspect-ratio: 4 / 3; }
}
/* On mobile, hide the swapping image in the mechanic section */
@media (max-width: 640px) {
  .sticky-nar.mechanic .sn-images { display: none; }
}
@media (max-width: 900px) {
  .sticky-nar.mechanic .sn-chapters {
    gap: clamp(40px, 6vw, 64px);
    padding-bottom: 0;
  }
}

/* ── M7 · logo wall ─────────────────────────────────────── */
.logo-wall {
  padding: var(--section-py) var(--pad);
  background: var(--paper-2);
  text-align: center;
}
.logo-wall .lw-head {
  max-width: 720px; margin: 0 auto 48px;
}
.logo-wall .lw-grid {
  max-width: var(--max); margin-inline: auto;
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-strong);
  border-inline-start: 1px solid var(--line-strong);
}
.logo-tile {
  aspect-ratio: 2 / 1;
  display: flex; align-items: center; justify-content: center;
  border-inline-end: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  transition: background .25s ease, color .25s ease;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(14px, 1.3vw, 19px);
  color: var(--muted-2); letter-spacing: -0.005em;
  direction: ltr;
}
.logo-tile:hover { background: var(--paper); color: var(--ink); }
@media (max-width: 900px) { .logo-wall .lw-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── M8 · comparison block ─────────────────────────────── */
.compare {
  padding: var(--section-py) var(--pad);
  background: var(--paper);
}
.compare-inner {
  max-width: var(--max); margin-inline: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.compare-col {
  padding: clamp(28px, 3.5vw, 48px);
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.compare-col.them {
  background: var(--paper-2);
  border-color: var(--line-strong);
}
.compare-col.us {
  background: var(--ink); color: var(--cream);
  border-color: var(--ink);
}
.compare-col h3 {
  font-family: var(--display); font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800; letter-spacing: -0.025em;
  margin-bottom: 28px;
  display: flex; align-items: baseline; gap: 12px;
}
.compare-col h3 em {
  font-style: normal; color: var(--brand-light); font-weight: 900;
}
.compare-col h3 .badge {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  background: var(--paper-3); color: var(--muted);
  letter-spacing: 0.15em; text-transform: uppercase;
}
.compare-col.us h3 .badge { background: rgba(255,255,255,0.08); color: var(--brand-light); }
.compare-col ul { list-style: none; padding: 0; margin: 0; }
.compare-col li {
  padding: 14px 0; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 28px 1fr; gap: 12px;
  align-items: baseline;
  font-family: var(--sans); font-size: var(--t-lg);
  line-height: 1.55; text-wrap: pretty;
}
.compare-col.them li { color: var(--muted); }
.compare-col.us li { border-color: rgba(255,255,255,0.1); }
.compare-col li:last-child { border-bottom: 0; }
.compare-col li .glyph {
  font-family: var(--display); font-size: 20px; font-weight: 900;
  color: var(--muted-2);
}
.compare-col.us li .glyph { color: var(--brand-light); }
@media (max-width: 900px) { .compare-inner { grid-template-columns: 1fr; } }

/* ── M9 · event list ────────────────────────────────────── */
.events {
  padding: var(--section-py) var(--pad);
  background: var(--paper);
}
.events-inner { max-width: var(--max); margin-inline: auto; }
.events-head { margin-bottom: 24px; }
.event-row {
  display: grid; grid-template-columns: 140px 1fr auto;
  gap: 28px; align-items: center;
  padding: 26px 16px;
  margin-inline: -16px;
  border-top: 1px solid var(--line-strong);
  transition: background .2s ease, padding .2s ease;
  cursor: pointer;
  text-decoration: none; color: inherit;
  border-radius: 6px;
}
.event-row:last-child { border-bottom: 1px solid var(--line-strong); }
.event-row:hover { background: var(--paper-2); }
.event-row .ev-date {
  display: flex; flex-direction: column; line-height: 1;
}
.event-row .ev-date .d {
  font-family: var(--display); font-size: clamp(40px, 4.4vw, 56px);
  font-weight: 900; letter-spacing: -0.04em; color: var(--brand);
}
.event-row .ev-date .m {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  color: var(--ink); letter-spacing: 0.22em;
  text-transform: uppercase; margin-top: 8px;
}
.event-row .ev-body h4 {
  font-family: var(--display); font-size: clamp(20px, 2vw, 26px);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.2;
  margin-bottom: 6px;
}
.event-row .ev-body .ev-venue {
  font-family: var(--sans); font-size: 14.5px; color: var(--muted);
}
.event-row .ev-rsvp {
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  padding: 11px 22px; background: var(--ink); color: var(--cream);
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s ease;
}
.event-row:hover .ev-rsvp { background: var(--brand); }
.event-row .ev-rsvp .arrow { direction: ltr; }
@media (max-width: 700px) {
  .event-row { grid-template-columns: 1fr; gap: 10px; }
  .event-row .ev-rsvp { align-self: start; }
}

/* ── M10 · diagonal CTA section ────────────────────────── */
.diag-cta {
  background: var(--ink); color: var(--cream);
  padding: var(--section-py) var(--pad);
  text-align: center;
  position: relative; overflow: hidden;
}
.diag-cta::before, .diag-cta::after {
  content: ''; position: absolute;
  left: -8%; right: -8%; height: 80px;
  background: var(--paper);
}
.diag-cta::before { top: -40px; transform: skewY(-2.5deg); }
.diag-cta::after  { bottom: -40px; transform: skewY(-2.5deg); }
.diag-cta-inner {
  max-width: 820px; margin-inline: auto;
  position: relative;
}
.diag-cta h2 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(36px, 5vw, 72px);
  letter-spacing: -0.04em; line-height: 1.02;
  color: var(--cream); text-wrap: balance;
  margin-bottom: 22px;
}
.diag-cta h2 em {
  font-style: normal; color: var(--brand-light); font-weight: 900;
}
.diag-cta p {
  font-family: var(--sans); font-size: var(--t-xl);
  line-height: 1.55; color: rgba(251,246,233,0.75);
  margin: 0 auto 32px; max-width: 56ch; text-wrap: pretty;
}

/* ── Helpers ────────────────────────────────────────────── */
/* image placeholder when stock URL fails - used inside .fc-img / .sc-img / .ahero-image */
.img-fallback {
  position: absolute; inset: 0;
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand-ink) 60%, var(--ink) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5);
  font-family: var(--display); font-weight: 900;
  font-size: clamp(48px, 10vw, 120px);
  letter-spacing: -0.04em;
}

/* ── print overrides for new modules ───────────────────── */
@media print {
  .ahero, .compare-inner, .featured-card, .sticky-nar-inner, .story-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .story-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .compare-inner { grid-template-columns: 1fr 1fr !important; }
  .sticky-nar .sn-images { position: static !important; }
  .diag-cta::before, .diag-cta::after { display: none !important; }
  .ahero { min-height: auto !important; }
}
