/* Eterea Studio — one-page (v.4-contatti). Static, no build step. */

:root {
  --bg: #050505;
  --fg: #ffffff;
  --lime: #add9f6;
  --gray: #a1a1a1;
  --border: rgba(255, 255, 255, 0.12);
  --sans: "Geist", system-ui, -apple-system, sans-serif;
  --display: "Playfair Display", Georgia, serif;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* Sfondo WebGL animato (GhostFibers), dietro a tutto il contenuto */
#bg {
  position: fixed;
  inset: 0;
  z-index: -1;
}

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

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero: logo al centro, rotazione lenta su se stesso */
.hero {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.25rem;
  padding: 3rem 1.5rem 1rem;
}

.logo {
  width: clamp(140px, 26vw, 200px);
  height: auto;
  animation: logo-spin 30s linear infinite;
}

@keyframes logo-spin {
  to {
    transform: rotate(360deg);
  }
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 600;
  margin: 0;
}

.tagline {
  color: var(--gray);
  margin: 0;
  font-size: 1.05rem;
}

/* Contatti */
.contatti {
  text-align: center;
  padding: 0.5rem 1.5rem 5rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  height: 3.25rem;
  padding: 0 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: scale(1.05);
}

.btn-whatsapp {
  background: var(--lime);
  color: var(--bg);
}

.btn-email {
  border: 1px solid var(--border);
  color: var(--fg);
}

.btn-email:hover {
  border-color: var(--lime);
  color: var(--lime);
}

/* Servizi: card collassabili native (<details>, zero JS) */
.servizi {
  padding-top: 2rem;
  padding-bottom: 6rem;
}

.servizi h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  margin: 0 0 1rem;
}

.servizi .intro {
  color: var(--gray);
  max-width: 42rem;
  line-height: 1.6;
  margin: 0 0 2.5rem;
}

details {
  border-bottom: 1px solid var(--border);
}

summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 0;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

.summary-text {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

@media (min-width: 768px) {
  .summary-text {
    flex-direction: row;
    align-items: baseline;
    gap: 2rem;
  }
}

.summary-text .title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  transition: color 0.2s ease;
}

summary:hover .title {
  color: var(--lime);
}

.summary-text .subtitle {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray);
}

.toggle {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  transition: border-color 0.2s ease, color 0.2s ease;
}

summary:hover .toggle {
  border-color: var(--lime);
  color: var(--lime);
}

.toggle::before {
  content: "+";
}

details[open] .toggle::before {
  content: "−";
}

.details-body {
  padding-bottom: 2.5rem;
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .details-body {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.details-body p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  max-width: 36rem;
}

.details-body ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-content: start;
}

.details-body li {
  color: var(--gray);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.details-body li::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
}

/* ponytail: apertura animata solo dove supportata (Chrome/Edge recenti); altrove toggle istantaneo nativo */
@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }

  details::details-content {
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease, content-visibility 0.35s allow-discrete;
  }

  details[open]::details-content {
    height: auto;
  }
}

/* Footer minimo: P.IVA obbligatoria per siti commerciali in Italia */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--gray);
  font-size: 0.85rem;
}

footer p {
  margin: 0 0 0.75rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
}

.footer-links a,
.footer-links button {
  color: var(--gray);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--lime);
}

/* Banner consenso cookie (vanilla, vedi cookie-consent.js) */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  border-top: 1px solid var(--border);
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(8px);
  padding: 1.25rem 1.5rem;
}

.cookie-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.cookie-text {
  flex: 1 1 24rem;
}

.cookie-text h2 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.cookie-text p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  max-width: 40rem;
}

.cookie-text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-text a:hover {
  color: var(--lime);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-btn {
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.cookie-btn-outline {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--fg);
}

.cookie-btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.cookie-btn-solid {
  background: var(--lime);
  border: 1px solid var(--lime);
  color: var(--bg);
}

.cookie-btn-solid:hover {
  transform: scale(1.05);
}

.cookie-prefs {
  display: none;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.cookie-banner.expanded .cookie-prefs {
  display: grid;
}

@media (min-width: 768px) {
  .cookie-prefs {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cookie-pref {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 0.9rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.cookie-pref input {
  margin-top: 0.15rem;
  accent-color: var(--lime);
}

.cookie-pref strong {
  display: block;
  color: var(--fg);
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

/* Pagine legali (privacy/cookie policy) */
.page-legal {
  max-width: 48rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

.page-legal .back {
  color: var(--gray);
  font-size: 0.9rem;
  text-decoration: none;
}

.page-legal .back:hover {
  color: var(--lime);
}

.page-legal h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  margin: 1.5rem 0 2rem;
}

.page-legal h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.25rem 0 0.75rem;
}

.page-legal p,
.page-legal li {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

.page-legal ul {
  padding-left: 1.25rem;
}

.page-legal li {
  margin-bottom: 0.5rem;
}

.page-legal a {
  color: var(--lime);
}

.page-legal .updated {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--gray);
}

@media (prefers-reduced-motion: reduce) {
  .logo {
    animation: none;
  }

  .btn,
  .summary-text .title,
  .toggle {
    transition: none;
  }
}
