:root {
  --ink: #0b1220;
  --navy: #0e1c2e;
  --deep: #070d14;
  --gold: #c9a36a;
  --gold-soft: #e4d0a8;
  --cream: #f3eadc;
  --paper: #ece3d3;
  --muted: rgba(243, 234, 220, 0.68);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--deep);
  color: var(--cream);
  font-family: Outfit, sans-serif;
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
}
img, video { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, .preloader-word, .city {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}
.eyebrow.gold { color: var(--gold-soft); }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  z-index: 200;
  pointer-events: none;
  background: rgba(201, 163, 106, 0.12);
}
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button { cursor: none; }
  .cursor { display: block; }
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--deep);
  display: grid;
  place-items: center;
  transition: transform 1.1s var(--ease), opacity 0.8s ease;
}
.preloader.is-gone { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.preloader-inner { text-align: center; }
.preloader-mark { width: 92px; height: 92px; margin: 0 auto 1.4rem; border-radius: 50%; }
.preloader-word { font-size: 2.6rem; letter-spacing: 0.42em; }
.preloader-sub { margin-top: 0.4rem; letter-spacing: 0.38em; text-transform: uppercase; font-size: 0.7rem; color: var(--gold); }
.preloader-line { width: 0; height: 1px; margin: 1.6rem auto 0; background: var(--gold); animation: line 1.4s 0.4s var(--ease) forwards; }
@keyframes line { to { width: 88px; } }

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 2.2rem;
  mix-blend-mode: difference;
}
.nav.is-solid {
  mix-blend-mode: normal;
  background: rgba(7, 13, 20, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(201, 163, 106, 0.12);
}
.nav-brand { display: flex; align-items: center; gap: 0.7rem; font-family: "Cormorant Garamond", serif; letter-spacing: 0.28em; }
.nav-brand img { width: 34px; height: 34px; border-radius: 50%; }
.nav nav { display: flex; gap: 1.6rem; }
.nav nav a { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.78; }
.nav-cta { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; border-bottom: 1px solid var(--gold); padding-bottom: 0.15rem; }

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: end start;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) contrast(1.05); }
.hero-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,13,20,0.25) 0%, rgba(7,13,20,0.15) 35%, rgba(7,13,20,0.82) 100%);
}
.hero-copy { position: relative; z-index: 2; padding: 0 8vw 14vh; max-width: 48rem; }
.hero h1 { font-size: clamp(4.6rem, 13vw, 11rem); letter-spacing: 0.12em; line-height: 0.86; }
.hero h2 { font-size: clamp(2.8rem, 7vw, 5.4rem); }
.city { font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-style: italic; color: var(--gold-soft); margin: 0.4rem 0 1.4rem; }
.line { font-family: "Cormorant Garamond", serif; font-size: clamp(1.5rem, 2.8vw, 2.2rem); font-style: italic; max-width: 24ch; }
.film-caption {
  margin-top: 1.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(243, 234, 220, 0.78);
}
.lead { margin-top: 1.1rem; max-width: 36rem; color: var(--muted); }
.scroll-hint {
  position: absolute; right: 2.2rem; bottom: 2.2rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-soft);
}
.scroll-hint i { width: 1px; height: 52px; background: linear-gradient(var(--gold), transparent); animation: drip 1.8s ease-in-out infinite; }
@keyframes drip {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

.ken { transform: scale(1.08); transition: transform 10s ease; }
.hero:hover .ken, .chapter:hover .ken, .split-img:hover img, .invite:hover .ken { transform: scale(1.14); }

.band { padding: 10vh 8vw 3vh; max-width: 46rem; }
.band.ink { color: var(--ink); }
.band h2 { font-size: clamp(2.2rem, 4vw, 3.6rem); margin-bottom: 0.8rem; }
.band p:last-child { color: #5a4a38; }
.band:not(.ink) p:last-child { color: var(--muted); }

.mosaic, .epoca { padding-bottom: 8vh; }
.epoca { background: var(--paper); color: var(--ink); }
.epoca .eyebrow { color: #8a6a32; }

.chapter.epoch .chapter-media {
  filter: sepia(0.28) contrast(1.08) saturate(0.7);
  object-fit: contain;
  background: #1a140c;
}
.chapter.epoch .chapter-wash {
  background: linear-gradient(180deg, rgba(14,12,8,0.15) 10%, rgba(14,12,8,0.78) 100%);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 38vh;
  gap: 0.6rem;
  padding: 0 8vw;
}
.grid.trio {
  grid-template-columns: 1fr 1fr 1fr;
  grid-auto-rows: 46vh;
  padding-bottom: 8vh;
}
.grid figure { position: relative; overflow: hidden; }
.grid figure.wide { grid-column: 1 / -1; grid-row: span 1; min-height: 48vh; }
.grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.2rem 1.1rem;
  background: linear-gradient(transparent, rgba(7,13,20,0.78));
  font-size: 0.78rem; letter-spacing: 0.08em;
  color: var(--gold-soft);
}
.sepia img { filter: sepia(0.35) contrast(1.05) saturate(0.75); }

.souls { overflow: hidden; border-top: 1px solid rgba(201,163,106,0.25); border-bottom: 1px solid rgba(201,163,106,0.25); background: var(--navy); padding: 1.15rem 0; }
.souls-track {
  display: flex; align-items: center; gap: 1.4rem; width: max-content;
  animation: marquee 28s linear infinite;
  font-family: "Cormorant Garamond", serif; font-size: 1.35rem; font-style: italic;
}
.souls-track i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

.manifesto {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}
.manifesto .eyebrow { color: #8a6a32; }
.manifesto-media { min-height: 70vh; }
.manifesto-copy { display: flex; flex-direction: column; justify-content: center; padding: 8vh 7vw; }
.manifesto h2 { font-size: clamp(2.1rem, 3.6vw, 3.4rem); margin-bottom: 1.6rem; }
.manifesto p + p { margin-top: 1rem; }
.manifesto blockquote {
  margin-top: 1.8rem; padding-left: 1.2rem; border-left: 1px solid var(--gold);
  font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.35rem; color: #3b2a16;
}

.chapter { position: relative; min-height: 100vh; display: grid; align-items: end; overflow: hidden; }
.chapter-media { position: absolute; inset: 0; }
.chapter-media.from-fort { object-position: 28% 62%; }
.chapter-wash { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(7,13,20,0.86)); }
.chapter-copy { position: relative; z-index: 2; padding: 0 8vw 12vh; max-width: 40rem; }
.chapter-copy h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); margin-bottom: 1rem; }
.chapter-copy p { color: var(--muted); }
.racconto-line {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(1.45rem, 2.6vw, 2.15rem);
  max-width: 22ch;
  color: #f3eadc;
}
.ascolta {
  appearance: none;
  margin-top: 1.5rem;
  padding: 0.72rem 1.15rem;
  border: 1px solid rgba(201, 163, 106, 0.55);
  background: rgba(7, 13, 20, 0.45);
  color: var(--gold-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.68rem;
}
.story figure { position: relative; min-height: 88vh; overflow: hidden; }
.story img { position: absolute; inset: 0; }
.story figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18vh 8vw 10vh;
  background: linear-gradient(transparent, rgba(7, 13, 20, 0.84));
}
.story h2 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); max-width: 16ch; }

.split { display: grid; grid-template-columns: 1fr 1fr; background: var(--deep); }
.split article { min-height: 92vh; display: grid; grid-template-rows: 1.15fr 0.85fr; }
.split-img { overflow: hidden; min-height: 46vh; }
.split-text { padding: 3.2rem 3rem; display: flex; flex-direction: column; justify-content: center; }
.split-text h3 { font-size: 2.1rem; margin: 0.4rem 0 0.9rem; }
.split-text p { color: var(--muted); }
.tag { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }

.live { padding: 4vh 0 10vh; background: var(--navy); }
.live .band p:last-child { color: var(--muted); }
.live-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.7rem; padding: 0 8vw; }
.live-grid article { background: #0b1624; }
.live-grid img { height: 42vh; }
.live-grid h3 { font-size: 1.7rem; padding: 1.3rem 1.3rem 0.4rem; }
.live-grid p { padding: 0 1.3rem 1.6rem; color: var(--muted); font-size: 0.95rem; }

.partners { padding: 12vh 8vw; background: var(--paper); color: var(--ink); }
.partners .eyebrow { color: #8a6a32; }
.partners h2 { font-size: clamp(2.2rem, 4vw, 3.6rem); margin-bottom: 2.4rem; }
.partners ul { list-style: none; max-width: 42rem; }
.partners li { padding: 1.3rem 0; border-top: 1px solid rgba(138, 106, 50, 0.22); }
.partners strong { display: block; font-family: "Cormorant Garamond", serif; font-size: 1.6rem; font-weight: 500; }
.partners span { color: #5a4a38; }

.invite { position: relative; min-height: 92vh; display: grid; place-items: center; text-align: center; overflow: hidden; }
.invite-media, .invite-wash { position: absolute; inset: 0; }
.invite-wash { background: linear-gradient(180deg, rgba(7,13,20,0.5), rgba(7,13,20,0.8)); }
.invite-copy { position: relative; z-index: 2; padding: 8vh 8vw; max-width: 46rem; }
.invite h2 { font-size: clamp(2.6rem, 5.5vw, 4.8rem); margin-bottom: 1.2rem; }
.invite p { color: var(--muted); }

.footer { padding: 3.2rem 2rem 3.6rem; text-align: center; background: #05080c; }
.footer img { width: 56px; height: 56px; margin: 0 auto 0.9rem; border-radius: 50%; }
.footer p:first-of-type { font-family: "Cormorant Garamond", serif; letter-spacing: 0.28em; }
.footer p + p { margin-top: 0.3rem; font-size: 0.78rem; color: var(--muted); }
.footer .credits { max-width: 40rem; margin: 1.1rem auto 0; font-size: 0.68rem; opacity: 0.7; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

.sound-toggle {
  appearance: none;
  position: fixed; left: 1.4rem; bottom: 1.4rem; z-index: 95;
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0.9rem 0.55rem 0.55rem;
  border: 1px solid rgba(201, 163, 106, 0.45);
  background: rgba(7, 13, 20, 0.62);
  color: var(--gold-soft);
  backdrop-filter: blur(12px);
  font-family: Outfit, sans-serif; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.sound-toggle svg { width: 22px; height: 22px; fill: none; stroke: var(--gold-soft); stroke-width: 1.4; }

@media (max-width: 980px) {
  .nav { padding: 0.9rem 1.1rem; flex-wrap: wrap; gap: 0.6rem; }
  .nav nav { order: 3; width: 100%; justify-content: space-between; }
  .manifesto, .split, .live-grid, .grid { grid-template-columns: 1fr; }
  .grid { grid-auto-rows: 32vh; }
  .grid.trio { grid-template-columns: 1fr; grid-auto-rows: 36vh; }
  .grid figure.wide { min-height: 36vh; }
  .split article { min-height: auto; }
  .hero-copy, .chapter-copy { padding: 0 7vw 12vh; }
}

/* Autonomous Kelibia identity and technical content. */
.hero h1 { font-size: clamp(3rem, 10vw, 9rem); letter-spacing: .04em; }
.hero-copy { max-width: 65rem; }
.project-note { max-width: 48rem; margin-top: 2rem; font-size: .85rem; color: #5a4a38; }
section[id] { scroll-margin-top: 100px; }
@media (max-width: 600px) { .nav nav { flex-wrap: wrap; gap: .5rem 1rem; justify-content: flex-start; } .nav nav a { font-size: .63rem; } .preloader-word { letter-spacing: .2em; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } .reveal { opacity: 1; transform: none; } }
