:root{
  --bg-dark:#000; --fg-dark:#fff;
  --bg-light:#fff; --fg-light:#000;
  --accent:#22d3ee;

  /* palette orb (dark di default) */
  --c1:#ffffff; --c2:#ffffff; --c3:#ffffff;

  --page-bg: var(--bg-dark);
  --page-fg: var(--fg-dark);
}

@font-face {
  font-family: "Aspekta";
  src: url("./Aspekta-250.otf") format("opentype");
  font-weight: 250;
  font-style: normal;
  font-display: swap;
}
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  position: relative;
}

body {
  font-family: "Aspekta", system-ui, Arial, sans-serif;
  transition: background .3s, color .3s;
  background: var(--page-bg);
  color: var(--page-fg);
}
button,input,select,textarea{font-family:inherit}
body.dark{--page-bg:var(--bg-dark);--page-fg:var(--fg-dark);background:var(--page-bg);color:var(--page-fg)}
body.light{
  --page-bg:var(--bg-light); --page-fg:var(--fg-light);
  background:var(--page-bg); color:var(--page-fg);
  /* palette chiara per l'orb */
  --c1:#000000; --c2:#000000; --c3:#000000;
}

/* Header / toggle */
.header{display:flex;justify-content:flex-end;padding:0;position:absolute;top:12px;right:12px;left:auto;bottom:auto;z-index:1000}

.floating-social{
  position: fixed;
  left: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 1200;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.floating-social__icon{
  width: 22px;
  height: 22px;
  fill: #fff;
  opacity: .92;
}

.floating-social:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.20);
}

.floating-social:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

body.light .floating-social{
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 18px 50px rgba(0,0,0,0.14);
}

body.light .floating-social__icon{
  fill: #111;
}

/* PULSANTI FLOTTANTI */
.floating-contacts {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  z-index: 10000; /* Assicura che stia sopra a tutto */
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

body.light .floating-contacts {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light .floating-btn {
  color: #000;
  background: rgba(0, 0, 0, 0.05);
}

.floating-btn:hover {
  transform: translateY(-3px);
  background: var(--accent);
  color: #000;
}

.floating-btn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 600px) {
  .floating-contacts {
    bottom: 15px;
    right: 15px;
    padding: 6px;
    gap: 8px;
  }
  
  .floating-btn {
    width: 36px;
    height: 36px;
  }
}

/* FINE PULSANTI FLOTTANTI */

/* Gradient Circle */
.gradient-circle {
  position: absolute;
  width: min(500px, 100vw);
  height: min(500px, 100vw);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

/* Theme Switch */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  margin-right: 5px;
}

.theme-switch {
  display: inline-block;
  position: relative;
  width: 60px;
  height: 34px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e8e8e8;
  transition: .4s;
  border: 2px solid transparent;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-icons {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6px;
  box-sizing: border-box;
  pointer-events: none;
}

.sun, .moon {
  font-size: 14px;
  line-height: 1;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

body.dark .slider {
  background-color: #333;
}

body.light .slider {
  background-color: #e8e8e8;
}

/* HERO */
.hero{
  position:relative;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;
  overflow:hidden;text-align:center;background:var(--page-bg);color:var(--page-fg);width:100%;
}
/* fix iOS viewport */
@supports (height: 100svh){ .hero{ min-height:100svh; } }

.hero-mm-gif-wrap{
  background:#000;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  z-index: 2;
  box-shadow: 0 18px 55px rgba(0,0,0,.55);
  line-height: 0;
}

.hero-mm-gif{
  width: min(520px, 76vw);
  height: auto;
  max-height: 52vh;
  object-fit: contain;
  display:block;
  filter: drop-shadow(0 18px 55px rgba(0,0,0,.6));
  user-select: none;
  -webkit-user-select: none;
}

.scroll-indicator{
  position:absolute;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:64px;
  z-index:3;
  opacity:.9;
  text-decoration:none;
}

.scroll-indicator__mouse{
  width:28px;
  height:46px;
  border:2px solid rgba(255,255,255,.85);
  border-radius:18px;
  position:relative;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(6px);
}

.scroll-indicator__dot{
  position:absolute;
  left:50%;
  top:10px;
  width:4px;
  height:8px;
  border-radius:999px;
  background: rgba(255,255,255,.9);
  transform:translateX(-50%);
  animation: scrollDot 1.35s ease-in-out infinite;
}

body.light .scroll-indicator__mouse{
  border-color: rgba(0,0,0,.80);
  background: rgba(0,0,0,.04);
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
}

body.light .scroll-indicator__dot{
  background: rgba(0,0,0,.80);
}

@keyframes scrollDot{
  0%{ transform: translate(-50%, 0); opacity: 0; }
  20%{ opacity: 1; }
  60%{ transform: translate(-50%, 14px); opacity: 1; }
  100%{ transform: translate(-50%, 18px); opacity: 0; }
}

.scroll-indicator:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 999px;
}

@media (prefers-reduced-motion: reduce){
  .scroll-indicator__dot{ animation:none; opacity:1; }
}

.curved-loop-section{
  background:var(--page-bg);
  width:100%;
  padding:10px 0 90px;
  overflow:hidden;
}

.curved-loop-jacket{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: clamp(160px, 22vh, 280px);
  width:100%;
  touch-action: pan-y;
}

.curved-loop-svg{
  width:100%;
  max-width: 1400px;
  aspect-ratio: 100 / 12;
  overflow: hidden;
  display:block;
  font-size: clamp(2.1rem, 6vw, 5.5rem);
  fill:var(--page-fg);
  user-select:none;
  -moz-user-select:none;
  -webkit-user-select:none;
  font-weight:700;
  text-transform:uppercase;
  line-height:1;
}

.curved-loop-measure{
  visibility:hidden;
  opacity:0;
  pointer-events:none;
}

@media (max-width: 768px){
  .curved-loop-section{ padding:8px 0 56px; }
}

/* Titolo – gradiente animato + glow */
.hero h1{
  font-size:clamp(1.5rem,3vw,2rem); margin:0 16px 14px; position:relative; z-index:2;
  color: var(--page-fg);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
  position: relative;
  z-index: 2;
}

/* Titolo in modalità chiara */
body.light .hero h1{ text-shadow: 0 0 10px rgba(255,255,255,0.25); }
@keyframes titleFlow{ 0%{background-position:0% 50%} 100%{background-position:200% 50%} }

/* ---- ORB CSS (3 layer) ---- */
.orb{
  position:absolute; inset:-20%;
  filter: blur(50px) saturate(140%) brightness(1.1);
  opacity:.92; pointer-events:none; z-index:0;
  will-change: transform; /* per il parallax */
}
.blob{
  position:absolute; top:50%; left:50%; width:70vmin; height:70vmin;
  transform:translate(-50%,-50%); border-radius:50%; mix-blend-mode:screen;
  background:
    radial-gradient(55% 55% at 35% 35%, var(--c1), transparent 60%),
    radial-gradient(55% 55% at 65% 40%, var(--c2), transparent 60%),
    radial-gradient(55% 55% at 50% 65%, var(--c3), transparent 60%);
}
.blob.a{ animation:floatA 16s ease-in-out infinite; }
.blob.b{ animation:floatB 19s ease-in-out infinite; }
.blob.c{ animation:floatC 22s ease-in-out infinite; }

@keyframes floatA{
  0%{transform:translate(-50%,-50%) scale(1)}
  50%{transform:translate(calc(-50% + 2%),calc(-50% - 1%)) scale(1.07) rotate(180deg)}
  100%{transform:translate(-50%,-50%) scale(1) rotate(360deg)}
}
@keyframes floatB{
  0%{transform:translate(-50%,-50%) scale(1)}
  50%{transform:translate(calc(-50% - 1%),calc(-50% + 2%)) scale(1.06) rotate(-180deg)}
  100%{transform:translate(-50%,-50%) scale(1) rotate(-360deg)}
}
@keyframes floatC{
  0%{transform:translate(-50%,-50%) scale(1)}
  50%{transform:translate(calc(-50% + 1%),calc(-50% + 1%)) scale(1.05)}
  100%{transform:translate(-50%,-50%) scale(1)}
}

/* Film grain overlay */
.grain{
  position:absolute; inset:0; z-index:1; pointer-events:none; opacity:.05; mix-blend-mode:soft-light;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 70%, rgba(255,255,255,.5) 50%, transparent 51%);
  background-size: 140px 140px, 180px 180px, 160px 160px, 200px 200px;
  animation: grainMove 12s linear infinite alternate;
}
@keyframes grainMove{ from{transform:translate3d(0,0,0)} to{transform:translate3d(2%,-2%,0)} }

/* Glitch button */
.glitch-btn, .glitch-btn::after { 
  padding: 10px 50px; 
  font-size: 20px; 
  border: none; 
  border-radius: 5px; 
  color: white; 
  background-color: transparent; 
  position: relative; 
  cursor: pointer;
  z-index: 2;
} 

.glitch-btn::after { 
  --move1: inset(50% 50% 50% 50%); 
  --move2: inset(31% 0 40% 0); 
  --move3: inset(39% 0 15% 0); 
  --move4: inset(45% 0 40% 0); 
  --move5: inset(45% 0 6% 0); 
  --move6: inset(14% 0 61% 0); 
  clip-path: var(--move1); 
  content: 'I miei progetti'; 
  position: absolute; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  display: block; 
} 

.glitch-btn:hover::after { 
  animation: glitch_4011 1s; 
  text-shadow: 10 10px 10px black; 
  animation-timing-function: steps(2, end); 
  text-shadow: -3px -3px 0px #1df2f0, 3px 3px 0px #E94BE8; 
  background-color: transparent; 
  border: 3px solid rgb(0, 255, 213); 
} 

.glitch-btn:hover { 
  text-shadow: -1px -1px 0px #1df2f0, 1px 1px 0px #E94BE8; 
  background-color: transparent; 
  border: 1px solid rgb(0, 255, 213); 
  box-shadow: 0px 10px 10px -10px rgb(0, 255, 213); 
} 

@keyframes glitch_4011 { 
  0% { 
    clip-path: var(--move1); 
    transform: translate(0px,-10px); 
  } 

  10% { 
    clip-path: var(--move2); 
    transform: translate(-10px,10px); 
  } 

  20% { 
    clip-path: var(--move3); 
    transform: translate(10px,0px); 
  } 

  30% { 
    clip-path: var(--move4); 
    transform: translate(-10px,10px); 
  } 

  40% { 
    clip-path: var(--move5); 
    transform: translate(10px,-10px); 
  } 

  50% { 
    clip-path: var(--move6); 
    transform: translate(-10px,10px); 
  } 

  60% { 
    clip-path: var(--move1); 
    transform: translate(10px,-10px); 
  } 

  70% { 
    clip-path: var(--move3); 
    transform: translate(-10px,10px); 
  } 

  80% { 
    clip-path: var(--move2); 
    transform: translate(10px,-10px); 
  } 

  90% { 
    clip-path: var(--move4); 
    transform: translate(-10px,10px); 
  } 

  100% { 
    clip-path: var(--move1); 
    transform: translate(0); 
  } 
}

/* Stile per il pulsante animato */
.button { 
  position: relative; 
  padding: 8px 24px; 
  font-size: 14px; 
  font-weight: bold; 
  color: white; 
  border: none; 
  border-radius: 50px; 
  cursor: pointer; 
  overflow: hidden; 
  background: transparent; 
  display: inline-block; 
  z-index: 1; 
  transition: transform 0.2s ease; 
} 

.button span { 
  position: relative; 
  z-index: 15; 
} 

.button:active { 
  transform: scale(0.96); 
} 

.button::before { 
  content: ""; 
  background: rgb(0 0 0); 
  border-radius: inherit; 
  height: calc(100% - 4px); 
  width: calc(100% - 4px); 
  position: absolute; 
  top: 2px; 
  left: 2px; 
  z-index: 12; 
  opacity: 0; 
  transform: scale(0.95); 
  transition: all 0.5s ease; 
} 

.button:hover::before { 
  opacity: 1; 
  transform: scale(1); 
} 

.bubble-layer { 
  position: absolute; 
  width: 100px; 
  height: 100px; 
  border-radius: 50%; 
  filter: blur(8px); 
  z-index: 0; 
} 

.bubble-1 { 
  background: #ff007f; 
  top: -20%; 
  left: -10%; 
  animation: moveUpRight 6s ease-in-out infinite; 
} 
.bubble-2 { 
  background: #ff6a00; 
  top: 0%; 
  left: 10%; 
  animation: moveDownLeft 5s ease-in-out infinite; 
  animation-delay: 1s; 
} 
.bubble-3 { 
  background: #ffcc00; 
  top: 20%; 
  left: 50%; 
  animation: moveRight 4s ease-in-out infinite; 
  animation-delay: 2s; 
} 
.bubble-4 { 
  background: #00fff0; 
  top: -20%; 
  left: 70%; 
  animation: moveUpLeft 7s ease-in-out infinite; 
  animation-delay: 3s; 
} 
.bubble-5 { 
  background: #9d00ff; 
  top: 30%; 
  left: -10%; 
  animation: moveDownRight 3s ease-in-out infinite; 
  animation-delay: 4s; 
} 
.bubble-6 { 
  background: #ff007f; 
  top: -10%; 
  left: 30%; 
  animation: moveLeft 8s ease-in-out infinite; 
  animation-delay: 0.5s; 
} 
.bubble-7 { 
  background: #ff6a00; 
  top: 40%; 
  left: 60%; 
  animation: moveUp 6s ease-in-out infinite; 
  animation-delay: 1.5s; 
} 

@keyframes moveUpRight { 
  0% { 
    transform: translate(0, 0); 
  } 
  25% { 
    transform: translate(100%, -100%); 
  } 
  50% { 
    transform: translate(-50%, 50%); 
  } 
  75% { 
    transform: translate(50%, -50%); 
  } 
  100% { 
    transform: translate(0, 0); 
  } 
} 
@keyframes moveDownLeft { 
  0% { 
    transform: translate(0, 0); 
  } 
  25% { 
    transform: translate(-100%, 100%); 
  } 
  50% { 
    transform: translate(50%, -50%); 
  } 
  75% { 
    transform: translate(-50%, 50%); 
  } 
  100% { 
    transform: translate(0, 0); 
  } 
} 
@keyframes moveRight { 
  0% { 
    transform: translate(0, 0); 
  } 
  25% { 
    transform: translate(100%, 0); 
  } 
  50% { 
    transform: translate(-100%, 50%); 
  } 
  75% { 
    transform: translate(50%, -50%); 
  } 
  100% { 
    transform: translate(0, 0); 
  } 
} 
@keyframes moveUpLeft { 
  0% { 
    transform: translate(0, 0); 
  } 
  25% { 
    transform: translate(-100%, -100%); 
  } 
  50% { 
    transform: translate(50%, 50%); 
  } 
  75% { 
    transform: translate(-50%, -50%); 
  } 
  100% { 
    transform: translate(0, 0); 
  } 
} 
@keyframes moveDownRight { 
  0% { 
    transform: translate(0, 0); 
  } 
  25% { 
    transform: translate(100%, 100%); 
  } 
  50% { 
    transform: translate(-50%, -50%); 
  } 
  75% { 
    transform: translate(50%, 50%); 
  } 
  100% { 
    transform: translate(0, 0); 
  } 
} 
@keyframes moveLeft { 
  0% { 
    transform: translate(0, 0); 
  } 
  25% { 
    transform: translate(-100%, 0); 
  } 
  50% { 
    transform: translate(100%, -50%); 
  } 
  75% { 
    transform: translate(-50%, 50%); 
  } 
  100% { 
    transform: translate(0, 0); 
  } 
} 
@keyframes moveUp { 
  0% { 
    transform: translate(0, 0); 
  } 
  25% { 
    transform: translate(0, -100%); 
  } 
  50% { 
    transform: translate(50%, 50%); 
  } 
  75% { 
    transform: translate(-50%, -50%); 
  } 
  100% { 
    transform: translate(0, 0); 
  } 
}

/* Sezione sponsorizzazione */
.empty-section {
  width: 100%;
  min-height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

.sponsor-container {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
}

.sponsor-text {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.sponsor-contact {
  font-size: 1.1rem;
}

.sponsor-contact a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* PROGETTI */
.projects{padding:72px 20px; position:relative; z-index:1}
.container{max-width:1100px;margin:auto}
h2{text-align:center;margin:0 0 28px}
.grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}

.reveal-item{
  opacity:0;
  transform: translateX(var(--reveal-x, 0px)) translateY(10px);
  transition: opacity 650ms ease, transform 650ms ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

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

#projects .project-link.reveal-item:nth-child(odd){
  --reveal-x: -44px;
}

#projects .project-link.reveal-item:nth-child(even){
  --reveal-x: 44px;
}

.projects-header {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.btn2 { 
  position: relative; 
  display: inline-block; 
  padding: 15px 30px; 
  border: 2px solid var(--page-fg); 
  text-transform: uppercase; 
  color: var(--page-fg); 
  text-decoration: none; 
  font-weight: 600; 
  font-size: 20px; 
  transition: 0.3s; 
  background-color: transparent; 
  cursor: pointer; 
} 

.btn2::before { 
  content: ""; 
  position: absolute; 
  top: -2px; 
  left: -2px; 
  width: calc(100% + 6px); 
  height: calc(100% + 2px); 
  background-color: rgba(255,255,255,0.06); 
  transition: 0.3s ease-out; 
  transform: scaleY(1); 
} 

.btn2::after { 
  content: ""; 
  position: absolute; 
  top: -2px; 
  left: -2px; 
  width: calc(100% + 4px); 
  height: calc(100% - 50px); 
  background-color: rgba(255,255,255,0.06); 
  transition: 0.3s ease-out; 
  transform: scaleY(1); 
} 

.btn2:hover::before { 
  transform: translateY(-25px); 
  height: 0; 
} 

.btn2:hover::after { 
  transform: scaleX(0); 
  transition-delay: 0.15s; 
} 

.btn2:hover { 
  border: 2px solid var(--page-fg); 
} 

body.light .btn2::before,
body.light .btn2::after{
  background-color: rgba(0,0,0,0.06);
}

.btn2 .spn2 { 
  position: relative; 
  z-index: 3; 
  text-decoration: none; 
  border: none; 
  background-color: transparent; 
}

/* STRISCIA LOGHI */
.logo-strip {
  background-color: transparent;
  padding: 40px 0;
  margin-top: 20px;
}

.logo-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.7;
  margin: 0 15px;
}

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

.logo-svg {
  width: 50px;
  height: 50px;
  fill: var(--text-color);
  transition: fill 0.3s ease;
}

.logo:hover .logo-svg {
  fill: var(--accent-color);
}

/* Colori dei loghi in base al tema */
[data-theme="light"] .logo-svg {
  fill: #000;
}

[data-theme="dark"] .logo-svg {
  fill: #fff;
}

/* SERVIZI */
.services-section {
  padding: 80px 0;
  background: var(--page-bg);
  text-align: center;
}

.services-grid {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 20px 10px;
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.service-card {
  flex: 1;
  min-width: 0; /* Permette al flex item di rimpicciolirsi oltre il contenuto */
  padding: 20px 10px;
  border-radius: 15px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid transparent;
}

body.dark .service-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
}

body.light .service-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

.service-card:hover {
  transform: translateY(-5px);
  background: var(--accent);
}

.service-card:hover h3, 
.service-card:hover p,
.service-card:hover .service-icon {
  color: #000;
  stroke: #000;
  fill: #000;
}

.service-icon {
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

body.light .service-icon {
  color: #000;
}

body.dark .service-icon {
  color: #fff;
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-family: "StussyScript", system-ui, Arial, sans-serif;
  font-size: 1.2rem;
  margin-bottom: 8px;
  font-weight: 400;
  white-space: nowrap;
}

.service-card p {
  font-size: 0.75rem;
  line-height: 1.3;
  opacity: 0.8;
  font-family: system-ui, Arial, sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 600px) {
  .services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .service-card {
    padding: 15px 5px;
  }

  .service-card h3 {
    font-size: 1rem;
  }

  .service-card p {
    font-size: 0.65rem;
    -webkit-line-clamp: 3;
  }
}

/* SEZIONE RICHIEDI */
.request-section {
  padding: 60px 0;
  text-align: center;
}

.section-title {
  font-family: "StussyScript", system-ui, Arial, sans-serif;
  font-size: 2.5rem;
  letter-spacing: 2px;
  margin-bottom: 30px;
  color: var(--page-fg);
  font-weight: 400;
}

.request-button-container {
  margin-bottom: 80px;
}

.contact-box-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-group {
  flex: 1;
}

.contact-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1.2rem;
  border-radius: 8px;
  background: transparent;
  font-family: "StussyScript", system-ui, Arial, sans-serif;
  transition: border-color 0.3s, box-shadow 0.3s;
}

body.dark .contact-input {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

body.light .contact-input {
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #000;
}

.contact-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2);
}

.select-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

body.light .select-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E");
}

.textarea-input {
  min-height: 120px;
  resize: vertical;
}

.button--submit-full {
  width: 100%;
  min-height: 50px;
  border: none;
  border-radius: 8px;
  font-size: 1.5rem;
  font-family: "StussyScript", system-ui, Arial, sans-serif;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 1px;
}

body.dark .button--submit-full {
  background-color: #fff;
  color: #000;
}

body.light .button--submit-full {
  background-color: #000;
  color: #fff;
}

.button--submit-full:hover {
  background-color: var(--accent);
  color: #000;
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 15px;
  }
}

.input-group { 
  display: flex; 
  align-items: center;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
} 

.input { 
  min-height: 50px; 
  flex: 1;
  padding: 0 1rem; 
  font-size: 1.2rem; 
  font-family: "StussyScript", system-ui, Arial, sans-serif;
  border-radius: 8px 0 0 8px; 
  background-color: transparent; 
} 

body.dark .input {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body.light .input {
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.button--submit { 
  min-height: 50px;
  min-width: 120px;
  padding: .5em 1em; 
  border: none; 
  border-radius: 0 8px 8px 0; 
  font-size: 1.5rem;
  font-family: "StussyScript", system-ui, Arial, sans-serif;
  font-weight: 400;
  cursor: pointer; 
  transition: all .3s ease-in-out; 
} 

body.dark .button--submit {
  background-color: #ffffff;
  color: #000000;
}

body.light .button--submit {
  background-color: #000000;
  color: #ffffff;
}

.button--submit:hover { 
  background-color: var(--accent);
  color: #000;
  transform: translateY(-2px);
} 

.input:focus, .input:focus-visible { 
  border-color: var(--accent); 
  outline: none; 
}

/* Form Section Styles */
.form-section {
  padding: 60px 0;
  background-color: var(--page-bg);
}

/* RECENSIONI GOOGLE */
.reviews-section {
  padding: 80px 0;
  text-align: center;
  background: var(--page-bg);
}

.google-badge-link {
  text-decoration: none;
  display: inline-block;
}

.google-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px 30px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
}

.google-badge:hover {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

body.light .google-badge {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

body.light .google-badge:hover {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.badge-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.rating-score {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--page-fg);
}

.stars {
  color: #fbaf08;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.review-count {
  font-size: 0.9rem;
  color: #fff;
}

@media (max-width: 768px) {
  .google-badge {
    flex-direction: column;
    text-align: center;
  }
  
  .badge-info {
    align-items: center;
  }
}

/* Footer Styles */
.footer {
  background-color: var(--page-bg);
  color: var(--page-fg);
  padding: 50px 0 20px;
  margin-top: 50px;
  text-align: center;
}

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

.footer a:hover{
  color: var(--accent);
}

.footer a:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-logo {
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-column h4 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--accent);
  text-align: center;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.footer-column li {
  margin-bottom: 10px;
  text-align: center;
}

.footer-column a {
  color: var(--page-fg);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-column a:hover {
  color: var(--accent);
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
  transition: all 0.3s;
}

body.light .social-icon {
  background-color: rgba(0, 0, 0, 0.1);
  color: #000000;
}

.social-icon:hover {
  background-color: var(--accent);
  color: #000;
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.light .footer-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 20px;
  }
}

.form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  background-color: var(--card-bg-light);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--card-bg);
  color: var(--text-color);
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-group {
  text-align: center;
  margin-top: 30px;
}

.submit-button {
  display: inline-block;
  padding: 14px 40px;
  background-color: var(--accent-color);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.submit-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.submit-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Media query per dispositivi mobili */
@media (max-width: 768px) {
  .logo-container {
    gap: 15px;
  }
  
  .logo {
    margin: 0 10px;
  }
  
  .logo-svg {
    width: 40px;
    height: 40px;
  }
  
  .form-container {
    padding: 20px;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 10px;
  }
  
  .submit-button {
    padding: 12px 30px;
    font-size: 1rem;
  }
}

/* Stile per i link dei progetti */
.project-link {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

/* Safari Window Style */
.safari-window {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  background: var(--bg-dark);
  border: 1px solid rgba(255,255,255,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

body.light .safari-window {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.safari-window:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

body.light .safari-window:hover {
  box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}

/* Safari Header */
.safari-header {
  height: 36px;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 16px;
}

body.light .safari-header {
  background: #f0f0f0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.safari-buttons {
  display: flex;
  gap: 8px;
}

.safari-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.safari-btn.red { background: #ff5f56; }
.safari-btn.yellow { background: #ffbd2e; }
.safari-btn.green { background: #27c93f; }

.safari-address-bar {
  flex: 1;
  height: 24px;
  background: #1a1a1a;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  font-family: inherit;
  letter-spacing: 0.5px;
}

body.light .safari-address-bar {
  background: #fff;
  color: rgba(0,0,0,0.8);
  border: 1px solid rgba(0,0,0,0.05);
}

/* Safari Content */
.safari-content {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: #111;
  overflow: hidden;
}

body.light .safari-content {
  background: #f9f9f9;
}

.safari-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.safari-window:hover .safari-img {
  transform: scale(1.05);
}

/* Variabili per il tema */
:root {
  --card-bg: #0c0d0d;
  --card-bg-light: #444444;
  --text-color: #fff;
  --text-color-dark: #000000;
  --border-color: #202222;
  --accent-color: #ffffff;
}

body.light {
  --card-bg: #f0f0f0;
  --card-bg-light: #dddddd;
  --text-color: #111;
  --text-color-dark: #333333;
  --border-color: #cccccc;
  --accent-color: #10b981;
}

body.light .sponsor-container{
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 18px 50px rgba(0,0,0,0.12);
}

/* Stile per la responsività delle card */
@media (max-width: 768px) {
  .projects {
    padding: 40px 14px;
  }

  .projects h2 {
    margin: 0 0 16px;
  }

  .grid {
    gap: 14px;
  }

  #projects .project-link.reveal-item:nth-child(odd){
    --reveal-x: -10px;
  }

  #projects .project-link.reveal-item:nth-child(even){
    --reveal-x: 10px;
  }

  .outer {
    width: 100%;
    max-width: 340px;
    height: 160px;
  }
  
  .ray {
    width: 160px;
    height: 30px;
  }

  .img-container {
    height: 100px;
  }

  .card .text {
    padding: 6px 10px;
  }
  
  .card .text h3 {
    font-size: 1rem;
  }
}

/* Manteniamo il vecchio stile per compatibilità */
.one-div { 
  position: relative; 
  height: 250px; 
  width: 400px; 
  background-color: rgb(15, 15, 15); 
  transform-style: preserve-3d; 
  animation: rot 3s infinite ease; 
  border-radius: 20px; 
  box-shadow: 0 0 20px 0px, inset 0 0 40px 0px; 
  color: white; 
  transition: 1.5s; 
  display: none; /* Nascondiamo il vecchio stile */ 
  justify-content: center; 
  align-items: center; 
  margin: 0 auto; 
} 

.one-div .thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  z-index: -1;
  opacity: 0.6;
}

.one-div .thumb.we-engineering { background: url('weengi.jpg'); background-size: cover; background-position: center; }
.one-div .thumb.quelli-alba { background: url('QDA.jpg'); background-size: cover; background-position: center; }
.one-div .thumb.natural { background: url('natural.png'); background-size: cover; background-position: center; }
.one-div .thumb.archi-duca { background: url('archidelduca.jpg'); background-size: cover; background-position: center; }
.one-div .thumb.nonna-dora { background: url('nonna.jpg'); background-size: cover; background-position: center; }

body.light .one-div {
  background-color: rgb(240, 240, 240);
  color: black;
  box-shadow: 0 0 50px 0px rgba(0,0,0,0.1), inset 0 0 90px 0px rgba(255,255,255,0.5);
}

/* Accessibilità: riduci animazioni se l’utente lo chiede */
@media (prefers-reduced-motion: reduce){
  .blob.a,.blob.b,.blob.c,.grain,.star-btn::after{ animation:none !important }
  .orb{ filter: blur(30px) saturate(110%); }
  .reveal-item{ transition:none !important; transform:none !important; opacity:1 !important; }
  .outer:hover .card{ transform: none !important; }
  .card{ transition: none !important; }
}


/* From Uiverse.io by Galahhad */ 
.theme-switch {
  --toggle-size: 12px; /* Ridotto ulteriormente */
  /* the size is adjusted using font-size,
     this is not transform scale,
     so you can choose any size */
  --container-width: 5.625em;
  --container-height: 2.5em;
  --container-radius: 6.25em;
  /* radius 0 - minecraft mode :) */
  --container-light-bg: #3D7EAE;
  --container-night-bg: #1D1F2C;
  --circle-container-diameter: 3.375em;
  --sun-moon-diameter: 2.125em;
  --sun-bg: #ECCA2F;
  --moon-bg: #C4C9D1;
  --spot-color: #959DB1;
  --circle-container-offset: calc((var(--circle-container-diameter) - var(--container-height)) / 2 * -1);
  --stars-color: #fff;
  --clouds-color: #F3FDFF;
  --back-clouds-color: #AACADF;
  --transition: .5s cubic-bezier(0, -0.02, 0.4, 1.25);
  --circle-transition: .3s cubic-bezier(0, -0.02, 0.35, 1.17);
}

.theme-switch, .theme-switch *, .theme-switch *::before, .theme-switch *::after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-size: var(--toggle-size);
}

.theme-switch__container {
  width: var(--container-width);
  height: var(--container-height);
  background-color: var(--container-light-bg);
  border-radius: var(--container-radius);
  overflow: hidden;
  cursor: pointer;
  -webkit-box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
  box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
  position: relative;
}

.theme-switch__container::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  -webkit-box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset, 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
  box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset, 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
  border-radius: var(--container-radius)
}

.theme-switch__checkbox {
  display: none;
}

.theme-switch__circle-container {
  width: var(--circle-container-diameter);
  height: var(--circle-container-diameter);
  background-color: rgba(255, 255, 255, 0.1);
  position: absolute;
  left: var(--circle-container-offset);
  top: var(--circle-container-offset);
  border-radius: var(--container-radius);
  -webkit-box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1), 0 0 0 1.25em rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1), 0 0 0 1.25em rgba(255, 255, 255, 0.1);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-transition: var(--circle-transition);
  -o-transition: var(--circle-transition);
  transition: var(--circle-transition);
  pointer-events: none;
}

.theme-switch__sun-moon-container {
  pointer-events: auto;
  position: relative;
  z-index: 2;
  width: var(--sun-moon-diameter);
  height: var(--sun-moon-diameter);
  margin: auto;
  border-radius: var(--container-radius);
  background-color: var(--sun-bg);
  -webkit-box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
  box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
  -webkit-filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25)) drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
  filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25)) drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
  overflow: hidden;
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
}

.theme-switch__moon {
  -webkit-transform: translateX(100%);
  -ms-transform: translateX(100%);
  transform: translateX(100%);
  width: 100%;
  height: 100%;
  background-color: var(--moon-bg);
  border-radius: inherit;
  -webkit-box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
  box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
  position: relative;
}

.theme-switch__spot {
  position: absolute;
  top: 0.75em;
  left: 0.312em;
  width: 0.75em;
  height: 0.75em;
  border-radius: var(--container-radius);
  background-color: var(--spot-color);
  -webkit-box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
  box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
}

.theme-switch__spot:nth-of-type(2) {
  width: 0.375em;
  height: 0.375em;
  top: 0.937em;
  left: 1.375em;
}

.theme-switch__spot:nth-last-of-type(3) {
  width: 0.25em;
  height: 0.25em;
  top: 0.312em;
  left: 0.812em;
}

.theme-switch__clouds {
  width: 1.25em;
  height: 1.25em;
  background-color: var(--clouds-color);
  border-radius: var(--container-radius);
  position: absolute;
  bottom: -0.625em;
  left: 0.312em;
  -webkit-box-shadow: 0.937em 0.312em var(--clouds-color), -0.312em -0.312em var(--back-clouds-color), 1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color), 2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color), 2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color), 3.625em -0.062em var(--clouds-color), 2.625em 0em var(--back-clouds-color), 4.5em -0.312em var(--clouds-color), 3.375em -0.437em var(--back-clouds-color), 4.625em -1.75em 0 0.437em var(--clouds-color), 4em -0.625em var(--back-clouds-color), 4.125em -2.125em 0 0.437em var(--back-clouds-color);
  box-shadow: 0.937em 0.312em var(--clouds-color), -0.312em -0.312em var(--back-clouds-color), 1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color), 2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color), 2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color), 3.625em -0.062em var(--clouds-color), 2.625em 0em var(--back-clouds-color), 4.5em -0.312em var(--clouds-color), 3.375em -0.437em var(--back-clouds-color), 4.625em -1.75em 0 0.437em var(--clouds-color), 4em -0.625em var(--back-clouds-color), 4.125em -2.125em 0 0.437em var(--back-clouds-color);
  -webkit-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
  -o-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
  transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
}

.theme-switch__stars-container {
  position: absolute;
  color: var(--stars-color);
  top: -100%;
  left: 0.312em;
  width: 2.75em;
  height: auto;
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
}

/* actions */

.theme-switch__checkbox:checked + .theme-switch__container {
  background-color: var(--container-night-bg);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container {
  left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter));
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container:hover {
  left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter) - 0.187em)
}

.theme-switch__circle-container:hover {
  left: calc(var(--circle-container-offset) + 0.187em);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__moon {
  -webkit-transform: translate(0);
  -ms-transform: translate(0);
  transform: translate(0);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__clouds {
  bottom: -4.062em;
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__stars-container {
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
}

/* Safari Window (Live Site Design) */
.safari-window {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  background: var(--bg-dark);
  border: 1px solid rgba(255,255,255,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

body.light .safari-window {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.safari-window:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

body.light .safari-window:hover {
  box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}

/* Safari Header */
.safari-header {
  height: 36px;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 16px;
}

body.light .safari-header {
  background: #f0f0f0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.safari-buttons {
  display: flex;
  gap: 8px;
}

.safari-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.safari-btn.red { background: #ff5f56; }
.safari-btn.yellow { background: #ffbd2e; }
.safari-btn.green { background: #27c93f; }

.safari-address-bar {
  flex: 1;
  height: 24px;
  background: #1a1a1a;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  font-family: inherit;
  letter-spacing: 0.5px;
}

body.light .safari-address-bar {
  background: #fff;
  color: rgba(0,0,0,0.8);
  border: 1px solid rgba(0,0,0,0.05);
}

/* Safari Content */
.safari-content {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: #111;
  overflow: hidden;
}

body.light .safari-content {
  background: #f9f9f9;
}

.safari-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.safari-window:hover .safari-img {
  transform: scale(1.05);
}
