/* =========================================================
   SMALLER SECTIONS
   .split      — image + text two-column (any page)
   .heritage   — big year + story (Fico)
   .structure  — group org chart (About)
   .subnav     — sticky in-page navigation (Solutions)   JS: js/subnav.js
   .catalog    — filter chips for product grid (CNC)      JS: js/filter.js
   .mapband    — full-width map with address card (Contact)
   .social     — round social icon links
   .collage    — photo collage for heroes
   ========================================================= */

/* ---------- SPLIT ---------- */
.split__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 5 / 4; box-shadow: var(--shadow-lg); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__badge { position: absolute; left: 1.2rem; bottom: 1.2rem; padding: .9rem 1.1rem; border-radius: var(--radius); background: var(--c-surface); box-shadow: var(--shadow); }
.split__badge strong { display: block; font-family: var(--font-display); font-size: 1.8rem; line-height: 1; color: var(--accent); }
.split__badge span { font-size: .82rem; color: var(--c-muted); }
.split__list { list-style: none; padding: 0; margin: 1.6rem 0 2rem; display: grid; gap: .9rem; }
.split__list li { display: flex; gap: .9rem; align-items: flex-start; }
.split__list .icon-box { width: 44px; height: 44px; border-radius: 12px; }
.split__list .icon-box svg { width: 22px; height: 22px; }
.split__list b { display: block; color: var(--c-ink); font-family: var(--font-display); }
.split__list span { font-size: .92rem; color: var(--c-muted); }
.section--dark .split__list b { color: #fff; }
.section--dark .split__list span { color: rgba(255, 255, 255, .6); }
@media (max-width: 900px) { .split__inner { grid-template-columns: 1fr; } .split--reverse .split__media { order: 0; } }

/* ---------- HERITAGE ---------- */
.heritage__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.heritage__year { font-family: var(--font-display); font-weight: 700; font-size: clamp(6rem, 16vw, 12rem); line-height: .85; letter-spacing: -.06em; background: linear-gradient(180deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.heritage__year small { display: block; font-size: .14em; letter-spacing: .2em; text-transform: uppercase; -webkit-text-fill-color: var(--c-muted); margin-bottom: .6rem; }
.heritage__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3.2; }
.heritage__media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .heritage__inner { grid-template-columns: 1fr; } }

/* ---------- STRUCTURE (org chart) ---------- */
.structure__root { display: flex; justify-content: center; }
.structure__node {
  --brand: var(--accent);
  display: flex; flex-direction: column; align-items: center; gap: .7rem; text-align: center;
  padding: 1.4rem 1.2rem; border-radius: var(--radius-lg); background: var(--c-surface); border: 1px solid var(--c-line);
  box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.structure__node:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.structure__node img { max-height: 56px; max-width: 140px; }
.structure__node b { font-family: var(--font-display); color: var(--c-ink); }
.structure__node small { color: var(--c-muted); font-size: .84rem; }
.structure__node--root { padding: 1.6rem 2.4rem; background: var(--c-dark-900); border-color: var(--c-dark-900); }
.structure__node--root b { color: #fff; font-size: 1.2rem; }
.structure__node--root small { color: rgba(255, 255, 255, .6); }
.structure__stem { width: 2px; height: 48px; margin: 0 auto; background: linear-gradient(var(--accent), var(--c-line)); }
.structure__branches { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; padding-top: 48px; }
.structure__branches::before { content: ""; position: absolute; top: 0; left: 12.5%; right: 12.5%; height: 2px; background: var(--c-line); }
.structure__branches > *::before { content: ""; position: absolute; top: -48px; left: 50%; width: 2px; height: 48px; background: var(--c-line); }
.structure__branches > * { position: relative; }
@media (max-width: 860px) {
  .structure__branches { grid-template-columns: 1fr 1fr; padding-top: 1.25rem; }
  .structure__branches::before, .structure__branches > *::before { display: none; }
}

/* ---------- SUBNAV ---------- */
.subnav { position: sticky; top: var(--header-h); z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--c-line); }
.subnav ul { display: flex; gap: .3rem; list-style: none; margin: 0; padding: .7rem 0; overflow-x: auto; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { display: block; white-space: nowrap; padding: .5rem 1rem; border-radius: 999px; font-size: .88rem; font-weight: 500; color: var(--c-muted); transition: background .2s, color .2s; }
.subnav a:hover { color: var(--c-ink); background: var(--c-bg-soft); }
.subnav a.is-active { background: var(--c-dark-900); color: #fff; }

/* ---------- CATALOG FILTER ---------- */
.catalog__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.catalog__chips button { padding: .6rem 1.1rem; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-text); font-size: .88rem; font-weight: 500; cursor: pointer; transition: all .2s; }
.catalog__chips button:hover { border-color: var(--accent); color: var(--accent); }
.catalog__chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.catalog .product[hidden] { display: none; }

/* ---------- MAP BAND ---------- */
.mapband { position: relative; height: 460px; background: var(--c-dark-800); }
.mapband iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.4) contrast(1.05); }
.mapband__card {
  position: absolute; left: max(1.25rem, calc((100% - var(--container)) / 2)); top: 50%; transform: translateY(-50%);
  max-width: 360px; padding: 1.8rem; border-radius: var(--radius-lg);
  background: var(--c-dark-900); color: rgba(255, 255, 255, .72); box-shadow: var(--shadow-lg);
}
.mapband__card h3 { color: #fff; font-size: 1.4rem; }
.mapband__card p { margin-bottom: 1.2rem; }
@media (max-width: 700px) { .mapband { height: auto; } .mapband iframe { height: 320px; display: block; } .mapband__card { position: static; transform: none; max-width: none; border-radius: 0; } }

/* ---------- SOCIAL ICONS ---------- */
.social { display: flex; flex-wrap: wrap; gap: .5rem; }
.social a { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--c-bg-soft); border: 1px solid var(--c-line); color: var(--c-ink); transition: background .2s, color .2s, border-color .2s; }
.social a:hover { background: var(--brand, var(--accent)); border-color: var(--brand, var(--accent)); color: #fff; }
.social svg { width: 17px; height: 17px; }
.social--dark a { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- PHOTO COLLAGE (hero visual) ---------- */
.collage { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: 1rem; aspect-ratio: 1 / .9; }
.collage figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.collage figure:first-child { grid-row: span 2; }
.collage img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.collage figure:hover img { transform: scale(1.06); }
/* Sub-menu follows the header: moves up when the header hides on scroll */
.subnav { transition: top .45s var(--ease); }
.site-header.is-hidden ~ main .subnav, body.cs-header-hidden .subnav { top: 0; }
