/* =========================================================
   Pastore Armando Zaccariello — "Casa di luce"
   Bianco caldo luminoso · Bricolage Grotesque + Hanken Grotesk + Newsreader
   ========================================================= */

:root {
  /* Colori (OKLCH con fallback letterale per la cache) */
  --bg:        oklch(0.985 0.006 85);   /* avorio caldo */
  --bg-2:      oklch(0.968 0.012 78);   /* crema sezioni alternate */
  --surface:   oklch(0.997 0.003 90);   /* quasi-bianco card */
  --ink:       oklch(0.27 0.035 258);   /* blu-notte testo */
  --ink-soft:  oklch(0.45 0.030 258);
  --ink-faint: oklch(0.58 0.024 258);
  --accent:    oklch(0.78 0.125 72);    /* ambra-luce */
  --accent-deep: oklch(0.52 0.115 56);  /* ambra scuro per testo accent */
  --line:      oklch(0.90 0.012 80);
  --line-soft: oklch(0.93 0.010 82);

  --bg-fb: #f8f4ec;
  --ink-fb: #1f2740;

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

  --maxw: 1140px;
  --pad: 22px;
  --radius: 16px;
  --radius-sm: 11px;
  --header-h: 66px;

  --shadow-sm: 0 1px 2px oklch(0.27 0.035 258 / 0.05), 0 4px 14px oklch(0.27 0.035 258 / 0.05);
  --shadow-md: 0 6px 30px oklch(0.27 0.035 258 / 0.09);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg-fb);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
}

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

section { scroll-margin-top: calc(var(--header-h) + 8px); }

/* ---------- Accessibilità ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px; font-weight: 600;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: oklch(0.985 0.006 85 / 0.92);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--accent-deep);
  background: oklch(0.78 0.125 72 / 0.14);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-kicker { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-deep); font-weight: 600; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.04rem; letter-spacing: -0.01em; }

.nav-desktop { display: none; }

/* Hamburger */
.hamburger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; padding: 11px; border: 1px solid var(--line);
  background: var(--surface); border-radius: 12px; cursor: pointer;
}
.hamburger span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .28s ease, opacity .2s ease; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile nav (overlay full-screen opaco) ---------- */
.nav-mobile {
  position: fixed; inset: 0; z-index: 150;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 80px 28px 40px;
  background: #f8f4ec;
  background: oklch(0.985 0.006 85);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .26s ease, visibility .26s ease;
}
.nav-mobile.open { opacity: 1; visibility: visible; pointer-events: auto; }
.nav-mobile a {
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 600;
  padding: 14px 6px; border-bottom: 1px solid var(--line-soft); color: var(--ink);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile-cta { color: var(--accent-deep) !important; }

body.nav-open { overflow: hidden; }

/* ---------- Tipografia di sezione ---------- */
.section-tag {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--accent-deep); margin-bottom: 14px;
}
.eyebrow {
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--ink-soft); margin-bottom: 20px;
}
.section-head { max-width: 640px; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(1.85rem, 6vw, 2.6rem); }
.section-intro { margin-top: 16px; color: var(--ink-soft); font-size: 1.08rem; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 26px; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 1.02rem;
  cursor: pointer; border: 1.5px solid transparent; transition: transform .18s ease, box-shadow .22s ease, background .2s ease;
}
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-faint); transform: translateY(-2px); }

/* ---------- HERO ---------- */
.hero { position: relative; padding: 56px 0 64px; overflow: hidden; }
.hero-glow {
  position: absolute; left: 50%; top: 8%; transform: translateX(-50%);
  width: min(900px, 130%); height: 620px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(closest-side, oklch(0.84 0.13 75 / 0.34), oklch(0.84 0.13 75 / 0.10) 55%, transparent 72%);
  filter: blur(8px);
}
.hero-inner { position: relative; z-index: 1; max-width: 880px; }
.hero-title {
  font-size: clamp(2.4rem, 9vw, 4.5rem); font-weight: 700;
  letter-spacing: -0.025em; margin-bottom: 22px;
}
.hero-sub { font-size: clamp(1.05rem, 3.5vw, 1.32rem); color: var(--ink-soft); max-width: 640px; margin-bottom: 16px; }
.hero-claim { font-size: 1.18rem; color: var(--ink); margin-bottom: 30px; }
.hero-claim strong { font-family: var(--font-display); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- STORIA ---------- */
.storia { padding: 60px 0; background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.storia-grid { display: grid; gap: 34px; }
.storia-media { position: relative; }
.storia-media img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.storia-figcap {
  font-family: var(--font-scripture); font-style: italic; font-size: 1.05rem;
  color: var(--ink-soft); margin-top: 12px; text-align: center;
}
.storia-text h2 { font-size: clamp(1.85rem, 6vw, 2.6rem); margin-bottom: 18px; }
.storia-text p { color: var(--ink-soft); margin-bottom: 16px; }
.storia-text p:first-of-type { color: var(--ink); }

.scripture {
  margin-top: 26px; padding: 22px 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.scripture-text { display: block; font-family: var(--font-scripture); font-style: italic; font-size: 1.32rem; line-height: 1.45; color: var(--ink); }
.scripture-ref { display: block; margin-top: 12px; font-size: 0.84rem; font-weight: 600; letter-spacing: 0.05em; color: var(--accent-deep); }

/* ---------- SERVIZI ---------- */
.servizi { padding: 66px 0; }
.cards { display: grid; gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .24s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: oklch(0.78 0.125 72 / 0.16); color: var(--accent-deep); margin-bottom: 18px;
}
.card-icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.24rem; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 1rem; }

/* ---------- A CHI MI RIVOLGO ---------- */
.chiservi { padding: 66px 0; background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.who-list { display: grid; gap: 14px; }
.who { padding: 26px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.who h3 { font-size: 1.2rem; margin-bottom: 8px; }
.who p { color: var(--ink-soft); }

/* ---------- PERCHE DIVERSO ---------- */
.diverso { padding: 66px 0; }
.diverso-grid { display: grid; gap: 36px; }
.diverso-text h2 { font-size: clamp(1.85rem, 6vw, 2.6rem); margin-bottom: 18px; }
.diverso-text > p.reveal { color: var(--ink-soft); margin-bottom: 24px; }
.diverso-points { list-style: none; display: grid; gap: 14px; }
.diverso-points li {
  position: relative; padding: 16px 18px 16px 50px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink-soft);
}
.diverso-points li strong { color: var(--ink); font-family: var(--font-display); font-weight: 600; }
.diverso-points li::before {
  content: ""; position: absolute; left: 18px; top: 21px;
  width: 18px; height: 18px; border-radius: 50%;
  background: oklch(0.78 0.125 72 / 0.22);
  box-shadow: inset 0 0 0 2px var(--accent-deep);
}
.diverso-trust { align-self: start; }
.diverso-trust ul { list-style: none; display: grid; gap: 12px; }
.diverso-trust li {
  display: flex; flex-direction: column; gap: 4px; padding: 22px 24px;
  background: var(--ink); color: var(--bg); border-radius: var(--radius);
}
.trust-big { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--bg); }
.trust-lbl { font-size: 0.95rem; color: oklch(0.985 0.006 85 / 0.8); }

/* ---------- CONTATTI ---------- */
.contatti { position: relative; padding: 72px 0; background: var(--bg-2); border-top: 1px solid var(--line-soft); overflow: hidden; }
.contatti-glow {
  position: absolute; left: 50%; bottom: -40%; transform: translateX(-50%);
  width: min(800px, 120%); height: 500px; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, oklch(0.84 0.13 75 / 0.26), transparent 70%); filter: blur(10px);
}
.contatti-inner { position: relative; z-index: 1; max-width: 760px; }
.contatti h2 { font-size: clamp(1.9rem, 6.5vw, 2.8rem); margin-bottom: 16px; }
.contatti-intro { color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 30px; max-width: 620px; }
.contatti-cards { display: grid; gap: 14px; margin-bottom: 24px; }
.contatto {
  display: flex; flex-direction: column; gap: 4px; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.contatto-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-deep); }
.contatto-value { font-family: var(--font-display); font-size: 1.22rem; font-weight: 600; color: var(--ink); word-break: break-word; }
.contatti-note { font-family: var(--font-scripture); font-style: italic; color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--bg); padding: 40px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 20px; }
.footer-brand { display: flex; flex-direction: column; gap: 3px; }
.footer-brand .brand-name { color: var(--bg); font-size: 1.12rem; }
.footer-sub { font-size: 0.9rem; color: oklch(0.985 0.006 85 / 0.7); }
.footer-meta { display: flex; flex-direction: column; gap: 6px; }
.footer-copy { font-size: 0.9rem; color: oklch(0.985 0.006 85 / 0.75); }
.footer-credit { font-size: 0.82rem; color: oklch(0.985 0.006 85 / 0.7); }
.footer-credit a { color: oklch(0.985 0.006 85 / 0.95); text-decoration: underline; text-underline-offset: 3px; }
.footer-credit a:hover { color: #fff; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===================== BREAKPOINTS ===================== */
@media (min-width: 768px) {
  body { font-size: 18px; }
  .hamburger { display: none; }
  .nav-mobile { display: none !important; }
  .nav-desktop { display: flex; align-items: center; gap: 30px; }
  .nav-desktop a { font-size: 1rem; font-weight: 500; color: var(--ink-soft); padding: 8px 2px; transition: color .18s ease; }
  .nav-desktop a:hover { color: var(--ink); }
  .nav-desktop .nav-cta {
    color: var(--bg); background: var(--ink); padding: 11px 22px; border-radius: 999px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center;
  }
  .nav-desktop .nav-cta:hover { color: var(--bg); background: var(--accent-deep); }

  .hero { padding: 80px 0 88px; }
  .storia-grid { grid-template-columns: 1fr 1.05fr; align-items: center; gap: 48px; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .who-list { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .diverso-grid { grid-template-columns: 1.3fr 0.9fr; align-items: start; gap: 52px; }
  .contatti-cards { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .footer-meta { text-align: right; }
}

@media (min-width: 1024px) {
  .hero-title { font-size: clamp(3rem, 6vw, 4.8rem); }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .servizi, .chiservi, .diverso, .storia { padding-block: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
