:root {
  --black: #100e0f;
  --black-2: #151112;
  --ink: #1d1719;
  --ink-2: #281f22;
  --pink: #f6dfe6;
  --pink-soft: #fff2f6;
  --muted: #c8adb7;
  --muted-2: #8d7880;
  --red: #ff1026;
  --red-dark: #b80d1c;
  --line: rgba(246, 223, 230, 0.72);
  --line-soft: rgba(246, 223, 230, 0.18);
  --surface: rgba(22, 18, 19, 0.82);
  --surface-strong: rgba(18, 15, 16, 0.94);
  --surface-soft: rgba(246, 223, 230, 0.075);
  --shadow: rgba(0, 0, 0, 0.42);
  --nav-height: 72px;
  --max-width: 1380px;
  --pad-x: clamp(18px, 3.6vw, 54px);
  --font-main: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--pink-soft);
  background: var(--black);
  text-rendering: geometricPrecision;
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 16px;
  left: 16px;
  top: 16px;
  z-index: 9999;
  background: var(--red);
  color: var(--pink-soft);
  clip: auto;
}

/* =========================
   NAVIGATION
========================= */

.site-nav {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(14px, 3vw, 46px);
  background: rgba(16, 14, 15, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-brand {
  width: 42px;
  height: 42px;
  max-width: 42px;
  max-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  min-width: 42px;
  text-decoration: none;
  overflow: hidden;
}

.nav-logo-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}

/* Vecchie classi non più usate */
.logo-fallback,
.nav-logo-fallback,
.brand-logo-fallback,
.nav-brand-text,
.nav-logo-slot {
  display: none !important;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--pink-soft);
  border-color: var(--line);
  background: rgba(246, 223, 230, 0.07);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--ink);
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--line);
}

/* =========================
   SECTIONS
========================= */

.section {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--nav-height) + clamp(26px, 4vw, 58px)) var(--pad-x) clamp(44px, 5vw, 74px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 26%, rgba(255, 16, 38, 0.16), transparent 32%),
    linear-gradient(135deg, var(--black) 0%, var(--black-2) 56%, #080707 100%);
}

.section::before,
.section::after {
  display: none;
}

.hero-section {
  background:
    radial-gradient(circle at 84% 30%, rgba(255, 16, 38, 0.18), transparent 34%),
    linear-gradient(135deg, #100e0f 0%, #151112 56%, #080707 100%);
}

.project-section {
  background:
    radial-gradient(circle at 18% 74%, rgba(255, 16, 38, 0.12), transparent 30%),
    linear-gradient(135deg, #0f0d0e 0%, #171214 62%, #070607 100%);
}

.systems-section {
  background:
    radial-gradient(circle at 74% 28%, rgba(255, 16, 38, 0.11), transparent 31%),
    linear-gradient(135deg, #100e0f 0%, #141011 55%, #090708 100%);
}

.loop-section {
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 16, 38, 0.13), transparent 30%),
    linear-gradient(135deg, #0e0c0d 0%, #151112 58%, #080707 100%);
}

.music-section {
  background:
    radial-gradient(circle at 78% 58%, rgba(255, 16, 38, 0.15), transparent 32%),
    linear-gradient(135deg, #100e0f 0%, #181315 60%, #080707 100%);
}

.contact-section {
  background:
    radial-gradient(circle at 80% 53%, rgba(255, 16, 38, 0.14), transparent 33%),
    linear-gradient(135deg, #0f0d0e 0%, #171214 60%, #080707 100%);
}

.content-shell {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max-width));
  margin-inline: auto;
  min-width: 0;
}

/* =========================
   LAYOUT
========================= */

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.52fr);
  gap: clamp(16px, 1.8vw, 26px);
  align-items: stretch;
  min-width: 0;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(16px, 1.8vw, 26px);
  align-items: stretch;
  min-width: 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(250px, 0.45fr);
  grid-template-areas:
    "about profile"
    "contact profile";
  gap: clamp(16px, 1.8vw, 26px);
  align-items: stretch;
  min-width: 0;
}

.about-copy {
  grid-area: about;
}

.profile-card {
  grid-area: profile;
}

.contact-card {
  grid-area: contact;
}

.surface {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 26px 90px var(--shadow);
  padding: clamp(20px, 2.6vw, 36px);
  overflow: hidden;
}

.surface-main {
  background: var(--surface-strong);
}

.surface-accented {
  background: linear-gradient(140deg, rgba(246, 223, 230, 0.10), rgba(255, 16, 38, 0.08));
}

.surface-video {
  padding: 0;
  background: var(--ink);
}

.surface-red {
  background: var(--red);
  color: var(--pink-soft);
  border-color: var(--pink);
}

.surface-red::after,
.surface-accented::after,
.surface-video::after {
  content: "";
  position: absolute;
  width: 58%;
  height: 32%;
  right: -14%;
  bottom: 11%;
  border: 1px solid rgba(246, 223, 230, 0.20);
  border-left: 0;
  border-bottom: 0;
  border-radius: 50%;
  transform: rotate(-8deg);
  pointer-events: none;
}

/* =========================
   TYPOGRAPHY
========================= */

.eyebrow,
.module-number,
.module-index,
.video-label {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.surface-red .eyebrow,
.surface-red .module-index {
  color: var(--pink-soft);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.07em;
  line-height: 0.98;
  overflow-wrap: normal;
}

h1 {
  max-width: 1040px;
  font-size: clamp(2.75rem, 4.35vw, 5.45rem);
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(1.95rem, 3.05vw, 3.65rem);
  margin-bottom: 14px;
}

h3 {
  font-size: clamp(1.25rem, 1.8vw, 2.2rem);
  margin-bottom: 14px;
}

p {
  color: var(--muted);
  font-size: clamp(0.9rem, 0.9vw, 1rem);
  line-height: 1.55;
}

.surface-red p,
.surface-red a {
  color: var(--pink-soft);
}

/* =========================
   LOGO HERO FIX
========================= */

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(580px, calc(100svh - var(--nav-height) - 110px));
  min-width: 0;
}

.brand-logo-slot {
  width: 100%;
  max-width: clamp(240px, 36vw, 520px);
  margin: 4px 0 22px;
  min-width: 0;
  overflow: visible;
  flex: 0 1 auto;
}

.brand-logo-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  overflow: visible;
  transform: translateZ(0);
}

.hero-text {
  max-width: 760px;
  font-size: clamp(0.96rem, 1.08vw, 1.12rem);
}

.hero-actions,
.external-row,
.contact-links,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* =========================
   CASE CARD
========================= */

.case-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100%;
  gap: clamp(18px, 2vw, 28px);
}

.case-card h2 {
  font-size: clamp(2.15rem, 3.05vw, 3.75rem);
}

.case-card .tag-row {
  margin-top: 2px;
  margin-bottom: 8px;
}

.case-card .inline-link {
  margin-top: 8px;
}

.tag-row span {
  border: 1px solid var(--line-soft);
  padding: 8px 10px;
  color: var(--pink);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* =========================
   BUTTONS
========================= */

.btn,
.external-row a,
.contact-links a,
.inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  padding: 0 14px;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn:hover,
.external-row a:hover,
.contact-links a:hover,
.inline-link:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--red);
  color: var(--pink-soft);
}

.btn-secondary,
.external-row a,
.contact-links a,
.inline-link {
  background: transparent;
  color: var(--pink-soft);
}

.btn-secondary:hover,
.external-row a:hover,
.contact-links a:hover,
.inline-link:hover {
  background: var(--pink);
  color: var(--black);
}

/* =========================
   PROJECT / VIDEO
========================= */

.section-heading {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-layout .section-heading,
.music-layout .section-heading,
.loop-layout .section-heading {
  min-height: 340px;
}

.video-card {
  min-height: 420px;
}

.video-button {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: grid;
  align-content: end;
  gap: 16px;
  padding: clamp(24px, 3.2vw, 46px);
  border: 0;
  color: inherit;
  text-align: left;
  background:
    radial-gradient(circle at 72% 22%, rgba(255, 16, 38, 0.24), transparent 28%),
    linear-gradient(135deg, rgba(246, 223, 230, 0.04), rgba(246, 223, 230, 0.01)),
    var(--ink);
  cursor: pointer;
}

.video-title {
  max-width: 860px;
  font-size: clamp(1.8rem, 3vw, 3.65rem);
  font-weight: 950;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.video-description {
  max-width: 700px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.play-symbol {
  position: absolute;
  right: clamp(20px, 4vw, 48px);
  top: clamp(20px, 4vw, 48px);
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--red);
  color: var(--pink-soft);
  font-size: 1.35rem;
}

.vimeo-frame {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #000;
}

.video-card.is-playing .vimeo-frame {
  display: block;
}

.vimeo-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* =========================
   SYSTEMS
========================= */

.section-kicker {
  margin-bottom: clamp(16px, 2vw, 26px);
}

.section-kicker h2 {
  margin-bottom: 0;
  max-width: 760px;
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(140px, auto);
  gap: 12px;
}

.system-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(18px, 2vw, 28px);
  min-height: 170px;
}

.system-card .module-index {
  margin-bottom: clamp(18px, 2vw, 26px);
}

.system-card h3 {
  max-width: 760px;
  font-size: clamp(1.18rem, 1.65vw, 2.05rem);
  margin-bottom: 0;
  overflow-wrap: normal;
}

.system-card p {
  max-width: 680px;
  margin-bottom: 0;
}

.card-large {
  grid-column: span 6;
  grid-row: span 2;
  min-height: 290px;
}

.card-tall {
  grid-column: span 3;
  grid-row: span 2;
  min-height: 290px;
}

.card-small {
  grid-column: span 3;
}

.card-wide {
  grid-column: span 6;
}

.card-red {
  grid-column: span 6;
  min-height: 220px;
}

/* =========================
   ACCORDION
========================= */

.accordion {
  padding: 0;
}

.accordion-item {
  width: 100%;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px 22px;
  align-items: start;
  padding: clamp(18px, 1.7vw, 24px);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--pink-soft);
  text-align: left;
  cursor: pointer;
}

.accordion-item:last-child {
  border-bottom: 0;
}

.accordion-item span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  color: var(--red);
  font-weight: 950;
}

.accordion-item strong {
  font-size: clamp(1rem, 1.25vw, 1.42rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.accordion-item small {
  grid-column: 2;
  display: none;
  max-width: 900px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.accordion-item.is-open {
  background: rgba(246, 223, 230, 0.07);
}

.accordion-item.is-open small {
  display: block;
}

/* =========================
   MUSIC
========================= */

.music-panel {
  min-height: 340px;
}

.track-list {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.track-player {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 60px;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(17, 16, 16, 0.72);
  color: var(--pink-soft);
  cursor: pointer;
}

.track-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--red);
  opacity: 0.78;
}

.track-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  min-height: 60px;
}

.track-content strong {
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.track-content em {
  font-style: normal;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.track-player.is-playing .track-content em {
  color: var(--pink-soft);
}

.external-row {
  margin-top: 22px;
}

/* =========================
   CONTACT
========================= */

.profile-card {
  display: grid;
  align-content: space-between;
  gap: 26px;
}

.portrait-frame {
  border: 1px solid var(--line);
  background: var(--black);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.25) contrast(1.04) brightness(0.86);
}

.profile-details p {
  margin-bottom: 0;
}

.contact-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
}

.contact-main {
  font-size: clamp(1.2rem, 2.35vw, 2.55rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
  font-weight: 950;
  text-decoration: none;
  overflow-wrap: anywhere;
}

/* =========================
   RESPONSIVE
========================= */

@media (min-width: 1121px) {
  .systems-grid {
    align-items: stretch;
  }

  .card-small {
    min-height: 255px;
  }
}

@media (max-width: 1120px) {
  .hero-layout,
  .split-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .about-copy,
  .profile-card,
  .contact-card {
    grid-area: auto;
  }

  .case-card,
  .project-layout .section-heading,
  .music-layout .section-heading,
  .loop-layout .section-heading,
  .music-panel {
    min-height: auto;
  }

  .systems-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .card-large,
  .card-tall,
  .card-small,
  .card-wide,
  .card-red {
    grid-column: span 6;
    grid-row: auto;
    min-height: auto;
  }
}

@media (max-width: 980px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: var(--nav-height) 0 auto 0;
    min-height: calc(100vh - var(--nav-height));
    display: none;
    grid-template-columns: 1fr;
    align-content: start;
    justify-items: stretch;
    gap: 8px;
    width: 100%;
    background: var(--black);
    border-bottom: 1px solid var(--line);
    padding: 18px 14px;
  }

  .nav-links.is-open {
    display: grid;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: flex;
    width: 100%;
    min-height: 58px;
    justify-content: center;
    border-color: var(--line-soft);
    font-size: 0.92rem;
    text-align: center;
  }

  .section {
    min-height: auto;
  }

  h1 {
    font-size: clamp(2.35rem, 9vw, 4.1rem);
  }

  h2 {
    font-size: clamp(1.8rem, 7.2vw, 3.15rem);
  }

  .video-card,
  .video-button {
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-height: 62px;
  }

  .site-nav {
    padding: 0 14px;
  }

  .nav-brand {
    width: 34px;
    height: 34px;
    max-width: 34px;
    max-height: 34px;
    flex: 0 0 34px;
    min-width: 34px;
  }

  .nav-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .section {
    padding: calc(var(--nav-height) + 22px) 14px 42px;
  }

  .surface {
    padding: 18px;
  }

  .brand-logo-slot {
    width: 100%;
    max-width: 100%;
    margin: 4px 0 20px;
  }

  .brand-logo-img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .hero-actions,
  .external-row,
  .contact-links {
    display: grid;
  }

  .btn,
  .external-row a,
  .contact-links a,
  .inline-link {
    width: 100%;
  }

  .case-card {
    gap: 20px;
  }

  .case-card .inline-link {
    margin-top: 12px;
  }

  .case-card .tag-row {
    margin-bottom: 10px;
  }

  .case-card h2 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .accordion-item {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 18px;
  }

  .accordion-item span {
    width: 34px;
    height: 34px;
  }

  .play-symbol {
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
  }

  .track-content {
    align-items: start;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .brand-logo-slot {
    max-width: calc(100vw - 64px);
  }

  h1 {
    font-size: clamp(2.25rem, 10.8vw, 3.7rem);
  }

  .hero-text {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


