/* ====== FOOTER SECTION ====== */

#footer {
  /* Base: in-flow at original position, navy bg, z-index for desktop reveal.
     The position:fixed reveal trick is applied ONLY in the desktop media
     query below. Declaring position:fixed in the base rule was triggering
     an iOS Safari layout-reservation bug where mobile (which overrode to
     relative) still reserved a phantom footer-height of space above the
     footer in flow. */
  position: relative;
  width: 100%;
  z-index: 1;
  background-color: var(--color-navy);
}

@media (min-width: 769px) {
  #footer {
    position: fixed;
    bottom: 0;
    left: 0;
  }
}

/* ---- Video atmosphere banner (standalone section) ---- */

.footer-atmosphere {
  width: 100%;
  overflow: hidden;
  background-color: var(--color-black);
  height: 45vh;
}

.footer-atmosphere video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Footer content block ---- */

.footer-body {
  padding: clamp(3rem, 5vw, 5rem) 0 0;
}

.footer-inner {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 var(--site-gutter);
}

/* ---- Top row: clocks | contact | nav ---- */

.footer-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(3rem, 5vw, 6rem);
  align-items: start;
}

/* Clocks group */
.footer-clocks {
  display: flex;
  gap: clamp(2.5rem, 4vw, 5rem);
}

.footer-clock__city {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-white);
  margin: 0 0 0.5em;
}

.footer-clock__time {
  display: block;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-white);
  opacity: 0.6;
}

.footer-clock__tz {
  display: block;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-white);
  opacity: 0.4;
  margin-top: 0.35em;
}

/* Contact column */
.footer-contact {
  justify-self: center;
}

.footer-contact__heading {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-white);
  margin: 0 0 0.5em;
}

.footer-contact__sub {
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-white);
  opacity: 0.6;
  margin: 0 0 1.3em;
}

.footer-contact__btn {
  display: inline-block;
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
  font-weight: var(--font-weight-bold);
  padding: 0.5em 1.6em;
  border: 1.5px solid var(--color-white);
  border-radius: 50px;
  background: transparent;
  color: var(--color-white);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.footer-contact__btn:hover {
  background: var(--color-white);
  color: var(--color-navy);
}

/* Nav column */
.footer-nav {
  justify-self: end;
}

.footer-nav__heading {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-white);
  margin: 0 0 0.6em;
}

.footer-nav__links {
  list-style: none;
  margin: 0 0 1em;
  padding: 0;
}

.footer-nav__links li {
  margin-bottom: 0.25em;
}

.footer-nav__links a {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.footer-nav__links a:hover {
  opacity: 1;
}

.footer-nav__social {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.footer-nav__social:hover {
  opacity: 1;
}

/* ---- Statements row ---- */

.footer-statements {
  display: flex;
  gap: clamp(3rem, 5vw, 6rem);
  margin-top: clamp(3rem, 5vw, 5rem);
}

.footer-statement {
  max-width: 300px;
}

.footer-statement:last-child {
  max-width: 450px;
}

.footer-statement__flag {
  display: block;
  height: 30px;
  width: auto;
  margin-bottom: 1em;
}

.footer-statement p {
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.6;
  color: var(--color-white);
  opacity: 0.6;
  margin: 0;
}

/* ---- Copyright bar ---- */

.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(3rem, 4vw, 4rem);
  padding: clamp(1.2rem, 2vw, 1.5rem) 1rem;
}

.footer-bar__copy {
  font-size: clamp(0.8rem, 0.95vw, 0.9rem);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  opacity: 0.85;
}

.footer-bar__policies {
  display: flex;
  gap: clamp(1.5rem, 2.5vw, 2.5rem);
}

.footer-bar__policies a {
  font-size: clamp(0.8rem, 0.95vw, 0.9rem);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.footer-bar__policies a:hover {
  opacity: 1;
}

/* ====== MOBILE ====== */
@media (max-width: 768px) {

  /* position:relative is now the base rule, so no override needed here. */

  .footer-top {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Mobile clocks: tight gap, no mid-word wrapping, fall back to
     wrapping the whole clock onto a second row if the viewport is
     unusually narrow. Previously the gap was 64px (var(--space-lg))
     which didn't leave room for "San Francisco" — it broke onto two
     lines and Sydney spilled past the right edge. */
  .footer-clocks {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1rem, 4vw, 1.75rem) clamp(1.25rem, 5vw, 2rem);
  }

  .footer-clock__city,
  .footer-clock__time,
  .footer-clock__tz {
    white-space: nowrap;
  }

  .footer-contact {
    justify-self: start;
  }

  .footer-nav {
    justify-self: start;
  }

  .footer-statements {
    flex-direction: column;
    gap: var(--space-md);
  }

  .footer-statement:first-child,
  .footer-statement:last-child {
    flex: none;
  }

  /* The atmosphere section (video banner) is only meaningful on desktop,
     where the fixed-position footer reveal trick uses it as a transition
     region. On mobile the footer becomes position: relative, so the
     atmosphere has no purpose - it just shows as empty dark space (or a
     broken iOS play-button when autoplay is refused). Hide the whole
     section, including its outer wrapper, so it takes zero vertical space.
     The two selectors are separated rather than comma-joined because iOS
     Safari has been observed applying a comma-list rule to one selector
     but not the other when the layout has already been partially
     computed by the time the media query takes effect. */
  #atmosphere {
    display: none;
  }
  .footer-atmosphere {
    display: none;
  }

  .footer-bar {
    flex-direction: row;
  }
}
