/* ==========================================================================
   chrome.css - site header, navigation, footer, cookie notice, WhatsApp button
   --------------------------------------------------------------------------
   Everything that appears on every page. Page-specific styling lives in the
   per-page sheets. Depends on the tokens in base.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   header
   --------------------------------------------------------------------------
   Fixed, transparent, and overlapping the hero beneath it. On scroll main.js
   adds .is-stuck, which shrinks it and fades in a dark backdrop.
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background-color 1s ease, min-height 0.5s ease;
}

.site-header.is-stuck {
  min-height: var(--header-height-stuck);
  background-color: rgba(0, 0, 0, 0.5);
}

/**
 * Full-bleed on purpose: the logo sits against the left edge and the nav
 * against the right, rather than inside the centred --container the page
 * content uses. Constraining this row to 1120px is what made the header read
 * as one cluster floating in the middle of a wide screen.
 *
 * Both children are `flex: 0 0 auto` so they size to their content and
 * space-between does the positioning - no percentage bases to keep in sync.
 * A flat 20px gutter at every width, so the logo sits the same distance from
 * the edge on a phone and on a 4K display.
 */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding-inline: var(--gutter);
}

.site-logo {
  flex: 0 0 auto;
  display: flex;
}

.site-logo img {
  width: 160px;
  height: 40px;
  object-fit: contain;
}

.site-header__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 25px;
}

/* --- primary navigation --------------------------------------------------- */

.nav__list {
  display: flex;
  align-items: center;
  gap: 25px;
}

.nav__link {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--on-dark-dim);
  transition: color var(--transition);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--surface-alt);
}

.nav__link[aria-current="page"] {
  color: var(--on-dark);
}

/** "Get a quote" - the only route to /enquire now it has no menu entry. */
.quote-btn {
  padding: 12px 24px;
  border-radius: 3px;
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  line-height: 1;
  background: var(--paper);
  color: var(--ink);
  transition: background var(--transition);
}

.quote-btn:hover,
.quote-btn:focus-visible {
  background: rgba(255, 255, 255, 0.55);
}

/* --- burger toggle --------------------------------------------------------
   In the markup the burger sits BEFORE "Get a quote", as it did in the export:
   the toggle belonged to the nav widget, which preceded the button. Moving it
   after the button visibly reorders the mobile header.
   -------------------------------------------------------------------------- */

.nav-toggle {
  display: none;
  padding: 4px;
  color: var(--on-dark);
}

.nav-toggle svg {
  width: 40px;
  height: 40px;
  fill: currentColor;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  color: var(--on-dark-dim);
}

/* The close glyph replaces the burger only while the menu is open. */
.nav-toggle__close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
  display: block;
}

@media (max-width: 1024px) {
  :root {
    --header-height: 90px;
  }

  .nav-toggle {
    display: block;
  }

  /* Collapsed menu drops out of the header as a translucent panel. */
  .nav {
    position: absolute;
    inset-inline: var(--gutter);
    top: calc(100% + 10px);
    display: none;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    overflow: hidden;
  }

  .nav.is-open {
    display: block;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__link {
    display: block;
    padding: 14px 20px;
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--ink);
  }

  .nav__link:hover,
  .nav__link:focus-visible,
  .nav__link[aria-current="page"] {
    background: rgba(208, 208, 208, 0.55);
    color: var(--ink);
  }

  .site-header__inner {
    position: relative;
  }

  .site-header__actions {
    gap: 10px;
  }
}

@media (max-width: 767px) {
  .quote-btn {
    padding: 10px 16px;
    font-size: var(--text-base);
  }
}

/* --------------------------------------------------------------------------
   footer
   -------------------------------------------------------------------------- */

.site-footer {
  min-height: 300px;
  padding-block: var(--space-4);
  background: var(--ink-soft);
  color: var(--on-dark);
}

.site-footer__contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 80px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  text-align: center;
}

.contact-item svg {
  width: 18px;
  height: 18px;
  fill: var(--on-dark);
}

.contact-item a:hover,
.contact-item a:focus-visible {
  color: var(--muted);
}

.site-footer__divider {
  height: 1px;
  margin-block: 30px;
  border: 0;
  background: rgba(134, 134, 139, 0.55);
}

.social {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: 30px;
}

.social a {
  display: block;
  color: var(--on-dark);
  transition: color var(--transition);
}

.social a:hover,
.social a:focus-visible {
  color: #D9D9D9;
}

.social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.site-footer__legal {
  text-align: center;
  color: var(--on-dark);
}

/* Legal links sit on their own line below the copyright rather than trailing
   it on the same line. */
.site-footer__links {
  margin-top: var(--space-2);
  text-align: center;
}

.site-footer__links a {
  color: var(--on-dark-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: var(--on-dark);
}

@media (max-width: 1200px) {
  .site-footer__contacts {
    gap: 30px;
  }
}

@media (max-width: 1024px) {
  .site-footer__contacts {
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
  }
}

/* --------------------------------------------------------------------------
   cookie notice
   --------------------------------------------------------------------------
   Shown once the visitor scrolls past 50px, unless they have dismissed it
   before (main.js records that in localStorage). Hidden until then so it
   never blocks first paint.
   -------------------------------------------------------------------------- */

.cookie-notice {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-start: 20px;
  z-index: 200;
  display: none;
  flex-direction: column;
  width: 430px;
  max-width: calc(100vw - 40px);
  padding: 25px;
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 4px 20px -7px rgba(0, 0, 0, 0.2);
}

.cookie-notice.is-visible {
  display: flex;
}

.cookie-notice__title {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.cookie-notice__body {
  margin-top: var(--space-2);
  font-size: var(--text-base);
  color: var(--ink);
}

.cookie-notice__body span {
  text-decoration: underline;
  color: var(--muted);
}

.cookie-notice__accept {
  align-self: flex-start;
  margin-top: var(--space-2);
  background: var(--muted);
}

.cookie-notice__accept:hover,
.cookie-notice__accept:focus-visible {
  background: var(--line);
  color: var(--ink);
}

@media (max-width: 1200px) {
  .cookie-notice {
    width: 325px;
    padding: 20px;
  }

  .cookie-notice__title,
  .cookie-notice__body,
  .cookie-notice__accept {
    font-size: var(--text-sm);
  }
}

@media (max-width: 767px) {
  .cookie-notice {
    inset-inline: 10px;
    inset-block-end: 10px;
    width: auto;
  }
}

/* --------------------------------------------------------------------------
   WhatsApp button
   --------------------------------------------------------------------------
   Regions with no WhatsApp number omit this element entirely (see REGIONS in
   meta.js), so there is nothing to hide with CSS.
   -------------------------------------------------------------------------- */

.whatsapp-btn {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition), box-shadow var(--transition);
}

.whatsapp-btn:hover,
.whatsapp-btn:focus-visible {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/**
 * The global focus ring in base.css is a 2px #D0D0D0 outline at a 2px offset.
 * On a 56px circle floating over dark hero footage that reads as a stray grey
 * box, so this draws the ring with a box-shadow spread instead - spread always
 * follows border-radius, in every browser, so it stays a circle.
 *
 * The transparent outline is not decorative: box-shadow is dropped in Windows
 * High Contrast Mode, and the outline is what survives to mark focus there.
 * Do not replace it with `outline: none`.
 */
.whatsapp-btn:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), 0 0 0 3px var(--paper);
}

.whatsapp-btn svg {
  width: 30px;
  height: 30px;
  fill: var(--paper);
}

@media (max-width: 767px) {
  .whatsapp-btn {
    width: 50px;
    height: 50px;
  }

  .whatsapp-btn svg {
    width: 26px;
    height: 26px;
  }
}
