/* Taste pass (Nov 2026): fewer template tells. Every rule here is reversible by
   removing this file's <link> in index.html. */

/* One label is enough: the small uppercase line over every section heading goes. */
.portfolio-section .floating-title > .eyebrow,
.bio-heading > .eyebrow,
.collab-copy > .eyebrow,
.footer-content .eyebrow { display: none; }

/* Hero: the name already sits in the wordmark; keep the hint and the clock. */
.home-meta > span:first-child { visibility: hidden; }

/* Bio: no topic pills; the copy names the work. */
.bio-tags { display: none; }
.bio-links { margin-top: 28px; }

/* Contact card: frosted glass with a soft inner light and a thin luminous line
   that travels around the border (CSS only; still under reduced motion). */
.collab.m-glass {
  border-radius: 24px;
  background:
    radial-gradient(110% 130% at 0% 0%, #1d3b3c73, #1d3b3c00 55%),
    radial-gradient(90% 110% at 100% 100%, #2f442a59, #2f442a00 60%),
    linear-gradient(180deg, #0c181bd9, #070f12eb);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 50px 120px -50px #000, inset 0 1px 0 #ffffff12;
}
/* The luminous line is a conic gradient that only rotates (a GPU transform),
   seen through a ring-shaped mask. Animating the gradient angle instead forced a
   style recalculation and repaint of the page on every frame, even off-screen. */
.collab.m-glass::before, .collab.m-glass::after { content: none; }
.collab-orbit {
  position: absolute; inset: -2px; z-index: 0; border-radius: 26px; padding: 3.2px; pointer-events: none;
  overflow: hidden; container-type: size; opacity: .95;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.collab-orbit i {
  position: absolute; left: 50%; top: 50%; width: 300%; aspect-ratio: 1;
  width: calc(100cqw + 100cqh); width: hypot(100cqw, 100cqh);
  background: conic-gradient(#ffffff17 0deg, #ffffff17 190deg, #7fd6cc 240deg, #ffffff 285deg, #d6e6b8 315deg, #ffffff17 360deg);
  transform: translate(-50%, -50%); will-change: transform;
  animation: collab-orbit 9s linear infinite;
}
.collab-orbit.is-paused i { animation-play-state: paused; }
.collab > :not(.collab-orbit) { position: relative; z-index: 1; }
@keyframes collab-orbit { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
.collab .m-btn--primary { background: #dfe8cf; box-shadow: 0 0 0 1px #ffffff26, 0 12px 30px -16px #cbdcae80; }
.collab .m-btn--primary:hover { background: #eef4e1; transform: translateY(-1px); }
.collab .m-btn--primary:active { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .collab-orbit i { animation: none; transform: translate(-50%, -50%) rotate(300deg); } }

/* Research sequence: the progress rail already counts the steps. */
.sk-step span { display: none; }

/* The portfolio line now lists the four projects: keep it to a readable measure. */
.floating-title .section-description { max-width: 560px; line-height: 1.7; }

/* One continuous background: the sea photograph under a single veil that
   darkens gradually to black (pages.js setSea). Sections no longer paint
   their own bands, so the sea never reappears in stripes between them. */
.home::after { display: none; }
.sea-dim { position: absolute; inset: 0; z-index: 0; background: #010304; opacity: 0; pointer-events: none; will-change: opacity; }
#water { will-change: opacity; }
.story-chapter, #bio-story, #collab-story { background: none !important; }
.footer-art { background: linear-gradient(180deg, #01030400 0%, #01030499 30%, #010304e6 60%); }

/* Without section bands, the hero copy and its hints must be gone before the portfolio heading arrives. */
.home-meta { opacity: var(--hero-fade); }

/* The beach photograph's dark sky fades into the sea instead of ending in a black box. */
.footer-art .footer-landscape {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.12) 5%, rgba(0,0,0,.62) 13%, #000 24%), linear-gradient(to bottom, transparent 0%, #000 42%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.12) 5%, rgba(0,0,0,.62) 13%, #000 24%), linear-gradient(to bottom, transparent 0%, #000 42%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}

/* Research entry: the vignette appears with the scene (no hard edge at the
   section top), and the sea fades into the dark stage over a longer stretch. */
.sk-stage::after { opacity: var(--sk-glow, 0); }
.research-section.sk--karst { background: linear-gradient(180deg, #02060800 0%, #02060859 5%, #020608d9 11%, #020608 16%, #020608 94%, #02060800 100%); }
.research-section.sk--sk { background: linear-gradient(180deg, #020608 0%, #020608 92%, #02060800 100%); }

/* Phones: the bio line flows freely instead of breaking into orphans. */
@media (max-width: 760px) { .bio-lead br { display: none; } .bio-lead em { display: inline; } }

/* Research cards: the paper status is a plain sentence, not a pill with a dot. */
.sk-meta { margin: 16px 0 0; font-size: 12px; line-height: 1.6; color: #8ea4a2; max-width: 380px; }

/* Easter egg: the bora (eggs.js). */
@keyframes bora-shiver { 0% { transform: none; } 18% { transform: translateX(-7px) rotate(-1.6deg); } 36% { transform: translateX(4px) rotate(.9deg); } 56% { transform: translateX(-3px) rotate(-.6deg); } 78% { transform: translateX(1px); } 100% { transform: none; } }
.bora-gust .folder-object { animation: bora-shiver 1.1s cubic-bezier(.3,.6,.3,1) both; }
.bora-gust .folder-card:nth-child(2) .folder-object { animation-delay: .08s; }
.bora-gust .folder-card:nth-child(3) .folder-object { animation-delay: .16s; }
.bora-gust .folder-card:nth-child(4) .folder-object { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .bora-gust .folder-object { animation: none; }  }

/* Second pass: the remaining template labels go. */
.hero-copy > .eyebrow { display: none; }
.navigation nav sup, .project-navigation nav sup { display: none; }
.folder-caption > span:first-child { display: none; }
.detail-intro .eyebrow, .case-body .eyebrow, .case-body .tags { display: none; }

/* In their place, the hero enters once on load: the two lines rise out of a
   soft blur, then the description and the actions follow. */
@keyframes hero-rise { from { opacity: 0; transform: translateY(26px); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes hero-fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero-copy h1 { animation: hero-rise 1.15s cubic-bezier(.2,.8,.2,1) .15s both; }
.hero-copy h1 em { display: inline-block; animation: hero-rise 1.25s cubic-bezier(.2,.8,.2,1) .42s both; }
.hero-copy .hero-bottom { animation: hero-fade 1s cubic-bezier(.2,.8,.2,1) .8s both; }
@media (prefers-reduced-motion: reduce) { .hero-copy h1, .hero-copy h1 em, .hero-copy .hero-bottom { animation: none; } }

/* Mobile pass (Nov 2026). */
/* The wordmark's text sat at the top of its box: centre it on the buttons' axis. */
.navigation .wordmark, .project-navigation .wordmark { align-items: center; align-self: center; line-height: 1; }
.nw { white-space: nowrap; }
@media (max-width: 760px) {
  .navigation .wordmark { min-height: 38px; }
  /* Hero: two full lines for the title, no orphan words. */
  .hero-copy h1 { font-size: clamp(26px, 7.7vw, 40px); text-wrap: balance; }
  .hero-bottom > p br, .hero-bottom p br { display: none; }
  .hero-bottom > p { text-wrap: pretty; }
  /* Portfolio title: "Software che ho" stays on one line, three lines in all. */
  .floating-title h2 { font-size: clamp(30px, 11vw, 46px); }
  .floating-title .section-description, .bio-glass p, .sk-line, .sk-lead { text-wrap: pretty; }
  /* Research classification: hypothesis only under each sign. */
  .sk-label small { display: none; }
  .sk-label em { font-size: 14px; }
}

/* Content shown only when JavaScript is off (and readable by any crawler). */
.seo-fallback{position:relative;z-index:5;max-width:680px;margin:0 auto;padding:48px 20px;color:#ece5d6;background:#0b171c;font:16px/1.6 'DM Sans',sans-serif}
.seo-fallback img{width:200px;height:auto;border-radius:6px}
.seo-fallback a{color:#8de4db}

/* The scroll hint only animates while its chapter is on screen and the hint is shown. */
.sk:not(.is-live) .sk-hint i, .sk-hint[style*="hidden"] i { animation: none; }
