/* Foundation - world-class content composition (not text walls) */

.fw-compose {
  --compose-gap: clamp(2.5rem, 6vw, 4.5rem);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--fw-text);
}

.fw-compose > .fw-chapter + .fw-chapter {
  margin-top: 0;
}

/* ── Chapters ── */
.fw-chapter {
  position: relative;
  padding: var(--compose-gap) 0;
}

.fw-chapter--alt {
  background: color-mix(in srgb, var(--fw-surface-alt) 88%, transparent);
}

.fw-chapter__inner {
  width: min(100% - 2.5rem, 44rem);
  margin-inline: auto;
}

.fw-chapter__inner > h2:first-child {
  font-family: var(--fw-font-display);
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 1.25rem;
  max-width: 18ch;
}

.fw-chapter__inner > h1 {
  font-family: var(--fw-font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.fw-chapter__inner > h3 {
  font-family: var(--fw-font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 500;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}

.fw-chapter__inner > h4,
.fw-chapter__inner > h5,
.fw-chapter__inner > h6 {
  font-family: var(--fw-font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fw-text-muted);
  margin: 1.75rem 0 0.65rem;
}

.fw-chapter__inner > p {
  margin: 0 0 1.15rem;
  color: var(--fw-text);
  max-width: 40rem;
}

.fw-compose-lead {
  font-family: var(--fw-font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem) !important;
  font-weight: 400;
  line-height: 1.55 !important;
  letter-spacing: -0.01em;
  color: var(--fw-text) !important;
  max-width: 36rem !important;
  margin: 0 0 2rem !important;
}

.fw-compose-lead--from-h6 {
  text-transform: none;
  letter-spacing: -0.01em;
  font-weight: 400;
}

/* ── Feature grids (numbered WP stacks) ── */
.fw-feature-grid {
  display: grid;
  gap: 0.85rem;
  margin: 1.75rem 0 0.5rem;
  width: min(100%, 52rem);
}

@media (min-width: 800px) {
  .fw-feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .fw-feature-grid--soft {
    grid-template-columns: repeat(3, 1fr);
  }
}

.fw-feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1rem;
  padding: 1.35rem 1.25rem;
  background: var(--fw-surface);
  border: 1px solid var(--fw-border);
  transition: transform 0.35s var(--fw-ease), box-shadow 0.35s var(--fw-ease), border-color 0.35s var(--fw-ease);
}

.fw-feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--fw-shadow);
  border-color: color-mix(in srgb, var(--fw-deep-crimson) 35%, var(--fw-border));
}

.fw-feature__index {
  font-family: var(--fw-font-display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fw-deep-crimson);
  min-width: 2rem;
  padding-top: 0.15rem;
}

.fw-feature__title {
  font-family: var(--fw-font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 0.45rem;
  line-height: 1.2;
}

.fw-feature__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--fw-text-muted);
}

.fw-feature__text p {
  margin: 0 0 0.5rem;
}

.fw-feature__text p:last-child {
  margin: 0;
}

.fw-feature--soft {
  grid-template-columns: 1fr;
  min-height: 8rem;
}

/* ── Stack rows (lists) ── */
.fw-stack {
  display: flex;
  flex-direction: column;
  margin: 1.5rem 0 2rem;
  border-top: 1px solid var(--fw-border);
}

.fw-stack-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--fw-border);
  align-items: start;
  transition: background 0.25s var(--fw-ease), padding 0.25s var(--fw-ease);
}

.fw-stack-row:hover {
  padding-left: 0.5rem;
  background: color-mix(in srgb, var(--fw-surface-alt) 70%, transparent);
}

.fw-stack-row__n {
  font-family: var(--fw-font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--fw-deep-crimson);
  padding-top: 0.15rem;
}

.fw-stack-row__mark {
  width: 6px;
  height: 6px;
  margin-top: 0.65rem;
  border-radius: 50%;
  background: var(--fw-deep-crimson);
  opacity: 0.7;
}

.fw-stack-row__body {
  font-size: 1rem;
  line-height: 1.65;
  max-width: 40rem;
}

.fw-stack-row__body p {
  margin: 0;
}

.fw-stack-row__body strong {
  font-weight: 600;
  color: var(--fw-text);
}

/* ── Media breaks ── */
.fw-media-break {
  margin: 2rem 0;
  width: 100%;
  max-width: none;
}

.fw-media-break img {
  width: 100%;
  height: auto;
  max-height: min(70vh, 36rem);
  object-fit: cover;
  display: block;
}

/* Full-bleed media: break out of chapter measure on large screens */
@media (min-width: 900px) {
  .fw-chapter__inner > .fw-media-break {
    width: min(100vw - 2.5rem, 68rem);
    margin-left: 50%;
    transform: translateX(-50%);
    max-width: none;
  }

  .fw-chapter__inner > .fw-feature-grid {
    width: min(100vw - 2.5rem, 58rem);
    margin-left: 50%;
    transform: translateX(-50%);
  }
}

/* ── Quote bands ── */
.fw-quote-band {
  margin: 2.5rem 0;
  padding: 0;
  border: 0;
}

.fw-quote-band blockquote {
  margin: 0;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border-left: 3px solid var(--fw-deep-crimson);
  background: color-mix(in srgb, var(--fw-surface-alt) 90%, transparent);
  font-family: var(--fw-font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-style: italic;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* ── Page frame (shared shell) ── */
.fw-page {
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.fw-page__hero {
  position: relative;
  min-height: min(58vh, 28rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: calc(-1 * var(--fw-header-h));
  padding-top: var(--fw-header-h);
}

.fw-page__hero-media {
  position: absolute;
  inset: 0;
}

.fw-page__hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fw-page__hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(20, 12, 10, 0.88) 0%,
    rgba(20, 12, 10, 0.4) 50%,
    rgba(20, 12, 10, 0.15) 100%
  );
}

.fw-page__hero-copy {
  position: relative;
  z-index: 3;
  width: min(100% - 2.5rem, var(--fw-max));
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  color: #fff;
}

.fw-page__hero-copy a,
.fw-page__hero-copy .fw-btn,
.fw-page__hero-copy [class*="-btn"] {
  position: relative;
  z-index: 4;
}

.fw-page__hero-copy .fw-eyebrow,
.fw-page__kicker {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.65rem;
}

.fw-page__hero-copy h1 {
  font-family: var(--fw-font-display);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  max-width: 16ch;
  color: #fff;
}

.fw-page__compose {
  position: relative;
}

/* Related rail at page end */
.fw-page__rail {
  width: min(100% - 2.5rem, 52rem);
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--fw-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fw-page__rail a {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.65rem 1rem;
  border: 1px solid var(--fw-border);
  color: var(--fw-text);
  transition: background 0.25s var(--fw-ease), color 0.25s var(--fw-ease), border-color 0.25s var(--fw-ease);
}

.fw-page__rail a:hover {
  background: var(--fw-deep-crimson);
  border-color: var(--fw-deep-crimson);
  color: #fff;
}

/* ── Brand overrides ── */

/* World - editorial / navy gold */
.theme-world .fw-page__hero-veil {
  background: linear-gradient(to top, rgba(0, 35, 73, 0.92), rgba(0, 35, 73, 0.35) 55%, rgba(0, 35, 73, 0.12));
}
.theme-world .fw-chapter--alt {
  background: color-mix(in srgb, #002349 4%, var(--fw-surface));
}
.theme-world .fw-feature__index,
.theme-world .fw-stack-row__n,
.theme-world .fw-stack-row__mark {
  color: #c29b40;
  background: none;
}
.theme-world .fw-stack-row__mark {
  background: #c29b40;
}
.theme-world .fw-feature:hover {
  border-color: rgba(194, 155, 64, 0.45);
}
.theme-world .fw-page__rail a:hover {
  background: #002349;
  border-color: #002349;
}

/* Israel - operator B/W */
.theme-israel .fw-page__hero {
  min-height: min(48vh, 22rem);
}
.theme-israel .fw-page__hero-veil {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.35));
}
.theme-israel .fw-chapter--alt {
  background: #f4f4f4;
}
/* Dark mode: alt chapters must not stay light gray (white text on #f4f4f4 was unreadable) */
html[data-theme="dark"] .theme-israel .fw-chapter--alt {
  background: color-mix(in srgb, var(--fw-surface-alt) 92%, #000 8%);
  color: var(--fw-text);
}
html[data-theme="dark"] .theme-israel .fw-chapter--alt .fw-chapter__inner > h1,
html[data-theme="dark"] .theme-israel .fw-chapter--alt .fw-chapter__inner > h2,
html[data-theme="dark"] .theme-israel .fw-chapter--alt .fw-chapter__inner > h3,
html[data-theme="dark"] .theme-israel .fw-chapter--alt .fw-chapter__inner > h4,
html[data-theme="dark"] .theme-israel .fw-chapter--alt .fw-chapter__inner > p,
html[data-theme="dark"] .theme-israel .fw-chapter--alt .fw-chapter__inner > li,
html[data-theme="dark"] .theme-israel .fw-chapter--alt .fw-compose-lead {
  color: var(--fw-text);
}
html[data-theme="dark"] .theme-israel .fw-chapter--alt .fw-chapter__inner > h4,
html[data-theme="dark"] .theme-israel .fw-chapter--alt .fw-chapter__inner > h5,
html[data-theme="dark"] .theme-israel .fw-chapter--alt .fw-chapter__inner > h6 {
  color: var(--fw-text-muted);
}
.theme-israel .fw-feature {
  border: 0;
  border-left: 2px solid #000;
  border-radius: 0;
  background: #fff;
}
html[data-theme="dark"] .theme-israel .fw-feature {
  background: #141010;
  border-left-color: #c8b89a;
  color: var(--fw-text);
}
.theme-israel .fw-feature__index {
  color: #8c2020;
}
html[data-theme="dark"] .theme-israel .fw-feature__index {
  color: #c8b89a;
}
.theme-israel .fw-stack {
  border-top-color: #000;
}
html[data-theme="dark"] .theme-israel .fw-stack {
  border-top-color: rgba(255, 255, 255, 0.14);
}
.theme-israel .fw-page__rail a {
  border-color: #000;
}
.theme-israel .fw-page__rail a:hover {
  background: #000;
  color: #fff;
}
html[data-theme="dark"] .theme-israel .fw-page__rail a {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--fw-text);
}
html[data-theme="dark"] .theme-israel .fw-page__rail a:hover {
  background: #fafafa;
  color: #0a0a0a;
}

/* Incubator - product density */
.theme-incubator .fw-page__hero {
  min-height: min(42vh, 20rem);
  background: var(--fw-surface);
  border-bottom: 1px solid var(--fw-border);
}
.theme-incubator .fw-page__hero-media {
  opacity: 0.35;
  filter: grayscale(0.4);
}
.theme-incubator .fw-page__hero-veil {
  background: linear-gradient(90deg, var(--fw-surface) 30%, transparent 80%);
}
.theme-incubator .fw-page__hero-copy {
  color: var(--fw-text);
}
.theme-incubator .fw-page__hero-copy h1,
.theme-incubator .fw-page__kicker {
  color: var(--fw-text);
}
.theme-incubator .fw-page__kicker {
  color: #8c2020;
}
.theme-incubator .fw-feature {
  border-radius: 8px;
  background: var(--fw-surface-alt);
  border-color: var(--fw-border);
}
.theme-incubator .fw-feature__index {
  color: #8c2020;
  font-family: var(--fw-font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.theme-incubator .fw-feature__title {
  font-family: var(--fw-font-sans);
  font-weight: 600;
  font-size: 1rem;
}
.theme-incubator .fw-chapter--alt {
  background: var(--fw-surface-alt);
}

/* New York - sparse luxury */
.theme-newyork .fw-page__hero {
  min-height: min(72vh, 36rem);
}
.theme-newyork .fw-page__hero-veil {
  background: linear-gradient(to top, rgba(28, 25, 22, 0.88), rgba(28, 25, 22, 0.25) 55%, rgba(28, 25, 22, 0.08));
}
.theme-newyork .fw-page__hero-copy h1 {
  font-weight: 400;
  max-width: 14ch;
}
.theme-newyork .fw-chapter {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}
.theme-newyork .fw-chapter--alt {
  background: #f0eeea;
}
.theme-newyork .fw-feature {
  border: 0;
  border-top: 1px solid rgba(124, 114, 98, 0.35);
  background: transparent;
  padding: 1.75rem 0;
}
.theme-newyork .fw-feature:hover {
  transform: none;
  box-shadow: none;
  background: color-mix(in srgb, var(--fw-steel) 6%, transparent);
}
.theme-newyork .fw-feature-grid {
  gap: 0;
  border-bottom: 1px solid rgba(124, 114, 98, 0.35);
}
@media (min-width: 800px) {
  .theme-newyork .fw-feature-grid {
    grid-template-columns: 1fr;
  }
}
.theme-newyork .fw-feature__index {
  color: var(--fw-steel);
}
.theme-newyork .fw-compose-lead {
  font-style: italic;
  max-width: 28rem !important;
}

/* Ukraine - kinetic bands */
.theme-ukraine .fw-page__hero-veil {
  background:
    linear-gradient(to top, rgba(10, 37, 64, 0.92), rgba(10, 37, 64, 0.4) 50%, rgba(10, 37, 64, 0.15)),
    linear-gradient(120deg, rgba(140, 32, 32, 0.2), transparent 55%);
}
.theme-ukraine .fw-page__hero-copy h1 {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}
.theme-ukraine .fw-chapter--alt {
  background: #f4ede0;
}
.theme-ukraine .fw-chapter:nth-child(3n) {
  background: #0a2540;
  color: #f4ede0;
}
.theme-ukraine .fw-chapter:nth-child(3n) .fw-chapter__inner > h2,
.theme-ukraine .fw-chapter:nth-child(3n) .fw-chapter__inner > h3,
.theme-ukraine .fw-chapter:nth-child(3n) .fw-chapter__inner > p,
.theme-ukraine .fw-chapter:nth-child(3n) .fw-compose-lead {
  color: #f4ede0 !important;
}
.theme-ukraine .fw-feature {
  border: 0;
  border-left: 4px solid #8c2020;
  background: #fff;
}
.theme-ukraine .fw-feature:nth-child(even) {
  border-left-color: #0a2540;
  background: #ede4d3;
}
.theme-ukraine .fw-feature__index {
  color: #8c2020;
  font-weight: 700;
}
.theme-ukraine .fw-feature__title {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.theme-ukraine .fw-page__rail a {
  background: #0a2540;
  border-color: #0a2540;
  color: #f4ede0;
}
.theme-ukraine .fw-page__rail a:hover {
  background: #8c2020;
  border-color: #8c2020;
}

/* Hide duplicate page H1 when hero already shows title */
.fw-page .fw-compose .fw-chapter:first-child .fw-chapter__inner > h1:first-child {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* FAQ Q&A list */
.fw-faq-list {
  width: min(100% - 2.5rem, 44rem);
  margin: 0 auto;
  border-top: 1px solid var(--fw-border);
}

.fw-faq-item {
  padding: 1.35rem 0 1.5rem;
  border-bottom: 1px solid var(--fw-border);
}

.fw-faq-item__q {
  font-family: var(--fw-font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 0.65rem;
  line-height: 1.25;
  color: var(--fw-text);
}

.fw-faq-item__a {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--fw-text-muted);
  max-width: 40rem;
}

.fw-faq-item__a p {
  margin: 0 0 0.75rem;
}

.fw-faq-item__a p:last-child {
  margin: 0;
}

.theme-israel .fw-faq-item__q { font-family: var(--fw-font-sans); font-weight: 600; }
.theme-incubator .fw-faq-item { border-color: var(--fw-border); }
.theme-ukraine .fw-faq-item__q { text-transform: uppercase; font-weight: 700; letter-spacing: -0.02em; }
.theme-newyork .fw-faq-item { padding: 1.75rem 0; }
.theme-world .fw-faq-item__q { color: #002349; }

/* Contact: keep measure tight */
.fw-page--contact .fw-chapter__inner,
.fw-compose--contact .fw-chapter__inner {
  max-width: 36rem;
}

@media (prefers-reduced-motion: reduce) {
  .fw-feature:hover {
    transform: none;
  }
}

/* Cloudflare Turnstile — shared contact forms */
.fw-contact-turnstile {
  margin-block: 0.75rem 0.25rem;
  min-height: 65px;
}
.fw-contact-turnstile .cf-turnstile {
  display: inline-block;
}
.fw-contact-turnstile__noscript {
  font-size: 0.875rem;
  opacity: 0.85;
}
