/* =========================================================
   Imbiancatura — Christian, imbianchino a Catania
   Moodboard: "La fiducia di chi apre casa"
   Warm-neutral monochrome (bianco + grigio topo), type-forward
   ========================================================= */

:root {
  /* Warm-neutral palette (bianco + grigio topo) */
  --bg:        oklch(0.985 0.005 85);   /* warm off-white, fresh paint */
  --surface:   oklch(0.955 0.007 80);   /* pale putty grey */
  --ink:       oklch(0.27 0.012 75);    /* deep warm charcoal (text) */
  --ink-soft:  oklch(0.38 0.013 73);    /* secondary text */
  --topo:      oklch(0.60 0.014 70);    /* grigio topo (decor, large) */
  --topo-deep: oklch(0.37 0.014 72);    /* deep grigio topo (drenched) */
  --line:      oklch(0.88 0.006 78);    /* hairline border */
  --on-dark:   oklch(0.97 0.006 85);    /* text on drenched sections */
  --on-dark-soft: oklch(0.84 0.008 80);

  /* accento: terracotta / cotto caldo (uso parsimonioso, < ~10%) */
  --accent:        oklch(0.55 0.12 45);  /* decor: chip, bullet, dot, underline */
  --accent-strong: oklch(0.47 0.11 45);  /* testo + sfondo CTA (AA su chiaro) */
  --accent-hover:  oklch(0.40 0.10 43);  /* hover CTA */

  --maxw: 1140px;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --r: 10px;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;

  --header-h: 68px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--on-dark); padding: .75rem 1rem; border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--topo-deep); outline-offset: 3px; border-radius: 4px; }

/* paint chip motif (CSS logo mark) */
.brand-chip {
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / .25);
  flex: 0 0 auto;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: oklch(0.985 0.005 85 / 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.02em;
}
.nav-desktop { display: flex; gap: 2rem; }
.nav-desktop a {
  text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 1rem;
  padding: .5rem 0; position: relative;
}
.nav-desktop a::after {
  content: ""; position: absolute; left: 0; bottom: .15rem; width: 0; height: 2px;
  background: var(--accent); transition: width .25s ease;
}
.nav-desktop a:hover { color: var(--ink); }
.nav-desktop a:hover::after { width: 100%; }

/* hamburger */
.hamburger {
  display: none; width: 48px; height: 48px; padding: 0; margin: 0;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; align-items: center; justify-content: center;
}
.hamburger-box { display: inline-flex; flex-direction: column; gap: 5px; width: 22px; }
.hamburger-line { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile menu (full-screen overlay — no translate math) */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: center;
  gap: .25rem; padding: var(--header-h) var(--pad) 2rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.mobile-link {
  text-decoration: none; color: var(--ink); font-family: var(--font-display);
  font-weight: 600; font-size: 2rem; letter-spacing: -0.02em;
  padding: .75rem 0; border-bottom: 1px solid var(--line);
  min-height: 44px; display: flex; align-items: center;
}
.mobile-cta { color: var(--accent-strong); border-bottom: none; }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2.5rem, 7vw, 5rem); }
.hero-grid {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.eyebrow {
  font-weight: 600; font-size: .98rem; color: var(--accent-strong);
  margin-bottom: 1.1rem;
}
.hero-title {
  font-size: clamp(2.6rem, 8vw, 5.4rem); font-weight: 800;
  letter-spacing: -0.035em; margin-bottom: 1.4rem;
}
.hero-lead {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--ink-soft);
  max-width: 36ch; margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; }
.hero-note { color: var(--topo-deep); font-weight: 500; font-size: .98rem; }
.hero-note::before { content: "● "; color: var(--accent); font-size: .7em; vertical-align: 1.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: .85rem 1.6rem; border-radius: var(--r);
  font-family: var(--font-body); font-weight: 600; font-size: 1.02rem;
  text-decoration: none; cursor: pointer; transition: transform .15s ease, background .2s ease;
}
.btn-primary { background: var(--accent-strong); color: var(--on-dark); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* campionario (paint sample card replacing photo) */
.campionario { display: flex; flex-direction: column; gap: .9rem; }
.campionario-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 50px -30px oklch(0.37 0.014 72 / 0.5);
}
.swatch { display: flex; align-items: flex-end; height: clamp(46px, 8vw, 64px); padding: .5rem .8rem; }
.swatch-label {
  font-size: .82rem; font-weight: 600; letter-spacing: .01em;
  background: oklch(1 0 0 / .82); color: var(--ink); padding: .12rem .5rem; border-radius: 5px;
}
.swatch-1 { background: oklch(0.975 0.006 85); }
.swatch-2 { background: oklch(0.93 0.008 82); }
.swatch-3 { background: oklch(0.78 0.012 75); }
.swatch-4 { background: oklch(0.60 0.014 70); }
.swatch-4 .swatch-label { background: oklch(1 0 0 / .9); }
.swatch-5 { background: oklch(0.40 0.014 72); }
.campionario-cap { font-size: .92rem; color: var(--ink-soft); padding-left: .2rem; }

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--surface); }
.section-head { max-width: 56ch; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-tag {
  display: inline-block; font-weight: 600; font-size: .92rem; color: var(--accent-strong);
  margin-bottom: .9rem;
}
.section-tag::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px;
  background: var(--accent); margin-right: .55rem; vertical-align: 0px;
}
.tag-light { color: var(--on-dark-soft); }
.tag-light::before { background: var(--on-dark-soft); }
.section-title { font-size: clamp(1.8rem, 4.5vw, 3rem); letter-spacing: -0.03em; }
.section-intro { margin-top: 1.1rem; font-size: 1.12rem; color: var(--ink-soft); max-width: 52ch; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.8rem 1.6rem; transition: transform .2s ease, box-shadow .2s ease;
}
.section-alt .card { background: var(--bg); }
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -28px oklch(0.37 0.014 72 / 0.55); }
.card-chip {
  display: block; width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); margin-bottom: 1.2rem;
}
.card-title { font-size: 1.32rem; margin-bottom: .6rem; }
.card p { color: var(--ink-soft); }

/* reasons */
.reasons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 2.2rem; }
.reason { padding-top: 1.3rem; border-top: 2px solid var(--ink); }
.reason-mark {
  display: inline-block; width: 22px; height: 22px; border-radius: 6px;
  background: var(--topo); margin-bottom: .9rem;
}
.reason-title { font-size: 1.4rem; margin-bottom: .4rem; }
.reason p { color: var(--ink-soft); max-width: 38ch; }

/* promise (drenched) */
.promise { background: var(--topo-deep); color: var(--on-dark); border-top: none; }
.promise-text {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 2.4rem); line-height: 1.24; letter-spacing: -0.02em;
  color: var(--on-dark); max-width: 24ch; margin-top: .4rem;
}
.promise-sign { margin-top: 1.6rem; color: var(--on-dark-soft); font-weight: 500; font-size: 1.05rem; }

/* contatti */
.contatti-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.contatto {
  border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem;
  background: var(--surface); display: flex; flex-direction: column; gap: .4rem;
}
.contatto-label { font-size: .9rem; font-weight: 600; color: var(--accent-strong); }
.contatto-value {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  letter-spacing: -0.01em; color: var(--ink); user-select: all;
}
.contatti-hint { margin-top: 1.4rem; color: var(--ink-soft); font-size: .98rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark); padding: clamp(2.5rem, 6vw, 3.5rem) 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: flex-end; }
.footer-brand { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.footer-brand .brand-name { color: var(--on-dark); }
.footer-brand .brand-chip { background: var(--accent); }
.footer-sub { color: var(--on-dark-soft); font-size: .95rem; width: 100%; margin-top: .2rem; padding-left: 1.6rem; }
.footer-meta { text-align: right; }
.footer-copy { color: var(--on-dark-soft); font-size: .92rem; }
.footer-credit { margin-top: .35rem; font-size: .85rem; color: var(--on-dark-soft); }
.footer-credit a { color: var(--on-dark); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- reveal animation ----------
   Default: contenuto visibile. Si nasconde e anima solo se <html> ha .anim-ready
   (aggiunta da JS solo con motion consentito). Così non c'è mai un hero vuoto. */
.anim-ready .reveal {
  opacity: 0; transform: translateY(14px);
  animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: calc(var(--d, 0) * .1s);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .campionario { max-width: 420px; }
  .campionario-card { flex-direction: row; }
  .swatch { flex: 1; height: clamp(80px, 22vw, 120px); align-items: flex-end; }
  .reasons { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .hamburger { display: inline-flex; }
  .cards { grid-template-columns: 1fr; }
  .contatti-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  .btn, .card { transition: none; }
}
