/* ============================================================
   Ciciriello Design — one-page statica
   Stack: HTML + CSS puro. Nessun framework, nessun build step.
   Layout: editorial dark — barra trasparente in alto, tagline
   in basso a sinistra, sfondo foto a tutto viewport.
   ============================================================ */

/* --- Reset minimo ------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Variabili --------------------------------------------- */
:root {
  --white: #ffffff;
  --link-color: rgba(255, 255, 255, 0.70);
  --link-hover: #ffffff;
  --bg-fallback: #0a0a0a;
  --transition: 180ms ease;

  --topbar-height: 64px;
  --logo-width-desktop: 200px;
  --logo-width-mobile: 140px;
}

/* --- Corpo -------------------------------------------------- */
html, body {
  height: 100%;
  width: 100%;
}

body {
  background-color: var(--bg-fallback);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden; /* pagina statica viewport-locked */
}

/* --- Sfondo foto ------------------------------------------- */
/*
  Foto: assets/studio.jpg (rendering_salone.jpg copiato da spazi-possibili).
  Filtro: grayscale(100%) brightness(.55) — desatura e scurisce la foto.
  Overlay: gradiente nero che si addensa verso il basso-sinistra
  per far emergere la tagline su nero profondo.
  Valori finali: filter grayscale(100%) brightness(.55) / overlay
  linear-gradient dal basso-sinistra rgba(0,0,0,.90) → rgba(0,0,0,.55)
  in alto a destra. Dominante nera, immagine percepibile.
  Fallback se foto mancante: #0a0a0a pieno (body).
*/
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url('assets/studio.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(100%) brightness(.50);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.86) 0%,
    rgba(0, 0, 0, 0.68) 50%,
    rgba(0, 0, 0, 0.56) 100%
  );
}

/* --- Barra in alto ----------------------------------------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--topbar-height);

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(1.5rem, 5vw, 3.5rem);
}

/* Link sinistra/destra */
.topbar__nav {
  display: flex;
  align-items: center;
}

.topbar__nav--left {
  justify-content: flex-start;
}

.topbar__nav--right {
  justify-content: flex-end;
}

.topbar__link {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--link-color);
  text-decoration: none;
  transition: color var(--transition);
}

.topbar__link:hover {
  color: var(--link-hover);
}

.topbar__link:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
  border-radius: 1px;
  color: var(--link-hover);
}

/* --- Logo wordmark (centro barra) -------------------------- */
.topbar__logo {
  display: block;
  width: var(--logo-width-desktop);
  outline-offset: 6px;
}

.topbar__logo:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 2px;
}

.logo-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Stage (contenitore principale) ------------------------ */
.stage {
  position: fixed;
  inset: 0;
  z-index: 5;

  /* Tagline ancorata in basso a sinistra */
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 3.5rem);
}

/* --- Tagline ----------------------------------------------- */
.tagline {
  font-size: clamp(0.8rem, 1.6vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.09em;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 600px) {
  :root {
    --topbar-height: 56px;
    --logo-width-mobile: 140px;
  }

  /* Su mobile: barra a colonna — logo sopra centrato, link sotto ai lati */
  .topbar {
    height: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    padding: 1rem clamp(1rem, 5vw, 1.5rem) 0.75rem;
    gap: 0.75rem 0;
  }

  .topbar__logo {
    grid-column: 1 / -1;
    grid-row: 1;
    width: var(--logo-width-mobile);
    margin: 0 auto;
  }

  .topbar__nav--left {
    grid-column: 1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .topbar__nav--right {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-end;
  }

  .tagline {
    padding-bottom: 0.5rem;
  }
}

/* --- Riduzione movimento ----------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .topbar__link {
    transition: none;
  }
}
