/* ============================================================
   KOSHER HOMES BY VILLATEL — SHARED BODY LIBRARY
   Page-body patterns used by MORE THAN ONE page: containers,
   heroes, split sections, cards, carousel rails, price tables,
   FAQ grids, tick lists. Link this BEFORE the page body CSS.
   Page-specific deltas go in {pagename}assets/css/{page}-body.css.
   ============================================================ */

/* ---------- layout primitives ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap--narrow { max-width: 900px; }
.wrap--mid { max-width: 840px; }
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section--lg { padding: clamp(56px, 8vw, 104px) 0; }
.section--tint { background: var(--bg-tint); }
.section--seafoam { background: var(--seafoam); }
.section--white { background: #fff; }
.section--teal { background: var(--deep-teal); }
.section--teal h2, .section--teal h3 { color: #fff; }
.center { text-align: center; }

.eyebrow {
  display: block;
  font-family: var(--font-body); font-size: 12px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--taupe-ink);
}
/* On Deep Teal the brand taupe is the accessible choice (5.1:1) — keep it there. */
.section--teal .eyebrow, .hero .eyebrow, .band .eyebrow, .card--teal .eyebrow { color: var(--stone-taupe); }
.eyebrow--mist { color: var(--mist-blue); }
.eyebrow--muted { color: var(--fg3); letter-spacing: .2em; }

.h-xl { font-size: clamp(38px, 6vw, 82px); line-height: 1.03; letter-spacing: .02em; }
.h-lg { font-size: clamp(30px, 4vw, 46px); line-height: 1.12; }
.h-md { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.14; }
.h-sm { font-size: clamp(27px, 3.6vw, 42px); line-height: 1.16; }
.h-card { font-family: var(--font-display); font-weight: 400; font-size: 24px; letter-spacing: .01em; line-height: 1.2; margin: 0; }
.h-card--md { font-size: 22px; }
.h-card--sm { font-size: 20px; }

.copy { font-family: var(--font-body); font-size: 16px; line-height: 1.7; color: var(--fg2); }
.copy--lg { font-size: 17px; }
.copy--sm { font-size: 15.5px; }
.copy--dark { color: var(--fg-on-dark-2); }
.copy--fine { font-size: 13px; line-height: 1.55; color: var(--fg3); }
.measure { max-width: 52ch; }
.measure--wide { max-width: 62ch; }
.mt-1 { margin-top: 14px; } .mt-2 { margin-top: 18px; } .mt-3 { margin-top: 26px; } .mt-4 { margin-top: 34px; }
.mb-3 { margin-bottom: 22px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.copy--band { font-size: clamp(16px, 1.5vw, 18px); max-width: 50ch; }

.statement {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(22px, 3vw, 34px); line-height: 1.34; letter-spacing: .01em;
  color: var(--fg1); text-wrap: pretty;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; display: flex; align-items: flex-end; overflow: hidden; min-height: clamp(440px, 62vw, 620px); }
.hero__media, .hero__media img, .hero__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,35,44,.30) 0%, rgba(13,35,44,.08) 40%, rgba(13,35,44,.84) 100%); }
.hero__inner { position: relative; max-width: var(--maxw); margin: 0 auto; width: 100%; padding: clamp(28px, 5vw, 64px) var(--gutter) clamp(48px, 7vw, 84px); }
.hero h1 { color: #fff; margin: 20px 0 0; max-width: 18ch; text-wrap: balance; }
.hero__lede { font-family: var(--font-body); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: rgba(255,255,255,.88); margin-top: 22px; max-width: 52ch; }
.hero .btn-row { margin-top: 32px; }
.crumb { font-family: var(--font-body); font-size: 12.5px; letter-spacing: .08em; color: rgba(255,255,255,.7); }
.crumb a { display: inline-block; padding: 5px 0; }
.crumb a { color: rgba(255,255,255,.7); text-decoration: none; }
.crumb a:hover { color: #fff; }
.crumb span { opacity: .5; }
.note-pill {
  position: absolute; bottom: 12px; right: 12px; z-index: 6;
  background: rgba(21,52,66,.85); color: #fff; font-family: var(--font-body);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: var(--radius-pill); pointer-events: none;
}

/* ---------- band (short image band with copy) ---------- */
.band { position: relative; display: flex; align-items: center; overflow: hidden; min-height: clamp(360px, 44vw, 480px); }
.band__scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,35,44,.86) 0%, rgba(13,35,44,.66) 46%, rgba(13,35,44,.28) 100%); }
.band__inner { position: relative; max-width: var(--maxw); margin: 0 auto; width: 100%; padding: clamp(48px, 7vw, 80px) var(--gutter); }

/* ---------- split (image + copy) ---------- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(28px, 4vw, 56px); align-items: center; }
.split__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.split__media img { width: 100%; height: clamp(280px, 42vw, 440px); object-fit: cover; display: block; }
.split__media--tall img { height: clamp(300px, 44vw, 480px); }
.split__media--square { aspect-ratio: 5 / 4; }
.split__media--square img { height: 100%; }

/* ---------- section head with rail arrows ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.sec-head__copy { max-width: 56ch; }
.rail-nav { display: flex; gap: 10px; }
.rail-btn {
  width: 46px; height: 46px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: #fff; color: var(--deep-teal);
  font-size: 16px; cursor: pointer; transition: background var(--dur) var(--ease-standard);
}
.rail-btn:hover { background: var(--bg-tint); }
.section--teal .rail-btn { border-color: var(--line-dark); background: transparent; color: #fff; }

/* ---------- carousel rail ---------- */
.rail {
  display: flex; gap: 22px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding: 32px 0 10px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* ---------- cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; text-decoration: none;
}
.card:hover { text-decoration: none; }
.card--teal { background: var(--deep-teal); border-color: transparent; }
.card--rail { flex: 0 0 clamp(280px, 80vw, 340px); }
.card--rail-sm { flex: 0 0 clamp(240px, 72vw, 290px); }
.card__media { position: relative; height: 230px; overflow: hidden; }
.card__media--sm { height: 170px; }
.card__media--md { height: 190px; }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 500ms var(--ease-out); }
.card:hover .card__media img { transform: scale(1.03); }
.card__media img.is-dimmed { filter: saturate(.7) brightness(.9); }
.card__body { padding: 24px 26px 28px; }
.card--teal .card__body { padding: 32px 32px 36px; }
.card__tag { font-family: var(--font-body); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg3); }
.card h3 { margin: 8px 0 12px; }
.card p { font-family: var(--font-body); font-size: 15.5px; line-height: 1.62; color: var(--fg2); }
.card--teal p { color: var(--fg-on-dark-2); }
.card__cta {
  font-family: var(--font-body); font-weight: 500; font-size: 12.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--deep-teal);
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 0;
}
.card__cta--muted { color: var(--fg3); }
.badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(13,35,44,.9); color: #fff; font-family: var(--font-body);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: var(--radius-pill);
}

/* ---------- tick lists ---------- */
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ticks--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px 24px; }
.ticks li, .tick {
  font-family: var(--font-body); font-size: 15.5px; line-height: 1.55; color: var(--fg1);
  display: flex; gap: 11px; align-items: baseline;
}
.ticks--dark li { color: var(--fg-on-dark-2); }
.ticks li::before, .tick::before { content: "→"; color: var(--taupe-ink); flex: 0 0 auto; }
.ticks--dark li::before { color: var(--stone-taupe); }

/* ---------- price table ---------- */
.price-table { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 18px; background: #fff; }
.price-row:nth-child(even) { background: var(--bg-tint); }
.price-row__label { font-family: var(--font-body); font-size: 15px; color: var(--fg1); }
.price-row__value { font-family: var(--font-body); font-weight: 500; font-size: 15px; color: var(--deep-teal); text-align: right; }

/* ---------- FAQ grid ---------- */
/* Long, static, always below the fold — skip layout/paint until near the viewport. */
.faq-grid, .price-table { content-visibility: auto; contain-intrinsic-size: auto 480px; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 30px 48px; margin-top: 36px; }
.faq-grid h3 { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.32; letter-spacing: .01em; margin: 0 0 10px; }
.faq-grid p { font-family: var(--font-body); font-size: 16px; line-height: 1.7; color: var(--fg2); }

/* ---------- feature panel (image + list in one card) ---------- */
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.panel__media { position: relative; min-height: 360px; }
.panel__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.panel__body { padding: clamp(32px, 4vw, 52px); }

/* ---------- small-screen readability ----------
   Label and caption tiers read too small on a phone at their desktop size,
   so the whole minor-type tier steps up one notch under 600px. Body copy and
   headings keep their clamped sizes. */
@media (max-width: 600px) {
  .eyebrow { font-size: 12.5px; letter-spacing: .2em; }
  .copy { font-size: 16.5px; line-height: 1.68; }
  .copy--sm { font-size: 16px; }
  .card p, .ticks li, .tick, .faq-grid p { font-size: 16px; }
  .card__tag, .card__cta { font-size: 12.5px; }
  .card__body { padding: 22px 22px 26px; }
  .faq-grid h3 { font-size: 20.5px; }
  .h-card { font-size: 23px; }
  .h-card--md { font-size: 22px; }
  .h-card--sm { font-size: 21px; }
  .price-row__label, .price-row__value { font-size: 15.5px; }
  .sec-head { align-items: flex-start; }
  .rail-nav { display: none; }
}

/* ---------- notice: inline advisory inside a content module ---------- */
.notice {
  font-family: var(--font-body); font-style: italic; font-size: 13px; line-height: 1.6;
  color: var(--fg3); margin: 18px 0 0; max-width: 60ch; text-wrap: pretty;
}
.notice::before { content: "*"; margin-right: 4px; }
.notice--dark { color: var(--fg-on-dark-3); }
