/* AI — Raccolta progetti. Nero della copertina, Roboto Mono per i tag di codice, un serif per i titoli,
   Montserrat Alternates per la campagna, i bruni caldi di FrescoGusto e il banco chiaro degli strumenti. */
@font-face {
  font-family: 'AI Mono';
  src: url('../assets/ai/fonts/roboto-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'AI Mono';
  src: url('../assets/ai/fonts/roboto-mono-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'AI Alt';
  src: url('../assets/ai/fonts/montserrat-alternates-300.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'AI Alt';
  src: url('../assets/ai/fonts/montserrat-alternates-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'AI Card';
  src: url('../assets/ai/fonts/montserrat-300.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'AI Sans';
  src: url('../assets/ai/fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'AI Serif';
  src: url('../assets/ai/fonts/instrument-serif-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AI Serif';
  src: url('../assets/ai/fonts/instrument-serif-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

.project-ai {
  --black: #000;
  --ink: #121212;
  --warm: #1c1815;
  --warm-2: #13100e;
  --mist: #dadada;
  --text: #f3f3f3;
  --soft: rgb(243 243 243 / 70%);
  --faint: rgb(243 243 243 / 46%);
  --line: rgb(243 243 243 / 16%);
  --cream: #e9dcc6;
  --mono: 'AI Mono', 'Roboto Mono', ui-monospace, monospace;
  --serif: 'AI Serif', 'Times New Roman', Times, serif;
  --alt: 'AI Alt', 'Montserrat Alternates', 'Montserrat', sans-serif;
  --sans: 'AI Sans', Inter, 'Helvetica Neue', Arial, sans-serif;
  --card: 'AI Card', 'Montserrat', 'AI Alt', sans-serif;
  --g: clamp(20px, 4vw, 64px);
  --wrap: 1200px;
  --out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --drop: cubic-bezier(0.3, 1.35, 0.5, 1);
  color-scheme: dark;
  scroll-behavior: smooth;
}
.project-ai body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.project-ai *,
.project-ai *::before,
.project-ai *::after {
  box-sizing: border-box;
}
.project-ai img {
  max-width: 100%;
}
.project-ai a {
  color: inherit;
  text-decoration: none;
}
.project-ai :focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: #fff;
  color: #000;
  font: 500 13px var(--mono);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}
.ai {
  overflow-x: clip;
}
.wrap {
  width: min(100%, calc(var(--wrap) + 2 * var(--g)));
  margin-inline: auto;
  padding-inline: var(--g);
}
.num {
  color: var(--cream);
  font: 400 0.86em/1 var(--mono);
  letter-spacing: 0.04em;
}

/* Intestazione: vetro nero, come la copertina ------------------------------------------- */
.project-ai .portfolio-header.project-header {
  background: rgb(0 0 0 / 66%);
  box-shadow: inset 0 -1px rgb(255 255 255 / 9%);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

/* Entrate -------------------------------------------------------------------------------- */
.reveal-ready [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(26px);
}
.reveal-ready [data-reveal] {
  transition:
    opacity 0.8s var(--out) var(--d, 0ms),
    transform 1s var(--out) var(--d, 0ms);
}

/* APERTURA --------------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  padding: calc(var(--project-header-height) + clamp(14px, 3.4svh, 40px)) var(--g) clamp(26px, 5svh, 56px);
  overflow: hidden;
  background: var(--black);
}
.hero-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  --mx: 0;
  --my: 0;
}
.hero-scene iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.hero-scene.is-ready iframe {
  opacity: 1;
}
.hero.is-off .hero-scene iframe {
  display: none;
}
/* Il bagliore viola richiama la piattaforma di Spline Expert. */
.hero-glow {
  position: absolute;
  left: 50%;
  bottom: -34%;
  width: max(130vw, 900px);
  height: 78%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgb(118 76 255 / 34%), rgb(118 76 255 / 10%) 55%, transparent);
  pointer-events: none;
  transition: opacity 1.6s ease;
}
/* Bolle di sapone iridescenti: la copertina senza Spline (mobile, niente WebGL, movimento ridotto). */
.bubble {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, rgb(140 110 255 / 7%), transparent 64%);
  box-shadow: inset 0 0 calc(var(--s) * 0.09) rgb(255 255 255 / 9%);
  translate: calc(var(--mx) * var(--z) * 1px) calc(var(--my) * var(--z) * 1px);
  transition:
    translate 1.2s var(--out),
    opacity 1.6s ease;
  pointer-events: none;
}
.bubble::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from var(--a, 0deg), #ff7ad9, #8a7dff, #4fd8ff, #7dffb2, #ffe17a, #ff9a6e, #ff7ad9);
  -webkit-mask: radial-gradient(closest-side, transparent 78%, #000 95%, rgb(0 0 0 / 30%) 99%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 78%, #000 95%, rgb(0 0 0 / 30%) 99%, transparent 100%);
  opacity: 0.62;
}
.bubble::after {
  content: '';
  position: absolute;
  left: 19%;
  top: 13%;
  width: 30%;
  height: 17%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 255 255 / 62%), transparent);
  transform: rotate(-36deg);
}
.motion-ok .bubble {
  animation: bob var(--d, 12s) ease-in-out infinite alternate;
}
.motion-ok .bubble::before {
  animation: sheen calc(var(--d, 12s) * 1.6) linear infinite;
}
.hero.is-off .bubble,
.hero.is-off .bubble::before {
  animation-play-state: paused;
}
@keyframes bob {
  to {
    transform: translate3d(0, -5%, 0) scale(1.03);
  }
}
@keyframes sheen {
  to {
    filter: hue-rotate(360deg);
  }
}
.hero-scene.is-ready .bubble {
  opacity: 0;
}
.hero-scene.is-ready .hero-glow {
  opacity: 0.4;
}

.hero-inner {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(18px, 3svh, 30px);
  width: min(100%, 880px);
  margin-inline: auto;
  pointer-events: none;
}
.hero-inner > * {
  pointer-events: auto;
}
.chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: clamp(340px, 64svh, 620px);
  align-self: center;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 24px;
  background: linear-gradient(rgb(255 255 255 / 4%), rgb(255 255 255 / 1.5%));
  box-shadow: 0 40px 90px rgb(0 0 0 / 45%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  overflow: hidden;
}
.chat-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: clamp(18px, 3vw, 28px) clamp(14px, 2.4vw, 26px) 14px;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-mask: linear-gradient(transparent, #000 26px, #000 calc(100% - 10px), transparent);
  mask: linear-gradient(transparent, #000 26px, #000 calc(100% - 10px), transparent);
}
.chat-log::-webkit-scrollbar {
  display: none;
}
.chat-log:focus-visible {
  outline-offset: -4px;
}
.msg {
  max-width: min(80%, 470px);
}
.msg p {
  margin: 0;
  padding: 10px 15px 11px;
  border-radius: 18px;
  color: #fff;
  font: 400 clamp(14px, 1.08vw, 15.5px) / 1.5 var(--sans);
  overflow-wrap: anywhere;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.msg-user {
  align-self: flex-end;
}
.msg-user p {
  border-bottom-right-radius: 5px;
  background: rgb(11 147 246 / 42%);
}
.msg-gpt p {
  border-bottom-left-radius: 5px;
  background: rgb(229 229 234 / 18%);
}
.msg .rest {
  color: transparent;
}
.msg.is-pending {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.msg.is-new {
  animation: msg-in 0.5s var(--out) both;
}
@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}
.msg-gpt.is-thinking p::after {
  content: '';
  display: inline-block;
  width: 26px;
  height: 8px;
  vertical-align: middle;
  background: radial-gradient(circle 3px, #fff 98%, transparent) 0 50% / 9px 8px repeat-x;
  animation: think 1s steps(3, jump-none) infinite;
}
@keyframes think {
  from {
    clip-path: inset(0 66% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
.chat-input {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 0 clamp(10px, 1.6vw, 16px) clamp(10px, 1.6vw, 16px);
  padding: 9px 9px 9px 16px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 16px;
  background: rgb(64 65 79 / 42%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.chat-field {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 34px;
  max-height: 4.6em;
  overflow: hidden;
  padding-block: 7px;
  color: #fff;
  font: 400 15px/1.5 var(--sans);
}
.chat-typed:empty {
  display: none;
}
.chat-typed:not(:empty) + .chat-placeholder {
  display: none;
}
.chat-typed:not(:empty)::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.18em;
  background: #fff;
  animation: caret 1s step-end infinite;
}
@keyframes caret {
  50% {
    opacity: 0;
  }
}
.chat-placeholder {
  color: rgb(255 255 255 / 46%);
}
.chat-send {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgb(255 255 255 / 12%);
  color: rgb(255 255 255 / 55%);
  transition:
    background 0.2s,
    color 0.2s;
}
.chat.is-typing .chat-send {
  background: #fff;
  color: #000;
}
.hero-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 28px;
}
.hero-title {
  margin: 0;
  font: 400 clamp(22px, 2.5vw, 34px) / 1.1 var(--mono);
  letter-spacing: -0.02em;
}
.hero-title .slash {
  margin-inline: 0.08em;
  color: var(--faint);
}
.hero-kicker {
  margin: 10px 0 0;
  color: var(--faint);
  font: 400 12px/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.chat-controls {
  display: flex;
  gap: 10px;
}
.chip-btn {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  background: rgb(255 255 255 / 6%);
  color: var(--text);
  font: 400 12px/1 var(--mono);
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    background 0.2s,
    border-color 0.2s;
}
.chip-btn:hover {
  border-color: rgb(255 255 255 / 55%);
  background: rgb(255 255 255 / 12%);
}

/* INDICE DELLA RACCOLTA ------------------------------------------------------------------ */
.works {
  padding: clamp(56px, 8vw, 110px) var(--g) clamp(40px, 5vw, 70px);
  background: linear-gradient(var(--black), var(--ink) 220px);
}
.works-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4.5vw, 72px);
  width: min(100%, var(--wrap));
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.work-card {
  display: block;
}
.work-label {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  color: var(--soft);
  font: 400 14px/1.4 var(--mono);
}
.work-media {
  overflow: hidden;
  border-radius: 18px;
  background: #1b1b1b;
}
.work-media img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.6s cubic-bezier(0.45, 0, 0.25, 1);
}
.work-card:hover .work-media img,
.work-card:focus-visible .work-media img {
  transform: scale(1.05);
}
.work-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 18px;
  font: 400 clamp(22px, 2.3vw, 32px) / 1.15 var(--mono);
  letter-spacing: -0.02em;
}
.work-arrow {
  font-size: 0.8em;
  transition: transform 0.3s var(--out);
}
.work-card:hover .work-arrow {
  transform: translateY(5px);
}

/* Testate dei due lavori: tag di codice, come nell'originale --------------------------- */
.work-head {
  text-align: center;
}
.work-kicker {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 0 0 16px;
  color: var(--soft);
  font: 400 clamp(13px, 1.1vw, 15px) / 1.4 var(--mono);
}
.code-title {
  margin: 0;
  font: 400 clamp(38px, 6.4vw, 96px) / 1 var(--mono);
  letter-spacing: -0.045em;
  white-space: nowrap;
}

/* 01 SPLINE EXPERT --------------------------------------------------------------------------- */
.spline {
  padding: clamp(70px, 10vw, 150px) var(--g) clamp(80px, 11vw, 160px);
}
.spline-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  width: min(100%, 1000px);
  margin: clamp(40px, 5vw, 70px) auto clamp(40px, 5vw, 64px);
}
.spline-text {
  margin: 0;
  color: var(--soft);
  font: 400 clamp(14px, 1.15vw, 16px) / 1.8 var(--mono);
}
.spec {
  display: grid;
  gap: 18px;
  margin: 0;
  align-content: start;
}
.spec div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.spec dt {
  color: var(--faint);
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.spec dd {
  margin: 6px 0 0;
  font: 400 15px/1.45 var(--mono);
}
.credit-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  width: min(100%, var(--wrap));
  margin: 28px auto 0;
  color: var(--soft);
  font: 400 13px/1.6 var(--mono);
}
.credit-line div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.6em;
}
.credit-line dt,
.credit-line dd {
  margin: 0;
}
.credit-line b {
  color: var(--text);
}

/* Palchi per gli embed: copertina ferma, l'iframe arriva al clic ------------------------ */
.stage {
  width: min(100%, var(--wrap));
  margin: 0 auto;
}
.stage-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 22px;
  background: #050505;
}
.stage-spline .stage-frame,
.stage-video .stage-frame {
  aspect-ratio: 16 / 9;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 8%);
}
.stage-backdrop {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  filter: blur(38px) saturate(1.25) brightness(0.55);
  z-index: -1;
}
.stage-spline .stage-poster {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  height: 82%;
  max-width: 88%;
  object-fit: contain;
  border-radius: 14px;
  transform: translate(-50%, -50%);
  box-shadow: 0 30px 80px rgb(0 0 0 / 55%);
}
.stage-video .stage-poster,
.laptop-screen .stage-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.5s ease;
}
.stage-video .stage-poster {
  filter: brightness(0.62);
}
.stage-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px 8px 8px;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 999px;
  background: rgb(18 18 18 / 46%);
  color: #fff;
  font: 400 14px/1 var(--mono);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  transition:
    background 0.25s,
    border-color 0.25s,
    transform 0.35s var(--out);
}
.stage-play:hover {
  border-color: rgb(255 255 255 / 70%);
  background: rgb(18 18 18 / 66%);
  transform: translate(-50%, -50%) scale(1.04);
}
.play-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
}
.play-icon::before {
  content: '';
  width: 0;
  height: 0;
  margin-left: 3px;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent #000;
}
.stage-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  background: #000;
  transition: opacity 0.6s ease;
}
.stage-frame.is-live iframe {
  opacity: 1;
}
.stage-frame.is-loading .stage-play {
  pointer-events: none;
}
.stage-frame.is-loading .play-icon::before {
  border: 2px solid #000;
  border-right-color: transparent;
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.stage figcaption,
.site-note {
  margin: 16px 0 0;
  color: var(--faint);
  font: 400 12px/1.6 var(--mono);
  text-align: center;
}
.stage figcaption a,
.site-note a {
  margin-left: 6px;
  color: var(--soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgb(255 255 255 / 30%);
}
.stage figcaption a:hover,
.site-note a:hover {
  color: #fff;
}

/* FRESCOGUSTO -------------------------------------------------------------------------------- */
.fg {
  position: relative;
}
.fg-open {
  padding: clamp(80px, 11vw, 170px) var(--g) clamp(80px, 10vw, 150px);
  background: linear-gradient(var(--ink) 30%, var(--warm));
}
.fg-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  width: min(100%, var(--wrap));
  margin: clamp(48px, 6vw, 90px) auto 0;
}
.kv {
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 40px 90px rgb(0 0 0 / 45%);
}
.kv img {
  display: block;
  width: 100%;
  height: auto;
}
.statement {
  margin: 0;
  color: #eaeaea;
  font: 400 clamp(26px, 2.9vw, 42px) / 1.18 var(--serif);
  letter-spacing: -0.005em;
}
.statement strong {
  font-style: italic;
  font-weight: 400;
  color: var(--cream);
}
.ai-notes {
  display: grid;
  gap: 18px;
  margin: clamp(30px, 3.6vw, 48px) 0 0;
  padding: 0;
  list-style: none;
}
.ai-notes li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid rgb(233 220 198 / 18%);
}
.ai-notes p {
  margin: 0;
  color: var(--soft);
  font: 300 15px/1.6 var(--alt);
}
.ai-notes .note-k {
  color: var(--faint);
  font: 400 11px/1.9 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.serif-title {
  margin: 0;
  color: #eaeaea;
  font: 400 clamp(52px, 8vw, 124px) / 0.92 var(--serif);
  letter-spacing: -0.02em;
}
.t-num {
  color: var(--cream);
  font-style: italic;
}

/* 1. Il Brief */
.fg-brief {
  padding: clamp(60px, 8vw, 120px) 0 clamp(80px, 10vw, 150px);
  background: var(--warm);
}
.values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: clamp(28px, 3.4vw, 46px) 0 0;
  padding: 0;
  list-style: none;
  color: var(--cream);
  font: italic 400 clamp(26px, 3.4vw, 50px) / 1.15 var(--serif);
}
.values li + li::before {
  content: '·';
  margin: 0 0.5em;
  color: rgb(233 220 198 / 45%);
  font-style: normal;
}
.brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(48px, 6vw, 90px);
}
.brief-card {
  padding-top: 22px;
  border-top: 1px solid rgb(233 220 198 / 22%);
}
.brief-card h3 {
  margin: 0 0 22px;
  font: 400 clamp(30px, 3vw, 44px) / 1 var(--serif);
}
.brief-lead {
  margin: 0 0 12px;
  font: 400 13px/1.5 var(--mono);
  letter-spacing: 0.02em;
}
.dash-list,
.obj-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--soft);
  font: 300 clamp(15px, 1.2vw, 17px) / 1.6 var(--alt);
}
.dash-list li {
  position: relative;
  padding-left: 1.6em;
}
.dash-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--cream);
}
.obj-list {
  counter-reset: obj;
}
.obj-list li {
  position: relative;
  padding-left: 2.4em;
  counter-increment: obj;
}
.obj-list li::before {
  content: '0' counter(obj);
  position: absolute;
  left: 0;
  top: 0.32em;
  color: var(--cream);
  font: 400 12px/1.6 var(--mono);
}
.brief-card b {
  color: var(--text);
  font-weight: 700;
}
.dash-list em {
  color: var(--text);
}

/* 2. Planning: tre palline unite da una linea ------------------------------------------- */
.fg-plan {
  padding: clamp(40px, 5vw, 70px) 0 clamp(80px, 11vw, 160px);
  background: var(--warm);
}
.plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
  margin: clamp(40px, 5vw, 72px) 0 0;
  padding: 0;
  list-style: none;
  text-align: center;
}
.plan-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 250px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0 auto 22px;
}
.plan-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 22px 30px rgb(0 0 0 / 45%));
}
/* Due palline sono semitrasparenti: un disco del colore del fondo copre la linea, come nell'originale. */
.plan-visual::before {
  content: '';
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  background: var(--warm);
}
.plan-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-left: 0.12em;
  z-index: 2;
  color: #fff;
  font: 400 clamp(84px, 9vw, 132px) / 1 var(--serif);
  text-shadow: 0 4px 28px rgb(0 0 0 / 45%);
}
/* La linea passa dietro le palline: si vede solo tra l'una e l'altra. */
.plan {
  position: relative;
}
.plan::before {
  content: '';
  position: absolute;
  left: calc(100% / 6);
  right: calc(100% / 6);
  top: 125px;
  height: 1px;
  background: rgb(255 255 255 / 72%);
  transform-origin: left;
  pointer-events: none;
}
.plan-step {
  position: relative;
}
.plan-phase {
  margin: 0 0 12px;
  font: 400 clamp(24px, 2.3vw, 32px) / 1 var(--serif);
  letter-spacing: 0.04em;
}
.plan-step p,
.plan-items {
  margin: 0 auto;
  max-width: 27ch;
  color: var(--soft);
  font: 300 15px/1.6 var(--alt);
}
.plan-items {
  padding: 0;
  list-style: none;
}
.plan-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  color: var(--cream);
  font: 400 12px/1.4 var(--mono);
  letter-spacing: 0.02em;
  border-bottom: 1px solid transparent;
}
.plan-link:hover {
  color: #fff;
}
.reveal-ready .plan .plan-visual img,
.reveal-ready .plan .plan-num {
  transition:
    opacity 0.9s var(--out) calc(var(--i) * 260ms + 150ms),
    transform 1.1s var(--out) calc(var(--i) * 260ms + 150ms);
}
.reveal-ready .plan::before {
  transition: transform 1.5s cubic-bezier(0.65, 0, 0.35, 1) 300ms;
}
.reveal-ready .plan:not(.is-in) {
  opacity: 1;
  transform: none;
}
.reveal-ready .plan:not(.is-in) .plan-visual img {
  opacity: 0;
  transform: translateY(30px) scale(0.9);
}
.reveal-ready .plan:not(.is-in) .plan-num {
  opacity: 0;
  transform: translateY(14px);
}
.reveal-ready .plan:not(.is-in)::before {
  transform: scaleX(0);
}

/* 3. Collezione: piatto e ricetta ----------------------------------------------------------- */
.fg-collection {
  padding: clamp(80px, 11vw, 160px) 0 clamp(60px, 8vw, 120px);
  background: var(--ink);
}
.coll-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 28px 48px;
}
.flavor-index {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 2px 32px;
}
.flavor-index a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  color: var(--soft);
  font: 300 15px/1.3 var(--alt);
  transition: color 0.2s;
}
.flavor-index a:hover {
  color: #fff;
}
.flavor {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  width: min(100%, calc(1320px + 2 * var(--g)));
  margin: clamp(56px, 8vw, 120px) auto 0;
  padding-inline: var(--g);
  scroll-margin-top: calc(var(--project-header-height) + 10px);
}
.flavor-dish {
  grid-column: 4 / -1;
  grid-row: 1;
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #1b1b1b;
}
.flavor-dish img {
  display: block;
  width: 100%;
  height: auto;
}
.recipe {
  grid-column: 1 / span 5;
  grid-row: 1;
  z-index: 1;
  position: relative;
  padding: clamp(26px, 3vw, 42px) clamp(18px, 2.4vw, 34px) clamp(14px, 1.6vw, 22px);
  border-radius: 22px;
  background: rgb(28 24 21 / 80%);
  box-shadow:
    inset 0 1px rgb(255 255 255 / 7%),
    0 40px 80px rgb(0 0 0 / 40%);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  container-type: inline-size;
}
.flavor-flip .flavor-dish {
  grid-column: 1 / span 9;
}
.flavor-flip .recipe {
  grid-column: 8 / -1;
}
.recipe-num {
  position: absolute;
  top: 18px;
  left: 22px;
  margin: 0;
  color: var(--cream);
  font: 400 12px/1 var(--mono);
}
.recipe-name {
  margin: 0 auto;
  padding-bottom: clamp(18px, 2.4vw, 30px);
  border-bottom: 1px solid rgb(233 233 233 / 55%);
  width: 86%;
  color: #e9e9e9;
  font: 300 clamp(19px, 6.2cqi, 34px) / 1.3 var(--card);
  letter-spacing: 0.32em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}
.recipe-stack {
  position: relative;
  width: 40%;
  aspect-ratio: 461 / 812;
  margin: clamp(14px, 2.4cqi, 22px) auto 0;
}
.recipe-list {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ing,
.bowl {
  position: absolute;
  left: 0;
  width: 100%;
  top: var(--t);
}
.ing {
  height: var(--h);
}
.ing img,
.bowl {
  display: block;
  width: 100%;
  height: auto;
}
.ing img {
  transition: transform 0.35s var(--out);
}
.ing:hover img {
  transform: scale(1.08);
}
/* Etichetta con la linea di richiamo e il trattino finale */
.recipe {
  --lead: clamp(34px, 11cqi, 64px);
}
.ing-name {
  position: absolute;
  top: var(--y);
  margin: 0;
  width: max-content;
  max-width: calc(var(--lead) + 13cqi + 20px);
  color: #e6e6e6;
  font: 300 clamp(12px, 3cqi, 15px) / 1.35 var(--card);
  transform: translateY(-50%);
  transition: color 0.2s;
}
.ing-l .ing-name {
  right: 70%;
  padding-right: var(--lead);
  text-align: right;
}
.ing-r .ing-name {
  left: 70%;
  padding-left: var(--lead);
}
.ing-name::before,
.ing-name::after {
  content: '';
  position: absolute;
  top: 50%;
  background: rgb(233 233 233 / 80%);
}
.ing-name::before {
  width: calc(var(--lead) - 10px);
  height: 1px;
}
.ing-name::after {
  width: 1px;
  height: 12px;
  margin-top: -6px;
}
.ing-l .ing-name::before {
  right: 0;
}
.ing-l .ing-name::after {
  right: calc(var(--lead) - 10px);
}
.ing-r .ing-name::before {
  left: 0;
}
.ing-r .ing-name::after {
  left: calc(var(--lead) - 10px);
}
.ing:hover .ing-name {
  color: #fff;
}
/* Entrata: la scheda scorre sul piatto, poi gli ingredienti cadono uno alla volta nella coppa. */
.motion-ok.reveal-ready .flavor .recipe {
  transition:
    opacity 0.9s var(--out),
    transform 1.1s var(--out);
}
.motion-ok.reveal-ready .flavor:not(.is-in) .recipe {
  opacity: 0;
  transform: translateX(-10%);
}
.motion-ok.reveal-ready .flavor-flip:not(.is-in) .recipe {
  transform: translateX(10%);
}
.motion-ok.reveal-ready .flavor .flavor-dish img {
  transition: transform 1.6s var(--out);
}
.motion-ok.reveal-ready .flavor:not(.is-in) .flavor-dish img {
  transform: scale(1.06);
}
.motion-ok.reveal-ready .flavor .ing img,
.motion-ok.reveal-ready .flavor .bowl {
  transition:
    opacity 0.45s ease calc(var(--k, 0) * 170ms + 520ms),
    transform 0.8s var(--drop) calc(var(--k, 0) * 170ms + 520ms);
}
.motion-ok.reveal-ready .flavor .ing-name {
  transition:
    opacity 0.6s ease calc(var(--k, 0) * 170ms + 760ms),
    color 0.2s;
}
.motion-ok.reveal-ready .flavor .ing-name::before,
.motion-ok.reveal-ready .flavor .ing-name::after {
  transition: transform 0.5s var(--out) calc(var(--k, 0) * 170ms + 700ms);
}
.motion-ok.reveal-ready .flavor:not(.is-in) .ing img {
  opacity: 0;
  transform: translateY(-46px);
}
.motion-ok.reveal-ready .flavor:not(.is-in) .bowl {
  opacity: 0;
  transform: translateY(16px);
}
.motion-ok.reveal-ready .flavor:not(.is-in) .ing-name {
  opacity: 0;
}
.motion-ok.reveal-ready .flavor:not(.is-in) .ing-name::before {
  transform: scaleX(0);
}
.motion-ok.reveal-ready .flavor:not(.is-in) .ing-l .ing-name::before {
  transform-origin: right;
}
.motion-ok.reveal-ready .flavor:not(.is-in) .ing-r .ing-name::before {
  transform-origin: left;
}

/* 4. Social Campaign ---------------------------------------------------------------------- */
.fg-social {
  padding: clamp(80px, 10vw, 150px) 0 0;
  background: var(--ink);
}
.serif-title .br {
  display: inline-block;
}
.phase {
  --pw: clamp(220px, 23vw, 330px);
  margin-top: clamp(110px, 14vw, 200px);
  scroll-margin-top: calc(var(--project-header-height) + 60px);
}
.phase-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 110px);
  min-height: calc(var(--pw) * 1.42);
  padding-inline: max(var(--g), calc((100% - var(--wrap)) / 2));
  background: var(--warm);
}
.phone {
  justify-self: center;
  width: var(--pw);
  margin: calc(var(--pw) * -0.28) 0;
  translate: 0 calc(var(--p, 0) * -28px);
}
.phone .mock {
  filter: drop-shadow(0 34px 50px rgb(0 0 0 / 55%));
}
.phase-flip .phone {
  order: 2;
}
.phase-copy,
.reveal-copy {
  max-width: 420px;
}
.phase-title {
  margin: 0;
  font: 400 clamp(44px, 4.8vw, 70px) / 0.95 var(--serif);
  letter-spacing: 0.01em;
}
.phase-channel {
  margin: 8px 0 0;
  font: 700 15px/1.3 var(--alt);
}
.phase-rule {
  display: block;
  width: 1px;
  height: 58px;
  margin: 24px 0 24px;
  background: #fff;
}
.phase-copy p:not(.phase-channel),
.reveal-copy p:not(.phase-channel) {
  margin: 0 0 12px;
  color: var(--soft);
  font: 300 clamp(15px, 1.2vw, 17px) / 1.65 var(--alt);
}
.phase-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  color: var(--cream);
  font: 400 12px/1.4 var(--mono);
}
.phase-link:hover {
  color: #fff;
}
/* Mockup: testi del telefono in HTML sopra le immagini, in unità del contenitore */
.mock {
  position: relative;
  margin: 0;
  container-type: inline-size;
}
.mock img {
  display: block;
  width: 100%;
  height: auto;
}
.mock-text {
  position: absolute;
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  pointer-events: none;
}
.mock-story .mock-text {
  left: 14.6%;
  top: 25.9%;
  width: 45.5%;
  color: #161616;
  font-size: 2.77cqi;
  line-height: 1.3;
  text-align: center;
}
.mock-post .mock-text {
  left: 10.7%;
  top: 78.3%;
  width: 77.5%;
  color: #161616;
  font-size: 3.56cqi;
  line-height: 1.3;
}
.mock-ig .mock-text {
  color: #fff;
  white-space: nowrap;
  transform: translateY(-50%);
}
.mock-ig-1 .mock-text {
  left: 41.9%;
  top: 97.4%;
  font-size: 3.17cqi;
}
.mock-ig-1 .mock-text::after {
  content: '…';
}
.mock-ig-2 .mock-text {
  left: 35.4%;
  top: 97.3%;
  font-size: 3.7cqi;
}

/* REVEAL: l'evento a tutta larghezza, con i post degli influencer */
.phase-reveal {
  position: relative;
  margin-top: clamp(140px, 16vw, 230px);
}
.reveal-band {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  justify-items: end;
  min-height: clamp(420px, 44vw, 640px);
  padding: 48px max(var(--g), calc((100% - var(--wrap)) / 2));
  overflow: hidden;
}
.reveal-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
.reveal-band::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(19 16 14 / 10%) 30%, rgb(19 16 14 / 82%) 74%),
    linear-gradient(rgb(18 18 18 / 30%), transparent 30%, transparent 70%, rgb(18 18 18 / 50%));
}
.reveal-copy {
  width: min(100%, 380px);
}
.reveal-posts {
  position: absolute;
  left: max(var(--g), calc((100% - var(--wrap)) / 2));
  top: clamp(-90px, -6vw, -40px);
  width: min(44%, 520px);
  height: 100%;
  pointer-events: none;
}
.reveal-posts > * {
  pointer-events: auto;
}
.mock-ig {
  position: absolute;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 34px 60px rgb(0 0 0 / 55%);
  translate: 0 calc(var(--p, 0) * var(--dir, 1) * -22px);
}
.mock-ig-1 {
  left: 0;
  top: 0;
  width: 58%;
}
.mock-ig-2 {
  left: 46%;
  top: 30%;
  width: 46%;
}
.posts-label {
  position: absolute;
  left: 0;
  bottom: calc(100% + 14px);
  margin: 0;
  color: var(--faint);
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* 5. Spot */
.fg-spot {
  padding: clamp(110px, 12vw, 180px) 0 clamp(70px, 9vw, 130px);
  background: var(--ink);
}
.fg-spot .stage {
  margin-top: clamp(36px, 4vw, 60px);
}

/* 6. Website: il portatile appoggiato sul banco chiaro */
.fg-site {
  padding: clamp(50px, 6vw, 90px) 0 0;
  background: var(--ink);
}
.fg-site .serif-title {
  text-align: center;
}
.site-note {
  margin-top: 18px;
}
.laptop {
  position: relative;
  isolation: isolate;
  width: min(100%, 1000px);
  margin: clamp(36px, 4vw, 56px) auto 0;
  aspect-ratio: 1670 / 1002;
}
/* Il banco chiaro comincia dove poggia la base del portatile. */
.laptop::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: -2;
  width: 100vw;
  height: 6%;
  background: var(--mist);
  transform: translateX(-50%);
}
.laptop-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.laptop-screen {
  position: absolute;
  left: 9.4%;
  top: 2.1%;
  width: 81.2%;
  height: 92.4%;
  border-radius: 1.6% / 2.6%;
  z-index: -1;
}
.laptop-screen .stage-poster {
  filter: brightness(0.82);
}

/* Strumenti e crediti */
.stack {
  padding: clamp(40px, 5vw, 70px) 0 clamp(50px, 6vw, 80px);
  background: var(--mist);
  color: #121212;
  text-align: center;
}
.stack-title {
  margin: 0;
  color: rgb(18 18 18 / 55%);
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.stack-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 26px clamp(36px, 6vw, 84px);
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.stack-logos img {
  display: block;
  width: auto;
  height: clamp(26px, 2.6vw, 36px);
}
.stack-logos .logo-openai {
  flex-basis: 100%;
  display: flex;
  justify-content: center;
}
.stack-logos .logo-openai img {
  height: clamp(36px, 3.4vw, 46px);
}
.team {
  margin: clamp(40px, 5vw, 64px) auto 0;
  padding-top: 26px;
  border-top: 1px solid rgb(18 18 18 / 14%);
  max-width: 900px;
}
.team-label {
  margin: 0 0 12px;
  color: rgb(18 18 18 / 60%);
  font: 400 12px/1.4 var(--mono);
}
.team-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 400 14px/1.6 var(--mono);
}

/* Footer ------------------------------------------------------------------------------------- */
.project-ai .portfolio-footer {
  position: relative;
  padding: 80px var(--g) 28px;
  background: var(--black);
  color: var(--text);
  font-family: var(--mono);
}
.project-ai .portfolio-footer .signature img {
  width: 52px;
  height: auto;
  filter: brightness(0) invert(1);
}
.project-ai .portfolio-footer .label {
  margin: 0;
  color: var(--cream);
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.project-ai .footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: start;
  gap: 45px;
  margin-bottom: 70px;
}
.project-ai .footer-top > div p:last-child {
  margin: 14px 0 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.75;
}
.project-ai .footer-top > a:last-child {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
}
.project-ai .next-link,
.project-ai .project-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 35px;
  padding: 32px 0;
  border-top: 1px solid rgb(255 255 255 / 18%);
}
.project-ai .project-link {
  border-bottom: 1px solid rgb(255 255 255 / 18%);
}
.project-ai .next-link p,
.project-ai .project-link p {
  margin: 14px 0 0;
  font: 400 clamp(38px, 5.6vw, 92px) / 1 var(--serif);
  letter-spacing: -0.015em;
}
.project-ai .next-link > span,
.project-ai .project-link > span {
  color: var(--cream);
  font: 300 clamp(36px, 4.6vw, 76px) / 1 var(--sans);
  transition: transform 0.3s var(--out);
}
.project-ai .next-link:hover > span {
  transform: translateX(8px);
}
.project-ai .project-link:hover > span {
  transform: translate(6px, -6px);
}
.project-ai .footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  padding-top: 28px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.6;
}
.project-ai .footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: -14px;
}

/* Responsive ------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .flavor-dish {
    grid-column: 3 / -1;
  }
  .recipe {
    grid-column: 1 / span 6;
  }
  .flavor-flip .flavor-dish {
    grid-column: 1 / span 10;
  }
  .flavor-flip .recipe {
    grid-column: 7 / -1;
  }
  .reveal-posts {
    width: min(48%, 460px);
  }
}
@media (max-width: 900px) {
  .spline-body,
  .fg-intro,
  .brief-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .spec {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .kv {
    width: min(100%, 640px);
    margin-inline: auto;
  }
  /* La ricetta passa sotto il piatto, sovrapposta di poco. */
  .flavor,
  .flavor-flip {
    grid-template-columns: minmax(0, 1fr);
  }
  .flavor .flavor-dish,
  .flavor-flip .flavor-dish {
    grid-column: 1;
    grid-row: 1;
  }
  .flavor .recipe,
  .flavor-flip .recipe {
    grid-column: 1;
    grid-row: 2;
    width: min(92%, 520px);
    margin: -48px auto 0;
  }
  .motion-ok.reveal-ready .flavor:not(.is-in) .recipe,
  .motion-ok.reveal-ready .flavor-flip:not(.is-in) .recipe {
    transform: translateY(40px);
  }
  .plan {
    grid-template-columns: minmax(0, 1fr);
    gap: 54px;
    max-width: 420px;
    margin-inline: auto;
  }
  .plan-visual {
    width: 190px;
  }
  /* In colonna un trattino verticale unisce una fase alla successiva. */
  .plan::before {
    display: none;
  }
  .plan-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    width: 1px;
    height: 34px;
    background: rgb(255 255 255 / 45%);
  }
  .phase-band {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 34px;
    min-height: 0;
    padding-block: 0 56px;
  }
  .phase-flip .phone {
    order: 0;
  }
  .phone {
    margin: calc(var(--pw) * -0.36) 0 0;
  }
  .phase-copy {
    max-width: 520px;
    justify-self: stretch;
    margin-inline: auto;
    text-align: left;
  }
  .reveal-band {
    justify-items: start;
    align-items: end;
    min-height: 560px;
  }
  .reveal-band::after {
    background: linear-gradient(rgb(19 16 14 / 0%) 20%, rgb(19 16 14 / 92%) 72%);
  }
  .reveal-posts {
    position: relative;
    left: auto;
    top: auto;
    width: min(100% - 2 * var(--g), 560px);
    height: auto;
    aspect-ratio: 1 / 1.16;
    margin: 30px auto 0;
  }
  .posts-label {
    position: static;
    margin-bottom: 14px;
  }
  .mock-ig-1 {
    top: 30px;
  }
  .mock-ig-2 {
    top: calc(30px + 24%);
  }
  .project-ai .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .project-ai .footer-top > a:last-child {
    justify-self: start;
  }
}
@media (max-width: 760px) {
  .works-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .code-title {
    font-size: clamp(30px, 9.4vw, 56px);
  }
  .spec {
    grid-template-columns: minmax(0, 1fr);
  }
  .stage-spline .stage-poster {
    height: 76%;
  }
  .stage-play {
    padding: 6px 16px 6px 6px;
    font-size: 13px;
  }
  .play-icon {
    width: 36px;
    height: 36px;
  }
  .ai-notes li {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .flavor-index {
    grid-template-columns: minmax(0, 1fr);
  }
  .recipe-stack {
    width: 38%;
  }
  .stage {
    margin-inline: calc(-1 * var(--g) + 8px);
    width: auto;
  }
  .stage-frame {
    border-radius: 14px;
  }
  .stage figcaption {
    padding-inline: var(--g);
  }
  .project-ai .footer-bottom {
    flex-direction: column;
    gap: 6px;
  }
  .project-ai .footer-bottom a {
    margin-top: 0;
  }
}
@media (max-width: 760px) and (max-height: 720px) {
  .chat {
    height: 56svh;
  }
}
@media (max-width: 420px) {
  .hero {
    padding-inline: 14px;
  }
  .chat {
    border-radius: 18px;
  }
  .msg {
    max-width: 86%;
  }
  .chip-btn {
    padding: 0 13px;
    font-size: 11px;
  }
  .recipe {
    width: 94%;
    padding-inline: 10px;
  }
  .recipe-name {
    letter-spacing: 0.22em;
  }
  .ing-name {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .project-ai {
    scroll-behavior: auto;
  }
  .project-ai *,
  .project-ai *::before,
  .project-ai *::after {
    animation: none !important;
    transition: none !important;
  }
}
