/* ────────────────────────────────────────────
   TOP EXPERTS
   Uses --sans, --line, --accent from style.css.
   .badge / .badge-row base rules live in custom.css.
   ════════════════════════════════════════════ */

.experts {
	position: relative;
	overflow: hidden;
	background: #c9481c;
	isolation: isolate;
}

.experts__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	/* Lumart, 20 Nov: orange silk background; the dark wash keeps the white heading readable on its pale top. */
	/* Lumart, 27 Nov: new orange waves image. Lumart, 20 Nov 09:15: his terracotta folds image, no overlay; only a soft
	   fade from the page colour at the top so the section flows in from above. */
	/* Lumart, 27 Nov 09:03: picture darker, same seamless fade. The dark wash sits under the page-colour fade and only
	   builds up where the fade ends, so the top still melts into the bone white. */
	background: linear-gradient(180deg, var(--bg) 0%, rgba(251, 250, 248, 0.6) 14%, rgba(251, 250, 248, 0) 34%),
      linear-gradient(180deg, rgba(40, 8, 0, 0) 18%, rgba(40, 8, 0, 0.4) 48%, rgba(40, 8, 0, 0.42) 100%),
      url("../images/experts-bg.webp?v=2") center bottom / cover no-repeat;
}

.experts__inner {
	position: relative;
	z-index: 1;
	width: min(1240px, 92vw);
	margin: 0 auto;
	padding: clamp(72px, 10vh, 120px) 0;
	text-align: center;
}

.experts .badge {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.experts__title {
	font-family: var(--sans);
	font-weight: 500;
	font-size: clamp(30px, 3.6vw, 52px);
	letter-spacing: -0.02em;
	color: #fff;
	margin: clamp(24px, 3vh, 36px) 0 18px;
	text-wrap: balance;
}

.experts__sub {
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.55;
	color: #fff; /* solid white for readability (Lumart, 12 Nov) */
	max-width: 62ch;
	margin: 0 auto clamp(40px, 5vh, 56px);
	text-wrap: pretty;
}

/* Grid is built for exactly 4 columns — matches the 4-max repeater cap
   set in ACF, so this never has to account for a 5th card. */
.expert-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
}

.expert {
	position: relative;
	margin: 0;
	/* 295 × 395 — the exact ratio the client is asked to export images at,
	   so cards line up edge-to-edge with no letterboxing or cropping. */
	aspect-ratio: 295 / 395;
	border-radius: 14px;
	overflow: hidden;
	background: #262626;
}

.expert__img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: center;
}

.expert__cap {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 20px;
	text-align: left;
	pointer-events: none;
	/* Darker under the text since the headshots (Dylan, 3 Dec): the embroidered logo and name on the
	   scrubs sat right behind the role and made it hard to read. */
	padding-top: 40px;
	/* Lumart, 3 Dec 15:01: text and fade a bit lower (less room under the role). */
	padding-bottom: 8px;
	background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.8) 45%, rgba(0, 0, 0, 0.4) 75%, transparent 100%);
}

.expert__name {
	font-family: var(--sans);
	font-weight: 600;
	font-size: 16px;
	color: #fff;
}

.expert__role {
	font-family: var(--sans);
	font-size: 13.5px;
	color: rgba(255, 255, 255, 0.75);
	margin-top: 4px;
	/* Lumart, 3 Dec: every card's name and role start at the same height, so a
	   role always takes two lines' room (one-line roles leave the second empty). */
	line-height: 1.4;
	min-height: 2.8em;
}

/*
 * Phones.
 * ≤860px: 2 columns, and the phone heading size shared by every homepage
 * section.
 * ≤480px: still 2 columns, with a tighter gap and a smaller caption so
 * names fit.
 */
@media (max-width: 860px) {
	.expert-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.experts__title {
		font-size: clamp(31px, 8.6vw, 40px);
		line-height: 1.12;
	}
}

@media (max-width: 480px) {
	.expert-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.expert {
		border-radius: 12px;
	}

	.expert__cap {
		padding: 28px 12px 6px;
	}

	.expert__name {
		font-size: 14px;
		line-height: 1.25;
	}

	.expert__role {
		font-size: 12px;
		line-height: 1.3;
		margin-top: 3px;
	}
}
/* Monogram card until a real headshot exists (Lumart, 12 Nov: show the section;
   no stock photos under real doctors' names). */
.expert__mono {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	background:
		radial-gradient(120% 80% at 30% 20%, rgba(239, 108, 35, 0.22), transparent 60%),
		linear-gradient(160deg, #2c2c2e 0%, #161617 100%);
}
.expert__mono span {
	font-family: var(--mono, monospace); font-size: clamp(34px, 4vw, 56px); font-weight: 500;
	letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.86);
	padding-bottom: 18%;
}

/* Lumart, 13 Nov (desktop): the subheading uses the same Superpower-style
   body text as the Home photo cards (20px, 450, 1.45). */
@media (min-width: 861px) {
	.experts__sub { font-size: 20px; line-height: 1.45; font-weight: 450; max-width: 640px; text-wrap: balance; }
}

/* Lumart, 20 Nov 08:53: the orange runs down through the space the dark
   connector strip used to take, and the connector line sits on top of it.
   (custom.css sets the strip to clamp(40px, 6vh, 64px) and loads later, so these use body to win.) */
body .experts:has(+ .conn-a) { padding-bottom: clamp(40px, 6vh, 64px); }
body .experts + .conn-a { background: transparent; margin-top: calc(-1 * clamp(40px, 6vh, 64px)); z-index: 2; }

/* The new image is near-white at the top, so the heading, line and badge
   above the cards switch to dark ink (white would disappear there). */
.experts { background: var(--bg); }
.experts .experts__title { color: var(--ink); }
.experts .experts__sub { color: var(--ink-soft); }
.experts .badge { background: rgba(12, 12, 13, 0.05); border-color: rgba(12, 12, 13, 0.14); color: var(--ink); }
@media (min-width: 901px) { .experts .experts__sub { color: #fff; text-shadow: 0 1px 14px rgba(140, 40, 5, 0.45); } } /* Lumart, 20 Nov 09:18: white subheading on desktop */
/* Lumart, 20 Nov 09:26: white heading on desktop. The picture is lifted a
   little (its pale top runs above the section) so the orange sits behind the
   heading and the white reads; the fade from the page still blends the top. */
@media (min-width: 901px) {
  .experts__bg { top: -22%; background: linear-gradient(180deg, var(--bg) 12%, rgba(251, 250, 248, 0.85) 22%, rgba(251, 250, 248, 0.55) 32%, rgba(251, 250, 248, 0.25) 42%, rgba(251, 250, 248, 0) 54%), linear-gradient(180deg, rgba(40, 8, 0, 0) 30%, rgba(40, 8, 0, 0.4) 62%, rgba(40, 8, 0, 0.42) 100%), url("../images/experts-bg.webp?v=2") center bottom / cover no-repeat; }
  .experts .experts__title { color: #fff; text-shadow: 0 1px 18px rgba(140, 40, 5, 0.4); }
}

/* Lumart, 27 Nov 10:30: the same background as the genetics page's "One DNA sample" section: its burnt orange to
   deep brown gradient (genetic-testing/page.css .orb-sec), no picture. The heading, line and badge are white on it at
   every width. Replaces the orange waves picture (1.1.291) and its darker wash (1.1.292). */
.experts__bg { top: 0; background: linear-gradient(180deg, #bb5110 0%, #ac4a0f 12.5%, #99420e 25%, #893c0e 37.5%, #7a350d 50%, #6c2f0d 62.5%, #5f290d 75%, #53240c 87.5%, #461f0c 100%); }
@media (min-width: 901px) {
  .experts__bg { top: 0; background: linear-gradient(180deg, #bb5110 0%, #ac4a0f 12.5%, #99420e 25%, #893c0e 37.5%, #7a350d 50%, #6c2f0d 62.5%, #5f290d 75%, #53240c 87.5%, #461f0c 100%); }
}
.experts { background: #461f0c; }
.experts .experts__title,
.experts .experts__sub { color: #fff; text-shadow: none; }
.experts .badge { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
