/* ============================================================
   Site chrome: header, navigation, footer, sticky actions
   ============================================================ */

/* ── Top bar ──────────────────────────────────────────────── */

.topbar {
  background: var(--ink-900);
  color: var(--text-on-dark-muted);
  font-size: var(--fs-sm);
  border-bottom: 1px solid var(--line-dark);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  min-height: 42px;
  flex-wrap: wrap;
}

.topbar__contact { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }

.topbar a {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text-on-dark-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

.topbar a:hover { color: var(--gold-300); }
.topbar svg { width: 0.95rem; height: 0.95rem; color: var(--gold-500); }

.topbar__tagline {
  font-family: var(--font-head);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--gold-400);
}

/* ── Header ───────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}

.site-header.is-scrolled { box-shadow: var(--shadow-sm); background: rgba(255, 255, 255, 0.97); }

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  min-height: var(--header-h);
  transition: min-height var(--dur) var(--ease);
}

.site-header.is-scrolled .site-header__inner { min-height: var(--header-h-scrolled); }

/* ── Logo ─────────────────────────────────────────────────── */

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  text-decoration: none;
  flex-shrink: 0;
}

.logo__mark { width: auto; height: 42px; flex-shrink: 0; }

.logo__text { display: flex; flex-direction: column; line-height: 1.1; }

.logo__name {
  font-family: var(--font-head);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-900);
  white-space: nowrap;
}

.logo__name em { font-style: normal; color: var(--gold-600); }

.logo__tagline {
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  white-space: nowrap;
  margin-top: 2px;
}

@media (max-width: 26rem) {
  .logo__tagline { display: none; }
  .logo__name { font-size: 1.0625rem; }
  .logo__mark { height: 36px; }
}

/* ── Primary navigation ───────────────────────────────────── */

.nav { display: none; }

@media (min-width: 64rem) {
  .nav { display: flex; align-items: center; gap: var(--s1); }
}

.nav__item { position: relative; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-700);
  text-decoration: none;
  border-radius: var(--r-md);
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.nav__link:hover { color: var(--gold-700); background: var(--gold-050); }

.nav__link[aria-expanded='true'] { color: var(--gold-700); background: var(--gold-050); }

.nav__link svg { width: 0.875rem; height: 0.875rem; transition: transform var(--dur) var(--ease); }
.nav__link[aria-expanded='true'] svg { transform: rotate(180deg); }

/* Active-state underline */
.nav__item.is-active > .nav__link { color: var(--gold-700); }
.nav__item.is-active > .nav__link::after {
  content: '';
  position: absolute;
  left: var(--s4);
  right: var(--s4);
  bottom: 4px;
  height: 2px;
  background: var(--gold-500);
  border-radius: var(--r-full);
}

.nav__cta { margin-left: var(--s3); }

/* ── Dropdown & mega menu ─────────────────────────────────── */

.nav__panel {
  position: absolute;
  top: calc(100% + var(--s3));
  /* Right-anchored so a panel hanging off a nav item near the end of the bar
     grows inward instead of past the viewport edge. The dropdown-bearing items
     all sit in the right half of the bar, so this reads naturally. */
  right: 0;
  left: auto;
  z-index: var(--z-dropdown);
  min-width: 20rem;
  max-width: calc(100vw - 2 * var(--gutter));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--s4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              visibility var(--dur);
}

.nav__panel[data-open='true'] { opacity: 1; visibility: visible; transform: none; }

/* A mega panel is anchored to the header container rather than to its nav
   item. Centring a fixed-width panel on an item that sits near the right of
   the header pushed it past the viewport at around 1024px. */
.nav__item--mega { position: static; }

.nav__panel--mega {
  left: 0;
  right: 0;
  width: auto;
  max-width: min(58rem, calc(100vw - 2 * var(--gutter)));
  margin-inline: auto;
  padding: var(--s6);
}

.nav__panel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
}

.nav__panel--mega .nav__panel-grid { grid-template-columns: repeat(3, 1fr); }

.nav__panel-link {
  display: block;
  padding: var(--s3) var(--s4);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  transition: background var(--dur-fast) var(--ease);
}

.nav__panel-link:hover { background: var(--gold-050); color: var(--text); }

.nav__panel-link strong {
  display: block;
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.nav__panel-link:hover strong { color: var(--gold-700); }

.nav__panel-link span {
  display: block;
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  color: var(--text-muted);
}

.nav__panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.nav__panel-foot p { font-size: var(--fs-sm); color: var(--text-muted); max-width: 28rem; }

/* ── Mobile toggle ────────────────────────────────────────── */

.nav-toggle {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--ink-800);
  flex-shrink: 0;
}

@media (min-width: 64rem) { .nav-toggle { display: none; } }

.nav-toggle__bars { display: block; width: 20px; height: 14px; position: relative; }

.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 6px; }
.nav-toggle__bars span:nth-child(3) { top: 12px; }

.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Mobile drawer ────────────────────────────────────────── */

.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  visibility: hidden;
  pointer-events: none;
}

.drawer[data-open='true'] { visibility: visible; pointer-events: auto; }

.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 20, 0.55);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.drawer[data-open='true'] .drawer__scrim { opacity: 1; }

/* The off-canvas panel parks off-screen via translateX(100%); without this it
   extends the scrollable area at very narrow widths. */
.drawer { overflow: hidden; }

.drawer__panel {
  position: absolute;
  inset-block: 0;
  right: 0;
  width: min(24rem, 92vw);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  overscroll-behavior: contain;
}

.drawer[data-open='true'] .drawer__panel { transform: none; }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.drawer__close {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--ink-800);
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--s4) var(--s5) var(--s6);
  -webkit-overflow-scrolling: touch;
}

.drawer__foot {
  padding: var(--s5);
  border-top: 1px solid var(--line);
  background: var(--surface-alt);
  display: grid;
  gap: var(--s3);
  flex-shrink: 0;
  padding-bottom: max(var(--s5), env(safe-area-inset-bottom));
}

.drawer-nav { list-style: none; padding: 0; }
.drawer-nav li { margin-top: 0; border-bottom: 1px solid var(--line); }

.drawer-nav > li > a,
.drawer-nav__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  width: 100%;
  min-height: 52px;
  padding: var(--s3) 0;
  font-family: var(--font-head);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink-800);
  text-decoration: none;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.drawer-nav__trigger svg { width: 1.125rem; height: 1.125rem; color: var(--gold-600); transition: transform var(--dur) var(--ease); }
.drawer-nav__trigger[aria-expanded='true'] svg { transform: rotate(180deg); }

.drawer-nav__sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur) var(--ease);
}
.drawer-nav__sub[data-open='true'] { grid-template-rows: 1fr; }
.drawer-nav__sub > div { overflow: hidden; }

.drawer-nav__sub ul { list-style: none; padding: 0 0 var(--s4) var(--s4); }
.drawer-nav__sub li { border: 0; }

.drawer-nav__sub a {
  display: block;
  padding: var(--s3) 0;
  font-size: var(--fs-base);
  color: var(--text-muted);
  text-decoration: none;
  min-height: 44px;
}

.drawer-nav__sub a:hover { color: var(--gold-700); }

/* ── Sticky mobile action bar ─────────────────────────────── */

.mobile-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: var(--z-sticky);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--ink-900);
  border-top: 1px solid var(--line-dark);
  padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 64rem) { .mobile-bar { display: none; } }

.mobile-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: var(--mobile-bar-h);
  padding: var(--s2);
  font-family: var(--font-head);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-on-dark-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

/* Grid tracks default to a min-content floor; at 320px the labels push the
   bar past the viewport. */
.mobile-bar__item { min-width: 0; }
.mobile-bar__item:active { background: rgba(255, 255, 255, 0.06); }
.mobile-bar__item svg { width: 1.25rem; height: 1.25rem; }
.mobile-bar__item--accent { color: var(--gold-400); }
.mobile-bar__item + .mobile-bar__item { border-left: 1px solid var(--line-dark); }

/* Reserve space so the bar never covers page content. */
@media (max-width: 63.99rem) {
  body { padding-bottom: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom)); }
}

/* ── WhatsApp floating button ─────────────────────────────── */

.whatsapp-fab {
  position: fixed;
  right: var(--s5);
  bottom: var(--s5);
  z-index: var(--z-sticky);
  display: none;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s5);
  background: #1FA855;
  color: #fff;
  font-family: var(--font-head);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--r-full);
  box-shadow: 0 6px 22px rgba(31, 168, 85, 0.36);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

@media (min-width: 64rem) { .whatsapp-fab { display: inline-flex; } }

.whatsapp-fab:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(31, 168, 85, 0.45);
}

.whatsapp-fab svg { width: 1.375rem; height: 1.375rem; }

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  background: var(--ink-900);
  color: var(--text-on-dark-muted);
  padding-top: var(--section-y);
  border-top: 3px solid transparent;
  border-image: var(--gold-grad) 1;
}

.site-footer a { color: var(--text-on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold-300); }

.footer__grid {
  display: grid;
  gap: var(--s6) var(--s5);
  padding-bottom: var(--s7);
}

/* Five content blocks: brand, Products, Company, Resources, Get in touch.
   The old four-column rule dropped the contact block onto a second row and
   left a large hole beside it. */
@media (min-width: 48rem) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (min-width: 62rem) {
  .footer__grid { grid-template-columns: repeat(4, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (min-width: 78rem) {
  .footer__grid {
    grid-template-columns: 1.9fr 1fr 1fr 1fr 1.4fr;
    gap: var(--s6);
    align-items: start;
  }
  .footer__brand { grid-column: auto; }
}

.footer__brand .logo__name { color: #fff; }
.footer__brand .logo__tagline { color: var(--text-on-dark-muted); }
.footer__brand p { font-size: var(--fs-sm); line-height: var(--lh-normal); margin-top: var(--s4); max-width: 34ch; }

.footer__title {
  font-family: var(--font-head);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: var(--s4);
  white-space: nowrap;
}

.footer__links { list-style: none; padding: 0; display: grid; gap: var(--s3); font-size: var(--fs-sm); }
.footer__links a { display: inline-block; transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.footer__links a:hover { transform: translateX(2px); }
.footer__links li { margin-top: 0; }

.footer__contact { list-style: none; padding: 0; display: grid; gap: var(--s3); font-size: var(--fs-sm); }
.footer__contact li { display: flex; gap: var(--s3); margin-top: 0; align-items: flex-start; }
.footer__contact svg { width: 1.0625rem; height: 1.0625rem; color: var(--gold-500); flex-shrink: 0; margin-top: 3px; }
/* break-word, not anywhere: `anywhere` participates in intrinsic sizing and
   collapses this column, pushing the email onto two lines. `break-word` keeps
   the email's full width in the min-content calculation — so it stays on one
   line and sets the column — while still breaking if truly constrained. */
.footer__contact a { overflow-wrap: break-word; }
/* Tighter leading, not smaller type — an address is scanned, not read as
   prose, so it does not need body line-height. text-wrap: pretty keeps a
   single word off the last line. */
.footer__contact address {
  font-style: normal;
  line-height: 1.45;
  text-wrap: pretty;
}

.footer__social { display: flex; gap: var(--s3); margin-top: var(--s5); }

.footer__social a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-md);
  transition: all var(--dur-fast) var(--ease);
}

.footer__social a:hover { border-color: var(--gold-500); background: rgba(201, 151, 43, 0.1); color: var(--gold-300); }
.footer__social svg { width: 1.125rem; height: 1.125rem; }

.footer__bottom {
  border-top: 1px solid var(--line-dark);
  padding-block: var(--s5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  font-size: var(--fs-sm);
}

.footer__legal { display: flex; flex-wrap: wrap; gap: var(--s5); list-style: none; padding: 0; }
.footer__legal li { margin-top: 0; }

/* ── Narrow-desktop nav (1024px–1199px) ───────────────────── */
/* The desktop bar switches on at 64rem, but seven items plus the logo and
   CTA do not fit at exactly 1024px — iPad landscape. Tighten the spacing
   across that band rather than dropping to the drawer, which would cost
   tablet users the mega menu. */

@media (min-width: 64rem) and (max-width: 74.99rem) {
  .site-header__inner { gap: var(--s3); }

  .nav__link {
    padding: var(--s3) var(--s2);
    font-size: 0.8125rem;
    letter-spacing: -0.01em;
  }

  .nav__item.is-active > .nav__link::after {
    left: var(--s2);
    right: var(--s2);
  }

  .nav__cta { margin-left: var(--s2); }
  .nav__cta.btn { padding-inline: var(--s3); font-size: 0.8125rem; }

  .logo { gap: var(--s2); }
  .logo__mark { height: 34px; }
  .logo__name { font-size: 1rem; }
  .logo__tagline { display: none; }
}
