/* ============================================================
   PAGINA — AI-Creative-Studio.com
   I testi compaiono subito, senza attendere la scena 3D: lo
   sfondo CSS riproduce l'orizzonte della scena, che poi si
   dissolve sopra di esso appena il primo fotogramma è pronto.
   ============================================================ */

:root {
  --ink: #f5f5f1;
  --muted: #9cacb7;
  --gold: #d8c6a7;
  --gold-line: #c7ac7a;
  --cyan: #96f1ff;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
  background: #010203;
}
body {
  background:
    radial-gradient(70% 28% at 50% 63%, #0a141b 0%, #050a0e00 70%),
    linear-gradient(#010203 0%, #03070a 52%, #050a0d 60%, #020406 100%);
}
canvas {
  display: block;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.is-live canvas {
  opacity: 1;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.brand {
  position: fixed;
  z-index: 3;
  top: 38px;
  left: 46px;
  animation: fade 1s 0.1s both;
}
.brand:before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: var(--gold-line);
  margin-bottom: 17px;
}
.brand strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.brand span {
  display: block;
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.23em;
  color: #c1cbd0;
}

.status {
  position: fixed;
  z-index: 3;
  top: 38px;
  right: 46px;
  width: 168px;
  text-align: right;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  animation: fade 1s 0.2s both;
}
.status b {
  font-weight: 400;
  color: var(--gold);
}
.status .label {
  display: block;
  margin-top: 9px;
  color: #c1cbd0;
}
.status i {
  display: block;
  height: 1px;
  margin-top: 14px;
  background: #ffffff1c;
  overflow: hidden;
}
.status i span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5fd9ec, var(--gold-line));
  transform-origin: left;
  transform: scaleX(0);
}

.message {
  position: fixed;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 0 30px calc(13vh + 22px);
  pointer-events: none;
}
.message:before {
  content: "";
  position: absolute;
  inset: 30% -15% -25%;
  background: radial-gradient(ellipse at 50% 82%, #020507d9 10%, #0205078a 40%, transparent 70%);
  z-index: -1;
}
.message h1 {
  font-size: clamp(34px, 4.3vw, 68px);
  font-weight: 300;
  letter-spacing: -0.04em;
  word-spacing: 0.025em;
  line-height: 1.16;
  margin: 0 0 27px;
  max-width: 1100px;
  text-shadow: 0 3px 35px #000;
}
.message h1 span {
  display: block;
  animation: rise 1.2s var(--ease) both;
}
.message h1 span:last-child {
  color: var(--gold);
  animation-delay: 0.12s;
}
.contact {
  pointer-events: auto;
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #d8c6a76b;
  padding: 0 0 8px;
  transition: color 0.2s;
  animation: rise 1.2s 0.26s var(--ease) both;
}
.contact:hover {
  color: #e9c48b;
}
.details {
  pointer-events: auto;
  display: flex;
  gap: 13px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: 0.035em;
  color: #b1bec6;
  animation: rise 1.2s 0.36s var(--ease) both;
}
.details a {
  color: inherit;
  text-decoration: none;
}
.details a:hover {
  text-decoration: underline;
}
.details .dash {
  color: #8e7859;
}

.signature {
  position: fixed;
  left: 46px;
  bottom: 38px;
  z-index: 3;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  animation: fade 1s 0.3s both;
}
.controls {
  position: fixed;
  z-index: 4;
  right: 42px;
  bottom: 28px;
  display: flex;
  gap: 9px;
  animation: fade 1s 0.3s both;
}
.no-3d .controls,
.no-3d .status {
  display: none;
}
button {
  width: 38px;
  height: 38px;
  border: 1px solid #adbdcb30;
  border-radius: 50%;
  background: #111c2455;
  color: #becbd3;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(10px);
}
button:hover {
  border-color: #b6e8f099;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 6px;
}
.controls svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#error {
  display: none;
  position: fixed;
  z-index: 10;
  top: 50%;
  left: 20px;
  right: 20px;
  text-align: center;
  font-size: 13px;
  color: #b1bec6;
}

@media (max-width: 600px) {
  .brand {
    top: 24px;
    left: 24px;
  }
  .brand strong {
    font-size: 14px;
  }
  .brand span {
    font-size: 9px;
  }
  .status {
    top: 24px;
    right: 22px;
    width: 92px;
    font-size: 9px;
    letter-spacing: 0.14em;
  }
  .status .label {
    display: none;
  }
  .status i {
    margin-top: 10px;
  }
  .message {
    padding: 0 22px calc(17vh + 30px);
  }
  .message h1 {
    font-size: clamp(30px, 8.5vw, 42px);
    line-height: 1.2;
    letter-spacing: -0.035em;
  }
  .details {
    flex-direction: column;
    gap: 9px;
  }
  .details .dash {
    display: none;
  }
  .contact {
    font-size: 15px;
  }
  .signature {
    left: 24px;
    font-size: 8px;
    letter-spacing: 0.08em;
  }
  .controls {
    right: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *:before {
    animation: none !important;
    transition: none !important;
  }
}
