/* ===================================================================================== */
/* HOME — layout ispirato a landing Framer-style (nero / giallo / crema)                 */
/* ===================================================================================== */

.home-page {
  padding-top: 88px;
}

.text-accent {
  color: var(--accent);
}

.text-muted-custom {
  color: var(--text-muted);
}

.btn-outline-cream {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 240, 230, 0.35);
  color: var(--cream);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.btn-outline-cream:hover {
  background: rgba(245, 240, 230, 0.08);
  border-color: var(--cream);
  color: var(--cream);
  transform: translateY(-2px);
}

/* Reveal on scroll */
.reveal-up,
.reveal-scale,
.reveal-stack {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0s);
}

.reveal-scale {
  transform: translateY(24px) scale(0.96);
}

.reveal-stack {
  transform: translateY(72px) scale(0.98);
  transition-delay: calc(0.08s * var(--stack, 1));
}

.reveal-up.is-visible,
.reveal-scale.is-visible,
.reveal-stack.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Hero */
.landing-hero {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  min-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.landing-hero__titles {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.landing-hero__line {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--cream);
}

.landing-hero__line--accent {
  color: var(--accent);
}

.landing-hero__avatar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%);
  z-index: 3;
  width: min(280px, 58vw);
  pointer-events: none;
}

.landing-hero__avatar.is-visible img {
  animation: hero-float 5s ease-in-out infinite;
}

.landing-hero__avatar img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.45));
}

@keyframes hero-float {
  0%, 100% { transform: translate(-50%, -46%) translateY(0); }
  50% { transform: translate(-50%, -46%) translateY(-10px); }
}

.landing-hero__footer {
  position: relative;
  z-index: 4;
  margin-top: clamp(10rem, 28vh, 16rem);
  align-items: flex-end;
}

.landing-hero__tagline {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 22rem;
  margin: 0;
}

/* Trust bar */
.trust-bar {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 1.25rem;
}

.trust-bar__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.trust-bar__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.trust-bar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(245, 197, 24, 0.6);
}

.trust-bar__logos {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: rgba(245, 240, 230, 0.45);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Sections */
.home-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) 1.25rem;
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 36rem;
  margin: 0;
}

/* Project grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.project-preview {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.project-preview:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 197, 24, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.project-preview__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1a1a1a;
}

.project-preview__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.projects-grid--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.projects-grid--duo .project-preview {
  min-height: 100%;
}

.projects-grid--duo .project-preview__media {
  aspect-ratio: 16 / 11;
}

.project-preview {
  will-change: transform;
}

.project-preview__media img {
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-preview:hover .project-preview__media img {
  transform: scale(1.08);
}

.project-preview__body {
  padding: 1.25rem 1.35rem 1.5rem;
}

.project-preview__body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
  color: var(--cream);
}

.project-preview__body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.project-preview__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

/* Shape section (reference-style stacked cards) */
.home-shape {
  max-width: none;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.shape-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.shape-layout__intro {
  position: sticky;
  top: 120px;
}

.shape-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.15;
  color: var(--cream);
  margin-bottom: 2rem;
}

.shape-title__rotate {
  position: relative;
  display: inline-block;
  min-width: 9.5ch;
  vertical-align: bottom;
}

.shape-tools-label {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.shape-tools {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.shape-tools li {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.shape-tools li:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 197, 24, 0.4);
}

.shape-tools img {
  width: 1.65rem;
  height: 1.65rem;
  object-fit: contain;
}

.shape-title__word {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  opacity: 0;
  transform: translateY(0.35em);
  transition: opacity 0.45s ease, transform 0.45s ease;
  white-space: nowrap;
}

.shape-title__word.is-active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
}

.shape-column {
  width: 100%;
  align-self: start;
}

.shape-stack {
  width: 100%;
  max-width: 420px;
  position: relative;
}

.shape-step {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.shape-step:last-child {
  min-height: calc(100vh + 120px);
  min-height: calc(100svh + 120px);
  padding-bottom: 3rem;
}

.shape-card {
  position: sticky;
  top: 112px;
  width: 100%;
  max-width: 420px;
  margin: 0;
  border-radius: 1.25rem;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  padding: 1.35rem 1.35rem 1.4rem;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 0.4rem;
  z-index: var(--shape-z, 1);
  transform-origin: center top;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.45s ease,
    border-color 0.45s ease,
    box-shadow 0.45s ease;
}

.shape-card.is-stacked {
  transform: scale(0.94) translateY(-14px);
  pointer-events: none;
}

.shape-card.is-active {
  transform: none;
  pointer-events: auto;
}

.shape-card.is-entering {
  transform: translateY(var(--shape-enter-y, 0)) rotate(var(--shape-enter-rot, 0deg));
  pointer-events: none;
}

.shape-card.shape-card--accent {
  background: linear-gradient(145deg, var(--accent), var(--accent-hover));
  border-color: rgba(74, 58, 0, 0.2);
  box-shadow: 0 26px 56px rgba(245, 197, 24, 0.28);
}

.shape-card--accent h3 {
  color: var(--accent-ink-strong);
  font-weight: 800;
}

.shape-card--accent p {
  color: var(--accent-ink);
}

.shape-card--accent .shape-card__tags li {
  border-color: rgba(74, 58, 0, 0.28);
  color: var(--accent-ink-strong);
}

.shape-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--cream);
  line-height: 1.2;
}

.shape-card p {
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 0.5rem;
  max-width: 26ch;
  font-size: 0.88rem;
}

.shape-card__tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}

.shape-card__tags li {
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  color: rgba(245, 240, 230, 0.85);
}

.about-teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.75rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(12px);
}

/* Chi sono page */
.about-page {
  padding-top: 88px;
}

.about-page__main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.about-page__hero {
  margin-bottom: 3rem;
}

.about-page__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.about-page__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.about-page__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  margin-bottom: 3rem;
}

.about-page__photo {
  margin: 0;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #161616;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.about-page__photo img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  filter: grayscale(1) contrast(1.03);
}

.about-page__timeline-section {
  max-width: 720px;
}

.about-lead {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}

.about-text {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.about-card {
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.75rem;
  background: var(--surface);
}

.about-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  color: var(--cream);
}

.about-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-timeline li {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.about-timeline li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.about-timeline__when {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.about-timeline strong {
  color: var(--cream);
  font-weight: 600;
}

.about-timeline span:last-child {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* CTA */
.home-cta {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(3rem, 10vw, 6rem) 1.25rem 5rem;
  text-align: center;
}

.home-cta__words {
  position: relative;
  height: 3.5rem;
  margin-bottom: 0.25rem;
}

.home-cta__word {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.25rem);
  color: var(--accent);
  transition: opacity 0.45s ease, transform 0.45s ease;
  white-space: nowrap;
}

.home-cta__word.is-active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.home-cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--cream);
  margin-bottom: 1rem;
}

.home-cta__sub {
  color: var(--text-muted);
  max-width: 28rem;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

.home-skills {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: clamp(3rem, 8vw, 5.5rem);
}

.home-skills__head {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.home-skills__marquee-wrap {
  width: 100%;
  overflow: hidden;
  margin-top: 2rem;
}

.marquee--full {
  width: 100%;
  max-width: none;
  padding: 10px 0;
  --duration: 32s;
}

.home-skills .marquee--full .card {
  width: clamp(220px, 22vw, 280px);
  height: clamp(220px, 22vw, 280px);
  gap: 1.25rem;
  padding: 1.35rem;
  justify-content: space-between;
}

.home-skills .marquee--full .stat .desc {
  font-size: 0.72rem;
  line-height: 1.4;
}

.home-skills .page {
  padding-inline: 0;
}

.home-skills .marquee {
  width: 100%;
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .shape-layout {
    grid-template-columns: 1fr;
  }

  .shape-layout__intro {
    position: static;
  }

  .shape-cards__stage {
    position: relative;
    top: auto;
  }

  .shape-step {
    min-height: 88svh;
  }

  .shape-step:last-child {
    min-height: calc(88svh + 80px);
  }

  .shape-card {
    top: 96px;
  }

  .about-page__grid {
    grid-template-columns: 1fr;
  }

  .about-page__photo {
    order: -1;
    max-width: 360px;
    margin-inline: auto;
  }

  .landing-hero__avatar {
    width: min(220px, 70vw);
  }

  .landing-hero__footer {
    margin-top: 9rem;
  }

  .trust-bar__logos {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero__avatar.is-visible img {
    animation: none;
  }

  .reveal-up,
  .reveal-scale,
  .reveal-stack {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .home-cta__word {
    position: static;
    transform: none;
    opacity: 0;
  }

  .home-cta__word.is-active {
    opacity: 1;
  }

  .home-cta__words {
    height: auto;
  }
}
