/* ============================================================
   LA FACTORY 2027 — CHI SIAMO
   PUNTO 231 / REBIRTH
   BREAK THE FRAME — REBUILD THE FUTURE
   ============================================================ */

/* 01 — BASE */

.about-page .rebirth {
  --rb-orange: #ff571c;
  --rb-red: #ed250a;
  --rb-white: #f6f3ef;
  --rb-muted: #aaa39e;
  --rb-black: #050505;

  position: relative;
  width: 100%;
  isolation: isolate;
  color: var(--rb-white);
  background: var(--rb-black);
}

/* Non usare overflow: hidden sul contenitore principale:
   può impedire il funzionamento dello sticky. */

.about-page .rebirth,
.about-page .rebirth-sequence {
  overflow: visible;
}

/* 02 — INTRO */

.about-page .rebirth-intro {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  min-height: 72svh;
  padding: 36px clamp(24px, 6vw, 110px) 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 70px;
  background:
    radial-gradient(
      ellipse at 75% 80%,
      rgba(255, 87, 28, .11),
      transparent 44%
    ),
    #050505;
}

.about-page .rebirth-intro .section-index {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.16);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.about-page .rebirth-intro .section-index span:first-child {
  color: var(--rb-orange);
}

.about-page .rebirth-intro-copy {
  max-width: 1150px;
  padding-top: 65px;
}

.about-page .rebirth .eyebrow {
  margin: 0 0 25px;
  color: var(--rb-orange);
  font-size: clamp(10px, .9vw, 13px);
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.about-page .rebirth-intro-copy h2 {
  margin: 0;
  font-size: clamp(60px, 10vw, 165px);
  font-weight: 900;
  line-height: .88;
  letter-spacing: -.075em;
  text-transform: uppercase;
}

.about-page .rebirth-intro-copy h2 em {
  color: var(--rb-orange);
  font-style: normal;
}

.about-page .rebirth-intro-copy > p:last-child {
  max-width: 470px;
  margin: 35px 0 0;
  color: var(--rb-muted);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.65;
}

/* 03 — SCROLL SEQUENCE */

.about-page .rebirth-sequence {
  position: relative;
  height: 350vh;
  height: 350svh;
  background: #030303;
}

.about-page .rebirth-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
      ellipse at center,
      rgba(255, 70, 12, .075) 0%,
      rgba(15, 4, 2, .05) 33%,
      #030303 76%
    );
}

/* 04 — CINEMA FRAME */

.about-page .rebirth-cinema {
  position: absolute;
  inset: clamp(20px, 3vw, 48px);
  z-index: 5;
  pointer-events: none;
}

.about-page .rebirth-corner {
  position: absolute;
  display: block;
  width: clamp(22px, 3vw, 48px);
  height: clamp(22px, 3vw, 48px);
  opacity: .65;
  border: 0 solid rgba(255, 112, 51, .7);
}

.about-page .rebirth-corner.top-left {
  top: 0;
  left: 0;
  border-top-width: 1px;
  border-left-width: 1px;
}

.about-page .rebirth-corner.top-right {
  top: 0;
  right: 0;
  border-top-width: 1px;
  border-right-width: 1px;
}

.about-page .rebirth-corner.bottom-left {
  bottom: 0;
  left: 0;
  border-bottom-width: 1px;
  border-left-width: 1px;
}

.about-page .rebirth-corner.bottom-right {
  bottom: 0;
  right: 0;
  border-bottom-width: 1px;
  border-right-width: 1px;
}

/* 05 — ATMOSPHERE */

.about-page .rebirth-atmosphere {
  position: absolute;
  z-index: 0;
  inset: -20%;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 50% 50%,
      rgba(255, 69, 10, .18),
      rgba(110, 13, 2, .055) 28%,
      transparent 55%
    );
  opacity: .65;
  filter: blur(45px);
  animation: rebirthBreathing 8s ease-in-out infinite;
}

.about-page .rebirth-sticky::after {
  content: "";
  position: absolute;
  z-index: 8;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 3px,
      rgba(255,255,255,.035) 4px
    );
}

@keyframes rebirthBreathing {
  0%, 100% {
    opacity: .45;
    transform: scale(.95);
  }

  50% {
    opacity: .85;
    transform: scale(1.08);
  }
}

/* 06 — ORIGINAL FACTORY SYMBOL */

.about-page .rebirth-visual {
  position: relative;
  z-index: 2;
  width: min(64vw, 670px, 73svh);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: translateZ(0);
}

.about-page .rebirth-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 68%;
  height: 68%;
  border-radius: 50%;
  background: rgba(255, 65, 10, .22);
  filter: blur(90px);
  opacity: .6;
}

.about-page .rebirth-symbol {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  filter: drop-shadow(0 0 24px rgba(255,65,10,.14));
  transform: translateZ(0);
}

/* Il canvas diventa visibile solo quando il JS è pronto. */

.about-page .rebirth-canvas {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}

.about-page .rebirth.is-ready .rebirth-canvas {
  opacity: 1;
}

.about-page .rebirth.is-ready .rebirth-symbol {
  opacity: 0;
}

/* 07 — CINEMATIC OVERLAY */

.about-page .rebirth-overlay {
  position: absolute;
  z-index: 6;
  inset: 0;
  padding:
    clamp(34px, 5vw, 76px)
    clamp(36px, 6vw, 100px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
}

.about-page .rebirth-frame-label,
.about-page .rebirth-frame-counter {
  color: rgba(255,255,255,.52);
  font-size: clamp(9px, .8vw, 12px);
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.about-page .rebirth-frame-counter {
  color: var(--rb-orange);
  font-variant-numeric: tabular-nums;
}

/* 08 — TRANSITION MESSAGES */

.about-page .rebirth-messages {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 40px 20px clamp(90px, 12vh, 160px);
  pointer-events: none;
}

.about-page .rebirth-message {
  position: absolute;
  bottom: clamp(90px, 12vh, 160px);
  left: 20px;
  right: 20px;
  margin: 0;
  opacity: 0;
  transform: translateY(24px);
  color: var(--rb-white);
  font-size: clamp(24px, 5vw, 72px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.055em;
  text-align: center;
  text-transform: uppercase;
  transition:
    opacity .35s ease,
    transform .45s ease;
}

.about-page .rebirth-message[data-rebirth-message="rebuild"] {
  color: var(--rb-orange);
}

.about-page .rebirth-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 09 — FINAL REVEAL */

.about-page .rebirth-reveal {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 40px 20px clamp(75px, 10vh, 125px);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .55s ease,
    transform .55s ease;
}

.about-page .rebirth-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.about-page .rebirth-reveal-kicker {
  margin-bottom: 14px;
  color: var(--rb-orange);
  font-size: clamp(9px, .8vw, 12px);
  font-weight: 800;
  letter-spacing: .2em;
}

.about-page .rebirth-reveal-brand {
  display: block;
  font-size: clamp(37px, 7vw, 105px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.07em;
  text-transform: uppercase;
  text-shadow: 0 8px 40px rgba(0,0,0,.75);
}

.about-page .rebirth-reveal-statement {
  margin: 18px 0 0;
  color: var(--rb-white);
  font-size: clamp(12px, 1.5vw, 19px);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: .04em;
}

.about-page .rebirth-reveal-statement em {
  color: var(--rb-orange);
  font-style: normal;
}

/* 10 — PROGRESS BAR */

.about-page .rebirth-progress {
  position: absolute;
  z-index: 12;
  left: clamp(20px, 4vw, 70px);
  right: clamp(20px, 4vw, 70px);
  bottom: clamp(23px, 3vw, 45px);
  height: 2px;
  overflow: hidden;
  background: rgba(255,255,255,.16);
  pointer-events: none;
}

.about-page .rebirth-progress > span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(
    90deg,
    #ed250a,
    #ff571c,
    #ffb13c
  );
  box-shadow: 0 0 15px rgba(255,87,28,.6);
  transition: width .08s linear;
}

/* 11 — OUTRO / FINAL CHAPTER */

.about-page .rebirth-outro {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    36px
    clamp(24px, 6vw, 110px)
    clamp(65px, 8vw, 120px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(40px, 5vw, 75px);
  background:
    radial-gradient(
      ellipse at 85% 90%,
      rgba(255, 87, 28, .085),
      transparent 45%
    ),
    #080808;
}

.about-page .rebirth-outro-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}

.about-page .rebirth-outro-top span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
}

.about-page .rebirth-outro-top span:last-child {
  color: var(--rb-orange);
}

.about-page .rebirth-outro-content {
  max-width: 1300px;
  margin: auto 0 0;
}

.about-page .rebirth-outro-content h3 {
  margin: 0;
  font-size: clamp(40px, 7.4vw, 116px);
  font-weight: 900;
  line-height: .98;
  letter-spacing: -.065em;
  text-transform: uppercase;
}

.about-page .rebirth-outro-content h3 em {
  color: var(--rb-orange);
  font-style: normal;
}

.about-page .rebirth-outro-content > p:last-child {
  max-width: 580px;
  margin: 45px 0 0;
  color: var(--rb-muted);
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.7;
}

/* Final links added in PUNTO 229 */

.about-page .rebirth-outro .closing-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(24px, 4vw, 65px);
  margin: 0 0 15px !important;
}

.about-page .rebirth-outro .closing-links a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  min-width: 230px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.45);
  color: var(--rb-white);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition:
    color .25s ease,
    border-color .25s ease;
}

.about-page .rebirth-outro .closing-links a:hover {
  color: var(--rb-orange);
  border-color: var(--rb-orange);
}

.about-page .rebirth-outro .closing-links a span {
  color: var(--rb-orange);
  font-size: 22px;
  transition: transform .3s ease;
}

.about-page .rebirth-outro .closing-links a:hover span {
  transform: translate(4px, -4px);
}

.about-page .rebirth-outro-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.16);
}

.about-page .rebirth-outro-bottom span,
.about-page .rebirth-outro-bottom strong {
  font-size: clamp(11px, 1.1vw, 15px);
  font-weight: 800;
  letter-spacing: .12em;
}

.about-page .rebirth-outro-bottom strong {
  color: var(--rb-orange);
}

/* 12 — TABLET */

@media (max-width: 900px) {
  .about-page .rebirth-intro {
    min-height: 65svh;
    padding-bottom: 75px;
  }

  .about-page .rebirth-intro-copy h2 {
    font-size: clamp(60px, 11vw, 105px);
  }

  .about-page .rebirth-visual {
    width: min(82vw, 590px, 64svh);
  }

  .about-page .rebirth-sequence {
    height: 300svh;
  }

  .about-page .rebirth-outro-content h3 {
    font-size: clamp(43px, 7vw, 78px);
  }
}

/* 13 — MOBILE */

@media (max-width: 600px) {
  .about-page .rebirth-intro {
    min-height: 68svh;
    padding: 26px 22px 65px;
    gap: 45px;
  }

  .about-page .rebirth-intro .section-index {
    font-size: 9px;
    letter-spacing: .1em;
  }

  .about-page .rebirth-intro-copy {
    padding-top: 35px;
  }

  .about-page .rebirth-intro-copy h2 {
    font-size: clamp(48px, 12.5vw, 84px);
    line-height: .94;
    letter-spacing: -.07em;
  }

  .about-page .rebirth-intro-copy > p:last-child {
    max-width: 340px;
    margin-top: 28px;
    font-size: 15px;
  }

  .about-page .rebirth-sequence {
    height: 270svh;
  }

  .about-page .rebirth-sticky {
    height: 100svh;
  }

  .about-page .rebirth-visual {
    width: min(88vw, 420px, 55svh);
    transform: translateY(-6%);
  }

  .about-page .rebirth-visual::before {
    filter: blur(55px);
  }

  .about-page .rebirth-cinema {
    inset: 20px;
  }

  .about-page .rebirth-corner {
    width: 22px;
    height: 22px;
  }

  .about-page .rebirth-overlay {
    padding: 33px 32px;
  }

  .about-page .rebirth-frame-label,
  .about-page .rebirth-frame-counter {
    font-size: 8px;
    letter-spacing: .08em;
  }

  .about-page .rebirth-frame-label {
    max-width: 145px;
    line-height: 1.5;
  }

  .about-page .rebirth-message {
    bottom: 19svh;
    font-size: clamp(25px, 8vw, 44px);
  }

  .about-page .rebirth-reveal {
    padding-bottom: 14svh;
  }

  .about-page .rebirth-reveal-brand {
    font-size: clamp(42px, 12vw, 72px);
  }

  .about-page .rebirth-reveal-statement {
    font-size: 12px;
  }

  .about-page .rebirth-reveal-kicker {
    font-size: 9px;
    letter-spacing: .1em;
  }

  .about-page .rebirth-progress {
    left: 22px;
    right: 22px;
    bottom: 25px;
  }

  .about-page .rebirth-outro {
    min-height: 85svh;
    padding: 28px 22px 55px;
    gap: 45px;
  }

  .about-page .rebirth-outro-top span {
    font-size: 9px;
    letter-spacing: .08em;
    line-height: 1.5;
  }

  .about-page .rebirth-outro-content h3 {
    font-size: clamp(35px, 9vw, 58px);
    line-height: 1.02;
  }

  .about-page .rebirth-outro-content > p:last-child {
    margin-top: 30px;
    font-size: 16px;
  }

  .about-page .rebirth-outro .closing-links {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
  }

  .about-page .rebirth-outro .closing-links a {
    width: 100%;
    min-width: 0;
  }

  .about-page .rebirth-outro-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
  }

  .about-page .rebirth-outro-bottom span,
  .about-page .rebirth-outro-bottom strong {
    font-size: 11px;
  }
}

/* 14 — SMALL SCREENS */

@media (max-width: 380px) {
  .about-page .rebirth-intro-copy h2 {
    font-size: 12vw;
  }

  .about-page .rebirth-frame-label {
    max-width: 110px;
  }

  .about-page .rebirth-visual {
    width: min(85vw, 50svh);
  }

  .about-page .rebirth-reveal-brand {
    font-size: 11vw;
  }

  .about-page .rebirth-outro-content h3 {
    font-size: 8.6vw;
  }
}

/* 15 — REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
  .about-page .rebirth-atmosphere {
    animation: none !important;
  }

  .about-page .rebirth-message,
  .about-page .rebirth-reveal,
  .about-page .rebirth-canvas,
  .about-page .rebirth-progress > span {
    transition: none !important;
  }

  .about-page .rebirth-visual {
    transform: none;
  }
}

/* 16 — FALLBACK */

.about-page .rebirth:not(.is-ready) .rebirth-reveal {
  opacity: 1;
  transform: none;
}

.about-page .rebirth:not(.is-ready) .rebirth-reveal-brand {
  text-shadow: 0 8px 35px rgba(0,0,0,.95);
}

/* In assenza del motore JS, evitiamo uno scroll
   eccessivamente lungo senza animazione. */

.about-page .rebirth:not(.is-ready) .rebirth-sequence {
  height: 100svh;
}

/* ============================================================
   END — LA FACTORY / PUNTO 231
   ============================================================ */


/* ============================================================
   LA FACTORY — REBIRTH
   MOBILE STICKY RESTORE
   Solo smartphone — desktop invariato
   ============================================================ */

@media screen and (max-width: 600px) {

  /* La sequenza deve avere spazio sufficiente
     per mantenere la scena ferma durante l'effetto. */
  .about-page .rebirth-sequence,
  .about-page .rebirth.is-ready .rebirth-sequence {
    position: relative;
    height: 270svh;
    overflow: visible;
  }

  /* La scena rimane visivamente ferma mentre
     l'utente continua a scorrere. */
  .about-page .rebirth-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    width: 100%;
    height: 100svh;
    overflow: hidden;
    display: grid;
    place-items: center;
  }

  /* Logo centrato sullo schermo. */
  .about-page .rebirth-visual {
    width: min(88vw, 420px, 55svh);
    transform: none;
  }

}


/* ============================================================
   LA FACTORY — REBIRTH MOBILE STICKY FIX
   ============================================================ */

@media screen and (max-width: 600px) {

  html,
  body.about-page {
    overflow-x: clip;
  }

  body.about-page main,
  body.about-page .rebirth,
  body.about-page .rebirth-sequence {
    overflow: visible;
    contain: none;
  }

  body.about-page .rebirth-sequence {
    position: relative;
    height: 270svh;
  }

  body.about-page .rebirth-sticky {
    position: sticky;
    top: 0;
    height: 100svh;
    width: 100%;
    overflow: hidden;
  }

  body.about-page .rebirth-visual {
    transform: none;
  }

}
