/* ============================================================
   RAFA Family of Companies - Shared Stylesheet
   Pure CSS. No framework. Portable for Lovable handoff.
   ============================================================ */

/* Self-hosted Titillium Web. Ships with the site bundle so the
   brand font renders even when Google Fonts is blocked or slow. */
@font-face {
  font-family: 'Titillium Web';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Titillium-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Titillium Web';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Titillium-SemiBold.ttf') format('truetype');
}
@font-face {
  font-family: 'Titillium Web';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Titillium-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Titillium Web';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/Titillium-Black.ttf') format('truetype');
}

:root {
  /* Brand palette */
  --red: #C8102E;
  --red-dark: #A50C25;
  --red-tint: #F4D6DC;
  --cream: #F7F4EE;
  --white: #FFFFFF;
  --surface-border: #E5DECE;
  --ink: #161616;
  --muted: #5A5A5A;
  --faint: #8C8C8C;
  --rule: #D9D2C4;

  /* Typography */
  --font: 'Titillium Web', -apple-system, Helvetica, Arial, sans-serif;

  /* Spacing */
  --section-pad: clamp(48px, 6vw, 96px);
  --container: 1200px;
  --container-narrow: 820px;
  --gap: clamp(20px, 3vw, 32px);

  /* Radius / shadow */
  --radius-card: 8px;
  --radius-btn: 4px;
  --shadow-sm: 0 1px 2px rgba(22, 22, 22, 0.04);
  --shadow-md: 0 12px 32px rgba(22, 22, 22, 0.08);
  --shadow-lg: 0 24px 60px rgba(22, 22, 22, 0.12);

  --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; }
p { margin: 0; }

/* ---------- Brand top bar ---------- */
.brandbar {
  height: 6px;
  width: 100%;
  background: var(--red);
  position: relative;
  z-index: 60;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: clamp(20px, 5vw, 48px);
  padding-right: clamp(20px, 5vw, 48px);
}
.narrow { max-width: var(--container-narrow); }
.section { padding-top: var(--section-pad); padding-bottom: var(--section-pad); }
.section--tight { padding-top: clamp(36px, 4vw, 64px); padding-bottom: clamp(36px, 4vw, 64px); }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
}
.eyebrow--muted { color: var(--faint); }

.section-head { max-width: 840px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
}
.section-head p {
  margin-top: 16px;
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--muted);
}

.lead { font-size: clamp(18px, 1.8vw, 21px); color: var(--muted); line-height: 1.55; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.btn--primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn--primary:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(200,16,46,.22); }
.btn--secondary { background: transparent; color: var(--red); border-color: var(--red); }
.btn--secondary:hover { background: var(--red); color: #fff; transform: translateY(-1px); }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: var(--cream); border-color: var(--cream); transform: translateY(-1px); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 238, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease, background .3s ease, padding .3s ease;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  transition: height .3s ease;
}
.header--scrolled {
  border-bottom-color: var(--rule);
  box-shadow: 0 4px 20px rgba(22,22,22,.05);
  background: rgba(247, 244, 238, 0.92);
}
.header--scrolled .header__inner { height: 62px; }
.logo img { height: 30px; width: auto; transition: height .3s ease; }
.header--scrolled .logo img { height: 26px; }

.nav { display: flex; align-items: center; gap: 8px; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  position: relative;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__links a.is-active { color: var(--red); }
.nav__cta { margin-left: 10px; }
.nav__cta .btn { padding: 10px 20px; font-size: 14px; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none; border: none;
  padding: 10px;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay nav */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 80px clamp(24px, 8vw, 48px) 48px;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
  visibility: hidden;
}
.mobile-nav.is-open { transform: translateX(0); visibility: visible; }
.mobile-nav a {
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 700;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.mobile-nav a:last-of-type { border-bottom: none; }
.mobile-nav .btn { margin-top: 24px; font-size: 16px; }

/* ---------- Hero (typographic) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(247,244,238,.94) 0%, rgba(247,244,238,.78) 55%, rgba(247,244,238,.96) 100%),
    url('../img/photos/hero_supra.jpg') center 35% / cover no-repeat,
    var(--cream);
  padding-top: clamp(56px, 9vw, 120px);
  padding-bottom: clamp(56px, 9vw, 120px);
}
.hero::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: clamp(160px, 26vw, 420px);
  height: clamp(160px, 26vw, 420px);
  background:
    linear-gradient(135deg, transparent 49.5%, var(--red) 49.5% 100%);
  opacity: .08;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(85% 65% at 18% 35%, rgba(247,244,238,.85) 0%, rgba(247,244,238,.55) 45%, transparent 75%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 980px; }
.hero h1 {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero h1 .em { color: var(--red); }
.hero__sub {
  margin-top: 26px;
  max-width: 680px;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--muted);
  line-height: 1.5;
}
.hero__cta { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 14px; }

/* Interior hero (smaller) */
.hero--interior { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(40px, 6vw, 80px); }
.hero--interior h1 { font-size: clamp(36px, 5vw, 60px); }

/* ---------- Six-layer architecture ---------- */
.layers { display: flex; flex-direction: column; gap: 14px; }
.layer {
  display: grid;
  grid-template-columns: 64px 160px 1fr 200px;
  align-items: center;
  gap: clamp(16px, 2.5vw, 36px);
  background: var(--white);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  padding: clamp(20px, 2.4vw, 30px) clamp(22px, 3vw, 36px);
  transition: transform .2s ease, box-shadow .2s ease;
}
.layer:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.layer__num {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  color: var(--rule);
  line-height: 1;
}
.layer__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: normal;
  line-height: 1.3;
}
.layer__main { min-width: 0; }
.layer__name { font-size: clamp(19px, 2vw, 24px); font-weight: 700; white-space: normal; line-height: 1.2; }
.layer__role { font-size: 16px; color: var(--muted); margin-top: 4px; }
.layer__sub { font-size: 13.5px; color: var(--faint); margin-top: 10px; line-height: 1.5; }
.layer__reach {
  text-align: right;
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--red);
  white-space: normal;
  line-height: 1.35;
}
/* Red-anchored layer (Racing Club, layer 05) */
.layer--red {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.layer--red .layer__num { color: rgba(255,255,255,.4); }
.layer--red .layer__tag { color: rgba(255,255,255,.78); }
.layer--red .layer__role { color: rgba(255,255,255,.9); }
.layer--red .layer__sub { color: rgba(255,255,255,.78); }
.layer--red .layer__reach { color: #fff; }
.layer--red:hover { box-shadow: 0 16px 40px rgba(200,16,46,.3); }

/* ---------- KPI / proof strip ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.kpi {
  background: var(--white);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  padding: 30px 26px 28px;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.kpi::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 5px; background: var(--red);
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kpi__num { font-size: clamp(32px, 4vw, 46px); font-weight: 700; color: var(--red); line-height: 1; letter-spacing: -0.02em; }
.kpi__label { margin-top: 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Family groups (parent + subs) ---------- */
.family-group { margin-bottom: clamp(36px, 5vw, 60px); }
.family-group:last-child { margin-bottom: 0; }

.family-group__parent {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  background: var(--white);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.family-group__parent:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--red); }

.family-group__parent--red { background: var(--red); color: #fff; border-color: var(--red); }
.family-group__parent--red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.family-group__parent--red .family-group__tag { color: rgba(255,255,255,.72); }
.family-group__parent--red .family-group__role { color: rgba(255,255,255,.92); }

.family-group__media {
  min-height: 260px;
  background-size: cover;
  background-position: center;
  background-color: var(--ink);
}
.family-group__media--heat {
  background: #f5f3ee;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12%;
}
.family-group__media--heat img {
  max-width: 78%;
  max-height: 58%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.family-group__body {
  padding: clamp(28px, 3.4vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.family-group__logo {
  display: block;
  height: clamp(34px, 4vw, 52px);
  width: auto;
  max-width: 80%;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 2px;
}
.family-group__logo--composite {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: auto;
  max-width: 100%;
}
.family-group__logo--composite img {
  height: clamp(34px, 4vw, 52px);
  width: auto;
  display: block;
}
.family-group__logo-suffix {
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(11px, 1.1vw, 14px);
  color: #000;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  align-self: flex-end;
  margin-top: 2px;
}
.family-group__tag {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
}
.family-group__name {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.family-group__role {
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--muted);
  line-height: 1.55;
  max-width: 46ch;
}

/* Subcards under each parent */
.family-group__subs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.subcard {
  display: block;
  padding: 22px 22px 24px;
  background: var(--white);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
}
.subcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--red);
}
.subcard__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
}
.subcard__role {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}
.subcard::after {
  content: "\2192";
  position: absolute;
  top: 18px;
  right: 20px;
  color: var(--rule);
  font-size: 16px;
  transition: color .18s ease, transform .18s ease;
}
.subcard:hover::after { color: var(--red); transform: translateX(3px); }

/* Standalone row variant: 3-column grid of equal parents (no subs) */
.family-group--row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.family-group__parent--standalone {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
}
.family-group__parent--standalone .family-group__media {
  min-height: 0;
  aspect-ratio: 16 / 10;
}
.family-group__parent--standalone .family-group__body {
  padding: 22px 24px 26px;
  gap: 8px;
}
.family-group__parent--standalone .family-group__name { font-size: 21px; }
.family-group__parent--standalone .family-group__role { font-size: 14.5px; }
.family-group__parent--standalone .family-group__tag { font-size: 11px; }

@media (max-width: 720px) {
  .family-group__parent { grid-template-columns: 1fr; }
  .family-group__media { min-height: 0; aspect-ratio: 16/10; }
}

/* ---------- Companies grid (legacy, kept for compatibility) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.card {
  background: var(--white);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--rule); }
.card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #161616 center / cover no-repeat;
  overflow: hidden;
}
.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22,22,22,.0) 60%, rgba(22,22,22,.45) 100%);
}
.card__body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex-grow: 1; }
.card__name { font-size: 19px; font-weight: 700; }
.card__role { margin-top: 8px; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.card__role:last-of-type { flex-grow: 1; }
.card__props { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); line-height: 1.7; display: flex; flex-wrap: wrap; gap: 4px 10px; flex-grow: 1; }
.card__props span { white-space: nowrap; }
.card__props span:not(:last-child)::after { content: "\00B7"; margin-left: 10px; color: var(--rule); }

/* Founder photo block */
.founder__media {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #161616 center / cover no-repeat;
  box-shadow: var(--shadow-md);
}
.founder__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22,22,22,0) 50%, rgba(22,22,22,.55) 100%);
}
.founder__caption {
  position: absolute;
  left: 22px; right: 22px; bottom: 18px;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  z-index: 1;
  text-align: center;
}
.card__link {
  margin-top: 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  display: inline-flex; align-items: center; gap: 6px;
}
.card__link .arrow { transition: transform .2s ease; }
.card:hover .card__link .arrow { transform: translateX(4px); }

/* ---------- Founder ---------- */
.founder { background: var(--white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.founder__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.founder h2 { font-size: clamp(26px, 3.4vw, 42px); }
.founder p { margin-top: 20px; font-size: clamp(17px, 1.7vw, 19px); color: var(--muted); line-height: 1.65; }
.founder__mark {
  font-size: clamp(60px, 14vw, 150px);
  font-weight: 900;
  line-height: .82;
  color: var(--cream);
  -webkit-text-stroke: 2px var(--rule);
  letter-spacing: -0.04em;
}

/* ---------- Inquiry CTA strip ---------- */
.inquiry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.inquiry-card {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-card);
  padding: 38px 32px;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.inquiry-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.inquiry-card__tag { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); }
.inquiry-card h3 { margin-top: 10px; font-size: 24px; font-weight: 700; color: #fff; }
.inquiry-card p { margin-top: 12px; font-size: 15.5px; color: rgba(255,255,255,.72); flex-grow: 1; line-height: 1.55; }
.inquiry-card .btn { margin-top: 26px; }

/* ---------- Tagline close ---------- */
.tagline { text-align: center; }
.tagline h2 { font-size: clamp(28px, 4vw, 50px); font-weight: 700; }
.tagline .motto { margin-top: 18px; font-size: clamp(22px, 3vw, 34px); font-weight: 700; color: var(--red); letter-spacing: -0.01em; }

/* ---------- Generic content blocks ---------- */
.prose-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.prose-block h3 { font-size: 20px; margin-bottom: 12px; }
.prose-block h3 .idx { color: var(--red); font-weight: 900; margin-right: 8px; }
.prose-block p { color: var(--muted); font-size: 16px; line-height: 1.65; }

.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.tier {
  background: var(--white);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.tier:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tier__name { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
.tier h3 { margin-top: 8px; font-size: 21px; }
.tier p { margin-top: 12px; font-size: 15px; color: var(--muted); line-height: 1.55; }

/* ---------- Integration map table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--surface-border); border-radius: var(--radius-card); background: var(--white); }
table.imap { width: 100%; border-collapse: collapse; min-width: 760px; }
table.imap th, table.imap td { text-align: left; padding: 18px 20px; vertical-align: top; border-bottom: 1px solid var(--rule); }
table.imap thead th { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); background: var(--cream); }
table.imap tbody tr:last-child td { border-bottom: none; }
table.imap .c-layer { font-weight: 900; color: var(--red); font-size: 18px; width: 70px; }
table.imap .c-entity { font-weight: 700; font-size: 15.5px; white-space: nowrap; }
table.imap .c-reach { font-weight: 700; color: var(--red); font-size: 13px; letter-spacing: .03em; white-space: nowrap; }
table.imap .c-formats { color: var(--muted); font-size: 14.5px; }
table.imap tr.row--red td { background: var(--red); color: #fff; border-bottom-color: var(--red-dark); }
table.imap tr.row--red .c-layer { color: #fff; }
table.imap tr.row--red .c-reach { color: #fff; }
table.imap tr.row--red .c-formats { color: rgba(255,255,255,.85); }

/* ---------- Forms ---------- */
.form-section { background: var(--white); border-top: 1px solid var(--rule); }
.form-card {
  background: var(--cream);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  padding: clamp(28px, 4vw, 48px);
  max-width: 720px;
  margin: 0 auto;
}
.form-card h2 { font-size: clamp(24px, 3vw, 36px); }
.form-card > p { margin-top: 12px; color: var(--muted); }
.form { margin-top: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 700; color: var(--ink); }
.field .req { color: var(--red); margin-left: 2px; }
.field .opt { color: var(--faint); font-weight: 400; font-size: 12.5px; margin-left: 6px; }
.field input, .field select, .field textarea {
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-btn);
  padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,.12);
}
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid {
  border-color: var(--red);
}
.form__actions { margin-top: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form__note { font-size: 13px; color: var(--faint); }
.form__success {
  display: none;
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--red-tint);
  border: 1px solid var(--red);
  border-radius: var(--radius-btn);
  color: var(--red-dark);
  font-weight: 600;
  font-size: 15px;
}
.form__success.is-visible { display: block; }

/* ---------- Press room ---------- */
.empty-state {
  background: var(--white);
  border: 1px dashed var(--rule);
  border-radius: var(--radius-card);
  padding: 48px 32px;
  text-align: center;
  color: var(--muted);
}
.empty-state strong { color: var(--ink); display: block; font-size: 18px; margin-bottom: 8px; }
.link-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.link-list a {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  font-weight: 700;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.link-list a:hover { border-color: var(--red); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.link-list a .arrow { color: var(--red); }
.spokes { display: flex; flex-direction: column; gap: 0; }
.spoke { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.spoke:last-child { border-bottom: none; }
.spoke__name { font-weight: 700; font-size: 17px; }
.spoke__role { color: var(--muted); font-size: 15px; margin-top: 2px; }

/* ---------- Back link ---------- */
.back-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--red); font-size: 15px; }
.back-link:hover { text-decoration: underline; }

/* ---------- Company stub ---------- */
.stub-hero { text-align: center; }
.stub-hero h1 { font-size: clamp(36px, 5.5vw, 64px); font-weight: 900; }
.stub-hero p { margin-top: 18px; max-width: 600px; margin-left: auto; margin-right: auto; font-size: clamp(17px, 1.8vw, 20px); color: var(--muted); }

/* ---------- Entity hero (full-bleed photo + overlay) ---------- */
.entity-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: clamp(360px, 52vw, 560px);
  display: flex;
  align-items: flex-end;
  padding-top: clamp(80px, 12vw, 160px);
  padding-bottom: clamp(48px, 7vw, 88px);
  overflow: hidden;
  isolation: isolate;
}
.entity-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,12,0.25) 0%, rgba(10,10,12,0.65) 55%, rgba(10,10,12,0.92) 100%);
  z-index: 0;
}
.entity-hero > .container { position: relative; z-index: 1; }
.entity-hero .eyebrow,
.entity-hero h1,
.entity-hero p { color: #fff; }
.entity-hero p { color: rgba(255,255,255,0.92); }
.entity-hero.stub-hero { text-align: left; }
.entity-hero.stub-hero p { margin-left: 0; margin-right: 0; max-width: 720px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: clamp(80px,12vw,160px) 0; }
.notfound .code { font-size: clamp(80px, 16vw, 180px); font-weight: 900; color: var(--red); line-height: .9; letter-spacing: -0.03em; }
.notfound h1 { margin-top: 8px; font-size: clamp(26px,3vw,38px); }
.notfound p { margin-top: 14px; color: var(--muted); }
.notfound .btn { margin-top: 28px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.7); padding-top: clamp(48px, 6vw, 80px); padding-bottom: 36px; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(28px, 4vw, 64px); }
.footer__logo img { height: 30px; width: auto; }
.footer__blurb { margin-top: 18px; max-width: 320px; font-size: 15px; line-height: 1.6; }
.footer__social { margin-top: 22px; display: flex; gap: 12px; }
.footer__social a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  color: rgba(255,255,255,.7);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.footer__social a:hover { border-color: var(--red); color: #fff; background: var(--red); }
.footer__col h4 { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-bottom: 16px; }
.footer__col ul li { margin-bottom: 11px; }
.footer__col a { font-size: 15px; color: rgba(255,255,255,.78); transition: color .2s ease; }
.footer__col a:hover { color: #fff; }
.footer__col a.is-cta { color: #fff; font-weight: 700; }
.footer__col a.is-cta:hover { color: var(--red); }
.footer__contact { font-size: 14px; margin-top: 4px; }
.family-expand { margin-top: 4px; }
.family-expand summary {
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s ease;
}
.family-expand summary::-webkit-details-marker { display: none; }
.family-expand summary::after {
  content: "+";
  font-size: 18px;
  line-height: 1;
}
.family-expand[open] summary::after { content: "–"; }
.family-expand summary:hover { color: #fff; }
.family-expand ul { margin-top: 10px; }
.family-expand ul li { margin-bottom: 8px; }
.family-expand ul li a { font-size: 14px; color: rgba(255,255,255,.65); }
.family-expand ul li a:hover { color: #fff; }
.footer__bottom {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--faint);
}
.footer__bottom .motto { color: var(--red); font-weight: 700; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .tiers { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav-toggle { display: flex; }

  .layer { grid-template-columns: 48px 1fr; grid-template-areas: "num main" "num reach"; row-gap: 12px; column-gap: 18px; }
  .layer__tag { grid-column: 2; grid-row: 1; align-self: end; }
  .layer__num { grid-area: num; align-self: start; }
  .layer__main { grid-area: main; }
  .layer__reach { grid-area: reach; text-align: left; }
  /* simpler: stack tag above name inside main on mobile handled by markup order */

  .founder__grid { grid-template-columns: 1fr; gap: 24px; }
  .founder__mark { order: -1; }
  .inquiry-grid { grid-template-columns: 1fr; }
  .prose-cols { grid-template-columns: 1fr; }
  .link-list { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero__cta .btn { width: 100%; }
}

/* Layer mobile: simplify grid to avoid awkward areas */
@media (max-width: 860px) {
  .layer {
    display: block;
    padding: 22px 22px;
  }
  .layer__num { display: inline-block; font-size: 24px; margin-bottom: 6px; }
  .layer__tag { display: block; margin-bottom: 6px; }
  .layer__reach { display: inline-block; margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ===== Per-entity Contact block ===== */
.contact-section { background: var(--ink-50, #f7f7f8); border-top: 1px solid var(--rule); }
.contact-block {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.contact-block h2 {
  font-size: clamp(24px, 3vw, 36px);
  margin-top: 8px;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
  text-align: left;
}
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-item {
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.contact-item__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-item__value {
  display: block;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  word-break: break-word;
}
a.contact-item__value:hover { color: var(--red, #c8102e); }
