
:root {
  --color-bg: #f3f4ff;
  --color-surface: #ffffff;
  --color-surface-soft: #e9edff;
  --color-border-subtle: #c5cff5;

  --color-text: #0f172a;
  --color-text-muted: #6b7280;

  --color-accent: #6366f1;
  --color-accent-soft: rgba(99,102,241,0.12);
  --color-accent-warm: #f97316;

  --shadow-soft: 0 22px 45px rgba(15,23,42,0.16);
  --radius-lg: 20px;
  --radius-md: 12px;
  --transition-fast: 0.22s ease-out;
}

:root[data-theme="dark"] {
  --color-bg: #020617;
  --color-surface: #020617;
  --color-surface-soft: #0f172a;
  --color-border-subtle: #1f2937;

  --color-text: #e5e7eb;
  --color-text-muted: #9ca3af;

  --color-accent: #6366f1;
  --color-accent-soft: rgba(129,140,248,0.25);
  --shadow-soft: 0 28px 70px rgba(15,23,42,0.8);
}

/*modifica del testo in dark mode sezioni preview e cta contatti*/
:root[data-theme="dark"] .section-highlight .section-heading p,
:root[data-theme="dark"] .section-highlight .preview-label {
  color: var(--color-text);
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

/*taglio ciò che esce dalla viewport*/
html,
body {
  overflow-x: clip;  /* oppure: overflow-x: hidden; */
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Layout base */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.4rem 1.6rem 4rem;
}

.section-padding {
  padding: 4.5rem 0;
}

.section-heading {
  margin-bottom: 2.6rem;
}

.section-heading h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 3vw, 2.1rem);
  line-height: 1.1;
}

.section-heading h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.5rem, 2.4vw, 1.8rem);
  line-height: 1.15;
}

.section-heading p {
  margin: 0;
  /*color: var(--color-text-muted);*/
  max-width: 520px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.8rem;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--color-bg) 80%, transparent);
  border-bottom: 1px solid var(--color-border-subtle);
}

.logo a {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
}

.logo span {
  font-weight: 400;
  color: var(--color-text-muted);
}

.main-nav {
  display: flex;
  gap: 1.2rem;
}

.main-nav a {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.main-nav a:hover {
  color: var(--color-text);
}

/* Theme toggle */

.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface-soft);
  padding: 0 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-toggle .toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease-out;
}

[data-theme="dark"] .theme-toggle .toggle-knob {
  transform: translateX(30px);
}

/* Hero */

.hero {
  padding: 4.5rem 3rem 3.2rem;
  background: radial-gradient(circle at 0 0, rgba(244,114,182,0.18), transparent 55%),
              radial-gradient(circle at 100% 0, rgba(56,189,248,0.2), transparent 60%);
  border-radius: 32px;
  margin-top: 2rem;
}

.hero--with-media {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.8rem;
  align-items: center;
}

.hero-text {
  max-width: 640px;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--color-accent-warm);
  margin-bottom: 0.6rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 4.1vw, 2.8rem);
  line-height: 1.05;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 540px;
  color: var(--color-text-muted);
  margin-bottom: 1.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.hero-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}


/* Hero media mock devices */
/* contenitore 3D generale */

.hero-media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-media--3d {
  perspective: 1600px;
}

.hero-media-inner {
  position: relative;
  transform-style: preserve-3d;
}

/* ORB SIRI-LIKE */

.hero-orb {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* glow esterno morbido */

.hero-orb-glow {
  position: absolute;
  inset: -15%;/*20*/
  border-radius: 50%;
  background:
    radial-gradient(circle at 20% 20%, rgba(96,165,250,0.7), transparent 60%),
    radial-gradient(circle at 80% 30%, rgba(244,114,182,0.7), transparent 60%),
    radial-gradient(circle at 50% 80%, rgba(45,212,191,0.7), transparent 60%);
  filter: blur(40px);/*30*/
  opacity: 0.95;
  animation: orb-glow-shift 6s ease-in-out infinite alternate;
}

@keyframes orb-glow-shift {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.18) translateY(-14px);
    opacity: 1;
  }
  100% {
    transform: scale(1.03) translateY(12px);
    opacity: 0.85;
  }
}


/* nucleo sfera (dietro il cubo) */
/*originale
.hero-orb-core {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 0% 0%,   rgba(56,189,248,0.95) 0%, transparent 35%),
    radial-gradient(circle at 100% 0%, rgba(244,114,182,0.95) 0%, transparent 35%),
    radial-gradient(circle at 50% 100%, rgba(45,212,191,0.95) 0%, transparent 35%);
  background-repeat: no-repeat;
  background-blend-mode: screen;
  box-shadow:
    0 0 30px rgba(59,130,246,0.7),
    0 0 80px rgba(56,189,248,0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: orb-core-flow 5s ease-in-out infinite alternate;
}
*/

/* VERSIONE B – Sfera glass, bordo luminoso e cavità morbida */

.hero-orb-core {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 0% 0%,   rgba(56,189,248,0.95) 0%, transparent 35%),
    radial-gradient(circle at 100% 0%, rgba(244,114,182,0.95) 0%, transparent 35%),
    radial-gradient(circle at 50% 100%, rgba(45,212,191,0.95) 0%, transparent 35%);
  background-repeat: no-repeat;
  background-blend-mode: screen;
  box-shadow:
    inset 0 0 20px rgba(79,70,229,0.65),   /* nuovo: glow interno blu/viola morbido */
    /*0 0 30px rgba(59,130,246,0.7),*/
    0 0 80px rgba(56,189,248,0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: orb-core-flow 5s ease-in-out infinite alternate;
}



/* cubo dentro la sfera */
.hero-orb-core .rubik {
  width: 150px;
  height: 150px;
  position: relative;
  z-index: 2;
}
/*
            animazione dei gradienti: spostiamo i centri
            @keyframes orb-core-flow {
              0% {
                background-position:
                  0% 0%,
                  100% 0%,
                  50% 100%;
                transform: scale(1);
              }
              50% {
                background-position:
                  20% 20%,
                  80% 10%,
                  40% 80%;
                transform: scale(1.05);
              }
              100% {
                background-position:
                  40% 0%,
                  60% 30%,
                  60% 60%;
                transform: scale(1.08);
              }
            }
*/            


                            /* CUBO */


.rubik {
  position: relative;
  width: 160px;
  height: 160px;
  transform-style: preserve-3d;
  transform: rotateX(25deg) rotateY(-30deg);
  margin: 0 auto;
}

/* ogni faccia del cubo */

.rubik-face {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 20px;
  box-sizing: border-box;
  border: 1px solid rgba(148,163,184,0.55);
  box-shadow:
    0 0 5px rgba(15,23,42,0.4),
    0 0 5px rgba(15,23,42,0.3);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* posizionamento facce */

.rubik-face--front  { transform: rotateY(  0deg) translateZ(80px); }
.rubik-face--back   { transform: rotateY(180deg) translateZ(80px); }
.rubik-face--right  { transform: rotateY( 90deg) translateZ(80px); }
.rubik-face--left   { transform: rotateY(-90deg) translateZ(80px); }
.rubik-face--top    { transform: rotateX( 90deg) translateZ(80px); }
.rubik-face--bottom { transform: rotateX(-90deg) translateZ(80px); }



/*icona centrale ogni faccia*/

.rubik-icon {
  display: inline-block;
  width: 90%;
  height: 90%;
  position: relative;
  border-radius: 18px;
  /*background: rgba(15,23,42,0.68);
  box-shadow:
    0 0 10px rgba(15,23,42,0.8),
    0 0 18px rgba(15,23,42,0.5);
  backdrop-filter: blur(8px);*/
}


                @keyframes rubik-icon-glow {
                  0% {
                    transform: scale(1);
                    box-shadow:
                      0 0 12px rgba(56,189,248,0.4),
                      inset 0 0 10px rgba(15,23,42,0.9);
                  }
                  100% {
                    transform: scale(1.03);
                    box-shadow:
                      0 0 20px rgba(56,189,248,0.7),
                      inset 0 0 16px rgba(15,23,42,0.95);
                  }
                }


/*tipi di icone*/


/* icona network: 3 nodi collegati */

.rubik-icon--network::before,
.rubik-icon--network::after {
  content: "";
  position: absolute;
}

/* linee di connessione animate (respiro + glow) */
.rubik-icon--network::before {
  inset: 28% 22%;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.75);
  box-shadow: 0 0 10px rgba(148,163,184,0.6);
  animation: network-lines 3.2s ease-in-out infinite;
  transform-origin: center;
}

/* nodi che pulsano leggermente */
.rubik-icon--network::after {
  top: 34%;
  left: 30%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow:
    40px 10px 0 #f97316,
    16px 34px 0 #22c55e;
  animation: network-nodes 3.2s ease-in-out infinite;
  animation-delay: 0.15s; /* leggero sfalsamento rispetto alle linee */
  transform-origin: center;
}
@keyframes network-lines {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(148,163,184,0.5);
    border-color: rgba(148,163,184,0.7);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 16px rgba(148,163,184,0.9);
    border-color: rgba(191,219,254,0.95);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(148,163,184,0.5);
    border-color: rgba(148,163,184,0.7);
  }
}

            @keyframes network-nodes {
              0% {
                transform: scale(1);
                filter: brightness(1);
              }
              50% {
                transform: scale(1.12);
                filter: brightness(1.25);
                box-shadow:
                  40px 10px 0 #fb923c,
                  16px 34px 0 #22c55e;
              }
              100% {
                transform: scale(1);
                filter: brightness(1);
                box-shadow:
                  40px 10px 0 #f97316,
                  16px 34px 0 #22c55e;
              }
            }



/* icona responsive */
.rubik-icon--responsive::before,
.rubik-icon--responsive::after {
  content: "";
  position: absolute;
  border-radius: 10px;
  transform-origin: center;
}

/* desktop (si riduce leggermente, come se lasciasse spazio al mobile) */
.rubik-icon--responsive::before {
  inset: 22% 16% 38% 16%;
  border: 1px solid rgba(226,232,240,0.75);
  box-shadow: 0 0 8px rgba(226,232,240,0.6);
  animation: responsive-desktop 3.4s ease-in-out infinite;
}

/* mobile (entra un po’ in scena e pulsa) */
.rubik-icon--responsive::after {
  right: 20%;
  bottom: 22%;
  width: 18px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(148,163,184,0.9);
  box-shadow: 0 0 6px rgba(148,163,184,0.7);
  animation: responsive-mobile 3.4s ease-in-out infinite;
  animation-delay: 0.15s;
}

            @keyframes responsive-desktop {
              0% {
                transform: scale(1);
                opacity: 1;
              }
              35% {
                transform: scale(1);
                opacity: 1;
              }
              60% {
                transform: scale(0.9);
                opacity: 0.8;
              }
              100% {
                transform: scale(1);
                opacity: 1;
              }
            }
            
            @keyframes responsive-mobile {
              0% {
                transform: translate(0, 0) scale(1);
                box-shadow: 0 0 6px rgba(148,163,184,0.7);
              }
              35% {
                transform: translate(0, 0) scale(1);
                box-shadow: 0 0 6px rgba(148,163,184,0.7);
              }
              60% {
                transform: translate(-2px, -3px) scale(1.08);
                box-shadow: 0 0 10px rgba(226,232,240,0.9);
              }
              100% {
                transform: translate(0, 0) scale(1);
                box-shadow: 0 0 6px rgba(148,163,184,0.7);
              }
            }



/* icona supporto: due fumetti chat */

.rubik-icon--support::before,
.rubik-icon--support::after {
  content: "";
  position: absolute;
}

/* bubble principale (in primo piano) */
.rubik-icon--support::before {
  inset: 26% 18% 34% 18%;
  border-radius: 16px;
  /*background: rgba(15,23,42,0.96);*/
  border: 1px solid rgba(148,163,184,0.75);
  box-shadow:
    0 0 10px rgba(15,23,42,0.8),
    0 0 14px rgba(15,23,42,0.6);
}
/* coda + 3 punti digitazione */
.rubik-icon--support::after {
  left: 32%;
  bottom: 30%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #e5e7eb;
  box-shadow:
    8px 0 0 #e5e7eb,
    16px 0 0 #e5e7eb;
  animation: support-typing 1.4s ease-in-out infinite;
}


        @keyframes support-typing {
          0%   { transform: translateY(0); opacity: 0.4; }
          50%  { transform: translateY(-1px); opacity: 1; }
          100% { transform: translateY(0); opacity: 0.4; }
        }
        
        
.rubik-icon--support {
  position: relative;
}

/* bubble secondaria dietro */
.rubik-support-bg {
  position: absolute;
  right: 40%;
  top: 40%;
  width: 50%;
  height: 40%;
  border-radius: 14px;
  /*background: rgba(100,80,80,0.9);*/
  border: 1px solid rgba(148,163,184,0.55);
  box-shadow: 0 0 8px rgba(15,23,42,0.7);
  transform: translate(-4px, 4px);
  opacity: 0.85;
}



/* icona card: componente UI */
.rubik-icon--card::before,
.rubik-icon--card::after {
  content: "";
  position: absolute;
}

/* corpo card */
.rubik-icon--card::before {
  inset: 20% 16%;
  border-radius: 14px;
  background: rgba(15,23,42,0.26);
  border: 1px solid rgba(148,163,184,0.8);
  box-shadow:
    0 0 10px rgba(15,23,42,0.8),
    0 0 14px rgba(15,23,42,0.6);
}

/* header / barra colorata */
.rubik-icon--card::after {
  top: 26%;
  left: 20%;
  right: 20%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #a855f7);
  box-shadow: 0 0 8px rgba(56,189,248,0.7);
}


/* icona lampadina: idea */

.rubik-icon--bulb {
  position: relative;
  /* niente box-shadow sulla cornice */
  animation: bulb-glow 2.5s ease-in-out infinite alternate;
}

.rubik-icon--bulb::before,
.rubik-icon--bulb::after {
  content: "";
  position: absolute;
}

/* bulbo (glow solo intorno alla lampadina) */
.rubik-icon--bulb::before {
  top: 18%;
  left: 50%;
  width: 28px;
  height: 34px;
  margin-left: -14px;
  border-radius: 18px 18px 12px 12px;
  background: radial-gradient(circle at 30% 20%, #fef9c3, #facc15, #f97316);
  box-shadow:
    0 0 10px rgba(250, 250, 210, 0.9),
    0 0 22px rgba(250, 204, 21, 0.95),
    0 0 40px rgba(249, 115, 22, 0.8);
}

/* attacco + filettatura */
.rubik-icon--bulb::after {
  top: 55%;
  left: 50%;
  width: 20px;
  height: 10px;
  margin-left: -10px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e5e7eb, #cbd5f5);
  box-shadow:
    0 0 6px rgba(148,163,184,0.8),
    0 4px 0 rgba(15,23,42,0.9);
}

        @keyframes bulb-glow {
          0%   { filter: brightness(0.9); }
          100% { filter: brightness(1.25); }
        }


/* icona AI: orb/cervello astratto */
.rubik-icon--ai::before,
.rubik-icon--ai::after {
  content: "";
  position: absolute;
}

/* orb principale */
.rubik-icon--ai::before {
  inset: 22%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 20%, #38bdf8, transparent 55%),
    radial-gradient(circle at 80% 80%, #a855f7, transparent 55%);
  background-blend-mode: screen;
  box-shadow:
    0 0 16px rgba(56,189,248,0.8),
    0 0 22px rgba(168,85,247,0.7);
}

/* anello “neurale” */
.rubik-icon--ai::after {
  inset: 30% 30%;
  border-radius: 999px;
  /*border: 1px dashed rgba(226,232,240,0.8);
  opacity: 0.85;*/
}




/* Buttons */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  color: #ffffff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4338ca, #db2777);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-surface-soft);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: var(--color-surface);
}

/* Cards */

.cards {
  display: grid;
  gap: 1.8rem;
}

.cards--services,
.cards--portfolio {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border-subtle);
  padding: 1.8rem 1.8rem;
}

.card h2,
.card h3 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.card--hover {
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(15,23,42,0.18);
}

/* Layouts */

.two-columns {
  display: grid;
  gap: 2.4rem;
}

@media (min-width: 800px) {
  .two-columns {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

/* Process list */

.process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.process-list li {
  counter-increment: step;
  margin-bottom: 0.8rem;
}

.process-list li::before {
  content: counter(step) ". ";
  font-weight: 600;
}

/* Contact form */

.contact-form {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-soft);
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface-soft);
  color: var(--color-text);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-border-subtle);
  padding: 2rem 1.4rem 2.4rem;
  text-align: center;
  color: var(--color-text-muted);
}

/* AI assistant */

.ai-assistant {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 200;
}

.ai-assistant-toggle {
  border-radius: 999px;
  border: none;
  padding: 0.6rem 1.2rem;
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font-size: 0.9rem;
}

.ai-assistant-panel {
  position: fixed;
  right: 1.2rem;
  bottom: 4.2rem;
  width: min(360px, 100vw - 2.4rem);
  max-height: 70vh;
  display: none;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border-subtle);
}

.ai-assistant-panel.is-open {
  display: flex;
}

.ai-assistant-header {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-assistant-messages {
  padding: 0.8rem 1rem;
  overflow-y: auto;
  flex: 1;
}

.ai-msg {
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.ai-msg--user {
  background: var(--color-accent-soft);
  align-self: flex-end;
}

.ai-msg--bot {
  background: var(--color-surface-soft);
}

.ai-assistant-form {
  padding: 0.7rem;
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  gap: 0.4rem;
}

.ai-assistant-form input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  padding: 0.5rem 0.8rem;
}
    
    /*versione mobile*/
@media (max-width: 720px) {
  .ai-assistant-form input {
    font-size: 16px;
  }
}
    
    
@media (max-width: 720px) {
  .ai-assistant {
    right: 0.8rem;
    bottom: 0.8rem;
  }

  .ai-assistant-panel {
    left: 5px;
    right: 5px;
    bottom: 40px;
    top: auto;
    width: 100vw;
    max-width: 100vw;
    max-height: 70vh;          /* resta contenuta in altezza */
    border-radius: 18px 18px 0 0;
    margin: 0;
  }
}


/* Preview grid */

.section-highlight {
  background: linear-gradient(135deg, rgba(15,23,42,0.96), rgba(30,64,175,0.96));
  border-radius: 28px;
  padding-inline: 2.2rem;
  color: #e5e7eb;
  box-shadow: 0 18px 36px rgba(15,23,42,0.8);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem;
}

.preview-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.preview-thumb {
  border-radius: 18px;
  height: 180px;
  background: radial-gradient(circle at 0 0, rgba(148,163,184,0.35), transparent 50%),
              radial-gradient(circle at 100% 100%, rgba(129,140,248,0.55), rgba(236,72,153,0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow: var(--shadow-soft);
  transform: translateY(0);
  opacity: 0.96;
  transition: transform 0.4s var(--transition-fast),
              box-shadow 0.4s var(--transition-fast),
              opacity 0.4s var(--transition-fast);
}

.preview-card:hover .preview-thumb {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(15,23,42,0.28);
  opacity: 1;
}

.preview-label {
  font-size: 0.9rem;
  /*color: var(--color-text-muted);*/
}

/* Responsive nav */

@media (max-width: 720px) {
  .main-nav {
    display: none;
  }

  .hero {
    padding: 3rem 1.6rem 2.4rem;
    border-radius: 26px;
  }

  .hero--with-media {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media {
    margin-top: 2rem;
  }
}

/* Scroll reveal */
.js-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.js-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hamburger nav */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
  margin-left: 0.8rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--color-text);
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.nav-toggle-line + .nav-toggle-line {
  margin-top: 4px;
}

.nav-toggle--open .nav-toggle-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle--open .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle--open .nav-toggle-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

:root[data-theme="dark"] .nav-toggle {
  background: #020617;
}

:root[data-theme="dark"] .nav-toggle-line {
  background: #e5e7eb;
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    inset: 56px 1.2rem auto;
    background: var(--color-surface);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border-subtle);
    padding: 0.6rem 0.8rem;
    display: none;
    flex-direction: column;
    gap: 0.4rem;
  }

  .main-nav a {
    padding: 0.4rem 0.6rem;
  }

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

  .nav-toggle {
    display: inline-flex;
  }
}
/*card portfolio*/
.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}
/*form contatti*/
/*honey form*/
.honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-alert {
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
}

.form-alert--success {
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
}

.form-alert--error {
  background: rgba(248, 113, 113, 0.08);
  color: #b91c1c;
}

.field-hint {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.field--error input,
.field--error textarea {
  border-color: #b91c1c;
  box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.3);
}

.field-error {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #b91c1c;
}

.form-privacy-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}


/*tolgo il cubo e le animazioni in mobile

@media (max-width: 720px) {
  .hero-orb-core .rubik {
    display: none;
  }
}

@media (max-width: 720px) {
  .hero-orb-glow,
  .hero-orb-core {
    animation: none !important;
  }
}
*/

/*Fai il fallback no‑JS (così il sito è sempre leggibile)*/
html.no-js .js-reveal {
  opacity: 1;
  transform: none;
}



/**************************************************/
