@font-face {
  font-family: 'DejaVu';
  src: url('../fonts/DejaVuSansMono.ttf');
}

:root {
  --sf-brown: #5e3c33;
  --sf-cream: #efdca6;
}

* {
  box-sizing: border-box;
  font-family: 'DejaVu', sans-serif;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--sf-brown);
}

.landing {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--sf-brown);
}

/*
 * Il mockup originale e' 1920x1080 (16:9).
 * L'artboard viene scalata in modalita' "cover": in questo modo fondale,
 * logo e CTA restano sempre allineati alle coordinate del PSD.
 */
.artboard {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, calc(100svh * 16 / 9));
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  background-color: var(--sf-brown);
  background-image: url("../assets/sfondo_v2.png");
  background-position:  center;
  background-repeat: no-repeat;
  background-size: contain;
}

.brand-lockup {
  position: absolute;
  left: 37.4479167%; /* 719 / 1920 */
  top: 22.5%;        /* 243 / 1080 */
  width: 25.0520833%; /* 481 / 1920 */
  height: auto;
  display: block;
}

.brand-tagline {
  position: absolute;
  top: 54.35%; /* 587 / 1080 */
  left: 50%;
  width: max-content;
  margin: 0;
  transform: translateX(-50%);
  color: var(--sf-cream);
  font-size: 1.1458333vw; /* 22 / 1920 */
  font-weight: 400;
  line-height: 1.42;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.location, .menu {
  position: absolute;
  top: 74.1666667%;    /* 801 / 1080 */
  width: 11.6666667%;  /* 224 / 1920 */
  height: 4.8148148%;  /* 52 / 1080 */
  border: 1px solid var(--sf-cream);
  color: var(--sf-cream);
  text-transform: uppercase;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1458333vw; /* 22 / 1920 */
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.menu {
  left: 50%;
  transform: translateX(-50%);
}

.menu:hover,
.menu:focus-visible {
  background: rgba(239, 220, 166, 0.12);
}

.menu:focus-visible {
  outline: 2px solid var(--sf-cream);
  outline-offset: 4px;
}

.menu:active {
  transform: translateX(-50%) scale(0.98);
}

.location--trieste {
  left: 14.9479167%; /* 287 / 1920 */
}

.location--tuscolana {
  left: 71.8229167%; /* 1379 / 1920 */
}

.location img {
  display: block;
  width: auto;
  height: 34.6153846%; /* 18 / 52 */
  max-width: 86%;
  object-fit: contain;
}

.location:hover,
.location:focus-visible {
  background: rgba(239, 220, 166, 0.12);
}

.location:focus-visible {
  outline: 2px solid var(--sf-cream);
  outline-offset: 4px;
}

.location:active {
  transform: scale(0.98);
}

/*
 * Su schermi molto verticali il 16:9 verrebbe fortemente tagliato ai lati.
 * Qui manteniamo l'identita' visiva ma rendiamo le due sedi sempre accessibili.
 */
@media (max-aspect-ratio: 4 / 5) {
  .artboard {
    width: max(100vw, calc(100svh * 16 / 9));
  }

  .brand-lockup {
    position: fixed;
    top: 18svh;
    left: 50%;
    width: min(78vw, 520px);
    transform: translateX(-50%);
  }

  .brand-tagline {
    position: fixed;
    top: calc(18svh + min(57.25vw, 382px));
    font-size: clamp(16px, 4.3vw, 22px);
  }

  .locations {
    position: fixed;
    left: 0;
    right: 0;
    bottom: max(30px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .location,
  .menu {
    position: static;
    width: min(72vw, 280px);
    height: 52px;
    flex: 0 0 52px;
    font-size: clamp(16px, 4.3vw, 22px);
    transform: none;
  }

  .menu:active {
    transform: scale(0.98);
  }

  .location img {
    height: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .location,
  .menu {
    transition: none;
  }
}
