/* SDB – stili base. I colori arrivano da data/site.json (css_tokens() in head.php). */

:root {
  --pad: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--deep);
  color: #fff;
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, p { margin: 0; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }

:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 4px; }

/* ---------- palco ---------- */
.stage {
  position: relative;
  flex: 1;
  overflow: hidden;
  display: flex;
}
.stage-in {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(56px, 10vh, 120px);
  padding-top: calc(env(safe-area-inset-top, 0px) + clamp(24px, 4vw, 40px));
  padding-bottom: clamp(48px, 9vh, 104px);
}

.logo { display: inline-block; align-self: flex-start; }
.logo img { height: clamp(30px, 3.2vw, 40px); width: auto; }

.copy { max-width: 720px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  color: var(--teal-bright);
  margin-bottom: 28px;
}
.pulse {
  width: 8px; height: 8px;
  background: var(--teal-bright);
  transform: skewX(-26deg);
  animation: pulse 2.4s var(--ease) infinite;
}

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(36px, 5.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 16ch;
  margin-bottom: 28px;
  text-wrap: balance;
}
.lead {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--on-dark);
  max-width: 34em;
  margin-bottom: 36px;
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-bottom: 20px; }
.btn-primary {
  display: inline-flex; align-items: center;
  height: 54px; padding: 0 30px;
  background: var(--teal); color: #fff;
  font-weight: 500; text-decoration: none;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.btn-primary:hover { background: var(--teal-mid); transform: translateY(-2px); }
.mail {
  color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .28);
  padding-bottom: 2px;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.mail:hover { color: var(--teal-bright); border-color: var(--teal-bright); }
.note { font-size: 14px; color: var(--muted-2); max-width: 34em; }

/* ---------- diagonali (motivo del marchio) ---------- */
.diagonals {
  position: absolute;
  z-index: 1;
  top: -140px; right: -200px;
  height: calc(100% + 280px);
  display: flex; gap: 26px;
  transform: skewX(-26deg);
  pointer-events: none;
}
.diagonals span {
  display: block;
  width: clamp(64px, 8vw, 120px);
  height: 100%;
  animation: rise 1.1s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 90ms + 120ms);
}
.copy > * { animation: fade .9s var(--ease) both; animation-delay: 520ms; }
.copy > h1 { animation-delay: 600ms; }
.copy > .lead { animation-delay: 680ms; }
.copy > .actions, .copy > .note { animation-delay: 760ms; }

@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- footer ---------- */
.site-foot {
  background: var(--deeper);
  color: #8E9AA5;
  font-size: 14px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.foot-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px;
  min-height: 76px; padding-top: 20px; padding-bottom: 20px;
}
.foot-id { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot-links { display: flex; gap: 24px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .diagonals { right: -300px; opacity: .55; }
}
@media (max-width: 560px) {
  .diagonals {
    top: -60px; right: -150px; height: 52%; gap: 14px; opacity: 1;
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 95%);
            mask-image: linear-gradient(to bottom, #000 45%, transparent 95%);
  }
  .diagonals span { width: 52px; }
  .stage-in { justify-content: flex-start; gap: 26vh; }
  .btn-primary { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .diagonals span, .copy > *, .pulse { animation: none; }
  .btn-primary:hover { transform: none; }
}
