/* Homepage styles preserved from the previous Spada site. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { -webkit-font-smoothing: antialiased; }

.homepage {
  --frame-scale: min(clamp(9rem, 11.5vw, 15rem), 28svh);
  /* Preserve the original dual-ring frame proportions. */
  --frame-outer: calc(var(--frame-scale) * 5 / 568);
  --frame-gap: calc(var(--frame-scale) * 3 / 568);
  --frame-inner: calc(var(--frame-scale) * 2.5 / 568);
  position: relative;
  isolation: isolate;
  /* Follow the visible viewport as mobile browser controls expand or collapse. */
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 4rem);
  background: #252525;
  color: #ecedee;
  font-family: Georgia, 'Times New Roman', serif;
}

.backdrop {
  --art-scale: 0.85;
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  container-type: size;
  background: linear-gradient(180deg, #2b2b2b 0%, #303030 64%, #252525 100%);
}

.layer {
  position: absolute;
  display: block;
  width: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

/* Preserve the approved demo's opposing anchors and shared drawing scale. */
.clouds {
  top: 0;
  right: 0;
  height: calc(min(100cqh, 110cqw) * var(--art-scale));
  aspect-ratio: 3000 / 821;
  z-index: 1;
}

.foreground {
  bottom: 0;
  left: 0;
  /* Empty SVG headroom is cropped from delivery images; visible art is unchanged. */
  height: calc(min(100cqh, 110cqw) * var(--art-scale));
  aspect-ratio: 3000 / 821;
  z-index: 2;
}

.identity {
  position: relative;
  z-index: 1;
  transform: scale(0.9);
  width: fit-content;
  max-width: 100%;
  padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 4vw, 4.5rem);
  background: #17181a;
  text-align: center;
}

/* Inset shadows retain the SVG's fractional stroke widths on small screens. */
.identity::before,
.identity::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.identity::before {
  inset: 0;
  box-shadow: inset 0 0 0 var(--frame-outer) #8e9094;
}

.identity::after {
  inset: calc(var(--frame-outer) + var(--frame-gap));
  box-shadow: inset 0 0 0 var(--frame-inner) #55585c;
}

.identity h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .homepage {
    --frame-scale: min(clamp(4.5rem, 22vw, 7rem), 28svh);
  }
  .identity h1 {
    font-size: clamp(1.75rem, 7.5vw, 2.75rem);
  }
}
