/* ==========================================================================
   Stefano Pontalti — alba sul Garda
   bg = lago di notte · sky = cobalto · dawn = prima luce (solo dove si agisce)
   ========================================================================== */

/* Archivo variabile, self-hosted: il CSS di Google Fonts bloccava il render
   per ~870 ms su mobile. Stessi file woff2 di gstatic, serviti da qui. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg:      oklch(0.16 0.03 240);
  --surface: oklch(0.20 0.035 238);
  --line:    oklch(0.32 0.03 238);
  --ink:     oklch(0.96 0.005 230);
  --ink-2:   oklch(0.80 0.02 230);
  --sky:     oklch(0.75 0.08 230);
  --dawn:    oklch(0.72 0.17 45);
  --dawn-ink: oklch(0.18 0.04 45);

  --font: "Archivo", system-ui, sans-serif;

  --space-1: clamp(1rem, 2vw, 1.5rem);
  --space-2: clamp(2rem, 4vw, 3.5rem);
  --space-3: clamp(4rem, 9vw, 8rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1); /* quint */
}

* { box-sizing: border-box; margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, 0.4vw + 0.9rem, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--dawn); color: var(--dawn-ink); }

h1, h2, h3 { text-wrap: balance; line-height: 1.05; }
p { text-wrap: pretty; max-width: 68ch; }

a { color: var(--sky); }
a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--dawn);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 60;
  background: var(--dawn); color: var(--dawn-ink);
  padding: 0.6rem 1rem;
  text-decoration: none;
  transition: top 0.2s var(--ease-out);
}
.skip:focus { top: 1rem; }

/* ---- display type ------------------------------------------------------ */

.display {
  font-variation-settings: "wdth" 125;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* ---- buttons ----------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.35s var(--ease-out), background-color 0.35s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--dawn {
  background: var(--dawn);
  color: var(--dawn-ink);
}
.btn--dawn:hover { background: oklch(0.78 0.17 45); }

.btn--ghost {
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--ghost:hover { border-color: var(--sky); color: var(--sky); }

/* ---- header ------------------------------------------------------------ */

.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  background: oklch(0.16 0.03 240 / 0.82);
  backdrop-filter: blur(8px);
}

.top__logo {
  font-variation-settings: "wdth" 125;
  font-weight: 850;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.top__logo span { color: var(--dawn); }

.top__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem clamp(0.75rem, 2vw, 1.75rem);
  margin-inline: auto;
}
.top__nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.25s var(--ease-out);
}
.top__nav a:hover { color: var(--ink); }
.top__nav a[aria-current="page"] { color: var(--dawn); }

.top__cta { padding: 0.55rem 1.25rem; font-size: 0.95rem; }

.top__burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  position: relative;
  flex: none;
}
.top__burger span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out);
}
.top__burger span:first-child { top: 16px; }
.top__burger span:last-child { bottom: 16px; }
.top.open .top__burger span:first-child { transform: translateY(4px) rotate(45deg); }
.top.open .top__burger span:last-child  { transform: translateY(-4px) rotate(-45deg); }
.top__burger:focus-visible { outline: 2px solid var(--dawn); outline-offset: 3px; }

@media (max-width: 900px) {
  .top { justify-content: space-between; }
  .top__burger { display: inline-flex; }

  /* menù a tendina sotto l'header */
  .top__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0.25rem clamp(1rem, 4vw, 3rem) 1rem;
    background: oklch(0.16 0.03 240 / 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  }
  .top.open .top__nav {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .top__nav a {
    padding: 0.85rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }
  .top__nav a:last-child { border-bottom: none; }
}

/* ---- hero -------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: var(--space-3) var(--space-1);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* la clip diventa texture in palette, qualunque cosa contenga */
  filter: grayscale(1) brightness(0.45) contrast(1.1) blur(3px);
  transform: scale(1.06); /* nasconde i bordi sfumati dal blur */
}
.hero__tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      oklch(0.16 0.03 240 / 0.55),
      oklch(0.16 0.03 240 / 0.72) 55%,
      var(--bg) 98%),
    oklch(0.30 0.06 240 / 0.45);
}

.hero__name {
  font-variation-settings: "wdth" 125;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: clamp(2.75rem, 9vw, 6rem);
  line-height: 0.98;
}
.hero__name .line {
  display: block;
  overflow: hidden;
}
.hero__name .line span {
  display: block;
  animation: rise 0.9s var(--ease-out) both;
}
.hero__name .line:nth-child(2) span { animation-delay: 0.12s; color: var(--sky); }

@keyframes rise {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}

.hero__claim {
  margin: var(--space-1) auto 0;
  max-width: 44ch;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--ink-2);
  animation: fade 0.8s var(--ease-out) 0.45s both;
}
.hero__claim strong { color: var(--ink); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: var(--space-2);
  animation: fade 0.8s var(--ease-out) 0.6s both;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  translate: -50% 0;
  color: var(--ink-2);
  animation: bob 2.4s ease-in-out 1.4s infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(8px); opacity: 1; }
}

/* ---- marquee ------------------------------------------------------------ */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 0.9rem 0;
  background: var(--surface);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: slide 26s linear infinite;
}
.marquee__track span {
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1rem;
  white-space: nowrap;
  color: var(--ink-2);
}
.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes slide {
  to { transform: translateX(-50%); }
}

/* ---- intro -------------------------------------------------------------- */

.intro {
  padding: var(--space-3) clamp(1rem, 6vw, 5rem);
  max-width: 62rem;
}
.intro__title {
  font-variation-settings: "wdth" 112;
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-1);
}
.intro p { color: var(--ink-2); font-size: 1.1em; }

/* ---- sezioni ------------------------------------------------------------ */

.section-title {
  font-variation-settings: "wdth" 125;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: var(--space-2);
}

/* ---- servizi: righe tipografiche, no card grid --------------------------- */

.services {
  padding: 0 clamp(1rem, 6vw, 5rem) var(--space-3);
  max-width: 72rem;
}

.services__list {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line);
}

.service {
  position: relative;
  display: grid;
  grid-template-columns: minmax(11rem, 1fr) 2fr auto;
  gap: var(--space-1);
  align-items: baseline;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0.5rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  color: inherit;
}

.service__btn {
  justify-self: end;
  align-self: center;
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.35s var(--ease-out), border-color 0.35s var(--ease-out),
              background-color 0.35s var(--ease-out);
}
.service:hover .service__btn {
  background: var(--dawn);
  border-color: var(--dawn);
  color: var(--dawn-ink);
}
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--surface);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease-out);
}
.service:hover::before { transform: translateY(0); }

.service h3 {
  font-variation-settings: "wdth" 118;
  font-weight: 800;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  letter-spacing: -0.015em;
  transition: color 0.35s var(--ease-out);
}
.service:hover h3 { color: var(--dawn); }

.service p { color: var(--ink-2); }

@media (max-width: 700px) {
  .service { grid-template-columns: 1fr auto; gap: 0.5rem 1rem; }
  .service p { grid-column: 1 / -1; }
  /* niente hover su touch: il titolo resta acceso */
  .service h3 { color: var(--sky); }
  .service__btn { color: var(--dawn); border-color: var(--dawn); }
}

/* ---- processo: sequenza reale → numeri legittimi -------------------------- */

.process {
  padding: var(--space-3) clamp(1rem, 6vw, 5rem);
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.process__steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-2);
  max-width: 72rem;
}
.process__n {
  display: block;
  font-variation-settings: "wdth" 125;
  font-weight: 850;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  color: var(--dawn);
}
.process__steps h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0.5rem 0 0.4rem;
}
.process__steps p { color: var(--ink-2); }

/* ---- lavori --------------------------------------------------------------- */

.works {
  padding: var(--space-3) clamp(1rem, 6vw, 5rem);
  max-width: 72rem;
}
.works__list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-1);
}
.works__list li {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) 2fr;
  gap: var(--space-1);
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.works__list h3 {
  font-variation-settings: "wdth" 112;
  font-weight: 750;
  font-size: 1.25rem;
}
.works__list p { color: var(--ink-2); }

@media (max-width: 700px) {
  .works__list li { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ---- contatti -------------------------------------------------------------- */

.contact {
  padding: var(--space-3) clamp(1rem, 6vw, 5rem);
  text-align: center;
}
.contact__title {
  font-variation-settings: "wdth" 125;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: clamp(2.5rem, 8vw, 6rem);
}
.contact__note {
  margin: var(--space-1) auto;
  color: var(--ink-2);
}
.contact__mail {
  display: inline-block;
  margin-top: var(--space-1);
  font-size: 1rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}
.contact__mail:hover { color: var(--dawn); }

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: var(--space-2);
}

/* ---- footer ------------------------------------------------------------------ */

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  justify-content: space-between;
  padding: var(--space-1) clamp(1rem, 4vw, 3rem) var(--space-2);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9rem;
}
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---- reveal on scroll: solo enhance, contenuto visibile senza JS ---------------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
html.js [data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

/* ---- reduced motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee__track { animation: none; }
  html.js [data-reveal] { opacity: 1; transform: none; }
}
