/* ============================================================
   Tante Cose Belle — stile del sito pubblico
   Colori e font sono variabili: cambiali qui sotto.
   ============================================================ */

@font-face {
  font-family: "Anton";
  src: url("/assets/fonts/anton-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #121212;
  --bg-2: #1c1c1c;
  --fg: #ffffff;
  --muted: #bcbcbc;
  --line: rgba(255, 255, 255, 0.16);
  --accent: #d6ff00;          /* colore di accento provvisorio */
  --accent-fg: #121212;

  --font-display: "Anton", "Arial Narrow", Impact, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 72px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: clamp(16px, 0.4vw + 14.5px, 19px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-fg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: var(--accent-fg);
  padding: 10px 16px; border-radius: 999px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { padding-inline: var(--gutter); }

/* ---------- tipografia ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: 0.005em;
  margin: 0;
}
.display--xl { font-size: clamp(3.4rem, 13.5vw, 13rem); }
.display--l  { font-size: clamp(2.8rem, 9vw, 8.5rem); }
.display--m  { font-size: clamp(2rem, 5vw, 4.5rem); }
.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}
.lead {
  font-size: clamp(1.15rem, 1.2vw + 0.8rem, 1.75rem);
  line-height: 1.4;
  max-width: 38ch;
  margin: 0;
}
.prose p { margin: 0 0 1.1em; max-width: 62ch; }
.prose p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }

/* titoli divisi in lettere */
.split__word {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  /* spazio per gli accenti delle maiuscole (À, È) e per le discendenti */
  padding: 0.16em 0.02em 0.08em;
  margin: -0.16em -0.02em -0.08em;
  vertical-align: top;
}
.split__char { display: inline-block; will-change: transform; }
.split__char.is-hl { color: var(--accent); }
.js-anim [data-split]:not(.is-split) { visibility: hidden; }

/* comparsa allo scroll */
.js-anim [data-reveal] { opacity: 0; transform: translateY(28px); }

/* ---------- bottoni e link ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  min-height: 52px; padding: 0 1.6em;
  border-radius: 999px;
  background: var(--accent); color: var(--accent-fg);
  font-weight: 700; text-decoration: none;
  border: 0; cursor: pointer;
  transition: transform 0.3s var(--ease), background-color 0.3s;
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--fg); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.arrow { display: inline-block; transition: transform 0.3s var(--ease); }
a:hover .arrow { transform: translateX(4px); }

.link-line {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  transition: background-size 0.4s var(--ease);
}
.link-line:hover { background-size: 0 1.5px; background-position: 100% 100%; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--gutter);
  transition: transform 0.45s var(--ease), background-color 0.3s;
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-solid { background: rgba(18, 18, 18, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.menu-open .site-header { transform: none; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }

.brand { display: inline-flex; text-decoration: none; padding: 6px 0; }
/* il logo è un PNG nero: lo uso come maschera così prende il colore del testo */
.logo {
  display: block;
  width: 92px; aspect-ratio: 677 / 417;
  background-color: currentColor;
  -webkit-mask: url("/assets/img/logo.png") center / contain no-repeat;
          mask: url("/assets/img/logo.png") center / contain no-repeat;
}
.logo--l { width: clamp(160px, 28vw, 320px); }

.menu-toggle {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 6px 0 18px;
  border: 0; border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font-weight: 700; font-size: 0.95rem; cursor: pointer;
}
.menu-toggle__icon {
  position: relative; width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg);
}
.menu-toggle__icon::before, .menu-toggle__icon::after {
  content: ""; position: absolute; left: 11px; right: 11px; height: 2px;
  background: var(--fg); border-radius: 2px;
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}
.menu-toggle__icon::before { top: 14px; }
.menu-toggle__icon::after  { top: 20px; }
.menu-open .menu-toggle__icon::before { top: 17px; transform: rotate(45deg); }
.menu-open .menu-toggle__icon::after  { top: 17px; transform: rotate(-45deg); }

/* ---------- menu a schermo intero ---------- */
.menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--accent); color: var(--accent-fg);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 24px) var(--gutter) 28px;
  overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list li { overflow: hidden; }
.menu__link {
  display: flex; align-items: baseline; gap: 0.35em;
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(3rem, 11vw, 9rem); line-height: 0.95;
  text-decoration: none;
}
.menu__link span:first-child {
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.1em; transform: translateY(-0.5em);
}
.menu__link:hover .menu__label, .menu__link[aria-current="page"] .menu__label { font-style: italic; text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.08em; }
.menu__link:focus-visible { outline-color: var(--accent-fg); }
.menu__foot { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; font-weight: 600; margin-top: 32px; }
.menu__foot a:focus-visible { outline-color: var(--accent-fg); }
.menu-open .menu-toggle { background: var(--accent-fg); color: var(--accent); }
.menu-open .menu-toggle__icon { background: var(--accent); }
.menu-open .menu-toggle__icon::before, .menu-open .menu-toggle__icon::after { background: var(--accent-fg); }
.menu-open .brand { color: var(--accent-fg); }

/* ---------- sezioni ---------- */
main { display: block; }
.section { padding-block: clamp(72px, 12vw, 160px); }
.section--tight { padding-block: clamp(48px, 7vw, 96px); }
.section-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: 20px 40px; margin-bottom: clamp(32px, 5vw, 64px);
}

.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: clamp(32px, 5vw, 64px);
}
.hero__title { max-width: 14ch; }
.hero__foot {
  display: grid; gap: 24px; margin-top: clamp(28px, 4vw, 56px);
  grid-template-columns: 1fr;
  align-items: end;
}
.hero__scroll { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 799px) {
  /* sul telefono il titolo sta al centro: niente grande vuoto sopra */
  .hero { min-height: 92svh; justify-content: center; }
  .hero .display--xl { font-size: clamp(3.4rem, 15.5vw, 6rem); }
}
@media (min-width: 800px) {
  .hero__foot { grid-template-columns: 1fr auto; }
}

.page-hero { padding-top: calc(var(--header-h) + clamp(48px, 10vw, 140px)); padding-bottom: clamp(40px, 6vw, 80px); }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: clamp(14px, 2vw, 26px);
  user-select: none;
}
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__set { display: flex; flex-shrink: 0; }
.marquee__item {
  display: inline-flex; align-items: center; gap: clamp(20px, 3vw, 44px);
  padding-right: clamp(20px, 3vw, 44px);
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(2.2rem, 6vw, 5.5rem); line-height: 1; white-space: nowrap;
}
.marquee__item::after {
  content: ""; width: 0.32em; height: 0.32em; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.marquee--accent { background: var(--accent); color: var(--accent-fg); border: 0; }
.marquee--accent .marquee__item::after { background: var(--accent-fg); }
.marquee--outline .marquee__item { color: transparent; -webkit-text-stroke: 1.5px var(--fg); }
/* senza animazione: le parole vanno a capo */
.no-anim .marquee__track { width: auto; flex-wrap: wrap; padding-inline: var(--gutter); }
.no-anim .marquee__set + .marquee__set { display: none; }
.no-anim .marquee__set { flex-wrap: wrap; }
.no-anim .marquee__item { font-size: clamp(1.8rem, 4vw, 3rem); }

/* ---------- slider progetti ---------- */
.slider { position: relative; }
.slider__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-inline: var(--gutter); margin-bottom: 24px;
}
.slider__count { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1; letter-spacing: 0.02em; }
.slider__count .muted { color: var(--muted); }
.slider__nav { display: flex; gap: 10px; }
.icon-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 0; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line);
  cursor: pointer; font-size: 1.2rem;
  transition: box-shadow 0.3s, background-color 0.3s, color 0.3s;
}
.icon-btn:hover:not([disabled]) { background: var(--fg); color: var(--bg); box-shadow: none; }
.icon-btn[disabled] { opacity: 0.35; cursor: default; }

.slider__track {
  list-style: none; margin: 0;
  display: flex; gap: clamp(14px, 2vw, 28px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 4px var(--gutter) 8px;
  scrollbar-width: none;
  cursor: grab;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.slider__track.is-dragging a { pointer-events: none; }
.slider__item { flex: 0 0 clamp(250px, 78vw, 440px); scroll-snap-align: start; }
@media (min-width: 900px) { .slider__item { flex-basis: clamp(300px, 30vw, 460px); } }

.card { display: block; text-decoration: none; }
.card__media {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5; border-radius: var(--radius);
  background: var(--bg-2);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__num {
  position: absolute; left: 14px; top: 14px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(18, 18, 18, 0.7); font-size: 0.8rem; font-weight: 700;
}
.card__ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-size: clamp(3rem, 8vw, 6rem);
  color: var(--line); text-transform: uppercase;
}
.card__title { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.5rem, 2.4vw, 2.2rem); line-height: 1; margin: 16px 0 6px; font-weight: 400; }
.card__meta { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* bolla "Trascina" che segue il mouse sullo slider */
.drag-cursor {
  position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none;
  width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-fg);
  font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  transform: scale(0); opacity: 0;
}

/* ---------- griglia progetti ---------- */
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(36px, 5vw, 72px) clamp(16px, 2.5vw, 36px);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .grid > li:nth-child(even) { margin-top: clamp(40px, 10vw, 160px); }
}
.grid .card__media { aspect-ratio: 4 / 5; }

/* ---------- servizi ---------- */
.services { list-style: none; margin: 0; padding: 0; counter-reset: s; border-top: 1px solid var(--line); }
.services li {
  counter-increment: s;
  display: flex; align-items: baseline; gap: 0.6em;
  padding-block: clamp(16px, 2.2vw, 28px);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(1.9rem, 5vw, 4.4rem); line-height: 1;
  transition: color 0.3s, padding-left 0.5s var(--ease);
}
.services li::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; color: var(--muted);
  min-width: 2.2em;
}
@media (hover: hover) {
  .services li:hover { color: var(--accent); padding-left: 0.4em; }
}

/* ---------- studio ---------- */
.two-col { display: grid; gap: 32px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1.4fr; gap: 64px; } }

/* ---------- progetto ---------- */
.project-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px 32px; margin: clamp(28px, 4vw, 48px) 0 0; padding: 20px 0 0;
  border-top: 1px solid var(--line);
}
.project-meta dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.project-meta dd { margin: 4px 0 0; font-weight: 600; }
.project-cover { border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.project-cover img { width: 100%; max-height: 92svh; object-fit: cover; }
.gallery { display: grid; gap: clamp(12px, 2vw, 24px); margin-top: clamp(12px, 2vw, 24px); }
@media (min-width: 800px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure.is-wide { grid-column: 1 / -1; }
}
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.next-project {
  display: block; text-decoration: none;
  padding-block: clamp(56px, 9vw, 120px);
  border-top: 1px solid var(--line);
}
.next-project:hover .display { color: var(--accent); }

/* ---------- contatti ---------- */
.form { display: grid; gap: 22px; max-width: 760px; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 0; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--fg);
  background: transparent;
  border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0;
  padding: 10px 0 12px; font-size: clamp(1.1rem, 1vw + 0.8rem, 1.5rem);
  transition: border-color 0.3s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field input:focus-visible, .field textarea:focus-visible { box-shadow: 0 2px 0 0 var(--accent); }
.field [aria-invalid="true"] { border-bottom-color: var(--err, #ff8a8a); }
.field__error { color: var(--err, #ff9c9c); font-size: 0.9rem; min-height: 0; margin: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 600; transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.chip input:checked + span { background: var(--fg); color: var(--bg); box-shadow: none; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-weight: 600; margin: 0; }
.form-status.is-ok { color: var(--fg); }
.form-status.is-err { color: var(--err, #ff9c9c); }
.form-note { font-size: 0.88rem; color: var(--muted); margin: 0; }

/* ---------- CTA e footer ---------- */
.cta { text-align: left; }
.cta__link { display: inline-block; text-decoration: none; }
.cta__link:hover .split__char { color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); padding-block: 40px 28px; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; align-items: end; } }
.footer-grid nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-small { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); font-size: 0.85rem; }

/* ---------- stati ---------- */
.state { color: var(--muted); padding-block: 24px; }
.skeleton { background: linear-gradient(90deg, var(--bg-2), #262626, var(--bg-2)); background-size: 200% 100%; animation: sk 1.4s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

.project-summary { margin-top: 24px; }
.preview-note { display: inline-block; margin: 0 0 16px; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-weight: 700; }
.field .chip { text-transform: none; letter-spacing: normal; font-size: 0.95rem; color: var(--fg); }

/* ============================================================
   TEMI DI SFONDO — palette: #FFFFFF #121212 #BCBCBC #D6FF00
   Senza animazioni ogni sezione ha il suo colore; con le animazioni
   (html.theme-scroll) è il body che cambia colore mentre scorri.
   ============================================================ */
body { transition: background-color 0.7s var(--ease), color 0.7s var(--ease); }

[data-theme="dark"],
html.theme-scroll body[data-active-theme="dark"] {
  --bg: #121212; --bg-2: #1c1c1c; --fg: #ffffff; --muted: #bcbcbc;
  --line: rgba(255, 255, 255, 0.16); --accent: #d6ff00; --accent-fg: #121212; --err: #ff9c9c;
  --blend-fg: #ededed; --blend-muted: #aaaaaa; --blend-hl: #c4ed12; --blend-line: #2e2e2e;
}
html:not(.theme-scroll) [data-theme="light"],
html.theme-scroll body[data-active-theme="light"] {
  --bg: #ffffff; --bg-2: #efefef; --fg: #121212; --muted: #5c5c5c;
  --line: rgba(18, 18, 18, 0.14); --accent: #121212; --accent-fg: #d6ff00; --err: #a31a10;
  --blend-fg: #ededed; --blend-muted: #a3a3a3; --blend-hl: #ededed; --blend-line: #242424;
}
html:not(.theme-scroll) [data-theme="grey"],
html.theme-scroll body[data-active-theme="grey"] {
  --bg: #bcbcbc; --bg-2: #acacac; --fg: #121212; --muted: #383838;
  --line: rgba(18, 18, 18, 0.2); --accent: #121212; --accent-fg: #d6ff00; --err: #7a0f08;
  --blend-fg: #aaaaaa; --blend-muted: #848484; --blend-hl: #aaaaaa; --blend-line: #262626;
}
html:not(.theme-scroll) [data-theme="lime"],
html.theme-scroll body[data-active-theme="lime"] {
  --bg: #d6ff00; --bg-2: #c4eb00; --fg: #121212; --muted: #3b4600;
  --line: rgba(18, 18, 18, 0.2); --accent: #121212; --accent-fg: #d6ff00; --err: #8a1209;
  --blend-fg: #c4ed12; --blend-muted: #9bb900; --blend-hl: #c4ed12; --blend-line: #2c3305;
}
html:not(.theme-scroll) [data-theme] { background: var(--bg); color: var(--fg); }
/* in modalità scroll le sezioni non ridefiniscono i colori: li prendono dal body */
html.theme-scroll [data-theme]:not(body) {
  --bg: inherit; --bg-2: inherit; --fg: inherit; --muted: inherit;
  --line: inherit; --accent: inherit; --accent-fg: inherit; --err: inherit;
  --blend-fg: inherit; --blend-muted: inherit; --blend-hl: inherit; --blend-line: inherit;
}
/* sugli sfondi chiari le lettere evidenziate diventano contorno */
html:not(.theme-scroll) [data-theme]:not([data-theme="dark"]) .split__char.is-hl,
html.theme-scroll body:not([data-active-theme="dark"]) .split__char.is-hl {
  color: transparent; -webkit-text-stroke: 0.03em var(--fg);
}
.site-header.is-solid { background: color-mix(in srgb, var(--bg) 84%, transparent); }
.marquee--accent .marquee__item::after { background: var(--accent-fg); }

/* ============================================================
   OGGETTO FLUIDO (home)
   ============================================================ */
main { position: relative; }
main > section { position: relative; z-index: 1; }
.fluid {
  position: fixed; left: 0; top: 0; z-index: 0;
  pointer-events: none; transform-origin: 50% 50%; will-change: transform;
}
/* gli elementi della home restano nascosti finché non escono dall'oggetto */
.js-anim .page-fluid [data-fly] { opacity: 0; }
.no-fluid .page-fluid [data-fly] { opacity: 1 !important; transform: none !important; }
/* l'oggetto sta tra lo sfondo e gli elementi: quando un elemento è in volo passa dietro
   l'oggetto (ci "entra" e ne "esce"), quando è al suo posto sta sopra */
.page-fluid main > section { z-index: auto; }
.page-fluid .fluid { z-index: 1; }
.page-fluid [data-fly] { position: relative; z-index: 2; will-change: transform, opacity; }
.page-fluid [data-fly].is-flying { z-index: 0; }

/* testi in negativo sopra l'oggetto: con "difference" il colore si inverte dove c'è l'oggetto.
   Il colore di partenza (--blend-*) è calcolato perché sullo sfondo resti identico agli altri testi. */
/* la fusione va sull'elemento che vola: i figli di un elemento con z-index non "vedono" l'oggetto */
.page-fluid main :is([data-fly].eyebrow, [data-fly].display, [data-fly].lead, [data-fly].hero__scroll, .services li[data-fly], .cta__link[data-fly]) {
  color: var(--blend-fg); mix-blend-mode: difference; transition: color 0.7s var(--ease);
}
.page-fluid main :is([data-fly].eyebrow, [data-fly].lead.muted, [data-fly].hero__scroll) { color: var(--blend-muted); }
.page-fluid main .services li[data-fly] { border-bottom-color: var(--blend-line); }
.page-fluid main .services li::before { color: var(--blend-muted); }
.page-fluid main .split__char.is-hl { color: var(--blend-hl); }
html:not(.theme-scroll) .page-fluid [data-theme]:not([data-theme="dark"]) .split__char.is-hl,
html.theme-scroll body.page-fluid:not([data-active-theme="dark"]) main .split__char.is-hl {
  color: transparent; -webkit-text-stroke-color: var(--blend-hl);
}
@media (hover: hover) { .page-fluid main .services li:hover { color: var(--blend-hl); } }

.hero--fluid { justify-content: flex-end; }
.hero--fluid .hero__copy { max-width: min(100%, 56vw); }
@media (max-width: 899px) {
  .hero--fluid { padding-top: 52svh; }
  .hero--fluid .hero__copy { max-width: 100%; }
}

/* ============================================================
   TRE AREE
   ============================================================ */
.pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
@media (min-width: 900px) { .pillars { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.pillar {
  position: relative; border-radius: 22px; padding: 28px 24px 30px; min-height: 300px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  color: #121212; transform: rotate(var(--r, 0deg));
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.5);
}
.pillar:nth-child(3n + 1) { background: #d6ff00; --r: -1.5deg; }
.pillar:nth-child(3n + 2) { background: #121212; color: #ffffff; --r: 1.2deg; }
.pillar:nth-child(3n + 3) { background: #bcbcbc; --r: -0.8deg; }
.pillar h3 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(2rem, 3.2vw, 2.9rem); line-height: 0.95; margin: 0; }
.pillar p { margin: 0; font-weight: 500; max-width: 32ch; }
.pillar__num { position: absolute; top: 20px; right: 22px; font-weight: 800; font-size: 0.85rem; }
.pillar__icon { position: absolute; top: 22px; left: 22px; width: 64px; height: 64px; }
.pillar__icon--1 { border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff 0 8%, #ececec 20%, #9a9a9a 70%, #3a3a3a 100%); }
.pillar__icon--2 { border-radius: 14px; background: linear-gradient(135deg, #d6ff00 0 50%, #b8dc00 50%); transform: rotate(12deg); }
.pillar__icon--2::after { content: ""; position: absolute; inset: 14px; border-radius: 6px; background: #121212; }
.pillar__icon--3 { background: #121212; clip-path: polygon(50% 0, 100% 100%, 0 100%); }

/* ============================================================
   CARD PROGETTO, STICKER, BADGE GIREVOLE
   ============================================================ */
.card__media { transform-style: preserve-3d; }
.card__ph {
  font-size: clamp(2.4rem, 5vw, 4rem); line-height: 0.95; text-align: center; padding: 18px;
  color: #121212; background: var(--ph, #ffffff);
}
.card__ph--0 { --ph: #ffffff; }
.card__ph--1 { --ph: #121212; color: #ffffff; }
.card__ph--2 { --ph: #bcbcbc; }
.card__ph--3 { --ph: #ffffff; }
.card__ph::before {
  content: ""; position: absolute; width: 34%; aspect-ratio: 1; right: -6%; bottom: -6%;
  border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff 0 8%, #ececec 20%, #9a9a9a 70%, #3a3a3a 100%);
}
.card__ph--1::before { border-radius: 18%; transform: rotate(18deg); background: linear-gradient(135deg, #efff8a, #a8c800); }
.card__ph--2::before { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); border-radius: 0; background: #121212; }
.sticker {
  position: absolute; right: 14px; top: 14px; z-index: 2;
  background: #121212; color: #d6ff00; font-family: var(--font-display); text-transform: uppercase;
  padding: 6px 12px; border-radius: 8px; transform: rotate(6deg); font-size: 1.1rem;
}

.cta { position: relative; }
.badge-spin {
  position: absolute; right: var(--gutter); top: clamp(40px, 8vw, 110px);
  width: clamp(110px, 16vw, 190px); aspect-ratio: 1;
  display: grid; place-items: center;
}
.badge-spin svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: rot 14s linear infinite; }
.badge-spin text { font-family: var(--font-display); font-size: 21px; letter-spacing: 1px; fill: var(--fg); text-transform: uppercase; }
.badge-spin__c { width: 42%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1; }
@keyframes rot { to { transform: rotate(360deg); } }
@media (max-width: 700px) { .badge-spin { position: relative; right: auto; top: auto; margin-bottom: 20px; } }

/* stellina che gira nelle fasce */
.marquee__item::after {
  width: 0.42em; height: 0.42em; border-radius: 0;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: rot 6s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .badge-spin svg, .marquee__item::after { animation: none !important; }
}
.slider.is-static .slider__nav { visibility: hidden; }
/* niente scroll orizzontale */
html { overflow-x: clip; }

/* ============================================================
   PRECARICAMENTO (home)
   ============================================================ */
.loader { display: none; }
.js-anim .loader {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; align-content: center; gap: 18px;
  background: #121212; color: #ffffff;
  transition: opacity 0.8s var(--ease), visibility 0s linear 0.8s;
  /* se il JavaScript non parte, la schermata sparisce da sola */
  animation: loader-failsafe 0.5s ease 10s forwards;
}
.loader__blob { width: min(56vmin, 360px); height: auto; overflow: visible; transition: transform 0.9s var(--ease); }
.loader__outline { fill: none; stroke: #ffffff; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.loader__liquid { fill: #d6ff00; }
.loader__pct { margin: 0; font-family: var(--font-display); font-size: clamp(2.6rem, 7vw, 4.5rem); line-height: 1; letter-spacing: 0.02em; }
.loader__label { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #bcbcbc; }
.loader.is-done { opacity: 0; visibility: hidden; }
.loader.is-done .loader__blob { transform: scale(1.35); }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }
html.is-loading, html.is-loading body { overflow: hidden; }
.fx-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
