/* ============================================================
   IHS 2027 — global component styles
   Design tokens live in usersc/templates/ihs/header.php (:root).
   Mobile-first; breakpoints at 640px, 1024px.
   ============================================================ */

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.ihs-body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--brand-ink);
  background: var(--brand-bg);
  -webkit-font-smoothing: antialiased;
}

.ihs-body h1, .ihs-body h2, .ihs-body h3, .ihs-body h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
}

.ihs-body a { color: var(--brand-primary-dark); text-decoration: none; }
.ihs-body a:hover { color: var(--brand-primary); }
.ihs-body img { max-width: 100%; height: auto; }
.ihs-body :focus-visible { outline: 3px solid var(--brand-primary-glow); outline-offset: 2px; border-radius: 4px; }

.ihs-no-scroll { overflow: hidden; }
.ihs-gtm-frame { display: none; visibility: hidden; }

.ihs-skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--brand-ink);
  color: #fff !important;
  border-radius: var(--radius);
}
.ihs-skip:focus { top: 1rem; }

.ihs-main { display: block; min-height: 50vh; }
.ihs-core-container { padding-top: 2.5rem; padding-bottom: 3rem; }

/* ── Layout ───────────────────────────────────────────────── */
.ihs-wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.ihs-section { padding: 3.5rem 0; }
.ihs-section--soft { background: var(--brand-bg-soft); }
.ihs-section--ink { background: var(--brand-ink); color: #fff; }
.ihs-section--ink h2, .ihs-section--ink h3 { color: #fff; }

.ihs-section__head { max-width: 680px; margin-bottom: 2rem; }
.ihs-section__head--row {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.ihs-section__head h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); margin: 0 0 0.5rem; }
.ihs-section__head p { color: var(--gray-600); margin: 0; font-size: 1.05rem; }
.ihs-section--ink .ihs-section__head p { color: rgba(255, 255, 255, 0.75); }

.ihs-eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
}

/* ── Buttons ──────────────────────────────────────────────── */
.ihs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.ihs-btn:active { transform: translateY(1px); }

.ihs-body .ihs-btn--primary { background: var(--brand-primary); color: #fff; }
.ihs-body .ihs-btn--primary:hover { background: var(--brand-primary-dark); color: #fff; }

.ihs-body .ihs-btn--dark { background: var(--brand-ink); color: #fff; }
.ihs-body .ihs-btn--dark:hover { background: var(--gray-800); color: #fff; }

.ihs-body .ihs-btn--outline { border-color: var(--brand-ink); color: var(--brand-ink); background: transparent; }
.ihs-body .ihs-btn--outline:hover { background: var(--brand-ink); color: #fff; }

.ihs-body .ihs-btn--light { background: #fff; color: var(--brand-ink); }
.ihs-body .ihs-btn--light:hover { background: var(--gray-100); color: var(--brand-ink); }

.ihs-body .ihs-btn--ghost-light { border-color: rgba(255, 255, 255, 0.6); color: #fff; background: transparent; }
.ihs-body .ihs-btn--ghost-light:hover { background: #fff; color: var(--brand-ink); }

.ihs-link-arrow { font-weight: 600; display: inline-flex; align-items: center; gap: 0.35rem; }
.ihs-link-arrow i { transition: transform var(--transition); }
.ihs-link-arrow:hover i { transform: translateX(3px); }

/* ── Announcement bar ─────────────────────────────────────── */
.ihs-announce { background: var(--brand-ink); color: rgba(255, 255, 255, 0.85); font-size: 0.85rem; }
.ihs-announce__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  text-align: center;
}
.ihs-announce strong { color: #fff; }
.ihs-body .ihs-announce a { color: var(--brand-secondary); font-weight: 600; }
.ihs-body .ihs-announce a:hover { color: #fff; }

/* ── Primary navigation ───────────────────────────────────── */
.ihs-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--gray-200);
}
.ihs-nav__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 1rem;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ihs-nav__brand { display: flex; align-items: center; margin-right: auto; }
.ihs-nav__brand img { height: 44px; width: auto; }

.ihs-nav__actions { display: flex; align-items: center; gap: 0.25rem; }

.ihs-nav__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--brand-ink) !important;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background var(--transition);
}
.ihs-nav__icon:hover { background: var(--gray-100); }

.ihs-nav__badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.ihs-nav__badge.is-hidden { display: none; }

.ihs-nav__toggle {
  order: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

/* Mobile: the menu is a full-width sheet below the bar */
.ihs-nav__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 1rem 1rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
}
.ihs-nav.is-menu-open .ihs-nav__menu { display: flex; flex-direction: column; gap: 1rem; }

.ihs-nav__links { list-style: none; margin: 0; padding: 0; }
.ihs-nav__item { position: relative; border-bottom: 1px solid var(--gray-100); }

.ihs-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  min-height: 48px;
  padding: 0.5rem 0.25rem;
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--brand-ink) !important;
  text-align: left;
  cursor: pointer;
}
.ihs-nav__link.is-active { color: var(--brand-primary) !important; }
.ihs-nav__link .bi-chevron-down { font-size: 0.75rem; transition: transform var(--transition); }
.ihs-nav__item.is-open .ihs-nav__link .bi-chevron-down { transform: rotate(180deg); }

.ihs-nav__panel { display: none; }
.ihs-nav__item.is-open > .ihs-nav__panel,
.ihs-nav__account.is-open > .ihs-nav__panel { display: block; }

.ihs-nav__sub { list-style: none; margin: 0; padding: 0 0 0.75rem 0.75rem; }
.ihs-nav__sub a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.25rem;
  color: var(--gray-800) !important;
}
.ihs-nav__sub a:hover { color: var(--brand-primary) !important; }
.ihs-nav__sub-all a { font-weight: 600; color: var(--brand-primary-dark) !important; }
.ihs-nav__sub-head {
  padding: 0.75rem 0.25rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-400);
}
.ihs-nav__sub-divider { border-top: 1px solid var(--gray-200); margin-top: 0.35rem; padding-top: 0.35rem; }

.ihs-nav__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: var(--gray-50);
  color: var(--gray-600);
}
.ihs-nav__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--brand-ink);
  outline: none;
}
.ihs-nav__search:focus-within { border-color: var(--brand-ink); background: #fff; }

.ihs-nav__cta { align-self: stretch; }

/* Account menu is a floating panel at every width */
.ihs-nav__account { position: relative; }
.ihs-nav__account > .ihs-nav__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
}
.ihs-nav__account .ihs-nav__sub { padding: 0; }
.ihs-nav__account .ihs-nav__sub a { padding: 0.5rem 0.75rem; border-radius: 6px; }
.ihs-nav__account .ihs-nav__sub a:hover { background: var(--gray-50); }
.ihs-nav__account .ihs-nav__sub-head { padding-left: 0.75rem; }

@media (min-width: 1024px) {
  .ihs-nav__brand { margin-right: 0.5rem; }
  .ihs-nav__toggle { display: none; }

  .ihs-nav__menu {
    position: static;
    display: flex;
    flex: 1;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .ihs-nav.is-menu-open .ihs-nav__menu { flex-direction: row; }

  .ihs-nav__links { display: flex; align-items: center; gap: 0.25rem; }
  .ihs-nav__item { border: 0; }
  .ihs-nav__link {
    width: auto;
    min-height: 40px;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.95rem;
  }
  .ihs-nav__link:hover { background: var(--gray-100); }

  .ihs-nav__item > .ihs-nav__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 260px;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
  }
  .ihs-nav__item .ihs-nav__sub { padding: 0; }
  .ihs-nav__item .ihs-nav__sub a { padding: 0.55rem 0.75rem; border-radius: 6px; }
  .ihs-nav__item .ihs-nav__sub a:hover { background: var(--gray-50); }
  .ihs-nav__sub-all { border-top: 1px solid var(--gray-200); margin-top: 0.35rem; padding-top: 0.35rem; }

  .ihs-nav__search { flex: 1; max-width: 280px; margin-left: auto; height: 40px; }
  .ihs-nav__cta { align-self: center; }
}

/* ── Hero ─────────────────────────────────────────────────── */
.ihs-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: var(--brand-ink);
}
.ihs-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.ihs-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.ihs-hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(11, 11, 11, 0.88) 0%, rgba(11, 11, 11, 0.7) 45%, rgba(11, 11, 11, 0.25) 100%);
}
.ihs-hero__inner { padding: 4.5rem 0 4rem; max-width: 640px; }
.ihs-hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 6vw, 3.5rem);
  margin: 0 0 1rem;
}
.ihs-hero p { font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: rgba(255, 255, 255, 0.85); margin: 0 0 1.75rem; }
.ihs-hero .ihs-eyebrow { color: var(--brand-secondary); }
.ihs-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (min-width: 1024px) {
  .ihs-hero__inner { padding: 7rem 0 6rem; }
}

/* ── Trust strip ──────────────────────────────────────────── */
.ihs-trust { border-bottom: 1px solid var(--gray-200); background: #fff; }
.ihs-trust__list {
  list-style: none;
  margin: 0;
  padding: 1.25rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.ihs-trust__item { display: flex; align-items: flex-start; gap: 0.75rem; }
.ihs-trust__item i { font-size: 1.4rem; color: var(--brand-primary); line-height: 1.2; }
.ihs-trust__item strong { display: block; font-size: 0.95rem; }
.ihs-trust__item span { font-size: 0.875rem; color: var(--gray-600); }

@media (min-width: 640px) { .ihs-trust__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ihs-trust__list { grid-template-columns: repeat(4, 1fr); } }

/* ── Category tiles ───────────────────────────────────────── */
.ihs-cat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.ihs-cat-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
  min-height: 140px;
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--brand-ink) !important;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.ihs-cat-tile:hover { border-color: var(--brand-ink); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ihs-cat-tile i { font-size: 1.75rem; color: var(--brand-primary); }
.ihs-cat-tile strong { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.25; }

@media (min-width: 640px) { .ihs-cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .ihs-cat-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }

/* ── Split feature (image + copy) ─────────────────────────── */
.ihs-split { display: grid; gap: 2rem; align-items: center; }
.ihs-split__media img { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 4 / 3; object-fit: cover; }
.ihs-split__body h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); margin: 0 0 1rem; }
.ihs-split__body p { color: var(--gray-600); }
.ihs-section--ink .ihs-split__body p { color: rgba(255, 255, 255, 0.75); }

.ihs-checklist { list-style: none; padding: 0; margin: 1.25rem 0 1.75rem; display: grid; gap: 0.6rem; }
.ihs-checklist li { display: flex; gap: 0.6rem; align-items: flex-start; }
.ihs-checklist i { color: var(--brand-primary); margin-top: 0.15rem; }
.ihs-section--ink .ihs-checklist i { color: var(--brand-secondary); }

@media (min-width: 1024px) {
  .ihs-split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .ihs-split--reverse .ihs-split__media { order: 2; }
}

/* ── Path cards (shop vs project) ─────────────────────────── */
.ihs-paths { display: grid; gap: 1rem; }
.ihs-path {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--gray-200);
}
.ihs-path h3 { font-size: 1.35rem; margin: 0; }
.ihs-path p { color: var(--gray-600); margin: 0; flex: 1; }
.ihs-path .ihs-btn { align-self: flex-start; margin-top: 0.5rem; }
.ihs-path--accent { background: var(--brand-secondary-pale); border-color: transparent; }

@media (min-width: 640px) { .ihs-paths { grid-template-columns: repeat(3, 1fr); } }

/* ── CTA band ─────────────────────────────────────────────── */
.ihs-cta-band {
  display: grid;
  gap: 1.25rem;
  padding: 2.25rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--brand-primary);
  color: #fff;
}
.ihs-cta-band h2 { color: #fff; margin: 0 0 0.35rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.ihs-cta-band p { margin: 0; color: rgba(255, 255, 255, 0.85); }
.ihs-cta-band__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (min-width: 1024px) {
  .ihs-cta-band { grid-template-columns: 1fr auto; align-items: center; padding: 3rem; }
}

/* ── Simple page header (inner pages) ─────────────────────── */
.ihs-page-head { padding: 3rem 0 2rem; background: var(--brand-bg-soft); border-bottom: 1px solid var(--gray-200); }
.ihs-page-head h1 { font-size: clamp(1.9rem, 5vw, 2.75rem); margin: 0 0 0.5rem; }
.ihs-page-head p { color: var(--gray-600); font-size: 1.1rem; margin: 0; max-width: 680px; }

/* ── 404 ──────────────────────────────────────────────────── */
.ihs-404 { padding: 5rem 0; text-align: center; }
.ihs-404__code { font-family: var(--font-display); font-size: 5rem; font-weight: 700; color: var(--brand-primary); line-height: 1; }
.ihs-404 h1 { font-size: clamp(1.6rem, 4vw, 2.25rem); margin: 1rem 0 0.5rem; }
.ihs-404 p { color: var(--gray-600); max-width: 520px; margin: 0 auto 1.75rem; }
.ihs-404__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

/* ── Footer ───────────────────────────────────────────────── */
.ihs-footer { background: var(--brand-ink); color: rgba(255, 255, 255, 0.7); margin-top: 0; }
.ihs-footer__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 3.5rem 1rem 2.5rem;
  display: grid;
  gap: 2.25rem;
}
.ihs-footer__brand p { font-size: 0.925rem; margin: 1rem 0; max-width: 360px; }
.ihs-footer__brand > a img { height: 52px; width: auto; filter: brightness(1.6); }
.ihs-footer__ccib { height: 52px; width: auto; background: #fff; border-radius: 6px; padding: 6px 10px; }
.ihs-footer__heading {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 1rem;
}
.ihs-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.ihs-body .ihs-footer a { color: rgba(255, 255, 255, 0.7); }
.ihs-body .ihs-footer a:hover { color: #fff; }
.ihs-footer__contact { display: grid; gap: 0.4rem; margin: 1.25rem 0 0; font-size: 0.95rem; }
.ihs-footer__contact i { margin-right: 0.35rem; color: var(--brand-secondary); }

.ihs-footer__bottom {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

@media (min-width: 640px) { .ihs-footer__inner { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ihs-footer__inner { grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2.5rem; } }

/* ── FAQ accordion (category, product, home and local pages) ── */
.ihs-faq { display: grid; gap: 0.75rem; max-width: 860px; }
.ihs-faq details { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); }
.ihs-faq summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; font-weight: 600; cursor: pointer; list-style: none; }
.ihs-faq summary::-webkit-details-marker { display: none; }
.ihs-faq summary::after { content: '+'; font-size: 1.25rem; line-height: 1; color: var(--brand-primary); flex-shrink: 0; }
.ihs-faq details[open] summary::after { content: '\2212'; }
.ihs-faq summary:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; border-radius: var(--radius); }
.ihs-faq details p { margin: 0; padding: 0 1.25rem 1.1rem; color: var(--gray-600); }

/* Phone in the announcement bar */
.ihs-announce__phone { white-space: nowrap; }
.ihs-confirm { background: #fff3cd; padding: 0 0.2rem; border-radius: 3px; font-weight: 600; }

/* Cloudflare Turnstile on lead forms (rendered by ihs_form_challenge() only when configured) */
.ihs-form__challenge { margin: 0.5rem 0 1rem; min-height: 65px; }
