/* ===========================================================
   TOKENS
   =========================================================== */
:root {
  --bg: #121019;
  --bg-elevated: #1b1826;
  --bg-card: #201d2c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f2f8;
  --text-dim: #a49dbd;
  --text-faint: #746e8c;

  --coral: #ff6b4a;
  --cyan: #3ed6c6;
  --violet: #9b7bff;
  --yellow: #ffc93c;
  --lime: #b8f135;
  --magenta: #ff4fa3;
  --blue: #4fa3ff;
  --pink: #ff6f91;

  --gradient-brand: linear-gradient(
    135deg,
    var(--coral),
    var(--magenta) 55%,
    var(--violet)
  );

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-category="funzionali"] {
  --accent: var(--cyan);
}

[data-category="decorativi"] {
  --accent: var(--violet);
}

[data-category="quadri"] {
  --accent: var(--coral);
}

[data-category="fermalibri"] {
  --accent: var(--yellow);
}

[data-category="animali"] {
  --accent: var(--lime);
}

[data-category="calcio"] {
  --accent: var(--magenta);
}

[data-category="connectibles"] {
  --accent: var(--blue);
}

[data-category="lifesize"] {
  --accent: var(--pink);
}

/* ===========================================================
   RESET & BASE
   =========================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, var(--coral));
  margin: 0 0 6px;
}

@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;
  }
}

/* ===========================================================
   HERO
   =========================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 24px 88px;
  text-align: center;
  isolation: isolate;
}

.hero-blobs {
  position: absolute;
  inset: 0;
  z-index: -1;
  filter: blur(60px);
  opacity: 0.55;
}

.blob {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
}

.blob-1 {
  width: 420px;
  height: 420px;
  top: -140px;
  left: -100px;
  background: var(--coral);
  animation: float-a 16s ease-in-out infinite;
}

.blob-2 {
  width: 380px;
  height: 380px;
  top: -60px;
  right: -120px;
  background: var(--violet);
  animation: float-b 20s ease-in-out infinite;
}

.blob-3 {
  width: 320px;
  height: 320px;
  bottom: -180px;
  left: 40%;
  background: var(--cyan);
  animation: float-c 18s ease-in-out infinite;
}

@keyframes float-a {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(40px, 50px) scale(1.08);
  }
}

@keyframes float-b {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-50px, 30px) scale(0.95);
  }
}

@keyframes float-c {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(30px, -40px) scale(1.1);
  }
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  animation: rise 0.8s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 18px;
}

.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.12;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 22px auto 0;
  max-width: 540px;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.25s var(--ease);
}

.btn-primary {
  background: var(--gradient-brand);
  color: #16121f;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(255, 107, 74, 0.55);
}

.btn-ghost {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
}

/* ===========================================================
   SECTION HEADS
   =========================================================== */

.section-head {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--magenta);
  margin: 0 0 6px;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

/* ===========================================================
   FEATURED / TOP LAVORI
   =========================================================== */

.featured {
  padding: 56px 0 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 640px;
  justify-content: center;
}

.featured .section-head {
  text-align: center;
  margin-bottom: 32px;
}

.carousel {
  --gap: 16px;

  width: 100%;
  max-width: 1200px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 14px;
  padding: 0 24px;
}

.carousel-viewport {
  flex: 1;
  min-width: 0;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;

  -webkit-overflow-scrolling: touch;

  border-radius: var(--radius-lg);

  scrollbar-width: none;
}

.carousel-viewport::-webkit-scrollbar {
  display: none;
}

.featured-track {
  display: flex;
  gap: var(--gap);
}

/*
  MOBILE
  Una card occupa esattamente il 100% del viewport.
*/
.feature-card {
  scroll-snap-align: start;

  flex: 0 0 100%;
  width: 100%;

  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);

  overflow: hidden;
}

/*
  TABLET
  3 card visibili.
*/
@media (min-width: 700px) {
  .feature-card {
    flex: 0 0 calc((100% - var(--gap) * 2) / 3);
    width: auto;
  }
}

/*
  DESKTOP
  5 card visibili.
*/
@media (min-width: 1180px) {
  .feature-card {
    flex: 0 0 calc((100% - var(--gap) * 4) / 5);
  }
}

.carousel-nav {
  flex: 0 0 auto;

  width: 46px;
  height: 46px;

  border-radius: 50%;

  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);

  color: var(--text);
  font-size: 1.5rem;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.2s var(--ease);
}

.carousel-nav:hover {
  border-color: var(--cyan);
  transform: scale(1.06);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.dot {
  width: 8px;
  height: 8px;

  border-radius: var(--radius-pill);

  background: var(--border-strong);

  transition: all 0.25s var(--ease);
}

.dot.active {
  width: 26px;
  background: var(--gradient-brand);
}

.feature-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #121019;
}

.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ribbon {
  position: absolute;
  top: 14px;
  left: 14px;

  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;

  padding: 6px 12px;
  border-radius: var(--radius-pill);

  background: var(--bg);
  border: 1px solid var(--border-strong);

  color: var(--text-dim);
}

.ribbon-live {
  background: var(--gradient-brand);
  color: #16121f;
  border: none;
  font-weight: 600;
}

.feature-body {
  padding: 18px 20px 22px;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 600;
}

/* ===========================================================
   PLACEHOLDER MEDIA
   =========================================================== */

.media-placeholder {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    repeating-linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent) 22%, var(--bg-elevated)),
      color-mix(in srgb, var(--accent) 22%, var(--bg-elevated)) 12px,
      var(--bg-elevated) 12px,
      var(--bg-elevated) 24px
    );
}

.media-placeholder span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  color: color-mix(in srgb, var(--accent) 70%, white);
  opacity: 0.85;
}

.media-placeholder-lg span {
  font-size: 4rem;
}

.coming-soon-note {
  margin: 4px 0 18px;
  padding: 12px 14px;

  background: var(--bg-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);

  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ===========================================================
   FILTERS
   =========================================================== */

.filters {
  position: sticky;
  top: 0;
  z-index: 20;

  display: flex;
  gap: 10px;
  flex-wrap: wrap;

  padding: 16px 24px;
  margin: 24px 0;

  background: color-mix(in srgb, var(--bg) 82%, transparent);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-bottom: 1px solid var(--border);

  justify-content: center;
}

.filter-chip {
  padding: 10px 18px;

  border-radius: var(--radius-pill);

  background: var(--bg-elevated);
  border: 1px solid var(--border);

  color: var(--text-dim);

  font-size: 0.88rem;
  font-weight: 500;

  transition: all 0.2s var(--ease);

  white-space: nowrap;
}

.filter-chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.filter-chip.active {
  background: var(--gradient-brand);
  color: #16121f;
  font-weight: 600;
  border-color: transparent;
}

/* ===========================================================
   GALLERY GRID
   =========================================================== */

.gallery {
  max-width: 1240px;
  margin: 0 auto;

  padding: 12px 24px 90px;

  display: grid;

  grid-template-columns: repeat(
    auto-fill,
    minmax(260px, 1fr)
  );

  gap: 24px;
}

.empty-state {
  grid-column: 1 / -1;

  text-align: center;
  color: var(--text-faint);

  padding: 60px 0;

  font-family: var(--font-mono);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);

  overflow: hidden;

  opacity: 0;

  transform: translateY(16px);

  transition:
    transform 0.35s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.card.in-view {
  animation: rise 0.6s var(--ease) forwards;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);

  box-shadow:
    0 18px 36px -18px
    color-mix(in srgb, var(--accent) 55%, transparent);
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;

  background: #121019;

  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;

  object-fit: contain;

  transition: transform 0.5s var(--ease);
}

.card:hover .card-media img {
  transform: scale(1.06);
}

.photo-badge {
  position: absolute;

  bottom: 12px;
  right: 12px;

  font-family: var(--font-mono);
  font-size: 0.7rem;

  padding: 5px 10px;

  border-radius: var(--radius-pill);

  background: rgba(18, 16, 25, 0.75);

  backdrop-filter: blur(6px);

  color: var(--text);

  border: 1px solid var(--border-strong);
}

.badge-soon {
  right: auto;
  left: 12px;

  bottom: auto;
  top: 12px;

  background: var(--bg);

  color: var(--accent);

  border-color: var(--accent);
}

.card-body {
  padding: 16px 18px 20px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

/* ===========================================================
   LIGHTBOX
   =========================================================== */

.lightbox {
  position: fixed;
  inset: 0;

  z-index: 100;

  display: none;

  align-items: center;
  justify-content: center;

  padding: 24px;

  background: rgba(10, 9, 14, 0.82);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox.open {
  display: flex;
  animation: fade 0.25s var(--ease);
}

@keyframes fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.lightbox-panel {
  background: var(--bg-card);

  border: 1px solid var(--border-strong);

  border-radius: var(--radius-lg);

  max-width: 980px;
  width: 100%;

  max-height: 88vh;

  overflow-y: auto;

  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.lightbox-media {
  position: relative;

  background: #121019;

  display: flex;

  align-items: center;
  justify-content: center;

  min-height: 320px;
}

.lightbox-media img {
  width: 100%;
  height: 100%;

  max-height: 88vh;

  object-fit: contain;
}

.lightbox-nav {
  position: absolute;

  top: 50%;

  transform: translateY(-50%);

  width: 42px;
  height: 42px;

  border-radius: 50%;

  background: rgba(18, 16, 25, 0.7);

  border: 1px solid var(--border-strong);

  color: var(--text);

  font-size: 1.4rem;

  display: flex;

  align-items: center;
  justify-content: center;

  transition: background 0.2s var(--ease);
}

.lightbox-nav:hover {
  background: rgba(18, 16, 25, 0.95);
}

.lightbox-prev {
  left: 14px;
}

.lightbox-next {
  right: 14px;
}

.lightbox-counter {
  position: absolute;

  bottom: 14px;
  right: 14px;

  font-family: var(--font-mono);
  font-size: 0.75rem;

  padding: 5px 10px;

  border-radius: var(--radius-pill);

  background: rgba(18, 16, 25, 0.75);

  border: 1px solid var(--border-strong);
}

.lightbox-info {
  padding: 28px 26px;
}

.thumb-strip {
  display: flex;

  gap: 8px;

  flex-wrap: wrap;

  margin: 16px 0 6px;
}

.thumb {
  width: 56px;
  height: 56px;

  border-radius: var(--radius-sm);

  overflow: hidden;

  border: 2px solid transparent;

  opacity: 0.6;

  transition: all 0.2s var(--ease);
}

.thumb img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.thumb.active,
.thumb:hover {
  opacity: 1;

  border-color: var(--accent, var(--coral));
}

.lightbox-contact {
  margin-top: 20px;

  padding-top: 18px;

  border-top: 1px solid var(--border);

  font-size: 0.88rem;

  color: var(--text-dim);

  line-height: 1.8;
}

.lightbox-contact a {
  color: var(--cyan);

  text-decoration: none;
}

.lightbox-contact a:hover {
  text-decoration: underline;
}

.lightbox-close {
  position: fixed;

  top: 22px;
  right: 24px;

  z-index: 101;

  width: 44px;
  height: 44px;

  border-radius: 50%;

  background: var(--bg-card);

  border: 1px solid var(--border-strong);

  color: var(--text);

  font-size: 1.6rem;

  line-height: 1;

  display: flex;

  align-items: center;
  justify-content: center;

  transition:
    transform 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.lightbox-close:hover {
  transform: rotate(90deg);
  border-color: var(--coral);
}

/* ===========================================================
   FOOTER
   =========================================================== */

.site-footer {
  text-align: center;

  padding: 70px 24px 50px;

  border-top: 1px solid var(--border);

  background:
    linear-gradient(
      180deg,
      transparent,
      var(--bg-elevated)
    );
}

.footer-message {
  font-family: var(--font-display);

  font-size: 1.3rem;

  font-weight: 600;

  margin: 0 0 20px;
}

.footer-contacts {
  display: flex;

  gap: 12px;

  justify-content: center;

  flex-wrap: wrap;

  margin: 0 0 24px;
}

.pill-link {
  display: inline-flex;

  align-items: center;

  gap: 8px;

  padding: 12px 22px;

  border-radius: var(--radius-pill);

  background: var(--bg-card);

  border: 1px solid var(--border-strong);

  text-decoration: none;

  font-weight: 600;

  font-size: 0.9rem;

  transition: all 0.2s var(--ease);
}

.pill-link:hover {
  border-color: var(--cyan);

  transform: translateY(-2px);
}

.footer-fine {
  font-family: var(--font-mono);

  font-size: 0.75rem;

  color: var(--text-faint);

  margin: 0;
}

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

@media (max-width: 720px) {
  .lightbox-panel {
    grid-template-columns: 1fr;
  }

  .lightbox-media {
    min-height: 240px;
  }

  .hero {
    padding: 72px 20px 64px;
  }

  .carousel {
    padding: 0 16px;
    gap: 10px;
  }

  .carousel-nav {
    width: 40px;
    height: 40px;
  }

  .filters {
    gap: 6px;
    padding: 10px 14px;
    margin: 16px 0;
  }

  .filter-chip {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}