/* Amazing Spaces design system tokens (Brand Toolkit V4.0) */
:root {
  --navy-blue: #1f2e4f;
  --white: #ffffff;

  /* Gotham and Bodoni are licensed; Montserrat and Bodoni Moda stand in. */
  --font-gotham: "Gotham", "Montserrat", Verdana, sans-serif;
  --font-bodoni: "Bodoni", "Bodoni Moda", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* Stop iOS Safari enlarging the text in landscape */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--navy-blue);
  font: 400 16px/24px var(--font-gotham);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
}

/* Two-line headline: Bodoni line over an offset Gotham line */
.headline { margin: 0; font-weight: 400; }
.headline span { display: block; }
.headline__serif {
  font: 400 clamp(56px, 11vw, 120px)/0.95 var(--font-bodoni);
}
.headline__sans {
  font: 700 clamp(22px, 4vw, 44px)/1.1 var(--font-gotham);
  letter-spacing: 0.08em;
  margin: 0.3em 0 0 2.2em;
}

/* Habitat logo with "by Amazing Spaces" beneath, as Locale does */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  /* 40px on desktop; on iPhone also clears the home-indicator safe area */
  padding: 0 max(16px, env(safe-area-inset-right))
    max(40px, calc(env(safe-area-inset-bottom) + 24px))
    max(16px, env(safe-area-inset-left));
}
.brand img { display: block; width: 120px; height: auto; }
.brand p {
  margin: 0;
  font: 700 11px/16px var(--font-gotham);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/*
 * Phones in portrait. The footer is pinned to the bottom of a 100svh box, so
 * if the browser's bottom toolbar overlaps that box (iOS Safari, in-app
 * browsers), the logo is the part that gets hidden. Keep it clear of the
 * bottom edge by a share of the viewport. Portrait phones have lots of spare
 * height, so this costs nothing.
 */
@media (max-width: 600px) {
  .brand {
    padding-bottom: max(40px, 10vh, calc(env(safe-area-inset-bottom) + 24px));
    padding-bottom: max(40px, 10svh, calc(env(safe-area-inset-bottom) + 24px));
  }
}

/* Short viewports (phones in landscape): scale everything down a little */
@media (max-height: 500px) {
  main { padding-top: 8px; padding-bottom: 8px; }
  .headline__serif { font-size: clamp(40px, 15vh, 120px); }
  .headline__sans { font-size: clamp(18px, min(4vw, 7vh), 44px); }
  .brand {
    gap: 6px;
    padding-bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
  }
  .brand img { width: 96px; }
}
