/* Nicoweb — Nicolas De Zuani
   Colori: ocra #EEBC60 e antracite #2B2B2B (dal logo). Font: Red Hat Display (SIL OFL), ospitato in locale. */

@font-face {
  font-family: "Red Hat Display";
  src: url("fonts/red-hat-display.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ocra: #EEBC60;
  --ocra-soft: #F6DCA6;
  --ocra-deep: #7A5F22;      /* testo ocra leggibile su fondo chiaro */
  --ocra-hover: #F2C878;     /* ocra al passaggio del mouse */
  --ink: #2B2B2B;
  --ink-2: #4A4540;          /* testo secondario, caldo */
  --ink-deep: #161616;       /* antracite più scuro, per l'hover dei pulsanti scuri */
  --ink-on-ocra: #3A3328;    /* testo secondario su fondo ocra */
  --shadow: 43, 43, 43;      /* antracite in RGB, per le ombre */
  --paper: #F8F4EC;
  --paper-2: #EFE7D7;
  --line: #DDD3BF;
  --on-dark: #F3EEE4;
  --on-dark-2: #C9C0B1;

  --wrap: 1180px;
  --gut: clamp(20px, 5vw, 48px);
  --sec: clamp(72px, 11vw, 144px);
  --r: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 88px; scrollbar-color: var(--ocra) var(--paper-2); }
body {
  margin: 0;
  font-family: "Red Hat Display", system-ui, sans-serif;
  font-size: clamp(17px, 1.05rem + .15vw, 19px);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--ocra-deep);
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.08; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1.5px; }
::selection { background: var(--ocra); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.works :focus-visible, .foot :focus-visible { outline-color: var(--ocra); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }
.ico { width: 1.15em; height: 1.15em; flex: none; }

/* Pulsanti */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: inherit; font-weight: 700; font-size: 1rem; line-height: 1;
  padding: 1em 1.4em; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(var(--shadow), .45); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn--ocra { background: var(--ocra); color: var(--ink); }
.btn--ocra:hover { background: var(--ocra-hover); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--line { border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--small { padding: .7em 1.1em; font-size: .92rem; }
.btn--big { font-size: 1.12rem; padding: 1.1em 1.7em; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Intestazione */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.top.is-scrolled { border-bottom-color: var(--line); }
.top__in { display: flex; align-items: center; gap: 28px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { height: 44px; width: auto; border-radius: 6px; }
.brand__name { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; }
.nav { display: flex; gap: 26px; font-weight: 600; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 6px 0; background: linear-gradient(var(--ocra), var(--ocra)) left bottom / 0 3px no-repeat; transition: background-size .35s var(--ease), color .2s; }
.nav a:hover { color: var(--ink); background-size: 100% 3px; }

/* Apertura */
.hero { padding-block: clamp(48px, 8vw, 104px) var(--sec); }
.hero__in { display: grid; grid-template-columns: 1.45fr .8fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 1.1rem + 3.6vw, 4.1rem); font-weight: 850; letter-spacing: -.035em; line-height: 1.02; }
.hero h1 span { display: block; font-weight: 500; color: var(--ink-2); margin-top: .12em; }
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--ink-2); max-width: 36ch; margin: 30px 0 38px; line-height: 1.55; }
.hero__photo { margin: 0; position: relative; justify-self: end; width: min(100%, 420px); }
.hero__photo::before {
  content: ""; position: absolute; inset: 9% -9% -7% 12%;
  background: var(--ocra); border-radius: var(--r);
}
.hero__photo picture { position: relative; display: block; border-radius: var(--r); overflow: hidden; box-shadow: 0 30px 60px -30px rgba(var(--shadow), .5); }
.hero__photo img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero__photo::before { animation: panel 1.1s var(--ease) both .15s; }
  @keyframes panel { from { transform: translate(-6%, -6%); } to { transform: none; } }
}

/* Come lavoro */
.steps { padding-block: var(--sec); border-top: 1px solid var(--line); }
.steps h2, .services h2, .works h2, .about h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; }
.steps__list { list-style: none; margin: clamp(40px, 6vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 4vw, 56px); counter-reset: s; position: relative; }
.steps__list::before { content: ""; position: absolute; left: 0; right: 0; top: 34px; height: 1px; background: var(--line); }
.steps__list li { position: relative; }
.steps__n {
  display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%;
  background: var(--ocra); color: var(--ink); font-weight: 850; font-size: 1.7rem;
  box-shadow: 0 0 0 10px var(--paper); margin-bottom: 28px;
}
.steps h3 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.015em; margin-bottom: 12px; }
.steps p { color: var(--ink-2); max-width: 34ch; }

/* Servizi */
.services { padding-block: var(--sec); background: var(--paper-2); }
.services__in { display: grid; grid-template-columns: .8fr 1.6fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.services h2 { position: sticky; top: 112px; }
.services__list { margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(28px, 4vw, 56px); }
.services__list > div { padding: 26px 0 30px; border-top: 2px solid var(--ink); }
.services__list dt { font-weight: 800; font-size: 1.22rem; letter-spacing: -.01em; margin-bottom: 8px; }
.services__list dd { margin: 0; color: var(--ink-2); }
.services__pa { grid-column: 2; margin-top: 8px; padding: 22px 26px; background: var(--paper); border-radius: var(--r); color: var(--ink-2); }

/* Lavori */
.works { padding-block: var(--sec); background: var(--ink); color: var(--on-dark); }
.works ::selection { background: var(--ocra); color: var(--ink); }
.works__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 40px; margin-bottom: clamp(36px, 5vw, 60px); }
.works__head p { color: var(--on-dark-2); }
.works__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(32px, 5vw, 72px); }
.works article { padding: 34px 0 40px; border-top: 1px solid color-mix(in srgb, var(--on-dark) 18%, transparent); }
.works h3 { color: var(--ocra); font-size: clamp(1.3rem, 1.1rem + .6vw, 1.6rem); font-weight: 800; letter-spacing: -.015em; margin-bottom: 14px; }
.works article p { color: var(--on-dark-2); max-width: 60ch; }

/* Chi sono */
.about { padding-block: var(--sec); }
.about__in { display: grid; grid-template-columns: .8fr 1.6fr; gap: clamp(32px, 6vw, 96px); }
.about__text { display: grid; gap: 22px; max-width: 64ch; }
.about__text p { color: var(--ink-2); }
.about__first { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.85rem); line-height: 1.35; font-weight: 600; color: var(--ink) !important; letter-spacing: -.01em; }

/* Contatti */
.contact { background: var(--ocra); padding-block: clamp(72px, 10vw, 128px); }
.contact__in { display: grid; gap: 22px; justify-items: start; }
.contact__in { grid-template-columns: minmax(0, 1fr); }
.contact__in > * { max-width: 100%; }
.contact h2 { overflow-wrap: break-word; hyphens: auto; }
.contact .btn { white-space: normal; text-align: left; line-height: 1.2; }
.contact h2 { font-size: clamp(2.4rem, 1.2rem + 4.6vw, 5rem); font-weight: 850; letter-spacing: -.04em; line-height: 1; }
.contact p { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); max-width: 40ch; color: var(--ink-on-ocra); }
.contact .cta { margin-top: 14px; gap: 18px 28px; }
.contact .btn--ocra { background: var(--ink); color: var(--paper); }
.contact .btn--ocra:hover { background: var(--ink-deep); }
.contact__mail { display: inline-flex; align-items: center; gap: .5em; font-weight: 700; font-size: 1.12rem; text-decoration: none; border-bottom: 2px solid var(--ink); padding-bottom: 2px; }
.contact__mail:hover { border-bottom-color: transparent; }
.contact ::selection { background: var(--ink); color: var(--ocra); }

/* Piè di pagina */
.foot { background: var(--ink); color: var(--on-dark-2); font-size: .92rem; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 26px; }
.foot a { color: var(--on-dark); }

/* WhatsApp fisso su smartphone */
.wa-float { display: none; }

/* Tablet */
@media (max-width: 960px) {
  .nav { display: none; }
  .hero__in { grid-template-columns: 1fr; }
  .hero__photo { justify-self: start; width: min(62%, 320px); margin-left: 4px; order: -1; }
  .steps__list { grid-template-columns: 1fr; }
  .steps__list::before { left: 33px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .steps__list li { padding-left: 100px; }
  .steps__n { position: absolute; left: 0; top: -6px; }
  .services__in, .about__in { grid-template-columns: 1fr; }
  .services h2 { position: static; }
  .services__pa { grid-column: 1; }
}

/* Smartphone */
@media (max-width: 640px) {
  .top__in { height: 64px; }
  .brand img { height: 36px; }
  .brand__name { font-size: .95rem; }
  .top .btn--small { display: none; }
  .services__list, .works__grid { grid-template-columns: 1fr; }
  .hero .cta .btn { flex: 1 1 100%; justify-content: center; }
  .steps__list li { padding-left: 86px; }
  .steps__n { width: 58px; height: 58px; font-size: 1.45rem; }
  .steps__list::before { left: 29px; }
  body { padding-bottom: 84px; }
  .wa-float {
    display: flex; align-items: center; justify-content: center; gap: .55em;
    position: fixed; left: 16px; right: 16px; bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 30; padding: 15px 20px; border-radius: 999px;
    background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none;
    box-shadow: 0 14px 30px -12px rgba(var(--shadow), .6);
    transition: transform .45s var(--ease), opacity .3s, visibility 0s;
  }
  .wa-float .ico { color: var(--ocra); }
  .wa-float.is-hidden { transform: translateY(140%); opacity: 0; visibility: hidden; pointer-events: none; transition: transform .45s var(--ease), opacity .3s, visibility 0s .45s; }
}

/* Chi ha chiesto di ridurre il movimento: niente spostamenti, solo cambi di colore e dissolvenze */
@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
  .nav a { transition: color .2s; }
  .wa-float, .wa-float.is-hidden { transform: none; }
}
