:root {
  --brand-red: #e95043;
  --brand-blue: #243447;
  --brand-white: #ffffff;
  --bg-1: #1b2838;
  --bg-2: #243447;
  --line: rgba(255, 255, 255, 0.08);
  --text-light: #eaf1f8;
  --text-soft: #aac0d4;
  --sticker-acid: #e95043;
  --sticker-mint: #ffffff;
  --paper: #f9fbfd;
  --ink: #1a2836;
  --radius-lg: 24px;
  --radius-md: 16px;
  --mint: #44e9c5;
  --surface-light: rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Outfit", "Segoe UI", sans-serif;
  color: var(--text-light);
  background-color: var(--bg-1);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    radial-gradient(circle at 20% 16%, rgba(233, 80, 67, 0.15), transparent 32%),
    radial-gradient(circle at 80% 8%, rgba(68, 233, 197, 0.18), transparent 36%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 30%, rgba(233, 80, 67, 0.14), transparent 26%),
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.1), transparent 20%),
    radial-gradient(circle at 62% 72%, rgba(233, 80, 67, 0.1), transparent 24%);
  animation: auroraShift 18s ease-in-out infinite alternate;
}

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 999;
  pointer-events: none;
  background: linear-gradient(90deg, var(--brand-red), #ff7d73, #ffffff);
  box-shadow: 0 0 14px rgba(233, 80, 67, 0.85);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

h1,
h2,
h3 {
  font-family: "Syne", sans-serif;
  line-height: 1.05;
  margin: 0 0 0.95rem;
}

h1 {
  font-size: clamp(2.2rem, 4.8vw, 5.2rem);
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 3.1rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.lead {
  color: var(--text-soft);
  margin-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
}

.site-header.glass-active {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(27, 40, 56, 0.85); /* Darker glass to match body bg */
}

.header-wrap {
  min-height: 82px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  transition: transform 0.25s ease;
}

.logo:hover {
  transform: translateY(-1px);
}

.brand-logo {
  display: block;
  width: clamp(170px, 18vw, 250px);
  height: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nav-links a {
  padding: 0.48rem 0.8rem;
  border-radius: 999px;
  color: #c7d9ea;
  font-weight: 500;
  transition: 0.22s ease;
  position: relative;
  overflow: hidden;
}

.nav-links a:hover,
.nav-links a.active {
  background: transparent;
  color: #fff;
}

.nav-links a[href="contattaci.html"]:hover {
  background: transparent;
  color: #fff;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: #e95043;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.menu-button {
  display: none;
  border: 0;
  border-radius: 10px;
  background: var(--brand-red);
  color: #fff;
  padding: 0.48rem 0.65rem;
  font-weight: 600;
}

.hero {
  padding: 4.8rem 0 2.4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.4rem;
  align-items: center;
}

.hero-copy {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(2px);
  padding: clamp(1.2rem, 3vw, 2.1rem);
  will-change: transform;
}

.headline-stack {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 1rem;
}

.headline-stack .line {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  animation: slideInUp 0.8s ease forwards;
}

.headline-stack .line:nth-child(1) {
  animation-delay: 0.12s;
}

.headline-stack .line:nth-child(2) {
  animation-delay: 0.22s;
}

.headline-stack .line:nth-child(3) {
  animation-delay: 0.32s;
}

.sticker {
  display: inline-flex;
  align-items: center;
  color: var(--brand-blue);
  padding: 0.08em 0.34em;
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.sticker-acid {
  background: var(--sticker-acid);
  color: var(--brand-white);
  transform: rotate(-3deg);
  animation: wobbleSlow 6s ease-in-out infinite;
}

.sticker-mint {
  background: var(--sticker-mint);
  transform: rotate(1.5deg);
  animation: wobbleSlow 7.5s ease-in-out infinite reverse;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0.33rem 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brand-white);
  background: var(--sticker-acid);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
  transform: rotate(-2deg);
  animation: badgeFloat 4.8s ease-in-out infinite;
}

.cta-row {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: 0.25s ease;
  min-height: 46px;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--brand-white);
  color: var(--brand-blue);
  background-image: linear-gradient(120deg, #ffffff 0%, #f3f7fb 46%, #ffffff 100%);
  background-size: 220% 100%;
  animation: btnSweep 5.8s linear infinite;
}

.btn-primary:hover {
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 14px 28px rgba(255, 255, 255, 0.24);
  animation-play-state: paused;
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.3);
  color: #d8e8f7;
  background: rgba(255, 255, 255, 0.06);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn::after {
  content: "";
  position: absolute;
  width: 42%;
  height: 220%;
  top: -60%;
  left: -65%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.75s ease;
}

.btn:hover::after {
  left: 130%;
}

.hero-media-wrap {
  position: relative;
}

.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 26px 44px rgba(0, 0, 0, 0.36);
  transform: rotate(1deg);
  animation: mediaBreath 7s ease-in-out infinite;
  will-change: transform;
}

.hero-media video {
  width: 100%;
  min-height: 420px;
  object-fit: cover;
}

.page-home .hero-media {
  aspect-ratio: 16 / 10;
}

.page-home .hero-media video {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #e95043;
}

.media-slot {
  min-height: 420px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.6rem;
  padding: 1.2rem;
  color: #eaf4ff;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  background-size: 28px 28px, 28px 28px, auto;
}

.media-slot.compact {
  min-height: 100%;
  justify-items: center;
  text-align: center;
}

.media-slot.slim {
  min-height: 250px;
}

.slot-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.54rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  background: var(--brand-red);
}

.media-slot h3,
.media-slot p,
.media-slot small {
  margin: 0;
}

.media-slot small {
  color: #c2d5e8;
}

.media-slot code {
  color: #fff;
  font-size: 0.8rem;
}

.output-media {
  position: relative;
  min-height: 270px;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.output-media .slot-tag {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 3;
}

.output-visual {
  width: 100%;
  height: 100%;
  min-height: 270px;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 1.5s ease;
}

.output-media:hover .output-visual {
  transform: scale(1.08);
}

.output-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  text-align: left;
  padding: 0.85rem 0.85rem 0.8rem;
  background: linear-gradient(180deg, transparent, rgba(14, 31, 46, 0.82));
}

.output-overlay h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #fff;
}

.output-overlay small {
  margin: 0;
  color: #e4eef9;
}

.float-metric {
  position: absolute;
  bottom: -16px;
  left: 12px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  transform: rotate(-4deg);
  animation: metricPop 1s ease 0.7s both, badgeFloat 5.4s ease-in-out infinite 1.7s;
}

.float-metric strong {
  display: block;
  font-family: "Syne", sans-serif;
  color: var(--brand-red);
  font-size: 1.25rem;
}

.section {
  padding: 4rem 0;
  position: relative;
}

.section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.section-tint,
.section-dark {
  background: transparent;
}

.grid-4,
.grid-3,
.grid-2 {
  display: grid;
  gap: 1rem;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  position: relative;
  background:
    linear-gradient(145deg, #ffffff, #f4f8fc);
  color: var(--ink);
  border-radius: 14px;
  border: 2px solid rgba(233, 80, 67, 0.22);
  padding: 1.1rem;
  box-shadow:
    0 20px 34px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: rotate(-1deg);
  transition: transform 0.34s ease, box-shadow 0.34s ease, border-color 0.34s ease;
  transform-style: preserve-3d;
  overflow: hidden;
  isolation: isolate;
}

.card:nth-child(even) {
  transform: rotate(1.2deg);
}

.card h2,
.card h3 {
  color: var(--brand-red);
}

.card::before,
.metric-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.24), transparent 62%);
  transform: translateX(-130%);
}

.card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -110px;
  top: -118px;
  border-radius: 999px;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(233, 80, 67, 0.08), rgba(233, 80, 67, 0.015) 58%, transparent 72%);
  z-index: 0;
  opacity: 0.2;
  transition: transform 0.42s ease, opacity 0.42s ease;
}

.card:hover::before,
.metric-box:hover::before {
  animation: sheen 0.9s ease;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-dark {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  border-color: rgba(255, 255, 255, 0.2);
}

.card-dark h2,
.card-dark h3 {
  color: #ff7f73;
}

.card-dark .lead {
  color: #d4e4f3;
}

.card-dark::after {
  background: radial-gradient(circle, rgba(233, 80, 67, 0.1), rgba(233, 80, 67, 0.02) 58%, transparent 74%);
  opacity: 0.25;
}

.metric-box {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  border: 1px solid #c8d9e8;
  padding: 0.95rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
  transform: rotate(-2deg);
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
  overflow: hidden;
}

.metric-box:nth-child(even) {
  transform: rotate(2deg);
}

.metric-box strong {
  font-family: "Syne", sans-serif;
  color: var(--brand-red);
  display: block;
  font-size: 1.8rem;
  line-height: 1;
}

.metric-box::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 8px;
  background: linear-gradient(90deg, #e95043, #243447);
  opacity: 0.7;
}

.client-tile p,
.client-card p {
  margin: 0.2rem 0 0;
  color: #29415a;
}

.client-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.client-logo-badge {
  width: clamp(58px, 8vw, 72px);
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #d1dce7;
  box-shadow: 0 8px 16px rgba(12, 34, 52, 0.14);
  display: grid;
  place-items: center;
  padding: 0.3rem;
  overflow: hidden;
}

.client-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.client-name {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.18rem;
  color: #132d45;
  letter-spacing: 0.01em;
}

.service-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.service-bento article:nth-child(1),
.service-bento article:nth-child(2) {
  grid-column: span 3;
}

.service-bento article:nth-child(3),
.service-bento article:nth-child(4) {
  grid-column: span 3;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chips span {
  background: rgba(36, 52, 71, 0.08);
  border: 1px solid rgba(36, 52, 71, 0.15);
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  color: var(--brand-blue);
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.logo-strip {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.logo-track {
  display: flex;
  white-space: nowrap;
  gap: 2rem;
  animation: marquee 24s linear infinite;
  padding: 0.9rem 1rem;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  color: #d7e9f9;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.quote {
  border-left: 4px solid var(--brand-red);
  padding-left: 0.8rem;
  color: #2f4256;
}

.cta-band {
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 86% 10%, rgba(255, 255, 255, 0.22), transparent 32%),
    linear-gradient(130deg, var(--brand-red), var(--brand-blue));
  color: #fff;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: ctaGlow 4s ease-in-out infinite alternate;
}

.timeline {
  border-left: 2px dashed #8ea3b7;
  padding-left: 1rem;
}

.timeline .item {
  margin-bottom: 0.8rem;
}

.project-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f2f8ff;
  font-weight: 700;
  font-size: 0.85rem;
}

.project-hero {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: clamp(1rem, 2.4vw, 1.7rem);
  background:
    radial-gradient(circle at 84% 14%, rgba(233, 80, 67, 0.3), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 1rem;
  align-items: start;
}

.project-side {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 0.8rem;
}

.phone-mockup {
  position: relative;
  width: min(280px, 100%);
  margin: 0 auto;
  border-radius: 34px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(145deg, #1d2735, #0f1822);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.34);
}

.phone-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.phone-link:hover .phone-mockup {
  transform: translateY(-2px);
}

.phone-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
  border-radius: 18px;
}

.phone-mockup::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 82px;
  height: 7px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: #0a1119;
  z-index: 3;
}

.phone-screen {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  aspect-ratio: 9 / 19.5;
  position: relative;
  background: #000;
}

.ig-topbar,
.ig-bottombar {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0.55rem 0.65rem;
  color: #fff;
  font-size: 0.76rem;
  pointer-events: none;
}

.ig-topbar {
  top: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.64), transparent);
}

.ig-bottombar {
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent);
}

.ig-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.3rem;
  background: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(233, 80, 67, 0.22);
}

.phone-video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.phone-video {
  width: 100%;
  height: 112%;
  object-fit: cover;
  transform: translateY(-2%);
  animation: igScrollDrift 10s ease-in-out infinite alternate;
}

.phone-caption {
  margin: 0.55rem 0 0;
  text-align: center;
  color: #d7e7f7;
  font-size: 0.86rem;
}

.project-box {
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  border: 1px solid #cad8e4;
  padding: 0.9rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.project-box h3 {
  color: #102b41;
  margin-bottom: 0.45rem;
}

.project-meta {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-meta li {
  font-size: 0.95rem;
  color: #274158;
}

.project-media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-height: 300px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(145deg, rgba(233, 80, 67, 0.24), rgba(36, 52, 71, 0.48));
  background-size: 32px 32px, 32px 32px, auto;
  padding: 1.1rem;
  display: grid;
  align-content: end;
}

.project-media h3,
.project-media p {
  margin: 0;
}

.project-media .chips span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
}

.project-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.stat-pill {
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  border: 1px solid #cad8e4;
  padding: 0.78rem;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.2);
}

.stat-pill strong {
  display: block;
  color: var(--brand-red);
  font-family: "Syne", sans-serif;
  font-size: 1.45rem;
  line-height: 1;
}

.deliverables {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.deliverable {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 0.8rem;
}

.deliverable h3 {
  color: #f2f8ff;
  font-size: 1.05rem;
}

.deliverable p {
  color: #d7e7f7;
  margin: 0;
}

/* Article styles consolidated in Article Layout section below */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2rem 0 2.4rem;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.socials {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-footer .socials a {
  background: rgba(255, 255, 255, 0.08);
  color: #e4eef7;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.site-footer .socials a:hover {
  background: #fff;
  color: #16324b;
  transform: translateY(-1px);
}

.site-footer .socials a:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.social-icon svg {
  width: 19px;
  height: 19px;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.portfolio-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(3px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  transform: rotate(-1.2deg);
  transition: transform 0.36s ease, box-shadow 0.36s ease, border-color 0.36s ease;
}

.portfolio-card:nth-child(even) {
  transform: rotate(1.2deg);
}

.portfolio-card:hover {
  transform: translateY(-8px) rotate(0deg);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.34);
  border-color: rgba(233, 80, 67, 0.5);
}

.page-blog .portfolio-card::before {
  content: "Articolo";
}

.portfolio-card::before {
  content: "Portfolio";
  position: absolute;
  top: 0.62rem;
  left: 0.62rem;
  z-index: 3;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  padding: 0.26rem 0.48rem;
  border-radius: 999px;
  background: rgba(233, 80, 67, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.portfolio-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.portfolio-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(9, 31, 48, 0.6));
  pointer-events: none;
}

.portfolio-media::before {
  display: none;
}

.portfolio-card:hover .portfolio-media::before {
  transform: none;
}

.portfolio-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.07);
  transition: transform 1.2s ease;
}

.portfolio-card:hover .portfolio-video {
  transform: scale(1.14);
}

.portfolio-copy {
  padding: 0.9rem;
}

.portfolio-copy h3 {
  color: #fff;
  margin-bottom: 0.4rem;
}

.portfolio-copy p {
  color: #d2e3f2;
  margin: 0;
}

.portfolio-card > a .portfolio-copy::after {
  content: "Leggi l'articolo  →";
  display: inline-block;
  margin-top: 0.58rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffb0a8;
  transition: transform 0.26s ease, color 0.26s ease;
}

.portfolio-card > a:hover .portfolio-copy::after {
  transform: translateX(4px);
  color: #ffd3ce;
}

.portfolio-client {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #edf5fd;
  font-size: 0.84rem;
  font-weight: 600;
}

.portfolio-client-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  padding: 2px;
}

.portfolio-client-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#site-loader {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  background-size: 48px 48px, 48px 48px, auto;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

#site-loader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
}

.loader-logo {
  display: block;
  width: clamp(220px, 24vw, 320px);
  height: auto;
  object-fit: contain;
  animation: loaderPulse 1.1s ease-in-out infinite alternate;
}

.loader-text {
  font-family: "Syne", sans-serif;
  color: #fff;
  letter-spacing: 0.04em;
  font-size: 0.94rem;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1300;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-red);
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 18px rgba(233, 80, 67, 0.36);
}

body.cursor-active .cursor-dot,
body.cursor-active .cursor-ring {
  opacity: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  filter: none;
  transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.2, 0.9, 0.2, 1), filter 0.75s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.reveal[data-reveal="left"] {
  transform: translateX(-34px) scale(0.98);
}

.reveal[data-reveal="right"] {
  transform: translateX(34px) scale(0.98);
}

.reveal[data-reveal="zoom"] {
  transform: scale(0.9);
}

.reveal[data-reveal="rotate"] {
  transform: translateY(24px) rotate(-2deg) scale(0.97);
}

.reveal[data-reveal="up"] {
  transform: translateY(24px) scale(0.98);
}

.reveal[data-reveal="flip"] {
  transform: perspective(700px) rotateX(-10deg) translateY(18px) scale(0.97);
}

.reveal.visible[data-reveal="left"],
.reveal.visible[data-reveal="right"],
.reveal.visible[data-reveal="zoom"],
.reveal.visible[data-reveal="rotate"],
.reveal.visible[data-reveal="up"],
.reveal.visible[data-reveal="flip"] {
  transform: translateX(0) translateY(0) rotate(0deg) scale(1);
}

.card:hover,
.metric-box:hover {
  transform: translateY(-8px) rotate(0deg) scale(1.01);
  box-shadow:
    0 28px 48px rgba(0, 0, 0, 0.34),
    0 0 0 2px rgba(233, 80, 67, 0.22);
  border-color: rgba(233, 80, 67, 0.5);
}

.card:hover::after {
  transform: translate(-10px, 8px) scale(1.08);
  opacity: 1;
}

body:not(.page-contact) .grid-3 .card:nth-child(3n + 1):hover {
  transform: translateY(-8px) rotate(-0.45deg);
}

body:not(.page-contact) .grid-3 .card:nth-child(3n + 2):hover {
  transform: translateY(-7px) rotate(0.45deg);
}

body:not(.page-contact) .grid-3 .card:nth-child(3n):hover {
  transform: translateY(-6px) scale(1.01);
}

.parallax {
  transition: transform 0.25s ease-out;
  will-change: transform;
}

@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes metricPop {
  0% {
    opacity: 0;
    transform: translateY(18px) rotate(-6deg) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(-4deg) scale(1);
  }
}

@keyframes wobbleSlow {
  0%,
  100% {
    transform: rotate(-3deg) translateY(0);
  }
  50% {
    transform: rotate(-1deg) translateY(-3px);
  }
}

@keyframes badgeFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-4px) rotate(-1deg);
  }
}

@keyframes mediaBreath {
  0%,
  100% {
    transform: rotate(1deg) translateY(0);
  }
  50% {
    transform: rotate(1deg) translateY(-4px);
  }
}

@keyframes sheen {
  0% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(130%);
  }
}

@keyframes ctaGlow {
  0% {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
  }
  100% {
    box-shadow: 0 24px 48px rgba(233, 80, 67, 0.34);
  }
}

@keyframes auroraShift {
  0% {
    transform: translate3d(-1.5%, -1.2%, 0) scale(1);
  }
  100% {
    transform: translate3d(1.5%, 1.2%, 0) scale(1.03);
  }
}

@keyframes loaderPulse {
  0% {
    opacity: 0.88;
    box-shadow: 0 0 0 rgba(233, 80, 67, 0.2);
  }
  100% {
    opacity: 1;
    box-shadow: 0 0 24px rgba(233, 80, 67, 0.45);
  }
}

@keyframes btnSweep {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 220% 0%;
  }
}

@keyframes mediaPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(233, 80, 67, 0.2);
    opacity: 0.85;
  }
  50% {
    box-shadow: 0 0 0 10px rgba(233, 80, 67, 0);
    opacity: 1;
  }
}

@keyframes igScrollDrift {
  0% {
    transform: translateY(-2%);
  }
  100% {
    transform: translateY(-12%);
  }
}

/* Motion Direction By Page */
.page-home .reveal {
  transition-duration: 1s;
}

.page-home .reveal:not(.visible) {
  filter: blur(2px);
}

.page-home .hero-copy {
  animation: homeHeroSweep 1.2s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.page-home .hero-media {
  animation: mediaBreath 6s ease-in-out infinite, homeCinemaDrift 11s ease-in-out infinite alternate;
}

.page-home .sticker-acid,
.page-home .sticker-mint {
  animation-duration: 5.4s;
}

.page-home .cta-band {
  animation-duration: 3.3s;
}

.page-blog .reveal {
  transform: translateY(14px);
  transition-duration: 0.7s;
}

.page-blog .reveal[data-reveal="left"] {
  transform: translateX(-16px);
}

.page-blog .reveal[data-reveal="right"] {
  transform: translateX(16px);
}

.page-blog .reveal[data-reveal="zoom"] {
  transform: scale(0.97);
}

.page-blog .reveal[data-reveal="rotate"],
.page-blog .reveal[data-reveal="flip"] {
  transform: translateY(14px);
}

.page-blog .card,
.page-blog .card:nth-child(even),
.page-blog .metric-box,
.page-blog .metric-box:nth-child(even) {
  transform: none;
}

.page-blog .card:hover,
.page-blog .metric-box:hover {
  transform: translateY(-3px);
}

.page-blog .card .btn-primary {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
}

.page-blog .card .btn-primary:hover {
  background: #cf4337;
  border-color: #cf4337;
  color: #fff;
}

.page-blog .card .btn-secondary {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}

.page-blog .card .btn-secondary:hover {
  background: #1c2a39;
  border-color: #1c2a39;
  color: #fff;
}

.page-contact .reveal {
  transform: translateY(10px);
  transition-duration: 0.62s;
}

.page-contact {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(180deg, #1b2838, #243447);
  background-size: 48px 48px, 48px 48px, auto;
}

.page-contact::before {
  content: none !important;
}

.page-contact .reveal[data-reveal="left"],
.page-contact .reveal[data-reveal="right"],
.page-contact .reveal[data-reveal="rotate"],
.page-contact .reveal[data-reveal="flip"],
.page-contact .reveal[data-reveal="zoom"] {
  transform: translateY(10px);
}

.page-contact .card,
.page-contact .card:nth-child(even),
.page-contact .metric-box,
.page-contact .metric-box:nth-child(even),
.page-contact .eyebrow {
  transform: none;
  animation: none;
}

.page-contact .card:hover,
.page-contact .metric-box:hover {
  transform: translateY(-2px);
}

.page-contact .cta-band {
  animation: none;
}


.page-contact .site-header {
  backdrop-filter: none;
  background: rgba(36, 52, 71, 0.88);
}

.page-contact .btn::after,
.page-contact .card::before,
.page-contact .metric-box::before,
.page-contact .card::after,
.page-contact .metric-box::after {
  display: none !important;
}

.contact-hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 1rem;
  align-items: start;
}

.contact-hero-panel ul {
  margin-top: 0.7rem;
}

.contact-badges {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.contact-badges span {
  background: rgba(255, 255, 255, 0.1);
  color: #dbeaf9;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.contact-channel-grid {
  grid-template-columns: repeat(2, 1fr);
}

.contact-channel-card p {
  margin: 0.3rem 0;
}

.contact-channel-grid a.contact-channel-card {
  text-decoration: none;
  color: inherit;
}

.contact-channel-card small {
  color: #2b4761;
}

.contact-channel-card p {
  color: #e95043;
  font-weight: 700;
}

.contact-channel-grid a.contact-channel-card:hover h3,
.contact-channel-grid a.contact-channel-card:hover small {
  color: #0f2b41;
}

.contact-form {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.6rem;
}

.contact-form label {
  font-weight: 700;
  color: #173a55;
  font-size: 0.92rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: #f8fbfe;
  border: 1px solid #c7d8e8;
  border-radius: 10px;
  color: #1b3348;
  padding: 0.68rem 0.72rem;
  font-family: "Outfit", sans-serif;
  font-size: 0.96rem;
}

.contact-form textarea {
  resize: vertical;
  min-height: 126px;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(233, 80, 67, 0.35);
  border-color: #e95043;
}

.contact-form .btn-primary {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

.contact-form .btn-primary:hover {
  background: #1b2a39;
  border-color: #1b2a39;
  color: #fff;
}

.faq-list {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.55rem;
}

.faq-list details {
  border: 1px solid #ccd9e6;
  border-radius: 10px;
  background: #f8fbfe;
  padding: 0.58rem 0.68rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: #1b3b56;
}

.faq-list p {
  margin: 0.5rem 0 0;
  color: #41586d;
}

@keyframes homeHeroSweep {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes homeCinemaDrift {
  0% {
    transform: rotate(1deg) translate3d(0, 0, 0);
  }
  100% {
    transform: rotate(1deg) translate3d(6px, -4px, 0);
  }
}

@media (max-width: 1000px) {
  .hero-grid,
  .contact-hero-grid,
  .grid-4,
  .grid-3,
  .grid-2,
  .service-bento,
  .service-bento article {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .menu-button {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    background: #0f2a3f;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 0.65rem;
    max-height: 70vh;
    overflow-y: auto;
  }

  .nav-links a {
    width: 100%;
  }

  .nav-links.open {
    display: flex;
  }

  .hero-media {
    transform: none;
    animation: none;
  }

  .hero-media video {
    min-height: 300px;
  }

  .page-home .hero-media video {
    min-height: 0;
  }

  .media-slot {
    min-height: 300px;
  }

  .output-media {
    min-height: 250px;
    padding: 0;
  }

  .output-visual {
    min-height: 250px;
  }

  .float-metric {
    position: static;
    margin-top: 0.7rem;
    transform: rotate(-2deg);
    animation: none;
  }

  .page-home .hero-media {
    animation: none;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .article-shell {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-side {
    position: static;
  }

  .phone-mockup {
    width: min(260px, 90%);
  }

  .project-stats {
    grid-template-columns: 1fr;
  }

  .deliverables {
    grid-template-columns: 1fr;
  }

  .article-aside {
    position: static;
    order: -1;
  }

  .portfolio-card,
  .portfolio-card:nth-child(even) {
    transform: none;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

@media (min-width: 721px) and (max-width: 1024px) {
  .container {
    width: min(1200px, calc(100% - 1.6rem));
  }

  .header-wrap {
    min-height: 78px;
  }

  .nav-links a {
    padding: 0.44rem 0.68rem;
    font-size: 0.94rem;
  }

  .hero {
    padding: 3.6rem 0 1.9rem;
  }

  .hero-grid {
    gap: 1rem;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 1.25rem;
  }

  h1 {
    font-size: clamp(2rem, 5.6vw, 3.4rem);
  }

  h2 {
    font-size: clamp(1.55rem, 3.8vw, 2.2rem);
  }

  .section {
    padding: 3rem 0;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 > :last-child {
    grid-column: span 2;
  }

  .service-bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-bento article:nth-child(1),
  .service-bento article:nth-child(2),
  .service-bento article:nth-child(3),
  .service-bento article:nth-child(4),
  .service-bento article:nth-child(5) {
    grid-column: auto;
  }

  .cta-row .btn {
    min-width: 210px;
  }

  .card,
  .metric-box {
    transform: none;
  }

  .card:nth-child(even),
  .metric-box:nth-child(even) {
    transform: none;
  }

  .float-metric {
    transform: rotate(-2deg);
  }
}

@media (max-width: 720px) {
  body {
    background-size: 28px 28px, 28px 28px, auto, auto, auto;
  }

  .container {
    width: min(1200px, calc(100% - 1.15rem));
  }

  .header-wrap {
    min-height: 74px;
  }

  .brand-logo {
    width: 170px;
  }

  .hero {
    padding: 2.8rem 0 1.3rem;
  }

  h1 {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
    line-height: 1.04;
  }

  h2 {
    font-size: clamp(1.45rem, 7.5vw, 2rem);
  }

  .hero-copy {
    padding: 1rem;
  }

  .headline-stack .line {
    display: block;
  }

  .sticker {
    margin-top: 0.2rem;
    animation: none;
  }

  .section {
    padding: 2.4rem 0;
  }

  .cta-row {
    gap: 0.55rem;
  }

  .cta-row .btn {
    width: 100%;
  }

  .card,
  .metric-box {
    transform: none;
    border-radius: 12px;
    padding: 0.95rem;
  }

  .card:nth-child(even),
  .metric-box:nth-child(even) {
    transform: none;
  }

  .hero-media {
    border-radius: 16px;
  }

  .hero-media video {
    min-height: 220px;
  }

  .page-home .hero-media video {
    min-height: 0;
  }

  .media-slot {
    min-height: 220px;
    padding: 0.9rem;
  }

  .output-media {
    min-height: 220px;
    padding: 0;
  }

  .output-visual {
    min-height: 220px;
  }

  .float-metric {
    width: fit-content;
    max-width: 100%;
    font-size: 0.94rem;
  }

  .cta-band {
    padding: 1.1rem;
    border-radius: 16px;
    animation: none;
  }

  .site-footer .socials a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  #site-loader {
    display: none !important;
  }

  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }
}

/* ── Share Section ─────────────────────────────────────────────────────────── */

.share-section {
  padding: 4rem 0 2rem;
  text-align: center;
}

.share-section h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 0;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  line-height: 1;
  color: #fff;
}

.share-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.share-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: currentColor;
}

.share-btn--whatsapp { background: #25d366; }
.share-btn--facebook { background: #1877f2; }
.share-btn--linkedin { background: #0a66c2; }
.share-btn--x        { background: #000; }
.share-btn--copy     { background: #555; }

.share-btn--copy.copied {
  background: #16a34a;
}

/* ── Related Articles ──────────────────────────────────────────────────────── */

.related-section {
  padding: 3rem 0 4rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 2rem;
}

.related-section h3 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.related-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: background 0.2s, transform 0.2s;
}

.related-card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-3px);
}

.related-card-img {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 20% 30%, rgba(233, 80, 67, 0.35), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(36, 52, 71, 0.6), transparent 50%),
    linear-gradient(135deg, #1a2f42, #0f1e2c);
  overflow: hidden;
  flex-shrink: 0;
}

.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.related-card-body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.related-card .card-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
}

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

.related-card .card-excerpt {
  font-size: 0.85rem;
  opacity: 0.6;
  line-height: 1.5;
}

/* ── Rich Text / Embeds ────────────────────────────── */
.responsive-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: var(--bg-1, #0f1e2c);
  border-radius: 12px;
  overflow: hidden;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.responsive-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Page Transitions ──────────────────────────────── */
.page-transition {
  opacity: 1;
  transition: opacity 0.35s ease;
}

.page-transition.fade-out {
  opacity: 0;
}

/* ── Article Layout ──────────────────────────────── */

/* Prevent reveal animations from causing horizontal overflow */
.page-article .section {
  overflow-x: hidden;
}

/* Header section title — outside article-content */
.page-article h1 {
  color: #e95043;
}

.article-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 900px) {
  .article-shell {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 5rem;
  }
}

.article-main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  /* Clip any overflow from reveal animations */
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 2.5rem;
}

.article-aside {
  position: -webkit-sticky;
  position: sticky;
  top: 7rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--ink);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  color: #e95043;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.article-content h4,
.article-content h5,
.article-content h6 {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.article-content ul, .article-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.article-content a {
  color: #e95043;
  text-decoration: none;
}

.article-content img {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  height: auto;
  margin: 0 0 2rem;
  display: block;
}

.article-cover-wrap {
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 2rem;
  aspect-ratio: 16 / 9;
  width: 100%;
  position: relative;
}

.article-cover-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.article-video-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  background: #000;
}

.article-video {
  width: 100%;
  display: block;
  cursor: pointer;
  border-radius: 12px;
}

.video-sound-hint {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.78rem;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  transition: opacity 0.3s;
}

.video-sound-hint.hidden {
  opacity: 0;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  color: var(--text-light);
  font-size: 0.95rem;
  opacity: 0.8;
}

.share-box {
  background: var(--surface-light);
  border: 1px solid var(--line);
  padding: 1.5rem;
  border-radius: 12px;
}

.share-box h3, .toc h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #fff;
}

.share-box-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-box-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: #fff;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}

.share-box-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.share-box-icon--copy svg {
  fill: none;
}

.share-box-icon:hover {
  background: var(--mint);
  color: #000;
  transform: translateY(-2px);
}

.share-box-icon--wa { background: #25d366; }
.share-box-icon--fb { background: #1877f2; }
.share-box-icon--li { background: #0a66c2; }
.share-box-icon--x  { background: #000; }
.share-box-icon--copy { background: rgba(255,255,255,0.18); }

.article-meta span {
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-light);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line);
}

.toc {
  background: var(--surface-light);
  border: 1px solid var(--line);
  padding: 1.5rem;
  border-radius: 12px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toc-list a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.toc-list a:hover {
  color: var(--mint);
}

.share-section {
  text-align: center;
  padding: 4rem 0;
}

.share-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  background: var(--surface-light);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.25s;
  border: 1px solid var(--line);
  cursor: pointer;
}

.share-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.share-btn--copy svg { fill: none; }

.share-btn:hover {
  background: var(--text-light);
  color: var(--bg-color);
  transform: translateY(-2px);
}

/* ── Skeleton Loaders ──────────────────────────────── */
@keyframes skeletonShine {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: #1e2e3c;
  background-image: linear-gradient(90deg, #1e2e3c 0px, #2a3a4c 50%, #1e2e3c 100%);
  background-size: 200% 100%;
  animation: skeletonShine 2s infinite linear;
  border-radius: 8px;
  color: transparent !important;
}

/* ── Custom Cursor ──────────────────────────────── */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: opacity 0.2s ease;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, opacity 0.2s ease;
  mix-blend-mode: difference;
}

body.cursor-active, body.cursor-active * {
  cursor: none !important;
}

/* ── Form Responses ────────────────────────────── */
.form-success {
  background: rgba(68, 233, 197, 0.1);
  border: 1px solid rgba(68, 233, 197, 0.3);
  color: #44e9c5;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  display: none;
}
.form-error {
  background: rgba(233, 80, 67, 0.1);
  border: 1px solid rgba(233, 80, 67, 0.3);
  color: #e95043;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  display: none;
}

/* ── Cookie Banner ─────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(36, 52, 71, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  z-index: 99999;
  padding: 1rem 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.cookie-content {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-content p {
  margin: 0;
  flex: 1 1 500px;
  font-size: 0.95rem;
  color: var(--text-light);
}

.cookie-buttons {
  display: flex;
  gap: 0.8rem;
  flex-shrink: 0;
}

/* Fix per doppio badge nelle pagine Blog, Home e Articolo */
.page-blog .portfolio-card::before,
.page-home #homeBlogGrid .portfolio-card::before,
.page-article .portfolio-card::before {
  display: none !important;
}
