/* ==========================================================================
   site-base.css — site-wide fixes loaded AFTER main.css
   Keeps accessibility, motion and small-screen safety rules in one place.
   ========================================================================== */

/* Brand tokens (single source of truth; main.css --theme / --orange match these) */
:root {
  --zn-gold:      #EAAA00;
  --zn-gold-dark: #CBA052;
  --zn-orange:    #DA291C;
  --zn-error:     #DA291C;
  --zn-success:   #007864;
}

/* ---- Keyboard focus: always visible, readable on light AND dark backgrounds ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid #212721 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 5px var(--zn-gold) !important;
}
main:focus { outline: none; }

/* ---- Skip link ---- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 3000;
  padding: 12px 20px;
  background: #212721;
  color: #fff;
  font-weight: 700;
  border-radius: 3px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---- Respect users who ask for less motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---- Never let long words or titles push the page sideways ---- */
h1, h2, h3, h4 { overflow-wrap: break-word; }

/* ---- Small phones: header fits at 320px ---- */
@media (max-width: 380px) {
  .zn-header-inner { padding: 0 16px; gap: 12px; }
  .zn-logo { min-width: 0; }
  .zn-header .zn-logo img { height: 40px !important; max-width: 100%; }
}

/* ---- Touch targets: at least 44px tall in the mobile menu and footer ---- */
@media (max-width: 1024px) {
  .zn-mobile-nav a, .zn-mobile-close, .zn-hamburger { min-height: 44px; min-width: 44px; }
  .zn-hamburger { align-items: center; justify-content: center; }
}

/* ---- Grid children may shrink below their content width (prevents tables pushing the page wide) ---- */
.ab-two-col > *, .cr-how-inner > *, .ct-main-inner > * { min-width: 0; }
.ab-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.esg-section-banner > *, .zn-news-row > * { min-width: 0; }
@media (max-width: 900px) { .esg-section-banner { grid-template-columns: minmax(0, 1fr); } }
.zn-news-body, .esg-section-banner-txt { overflow-wrap: break-word; }
.esg-two-col > *, [class*="two-col"] > * { min-width: 0; }
@media (max-width: 900px) { .esg-two-col { grid-template-columns: minmax(0, 1fr); } }
/* Long emails / job titles wrap instead of pushing the page wide */
.jd-main a, .jd-main p, .jd-breadcrumb span, .jd-title { overflow-wrap: anywhere; }

/* ---- Home hero: text must fit inside the screen on small phones (was cut off at 320px) ---- */
@media (max-width: 768px) {
  .zn-hero .zn-hero-text { width: 100%; min-width: 0; }
  .zn-hero .zn-hero-p, .zn-hero .zn-hero-h { max-width: 100%; overflow-wrap: break-word; }
}
@media (max-width: 480px) {
  .zn-hero .zn-hero-eyebrow { font-size: 1.15rem; letter-spacing: 0.14em; gap: 8px; }
  .zn-hero .zn-hero-eyebrow::before, .zn-hero .zn-hero-eyebrow::after { width: 20px; }
}
@media (max-width: 480px) {
  .zn-hero .zn-hero-content { padding-bottom: 96px; }   /* keep buttons clear of the slider arrows */
  .zn-hero .zn-hero-p { display: block; -webkit-line-clamp: unset; overflow: visible; }
}

/* ---- Careers: "Click here to view all vacancies" button must fit on phones ---- */
@media (max-width: 600px) {
  .cr-vac-strip .cr-vac-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; white-space: normal; text-align: center;
    padding-left: 16px; padding-right: 16px; letter-spacing: 0.06em;
  }
}
