/* =========================================================
   Stile condiviso — Sito Andrea Ceccarani
   Estetica editoriale: carta crema, inchiostro, terracotta
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,900;1,9..144,500&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --paper:      #f4efe6;
  --paper-deep: #ece4d6;
  --ink:        #211d18;
  --ink-soft:   #4a443b;
  --accent:     #b5471f;
  --accent-dk:  #8a3415;
  --line:       #d8cdba;
  --display: 'Fraunces', Georgia, serif;
  --body:    'Hanken Grotesk', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(181,71,31,.05), transparent 42%),
    radial-gradient(circle at 88% 78%, rgba(33,29,24,.04), transparent 40%);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Grana sottile sopra tutto */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Navigazione ───────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.4rem clamp(1.2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(244, 239, 230, .82);
  backdrop-filter: blur(8px);
  z-index: 100;
}

.brand {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--accent); }

.menu {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
}

/* Pulsanti di navigazione */
.btn-nav {
  font-family: var(--body);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  color: var(--ink-soft);
  padding: .5rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: all .22s ease;
}
.btn-nav:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--paper-deep);
}
.btn-nav.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* ── Contenuto ─────────────────────────────────────────── */
main {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.2rem, 5vw, 2rem) 4rem;
}

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  margin-bottom: 1.3rem;
}
h1 em { font-style: italic; color: var(--accent); font-weight: 500; }

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -.02em;
  margin: 2.6rem 0 1rem;
}

.lead {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: 2rem;
}

p { margin-bottom: 1.1rem; max-width: 64ch; color: var(--ink-soft); }
p strong { color: var(--ink); }

/* Pulsante d'azione grande */
.btn-cta {
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  padding: .9rem 1.9rem;
  border-radius: 999px;
  transition: transform .2s ease, background .2s ease;
  box-shadow: 0 8px 22px -10px rgba(181,71,31,.7);
}
.btn-cta:hover { background: var(--accent-dk); transform: translateY(-2px); }
.btn-cta.ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  box-shadow: none;
  margin-left: .6rem;
}
.btn-cta.ghost:hover { background: var(--accent); color: #fff; }

/* Griglia di schede */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.4rem;
  margin-top: 2rem;
}
.card {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.6rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -18px rgba(33,29,24,.5); }
.card h3 { font-family: var(--display); font-size: 1.25rem; margin-bottom: .5rem; }
.card p { font-size: .95rem; margin: 0; }

/* Lista contatti */
.contact-list { list-style: none; margin-top: 1.5rem; }
.contact-list li {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.contact-list .label {
  font-weight: 700;
  color: var(--ink);
  min-width: 110px;
}
.contact-list a { color: var(--accent); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* ── Footer ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 2rem clamp(1.2rem, 5vw, 4rem);
  font-size: .85rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
}

/* ── Animazione di ingresso ────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal:nth-child(1) { animation-delay: .05s; }
.reveal:nth-child(2) { animation-delay: .15s; }
.reveal:nth-child(3) { animation-delay: .25s; }
.reveal:nth-child(4) { animation-delay: .35s; }
.reveal:nth-child(5) { animation-delay: .45s; }
