/* ==========================================================================
   PROD. ALE_ — Portfolio
   Palette "golden hour over the city": nero caldo + gradiente corallo-ambra-oro
   ispirato direttamente al logo e al banner originali del producer.
   ========================================================================== */

:root {
  /* Colori */
  --bg: #0b0a08;
  --bg-soft: #15120d;
  --bg-panel: #1c1610;
  --ink: #050403;
  --gold: #d4a574;
  --amber: #e8973f;
  --coral: #e2562f;
  --cream: #f3e9d8;
  --cream-dim: #c9bba3;
  --line: rgba(243, 233, 216, 0.12);
  --line-strong: rgba(243, 233, 216, 0.22);
  --shadow: rgba(0, 0, 0, 0.55);

  --grad: linear-gradient(100deg, var(--coral) 0%, var(--amber) 55%, var(--gold) 100%);
  --grad-soft: linear-gradient(135deg, rgba(226, 86, 47, 0.18), rgba(212, 165, 116, 0.10));

  /* Tipografia */
  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  /* Layout */
  --container: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --nav-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0;
  text-transform: uppercase;
}

p { margin: 0 0 1em; color: var(--cream-dim); }
p:last-child { margin-bottom: 0; }

.sprite-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Grain texture leggera su tutta la pagina, per il sapore "cassette/lo-fi" */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.9em;
  display: inline-block;
}
.eyebrow::before { content: "// "; color: var(--coral); }
.eyebrow-light { color: var(--gold); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-small { padding: 0.6em 1.3em; font-size: 0.85rem; }
.btn-primary {
  background: var(--grad);
  color: var(--ink);
  box-shadow: 0 8px 24px -8px rgba(226, 86, 47, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(226, 86, 47, 0.7); }
.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--cream);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.link-arrow { color: var(--gold); font-weight: 600; }
.link-arrow:hover { color: var(--amber); }

/* ---------- Navigazione ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.35s ease, border-color 0.35s ease, height 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 10, 8, 0.86);
  backdrop-filter: blur(10px);
  border-color: var(--line);
}
.nav-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.nav-logo img { width: 38px; height: 38px; border-radius: 50%; }
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--cream-dim);
}
.nav-links a { transition: color 0.2s ease; position: relative; }
.nav-links a:hover { color: var(--gold); }
.nav-cta { margin-left: auto; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--cream); transition: transform 0.25s ease, opacity 0.25s ease; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,10,8,0.55) 0%, rgba(11,10,8,0.35) 35%, rgba(11,10,8,0.92) 92%),
    linear-gradient(100deg, rgba(11,10,8,0.85) 0%, rgba(11,10,8,0.25) 55%);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  padding-top: var(--nav-h);
}
.hero-title {
  font-size: clamp(3.2rem, 9vw, 7rem);
  color: var(--cream);
  margin: 0.2em 0 0.3em;
}
.hero-tagline {
  max-width: 36ch;
  font-size: 1.15rem;
  color: var(--cream-dim);
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 1.8em; }

/* ---------- Divisore equalizzatore / skyline (elemento firma) ---------- */
.eq-divider {
  width: 100%;
  height: 44px;
  overflow: hidden;
  line-height: 0;
}
.eq-divider svg { width: 100%; height: 100%; display: block; opacity: 0.85; }
.eq-divider--hero { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; z-index: 1; }

.eq-anim rect { animation: eqPulse 2.4s ease-in-out infinite; transform-origin: center bottom; }
.eq-anim rect:nth-child(odd) { animation-delay: -1.1s; }
.eq-anim rect:nth-child(3n) { animation-delay: -0.6s; animation-duration: 3.1s; }
.eq-anim rect:nth-child(5n) { animation-delay: -1.8s; animation-duration: 2.8s; }
@keyframes eqPulse {
  0%, 100% { transform: scaleY(0.82); }
  50% { transform: scaleY(1.08); }
}

/* ---------- Sezioni generiche ---------- */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 96px 24px;
}
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.5em; }
.section-sub { font-size: 1.05rem; }

/* ---------- Beats ---------- */
.player-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: 0 24px 50px -24px var(--shadow);
}
.player-frame iframe { display: block; border: none; }
.beats-more {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.beats-more p { margin: 0; color: var(--cream-dim); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: center;
}
.about-text h2 { font-size: clamp(1.9rem, 3.6vw, 2.5rem); margin-bottom: 0.6em; }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.6em; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  padding: 0.5em 1em;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--gold);
}
.about-visual { display: flex; justify-content: center; }
.vinyl {
  position: relative;
  width: min(320px, 80%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #2a2118 0%, #14110c 60%, #0b0a08 100%);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px var(--shadow), inset 0 0 0 14px rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  animation: spin 18s linear infinite;
}
.vinyl::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(243,233,216,0.05) 0 2px, transparent 2px 6px);
}
.vinyl img { width: 34%; border-radius: 50%; border: 3px solid var(--ink); position: relative; z-index: 1; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ---------- Servizi ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.service-card::before {
  content: "";
  position: absolute; top: 0; left: 24px; right: 24px; height: 2px;
  background: var(--grad);
  border-radius: 2px;
}
.service-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.service-card h3 {
  font-family: var(--font-body);
  text-transform: none;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--cream);
  margin-bottom: 0.6em;
  letter-spacing: 0;
}
.service-card p { font-size: 0.95rem; }

/* ---------- Contatti ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
}
.contact-intro h2 { font-size: clamp(1.9rem, 3.6vw, 2.5rem); margin-bottom: 0.6em; }
.contact-links { list-style: none; padding: 0; margin: 2em 0 0; display: flex; flex-direction: column; gap: 14px; }
.contact-links a {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--cream);
  transition: color 0.2s ease;
}
.contact-links a:hover { color: var(--amber); }

.contact-form {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.85rem; font-weight: 700; color: var(--cream-dim); }
.field input, .field select, .field textarea {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85em 1em;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.96rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(243,233,216,0.35); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(232, 151, 63, 0.18);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; cursor: pointer; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--coral); }
.field-error { font-size: 0.8rem; color: var(--coral); min-height: 1em; }

.hp-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; overflow: hidden; }

.btn-submit { justify-content: center; position: relative; margin-top: 4px; }
.btn-submit[disabled] { opacity: 0.7; cursor: not-allowed; }
.btn-spinner {
  display: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(5,4,3,0.3);
  border-top-color: var(--ink);
  animation: rotateSpin 0.7s linear infinite;
}
.btn-submit.is-loading .btn-spinner { display: inline-block; }
.btn-submit.is-loading .btn-label { opacity: 0.85; }
@keyframes rotateSpin { to { transform: rotate(360deg); } }

.form-status {
  margin: 0; font-size: 0.9rem; min-height: 1.4em; color: var(--cream-dim);
}
.form-status.success { color: var(--gold); }
.form-status.error { color: var(--coral); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 24px 36px; }
.footer-inner { max-width: var(--container); margin: 0 auto; text-align: center; }
.footer-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.1rem; }
.footer-logo img { width: 32px; height: 32px; border-radius: 50%; }
.footer-tagline { margin: 14px 0; font-size: 0.9rem; }
.footer-links { display: flex; justify-content: center; gap: 24px; font-weight: 700; font-size: 0.88rem; margin-bottom: 18px; }
.footer-links a:hover { color: var(--amber); }
.footer-copy { font-size: 0.78rem; color: rgba(201,187,163,0.55); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Focus visibile ovunque ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-visual { order: -1; margin-bottom: 12px; }
  .services-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav.is-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(11,10,8,0.97);
    padding: 24px;
    gap: 18px;
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open .nav-cta {
    display: inline-flex;
    position: absolute;
    top: calc(var(--nav-h) + 210px);
    left: 24px;
  }
  .hero-title { font-size: clamp(2.6rem, 14vw, 4rem); }
  .section { padding: 72px 20px; }
  .services-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 26px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .player-frame iframe { height: 360px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eq-anim rect { animation: none; }
  .vinyl { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
