/* ==========================================================================
   Frederick Healthcare — page patterns
   Composite blocks assembled from the system primitives.
   ========================================================================== */

/* ---------- hero ---------- */
.hero { position: relative; background: linear-gradient(180deg, var(--bg-brand-subtle) 0%, #fff 78%); overflow: hidden; }
.hero__inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(2rem, 1rem + 4vw, 4rem);
    align-items: center;
    padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
}
.hero__copy > * + * { margin-top: var(--space-5); }
.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); padding-top: var(--space-2); }
.hero__media { position: relative; }
.hero__media img {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
    aspect-ratio: 4 / 3;
}
.hero__badge {
    position: absolute; left: -12px; bottom: -18px;
    display: flex; align-items: center; gap: var(--space-3);
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
    padding: var(--space-4) var(--space-5);
}
.hero__badge .stat-value { display: block; font-size: var(--text-2xl); }
.hero__badge .stat-label { display: block; max-width: 18ch; }
@media (max-width: 960px) {
    .hero__inner { grid-template-columns: 1fr; }
    .hero__media { order: -1; }
    .hero__badge { display: none; }
}

/* ---------- figures strip ---------- */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
.figures > li { padding: var(--space-5) var(--space-6); border-left: 2px solid var(--brand-200); }
.figures .stat-value { display: block; font-size: var(--text-4xl); }
.figures .stat-label { display: block; margin-top: var(--space-1); }
@media (max-width: 860px) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); } }
@media (max-width: 460px) { .figures { grid-template-columns: 1fr; } }

/* ---------- media band (image + copy) ---------- */
.band__media img { width: 100%; border-radius: var(--radius-xl); box-shadow: var(--shadow-md); object-fit: cover; aspect-ratio: 5 / 4; }
/* the source map artwork carries an unused stats strip at the bottom — crop to the map */
.band__media--map img { aspect-ratio: 229 / 100; object-fit: cover; object-position: center top; background: #fff; }
.band__list { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
.band__list li { display: flex; gap: var(--space-4); align-items: flex-start; }
.band__list .icon-circle { width: 44px; height: 44px; }
.band__list .icon-circle img { width: 22px; height: 22px; }
.band__list strong { display: block; color: var(--navy-800); font-family: var(--font-heading); }
.band__list span { font-size: var(--text-sm); color: var(--ink-600); }

/* ---------- value cards ---------- */
.value-card { display: flex; gap: var(--space-5); padding: var(--space-6); }
.value-card h3 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.value-card p { font-size: var(--text-sm); color: var(--ink-600); }

/* ---------- therapeutic area cards ---------- */
.area-card { position: relative; display: block; overflow: hidden; border-radius: var(--radius-lg); background: var(--navy-900); aspect-ratio: 4 / 3; }
.area-card img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: transform .5s var(--ease), opacity .3s var(--ease); }
.area-card:hover img { transform: scale(1.05); opacity: .68; }
.area-card__body { position: absolute; inset: auto 0 0 0; padding: var(--space-5); background: linear-gradient(180deg, rgba(11,31,63,0) 0%, rgba(11,31,63,.86) 62%); }
.area-card__name { font-family: var(--font-heading); font-weight: 700; color: #fff; font-size: var(--text-lg); line-height: 1.25; }
.area-card__note { display: block; margin-top: 2px; font-size: var(--text-caption); color: rgba(255,255,255,.78); }
.area-card__index { position: absolute; top: var(--space-4); left: var(--space-5); font-family: var(--font-heading); font-weight: 700; font-size: var(--text-caption); color: rgba(255,255,255,.85); letter-spacing: .1em; }

/* ---------- cta band ---------- */
.cta-band { background: var(--brand-700); color: #fff; }
.cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-6); padding-block: clamp(2.5rem, 1.5rem + 3vw, 3.5rem); }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.cta-band p { color: rgba(255, 255, 255, .82); margin-top: var(--space-2); max-width: 56ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- search dialog ---------- */
.search-panel__form { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.search-panel__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-4); }
.search-panel__areas { margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--line); }
.area-chip {
    display: flex; align-items: center; gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--line); border-radius: var(--radius-md);
    color: var(--navy-800); font-size: var(--text-caption); font-weight: 700;
    transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.area-chip img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.area-chip:hover { border-color: var(--brand-300); background: var(--brand-50); color: var(--brand-700); }
@media (max-width: 700px) { .search-panel__areas .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- team ---------- */
.person { text-align: left; overflow: hidden; }
.person__photo { aspect-ratio: 3 / 4; background: var(--bg-subtle); overflow: hidden; }
.person__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* a few source headshots carry a name caption along the bottom edge: scale past it */
.person__photo--trim img { height: 124%; }
.person__body { padding: var(--space-4) var(--space-5) var(--space-5); }
.person__name { font-family: var(--font-heading); font-weight: 700; color: var(--navy-900); font-size: var(--text-base); }
.person__role { font-size: var(--text-caption); color: var(--ink-500); margin-top: 2px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- tab bar ---------- */
.tabbar { display: inline-flex; padding: 4px; background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--radius-pill); gap: 4px; }
.tabbar button {
    border: 0; background: none; cursor: pointer;
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-pill);
    font-family: var(--font-heading); font-weight: 700; font-size: var(--text-sm); color: var(--ink-600);
    transition: background-color .18s var(--ease), color .18s var(--ease);
}
.tabbar button:hover { color: var(--brand-700); }
.tabbar button.is-active { background: #fff; color: var(--brand-700); box-shadow: var(--shadow-xs); }

/* ---------- contact / office ---------- */
.contact-tile { display: flex; gap: var(--space-4); padding: var(--space-5); }
.contact-tile .icon-circle { width: 44px; height: 44px; }
.contact-tile .icon-circle img { width: 22px; height: 22px; }
.contact-tile dt { font-family: var(--font-heading); font-weight: 700; font-size: var(--text-sm); color: var(--navy-900); }
.contact-tile dd { margin: 2px 0 0; font-size: var(--text-sm); color: var(--ink-600); }
.map-frame { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-subtle); min-height: 400px; height: 100%; }
.map-frame iframe { width: 100%; height: 100%; min-height: 400px; border: 0; display: block; }

/* ==========================================================================
   Editorial blocks — short, high-impact sections in the modern pharma idiom:
   an immersive hero, a scrolling segment strip, mixed-size card mosaics,
   numbered cards and accent-filled highlight panels.
   ========================================================================== */

/* ---------- immersive hero ---------- */
.hero-x {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: min(84vh, 740px);
    background: var(--navy-900);
    color: #fff;
    overflow: hidden;
}
.hero-x__bg { position: absolute; inset: 0; }
.hero-x__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .58; }
.hero-x__bg::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(11, 31, 63, .86) 0%, rgba(11, 31, 63, .45) 42%, rgba(11, 31, 63, .94) 100%);
}
.hero-x__inner {
    position: relative; z-index: 1; width: 100%;
    padding-block: clamp(5rem, 4rem + 7vw, 8rem) clamp(4rem, 3rem + 4vw, 6rem);
}
.hero-x h1 { color: #fff; max-width: 17ch; }
.hero-x .overline { color: var(--brand-300); }
.hero-x .lead { color: rgba(255, 255, 255, .84); max-width: 54ch; }
.hero-x__copy > * + * { margin-top: var(--space-5); }
.hero-x__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); padding-top: var(--space-2); }

.hero-stats {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.hero-stats > li { background: rgba(9, 26, 54, .55); padding: var(--space-5) var(--space-6); backdrop-filter: blur(6px); }
.hero-stats .stat-value { display: block; color: #fff; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem); }
.hero-stats .stat-label { display: block; margin-top: 2px; color: rgba(255, 255, 255, .7); font-size: var(--text-caption); }
@media (max-width: 860px) { .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.scroll-cue {
    position: absolute; left: 50%; bottom: 16px; z-index: 2;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
    color: rgba(255, 255, 255, .62);
    font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
}
.scroll-cue i { display: block; width: 22px; height: 34px; border: 1.5px solid rgba(255, 255, 255, .45); border-radius: var(--radius-pill); position: relative; }
.scroll-cue i::after {
    content: ""; position: absolute; left: 50%; top: 7px;
    width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #fff;
    animation: cue-drop 1.9s var(--ease) infinite;
}
@keyframes cue-drop { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(13px); } }
@media (max-width: 860px) { .scroll-cue { display: none; } }

/* ---------- compact dark page hero (inner pages) ---------- */
.page-hero {
    position: relative;
    background: var(--navy-900);
    color: rgba(255, 255, 255, .76);
    overflow: hidden;
    padding-block: clamp(3rem, 2rem + 4vw, 5rem);
}
.page-hero::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(820px 380px at 8% -20%, rgba(0, 88, 176, .55), transparent 62%),
                radial-gradient(620px 340px at 92% 120%, rgba(3, 95, 131, .42), transparent 60%);
    pointer-events: none;
}
.page-hero__bg { position: absolute; inset: 0; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.page-hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 31, 63, .95) 20%, rgba(11, 31, 63, .55) 100%); }
.page-hero__inner { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; max-width: 20ch; }
.page-hero .overline { color: var(--brand-300); }
.page-hero .lead { color: rgba(255, 255, 255, .74); max-width: 64ch; margin-top: var(--space-4); }
.page-hero .breadcrumb { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--text-caption); color: rgba(255, 255, 255, .55); margin-bottom: var(--space-4); }
.page-hero .breadcrumb a { color: rgba(255, 255, 255, .7); }
.page-hero .breadcrumb a:hover { color: #fff; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.page-hero__stats { display: flex; flex-wrap: wrap; gap: var(--space-8); margin-top: var(--space-8); }
.page-hero__stats .stat-value { display: block; color: #fff; font-size: var(--text-3xl); }
.page-hero__stats .stat-label { display: block; color: rgba(255, 255, 255, .62); font-size: var(--text-caption); }

/* ---------- segment marquee ---------- */
.marquee { overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); }
.marquee__track {
    display: flex; align-items: center; width: max-content;
    padding-block: var(--space-4);
    animation: marquee-slide 48s linear infinite;
}
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
.marquee__item {
    display: inline-flex; align-items: center; gap: var(--space-3);
    padding-inline: var(--space-6);
    font-family: var(--font-heading); font-weight: 700; font-size: var(--text-sm);
    color: var(--navy-800); white-space: nowrap;
    transition: color .18s var(--ease);
}
.marquee__item:hover { color: var(--brand-600); }
.marquee__item img { width: 24px; height: 24px; object-fit: contain; flex: none; }
.marquee__item::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand-200); margin-left: var(--space-6); }
@keyframes marquee-slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .marquee__track { animation: none; width: 100%; flex-wrap: wrap; justify-content: center; }
}

.span-2 { grid-column: span 2; }
@media (max-width: 600px) { .span-2 { grid-column: span 1; } }

/* ---------- card mosaic ---------- */
.mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-5); }
.mosaic > * { grid-column: span 3; }
.mosaic > .mosaic--wide { grid-column: span 6; }
@media (max-width: 1024px) {
    .mosaic > * { grid-column: span 6; }
    .mosaic > .mosaic--wide { grid-column: span 12; }
}
@media (max-width: 600px) { .mosaic > *, .mosaic > .mosaic--wide { grid-column: span 12; } }

.tile { min-height: 248px; display: flex; flex-direction: column; }
@media (max-width: 600px) { .tile { min-height: 190px; } }

/* stat tile */
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: var(--space-6); }
.stat-card__dots { display: flex; gap: 5px; margin-bottom: var(--space-4); }
.stat-card__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-200); }
.stat-card__dots i:first-child { background: var(--brand-600); }
.stat-card__label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-500); line-height: 1.6; }
.stat-card__value {
    margin-top: auto;
    font-family: var(--font-heading); font-weight: 700; line-height: 1;
    font-size: clamp(2rem, 1.4rem + 2vw, 2.875rem);
    color: var(--navy-900); letter-spacing: -0.02em;
}
.stat-card__note { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--ink-600); }

/* accent highlight tile */
.highlight-card {
    position: relative; overflow: hidden;
    border-radius: var(--radius-lg);
    padding: var(--space-8) var(--space-7, 1.75rem);
    color: #fff;
    background: linear-gradient(140deg, var(--brand-800) 0%, var(--brand-600) 58%, var(--teal-700) 100%);
}
.highlight-card__deco { position: absolute; right: -44px; bottom: -48px; width: 230px; opacity: .18; filter: brightness(0) invert(1); pointer-events: none; }
.highlight-card .overline { color: rgba(255, 255, 255, .78); position: relative; }
.highlight-card h3 { color: #fff; margin-top: var(--space-3); font-size: var(--text-2xl); max-width: 22ch; position: relative; }
.highlight-card p { color: rgba(255, 255, 255, .8); margin-top: var(--space-3); font-size: var(--text-sm); position: relative; }
.highlight-card .link-arrow { color: #fff; margin-top: auto; padding-top: var(--space-6); position: relative; }
.highlight-card .link-arrow:hover { color: #fff; }

/* image tile */
.media-card { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--navy-900); }
.media-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.media-card:hover img { transform: scale(1.05); }
.media-card__cap {
    position: relative; margin-top: auto;
    padding: var(--space-5);
    color: #fff; font-size: var(--text-sm);
    background: linear-gradient(180deg, rgba(11, 31, 63, 0), rgba(11, 31, 63, .88));
}
.media-card__cap strong { display: block; font-family: var(--font-heading); font-size: var(--text-base); }

/* ---------- numbered cards ---------- */
.num-card {
    position: relative; overflow: hidden;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: var(--space-7, 1.75rem) var(--space-6) var(--space-6);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.num-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.num-card__n {
    position: absolute; top: 4px; right: 14px;
    font-family: var(--font-heading); font-weight: 700; font-size: 3.75rem; line-height: 1;
    color: var(--brand-50);
}
.num-card__bar { width: 36px; height: 3px; border-radius: 2px; background: var(--brand-600); margin-bottom: var(--space-5); }
.num-card h3 { font-size: var(--text-xl); position: relative; padding-right: 60px; }
.num-card p { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--ink-600); }
.section--dark .num-card { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); }
.section--dark .num-card:hover { border-color: rgba(255, 255, 255, .3); box-shadow: none; }
.section--dark .num-card__n { color: rgba(255, 255, 255, .1); }
.section--dark .num-card p { color: rgba(255, 255, 255, .7); }

/* ---------- decorative watermark ---------- */
.deco-molecule { position: absolute; pointer-events: none; opacity: .07; width: min(400px, 38%); }
.deco-molecule--light { filter: brightness(0) invert(1); opacity: .06; }

/* ---------- product teaser ---------- */
.teaser { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
.teaser:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.teaser__media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; padding: var(--space-5); background: linear-gradient(180deg, var(--bg-brand-subtle), #fff); border-bottom: 1px solid var(--line); }
.teaser__media img { max-height: 100%; width: auto; object-fit: contain; }
.teaser__media .tag--new { position: absolute; top: var(--space-3); left: var(--space-3); }
.teaser__body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.teaser__cat { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-600); }
.teaser__name { font-family: var(--font-heading); font-weight: 700; font-size: var(--text-lg); color: var(--navy-900); line-height: 1.25; }
.teaser__comp { font-size: var(--text-sm); color: var(--ink-600); }
.teaser__foot { margin-top: auto; padding-top: var(--space-4); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); border-top: 1px solid var(--line); font-size: var(--text-caption); color: var(--ink-500); }
.teaser__foot .link-arrow { font-size: var(--text-caption); }

/* ---------- section heading with rule ---------- */
.eyebrow-rule { display: flex; align-items: center; gap: var(--space-3); }
.eyebrow-rule::after { content: ""; flex: 1; height: 1px; background: var(--line); max-width: 120px; }
.section--dark .eyebrow-rule::after { background: rgba(255, 255, 255, .2); }

/* ---------- forms layout ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.form-grid .field--full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-note { font-size: var(--text-caption); color: var(--ink-500); }
