/* =========================================================================
   The InterSpace Group — unified site header
   One source of truth for the top navigation used on every page.
   Namespaced `isg-` so it never collides with page-level or scraped CSS.
   Theme-aware for BOTH mechanisms in use across the site:
     - index / header  ->  :root[data-theme="light|dark"]
     - scraped pages    ->  html.light  (default = dark)
   ========================================================================= */
:root { --isg-accent: #DE0A26; }

.isg-hdr {
  --isg-fg: #F4F1EB;
  --isg-menu-bg: #0C0B0A;
  --isg-line: rgba(244, 241, 235, .12);
  --isg-mut: #9C978D;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height, 64px);
  display: flex;
  align-items: center;
  background: transparent;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}
.isg-hdr.isg-hidden { transform: translateY(-100%) !important; }
.isg-hdr.isg-open { transform: none !important; }
html.light-mode .isg-hdr,
:root[data-theme="light"] .isg-hdr {
  --isg-fg: #17150F;
  --isg-menu-bg: #F7F6F3;
  --isg-line: rgba(23, 21, 15, .14);
  --isg-mut: #5C594F;
}

.isg-hdr-in {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 52px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

/* brand logo lockup */
.isg-logo { display: flex; align-items: center; height: 100%; flex-shrink: 0; }
.isg-logo img { height: 34px; width: auto; display: block; }
.isg-logo .isg-logo-light { display: none; }
html.light-mode .isg-logo .isg-logo-dark,
:root[data-theme="light"] .isg-logo .isg-logo-dark { display: none; }
html.light-mode .isg-logo .isg-logo-light,
:root[data-theme="light"] .isg-logo .isg-logo-light { display: block; }
@media (max-width: 520px) { .isg-logo img { height: 28px; } }

/* centre links */
.isg-links {
  display: flex;
  align-items: center;
  gap: 32px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.isg-links a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--isg-mut);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}
.isg-links a:hover,
.isg-links a[aria-current="page"] { color: var(--isg-fg); }
.isg-links a.isg-cta {
  color: var(--isg-fg);
  border: 1px solid var(--isg-line);
  border-radius: 2px;
  padding: 8px 18px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.isg-links a.isg-cta:hover,
.isg-links a.isg-cta[aria-current="page"] {
  background: var(--isg-accent);
  border-color: var(--isg-accent);
  color: #fff;
}

/* right cluster */
.isg-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.isg-theme {
  width: 36px; height: 36px;
  border: 0; background: transparent;
  color: var(--isg-fg); cursor: pointer;
  display: grid; place-items: center; border-radius: 2px;
}
.isg-theme svg { width: 17px; height: 17px; }
.isg-theme:hover { opacity: .78; }

.isg-burger {
  display: none;
  width: 38px; height: 38px;
  border: 0; background: transparent;
  color: var(--isg-fg); cursor: pointer;
  flex-direction: column; gap: 5px;
  align-items: center; justify-content: center;
}
.isg-burger span { display: block; width: 20px; height: 1.6px; background: currentColor; transition: transform .25s ease, opacity .2s ease; }
.isg-hdr.isg-open .isg-burger span:nth-child(1) { transform: translateY(3.3px) rotate(45deg); }
.isg-hdr.isg-open .isg-burger span:nth-child(2) { transform: translateY(-3.3px) rotate(-45deg); }

/* mobile overlay */
/* Closed menu is hidden with `display:none` (NOT opacity): the scraped pages'
   offline-reveal-patch force-sets opacity/visibility/transform to visible on
   any hidden element, but leaves `display` alone — so display is the only
   patch-proof way to keep the menu collapsed until the burger opens it. */
.isg-mobile {
  position: fixed;
  inset: var(--nav-height, 64px) 0 0;
  background: var(--isg-menu-bg);
  display: none;
  flex-direction: column;
  padding: 24px clamp(20px, 6vw, 52px);
  gap: 2px;
  pointer-events: none;
}
.isg-hdr.isg-open .isg-mobile { display: flex; pointer-events: auto; }
.isg-mobile a {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--isg-fg);
  text-decoration: none;
  padding: 14px 2px;
  border-bottom: 1px solid var(--isg-line);
}
.isg-mobile a[aria-current="page"] { color: var(--isg-accent); }

@media (max-width: 860px) {
  .isg-links { display: none; }
  .isg-burger { display: flex; }
}
@media (min-width: 861px) {
  .isg-mobile { display: none !important; }
}

/* =========================================================================
   Unified site footer (every page except index) — minimal.
   Styled here so scraped pages and the custom contact page match. No logo.
   ========================================================================= */
.isg-foot {
  --f-fg: #F4F1EB; --f-mut: #9C978D; --f-faint: #6C685F; --f-line: rgba(244, 241, 235, .12);
  border-top: 1px solid var(--f-line);
  padding: clamp(34px, 4vw, 52px) clamp(20px, 4vw, 52px) 30px;
  background: transparent;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html.light-mode .isg-foot,
:root[data-theme="light"] .isg-foot {
  --f-fg: #17150F; --f-mut: #5C594F; --f-faint: #8B877D; --f-line: rgba(23, 21, 15, .14);
}
.isg-foot::before { content: none !important; }
.isg-foot-in { max-width: 1360px; margin: 0 auto; }

.isg-foot-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px;
  padding-bottom: 22px;
}
.isg-foot-nav a {
  color: var(--f-mut); font-size: 14px; text-decoration: none;
  transition: color .18s ease;
}
.isg-foot-nav a:hover { color: var(--f-fg); }
.isg-foot-nav a.isg-foot-accent { margin-left: auto; }
.isg-foot-nav a.isg-foot-accent:hover { color: var(--isg-accent); }

.isg-foot-bottom {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  justify-content: space-between; align-items: center;
  padding-top: 20px; border-top: 1px solid var(--f-line);
}
.isg-foot-copy, .isg-foot-loc { margin: 0; font-size: 12px; color: var(--f-faint); }

@media (max-width: 600px) {
  .isg-foot-nav a.isg-foot-accent { margin-left: 0; }
  .isg-foot-bottom { flex-direction: column; align-items: flex-start; }
}

/* =========================================================================
   Divisions grid — InterSpace Distribution brand mark
   Sibling cards render sub-brand wordmark PNGs that the shared rule
   `.division-card-logo img { filter: brightness(0) invert(); }` flattens to
   monochrome. The parent brand carries its real InterSpace logo (pulled from
   the interspacemusic.com homepage) in full colour — no overlay/filter — in
   both dark and light mode.
   ========================================================================= */
.division-card-logo-brand img,
.division-card:hover .division-card-logo-brand img,
html.light-mode .division-card-logo-brand img,
html.light-mode .division-card:hover .division-card-logo-brand img {
  filter: none;
  opacity: 1;
  width: auto;
  height: 68px;
}

/* =========================================================================
   Division profile — InterSpace brand story (divisions/interspace.html)
   Editorial layout on the site's existing tokens: cream/charcoal foreground
   (--black), --muted, hairline --border, Inter display + Space Mono, with the
   InterSpace red (--isg-accent) used only as a sparing accent.
   ========================================================================= */

/* Mono eyebrow with a short red rule */
.isd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono, "Space Mono", monospace);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.isd-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--isg-accent, #DE0A26);
  display: inline-block;
}

/* Hero */
.dp-hero-left .isd-eyebrow { margin-bottom: 1.5rem; }
.isd-hero-tag {
  color: var(--text);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.5;
  max-width: 34ch;
  margin: -1rem 0 0;
}

/* Big lead / positioning statement */
.isd-lead-section {
  padding: 5rem 0 5.5rem;
  border-bottom: 1px solid var(--border);
}
.isd-lead {
  font-family: var(--font-display, "Inter", sans-serif);
  font-weight: 500;
  letter-spacing: -.02em;
  font-size: clamp(1.65rem, 3.4vw, 2.85rem);
  line-height: 1.2;
  color: var(--black);
  max-width: 900px;
}
.isd-lead .hl { color: var(--isg-accent, #DE0A26); }

/* Stats band — hairline grid via 1px gap */
.isd-stats-section { padding: 3.5rem 0; border-bottom: 1px solid var(--border); }
.isd-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.isd-stat { background: var(--bg); padding: 2.25rem 1.75rem; }
.isd-stat-num {
  font-family: var(--font-display, "Inter", sans-serif);
  font-weight: 600;
  letter-spacing: -.03em;
  font-size: clamp(2.3rem, 4vw, 3.3rem);
  line-height: 1;
  color: var(--black);
}
.isd-stat-num .u { color: var(--isg-accent, #DE0A26); }
.isd-stat-label {
  font-family: var(--font-mono, "Space Mono", monospace);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .85rem;
}

/* Generic profile section */
.isd-section { padding: 5.5rem 0; border-bottom: 1px solid var(--border); }
.isd-section-head {
  margin-bottom: 3.5rem;
}
.isd-h2 {
  font-family: var(--font-display, "Inter", sans-serif);
  font-weight: 500;
  letter-spacing: -.02em;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.08;
  color: var(--black);
  max-width: 24ch;
  text-wrap: balance;
}

/* Story prose */
.isd-prose { max-width: 760px; display: grid; gap: 1.4rem; }
.isd-prose p { color: var(--text); font-size: 1.03rem; line-height: 1.8; }
.isd-prose strong { color: var(--black); font-weight: 600; }

/* Capabilities — hairline grid */
.isd-caps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.isd-cap { background: var(--bg); padding: 1.9rem 1.75rem; transition: background .2s ease; }
.isd-cap:hover { background: var(--surface); }
.isd-cap-title {
  position: relative;
  font-family: var(--font-display, "Inter", sans-serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  color: var(--black);
  padding-left: 1rem;
  margin-bottom: .55rem;
}
.isd-cap-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--isg-accent, #DE0A26);
}
.isd-cap-desc { color: var(--muted); font-size: .86rem; line-height: 1.55; padding-left: 1rem; }

/* Who it's for — rows */
.isd-serve { border-top: 1px solid var(--border); }
.isd-serve-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: baseline;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border);
}
.isd-serve-name {
  font-family: var(--font-display, "Inter", sans-serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  color: var(--black);
  transition: color .2s ease;
}
.isd-serve-row:hover .isd-serve-name { color: var(--isg-accent, #DE0A26); }
.isd-serve-desc { color: var(--muted); font-size: .92rem; line-height: 1.6; }

/* Client roster — pills */
.isd-clients { display: flex; flex-wrap: wrap; gap: .55rem; max-width: 980px; }
.isd-client {
  font-family: var(--font-mono, "Space Mono", monospace);
  font-size: .73rem;
  letter-spacing: .01em;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .42rem .85rem;
  transition: border-color .2s ease, color .2s ease;
}
.isd-client:hover { border-color: var(--isg-accent, #DE0A26); color: var(--black); }
.isd-client-more { color: var(--muted); border-style: dashed; }

/* Closing CTA */
.isd-cta { padding: 6rem 0 6.5rem; text-align: center; }
.isd-cta-h {
  font-family: var(--font-display, "Inter", sans-serif);
  font-weight: 500;
  letter-spacing: -.02em;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.05;
  color: var(--black);
  max-width: 18ch;
  margin: 0 auto 2.25rem;
}
.isd-cta-actions { display: flex; gap: 1.5rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.isd-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--isg-accent, #DE0A26);
  color: #fff;
  font-family: var(--font-mono, "Space Mono", monospace);
  font-size: .74rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .9rem 1.6rem;
  border-radius: 999px;
  transition: transform .2s ease, filter .2s ease;
}
.isd-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.isd-link {
  font-family: var(--font-mono, "Space Mono", monospace);
  font-size: .74rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s ease;
}
.isd-link:hover { color: var(--black); }

/* Responsive */
@media (max-width: 900px) {
  .isd-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .isd-section-head { grid-template-columns: 1fr; gap: 1rem; margin-bottom: 2.5rem; }
  .isd-h2 { max-width: none; }
  .isd-caps { grid-template-columns: 1fr; }
  .isd-serve-row { grid-template-columns: 1fr; gap: .4rem; }
  .isd-hero-tag { max-width: none; }
}
@media (max-width: 520px) {
  .isd-stats { grid-template-columns: 1fr; }
}

/* Per-division brand accent — scoped to the profile main so header/footer
   keep the group red. isd-* rules read var(--isg-accent), so overriding it
   here recolours every accent (eyebrow rule, stat units, dots, CTA) at once. */
.dp.isd-accent-tonegrid { --isg-accent: #7C3AED; }      /* ToneGrid purple */
.dp.isd-accent-soundsystem { --isg-accent: #0B8A30; }   /* Sound System green */

/* Sound System hero emblem shows in full brand colour (no mono filter) */
.dp-logo.dp-logo--full,
html.light-mode .dp-logo.dp-logo--full {
  filter: none;
  width: auto;
  height: 104px;
  object-position: left center;
}
