@font-face {
  font-family: "Alice";
  src: url("fonts/Alice-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root{
  --bg1:#1a2f6b;
  --bg2:#020611;

  --white: rgba(255,255,255,1);
  --white-70: rgba(255,255,255,0.7);
  --white-12: rgba(255,255,255,0.12);
  --black-65: rgba(2,6,17,0.65);
  --black-35: rgba(2,6,17,0.35);

  --header-h: 72px;

  /* Sistema solare responsive */
  --ss-size: clamp(260px, 60vmin, 560px);

  /* Orbit Plutone: width 75% => raggio 37.5% */
  --pluto-radius: calc(var(--ss-size) * 0.375);

  /* Label */
  --label-gap-desktop: 34px;
  --label-gap-mobile: clamp(18px, 3vmin, 28px);

  /* Pianeti responsive */
  --p-merc: clamp(2px, 0.45vmin, 3px);
  --p-ven:  clamp(3px, 0.65vmin, 4px);
  --p-ter:  clamp(4px, 0.75vmin, 5px);
  --p-mar:  clamp(3px, 0.65vmin, 4px);
  --p-gio:  clamp(10px, 2.8vmin, 18px);
  --p-sat:  clamp(9px,  2.2vmin, 14px);
  --p-ura:  clamp(7px,  1.7vmin, 10px);
  --p-net:  clamp(7px,  1.7vmin, 10px);
  --p-plu:  clamp(2px, 0.45vmin, 3px);
}

html, body { height: 100%; }

body{
  margin:0;
  color: var(--white);
  background: var(--bg2);
  opacity:0;
  transition: opacity .8s ease;
  overflow-x:hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

body.loaded{ opacity:1; }

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
  body{ opacity: 1 !important; }
}

/* =========================
   Header (sticky + blur)
   ========================= */
.site-header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  z-index: 2000;

  display: flex;
  align-items: center;

  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  transition: background .25s ease, backdrop-filter .25s ease;
}

.site-header.scrolled{
  background: var(--black-35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;

  /* burger leggermente a sinistra */
  padding-left: 22px;
  padding-right: 16px;
  box-sizing: border-box;
  position: relative;
}

.header-title{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Alice", serif;
  font-weight: 400;
  letter-spacing: 1px;
  font-size: 20px;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  white-space: nowrap;
}

.site-header.scrolled .header-title{
  opacity: 0.92;
}

.page{
  padding-top: var(--header-h);
}

/* =========================
   Burger + menu dropdown
   ========================= */
.burger{
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;

  width: 44px;
  height: 44px;
  border-radius: 12px;

  border: 0;
  background: transparent;
  padding: 0;
}

.burger span{
  display:block;
  width: 30px;
  height: 3px;
  background: var(--white);
  border-radius: 4px;
  opacity: 0.92;
}

.nav-panel{
  position: absolute;
  top: calc(var(--header-h) - 6px);
  left: 14px;

  display: none;
  min-width: 200px;
  padding: 12px;
  border-radius: 14px;

  background: var(--black-65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header.open .nav-panel{
  display: block;
}

.nav-panel a{
  display:block;
  color: var(--white);
  text-decoration: none;
  padding: 10px 10px;
  border-radius: 10px;
  opacity: 0.92;
  transition: background .2s ease, opacity .2s ease;
}

.nav-panel a:hover{
  background: rgba(255,255,255,0.08);
  opacity: 1;
}

/* =========================
   Typography
   ========================= */
h1, h2, .planet-label, .page-title{
  font-family: "Alice", serif;
  font-weight: 400;
}

h1{
  font-size: clamp(40px, 6.2vmin, 58px);
  letter-spacing: 2px;
  margin: 0 0 10px;
}

.subtitle{
  font-size: clamp(14px, 2.1vmin, 16px);
  opacity: var(--white-70);
  margin: 0 0 42px;
  line-height: 1.5;
}

h2{
  font-size: clamp(26px, 4.3vmin, 34px);
  margin: 0 0 24px;
  letter-spacing: 1px;
}

/* =========================
   Layout
   ========================= */
.hero{
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 40px 16px 40px;
  box-sizing: border-box;
}

/* Gradiente: chiaro al Sole, scuro ESATTAMENTE al raggio di Plutone */
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background: radial-gradient(
    circle var(--pluto-radius) at var(--glow-x, 50%) var(--glow-y, 50%),
    var(--bg1) 0%,
    var(--bg2) 100%
  );
}

section{
  padding: 100px 18px;
  text-align:center;
  background: transparent;
}

/* Location container */
.container{
  min-height: calc(100vh - var(--header-h));
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 40px 16px 40px;
  box-sizing: border-box;
}

/* =========================
   Solar system
   ========================= */
.wrapper{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
}

.solar-system{
  position:relative;
  width: var(--ss-size);
  height: var(--ss-size);
}

.sun{
  position:absolute;
  width:4px;
  height:4px;
  background: var(--white);
  border-radius:50%;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  box-shadow: 0 0 10px rgba(255,255,255,0.7);
}

.orbit{
  position:absolute;
  top:50%;
  left:50%;
  border:1px solid var(--white-12);
  border-radius:50%;
  transform: translate(-50%,-50%);
  touch-action: manipulation;
}

@media (hover:hover){
  .orbit{ cursor: pointer; }
}

.planet{
  position:absolute;
  top:50%;
  left:100%;
  transform: translate(-50%,-50%);
  background: var(--white);
  border-radius:50%;
  pointer-events:none;
}

/* Pianeti */
.mercurio{ width:var(--p-merc); height:var(--p-merc); }
.venere{ width:var(--p-ven); height:var(--p-ven); }
.terra{ width:var(--p-ter); height:var(--p-ter); }
.marte{ width:var(--p-mar); height:var(--p-mar); }
.giove{ width:var(--p-gio); height:var(--p-gio); }
.saturno{ width:var(--p-sat); height:var(--p-sat); }
.urano{ width:var(--p-ura); height:var(--p-ura); }
.nettuno{ width:var(--p-net); height:var(--p-net); }
.plutone{ width:var(--p-plu); height:var(--p-plu); }

@keyframes spin{
  from{ transform: translate(-50%,-50%) rotate(0deg); }
  to{ transform: translate(-50%,-50%) rotate(360deg); }
}

/* Orbits scale + speed + z-index */
.orbit.mercurio { width:10%; height:10%; animation:spin 6s linear infinite;  z-index:9; }
.orbit.venere   { width:15%; height:15%; animation:spin 10s linear infinite; z-index:8; }
.orbit.terra    { width:20%; height:20%; animation:spin 14s linear infinite; z-index:7; }
.orbit.marte    { width:25%; height:25%; animation:spin 18s linear infinite; z-index:6; }
.orbit.giove    { width:35%; height:35%; animation:spin 24s linear infinite; z-index:5; }
.orbit.saturno  { width:45%; height:45%; animation:spin 30s linear infinite; z-index:4; }
.orbit.urano    { width:55%; height:55%; animation:spin 36s linear infinite; z-index:3; }
.orbit.nettuno  { width:65%; height:65%; animation:spin 42s linear infinite; z-index:2; }
.orbit.plutone  { width:75%; height:75%; animation:spin 50s linear infinite; z-index:1; }

/* Label DESKTOP: posizionata a destra, fuori dall'orbita di Plutone */
.planet-label{
  position:absolute;
  top:50%;
  left: calc(50% + var(--pluto-radius) + var(--label-gap-desktop));
  right: auto;
  transform:translateY(-50%);
  font-size: clamp(16px, 2.8vmin, 22px);
  letter-spacing: 1px;
  opacity:0;
  transition: opacity .18s ease;
  min-width: 140px;
  text-align:left;
  pointer-events:none;
}

/* MOBILE: NON TOCCARE (resta sotto, come richiesto) */
@media (max-width: 560px){
  .planet-label{
    top: calc(100% + var(--label-gap-mobile));
    left: 50%;
    right: auto;
    transform: translate(-50%, 0);
    text-align: center;
    min-width: 0;
    width: min(90vw, 320px);
  }
}

/* =========================
   Location map
   ========================= */
.map{
  width: 84%;
  max-width: 720px;
  height: 340px;
  margin-top: 28px;
}
.map iframe{
  width:100%;
  height:100%;
  border:0;
  border-radius: 14px;
}
