* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: #222;
  background: #fff;
  letter-spacing: .01em;
}

a {
  color: inherit;
}

/* ---- base / mobile: full-bleed, vertically centered, no scroll ---- */

.page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh; /* modern mobile viewport unit, avoids URL-bar jump */
}

.hero {
  flex: 1;
  min-height: 0; /* let flex child shrink instead of overflowing */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero picture {
  display: contents; /* let the <img> be the actual flex item, so %-based sizing works */
}

.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.site-footer {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1.25rem 1.5rem;
}

.brand,
.contact {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.contact a {
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

/* ---- small mobile: less-aggressive crop (image keeps close to its
   native aspect ratio instead of stretching to fill the viewport),
   image + text sit together as a group, centered in the viewport ---- */

@media (max-width: 500px) {
  .page {
    justify-content: center;
    gap: 2rem;
  }

  .hero {
    flex: none;
  }

  .hero-image {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .site-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }
}

/* ---- desktop (incl. small desktop/tablet): normal document flow,
   scrolling is fine, image floats instead of going full-width ---- */

@media (min-width: 769px) {
  .page {
    height: auto;
    min-height: 100vh;
  }

  .hero {
    flex: none;
    overflow: visible;
    padding-top: clamp(1.5rem, 4vh, 3rem);
  }

  .hero-image {
    width: auto;
    height: auto;
    max-width: 92%;
    max-height: 85vh;
    object-fit: contain;
  }

  .site-footer {
    padding: 1.5rem 2.5rem;
  }

  .brand,
  .contact {
    font-size: 1rem;
  }
}

/* ---- desktop, tall viewport: fit one screen, image floats mid-page,
   footer text sits close to the bottom edge ---- */

@media (min-width: 769px) and (min-height: 800px) {
  .page {
    height: 100vh;
    height: 100dvh;
  }

  .hero {
    flex: 1;
    min-height: 0;
  }

  .hero-image {
    max-height: 85%;
  }

  .site-footer {
    flex: none;
    padding-bottom: 2.5rem;
  }
}
