/* Bottega di Siti — stile principale */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-500-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-600-italic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Palette */
  --carta: #f3ebd9;        /* Carta naturale — sfondo */
  --verde: #354536;        /* Verde bottega — bottoni e dettagli */
  --verde-scuro: #26321f;
  --ocra: #c69a45;         /* Ocra — accenti grafici */
  --terracotta: #7d2337;   /* Borgogna — testi in evidenza */
  --terracotta-testo: #6e1e30; /* Borgogna più scuro per i link */
  --noce: #342a21;         /* Noce scuro — titoli e testo */

  --paper: #fbf7ee;
  --sand: #ebdfc5;
  --kraft: #dcc49c;
  --ink: var(--noce);
  --ink-soft: #66574a;
  --line: #dccdb0;

  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 16px;
  --max: 1160px;

  --paper-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.27 0 0 0 0 0.16 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--carta);
  background-image: var(--paper-texture);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--terracotta-testo); text-underline-offset: 3px; }
a:hover { color: var(--noce); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.8rem, 6.5vw, 5.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
h3 { font-size: 1.6rem; line-height: 1.15; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--terracotta); }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Etichetta di sezione con linea ocra */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--verde);
  margin-bottom: 1em;
  white-space: nowrap;
}
.eyebrow::after {
  content: "";
  flex: 0 1 140px;
  height: 1.5px;
  background: var(--ocra);
}
.center .eyebrow { justify-content: center; }
.center .eyebrow::before {
  content: "";
  flex: 0 1 60px;
  height: 1.5px;
  background: var(--ocra);
}
.center .eyebrow::after { flex-basis: 60px; }

/* Sottolineatura disegnata a mano */
.swoosh {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.swoosh svg {
  position: absolute;
  left: 4%;
  bottom: -0.16em;
  width: 92%;
  height: 0.28em;
  color: var(--ocra);
  overflow: visible;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(243, 235, 217, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(220, 205, 176, 0.7);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.logo {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: var(--noce);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  padding-bottom: 8px;
}
.logo:hover { color: var(--noce); }
.logo svg {
  position: absolute;
  left: 30%;
  bottom: -2px;
  width: 42%;
  height: 10px;
  color: var(--ocra);
  overflow: visible;
}

.header-right { display: flex; align-items: center; gap: 22px; }

.lang-switch {
  display: flex;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lang-switch a {
  padding: 5px 10px;
  text-decoration: none;
  color: var(--ink-soft);
}
.lang-switch a:hover { color: var(--noce); }
.lang-switch a[aria-current="true"] { background: var(--noce); color: var(--carta); }

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav a {
  text-decoration: none;
  color: var(--noce);
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 500;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--terracotta); }
.nav a[aria-current="page"]:not(.btn) {
  text-decoration: underline;
  text-decoration-color: var(--ocra);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--noce);
}

@media (max-width: 1000px) {
  .site-header .container { height: 72px; }
  .logo { font-size: 1.7rem; }
  .header-right { gap: 10px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background-color: var(--carta);
    background-image: var(--paper-texture);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px; }
  .nav li a { display: block; padding: 12px 0; font-size: 1.35rem; border-bottom: 1px solid var(--line); }
  .nav li:last-child a { border-bottom: 0; margin-top: 14px; text-align: center; justify-content: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 30px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  border: 2px solid var(--verde);
  background: var(--verde);
  color: var(--carta);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn::after {
  content: "→";
  font-size: 1.2em;
  line-height: 1;
  transition: transform 0.15s;
}
.btn:hover { background: var(--verde-scuro); border-color: var(--verde-scuro); color: var(--carta); }
.btn:hover::after { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--verde); }
.btn-ghost:hover { background: var(--verde); color: var(--carta); }
.btn-small { padding: 11px 22px; font-size: 0.98rem; }
.nav .btn, .nav .btn[aria-current="page"] { color: var(--carta); font-family: var(--sans); font-size: 0.98rem; }
.btn.no-arrow::after { content: none; }

/* ---------- Sections ---------- */

section { padding: 96px 0; }
.section-sand { background-color: rgba(220, 196, 156, 0.28); }
.section-head { max-width: 700px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }

.page-hero { padding: 80px 0 40px; }
.page-hero p { max-width: 660px; }

/* ---------- Hero ---------- */

.hero { padding: 72px 0 96px; }
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 40px;
  align-items: center;
}
.hero h1 { position: relative; margin-bottom: 0.45em; }
.hero h1 .swoosh svg { bottom: -0.2em; }
.hero .sparkle {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-left: 0.15em;
  vertical-align: 0.35em;
  color: var(--ocra);
}
.hero .subtitle {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 0.4em;
}
.hero .details { color: var(--ink-soft); margin-bottom: 32px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Composizione con i siti di esempio */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 0.86;
  width: 100%;
}
.hero-visual .blob { position: absolute; }
.hero-visual .blob-kraft { left: 2%; top: 0; width: 72%; height: 78%; color: var(--kraft); }
.hero-visual .blob-ocra { right: -4%; bottom: 0; width: 52%; height: 70%; color: var(--ocra); }
.hero-visual .rays { position: absolute; left: 8%; top: 1%; width: 9%; color: var(--ocra); }
.hero-visual .branch { position: absolute; right: 2%; left: auto; bottom: -1%; width: 32%; z-index: 4; transform: rotate(-8deg); }

.mock {
  position: absolute;
  background: #f8f2e6;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 50px -24px rgba(52, 42, 33, 0.55), 0 2px 6px rgba(52, 42, 33, 0.12);
  font-family: var(--serif);
}
.mock-1 { right: -2%; top: 5%; width: 76%; transform: rotate(-4deg); z-index: 1; }
.mock-2 { left: 0; top: 45%; width: 64%; transform: rotate(3deg); z-index: 3; }

@media (max-width: 900px) {
  .hero { padding: 40px 0 72px; }
  .hero .container { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 560px; margin: 0 auto; }
  section { padding: 72px 0; }
}

/* ---------- Grids & cards ---------- */

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 10px 30px -22px rgba(52, 42, 33, 0.4);
}
.card p:last-child { margin-bottom: 0; }

.step-num {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 2.8rem;
  line-height: 1;
  color: var(--ocra);
  margin-bottom: 12px;
}

.icon {
  width: 44px;
  height: 44px;
  color: var(--verde);
  margin-bottom: 16px;
}

/* ---------- Pricing ---------- */

.price-card { display: flex; flex-direction: column; position: relative; }
.price-card.featured { border: 2px solid var(--verde); }
.badge {
  position: absolute;
  top: -14px;
  left: 30px;
  background: var(--ocra);
  color: var(--noce);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
}
.price {
  font-family: var(--serif);
  font-size: 3.4rem;
  font-weight: 600;
  line-height: 1;
  margin: 8px 0 4px;
}
.price-note { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 20px; }
.checklist { list-style: none; padding: 0; margin: 0 0 28px; flex-grow: 1; }
.checklist li { padding: 7px 0 7px 28px; position: relative; border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--ocra);
  border-bottom: 2px solid var(--ocra);
  transform: rotate(-45deg);
}

.extras-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.extras-table td { padding: 18px 22px; border-bottom: 1px solid var(--line); vertical-align: top; }
.extras-table tr:last-child td { border-bottom: 0; }
.extras-table td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }
.extras-table .muted { display: block; font-size: 0.9rem; color: var(--ink-soft); font-weight: 400; }
@media (max-width: 560px) {
  .extras-table td { display: block; padding: 6px 18px; border: 0; text-align: left !important; }
  .extras-table td:first-child { padding-top: 16px; }
  .extras-table td:last-child { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
}

/* ---------- Progetti ---------- */

.projects-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
}
.projects-head .section-head { margin-bottom: 0; }

.project-tile {
  display: block;
  text-decoration: none;
  color: var(--noce);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 40px -26px rgba(52, 42, 33, 0.5);
  transition: transform 0.2s;
}
.project-tile:hover { transform: translateY(-3px); color: var(--noce); }
.project-tile img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.project-tile .tile-body { padding: 22px 26px 26px; }
.project-tile h3 { margin-bottom: 0.2em; }
.project-tile p { color: var(--ink-soft); margin: 0; }

.project-next {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  border: 2px dashed var(--ocra);
  border-radius: 20px;
  padding: 40px;
  min-height: 100%;
}
.project-next h3 { font-size: 2rem; }
.project-next h3 em { color: var(--terracotta); font-weight: 500; }

.project {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 40px -26px rgba(52, 42, 33, 0.5);
}
.project-visual { background: var(--sand); }
.project-visual img { width: 100%; height: 100%; min-height: 100%; object-fit: cover; object-position: top left; }
.project-body { padding: 40px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.tags li { font-size: 0.8rem; padding: 4px 12px; border-radius: 999px; background: var(--sand); color: var(--noce); }
.project-placeholder {
  border: 2px dashed var(--ocra);
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  color: var(--ink-soft);
  margin-top: 24px;
}
@media (max-width: 820px) {
  .projects-head { flex-direction: column; align-items: flex-start; }
  .project { grid-template-columns: 1fr; }
  .project-body { padding: 28px; }
  .project-visual img { aspect-ratio: 16 / 10; }
}

/* ---------- La bottega ---------- */

.about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.about-photo {
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  background: var(--sand);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
  padding: 20px;
  transform: rotate(-2deg);
  box-shadow: 0 16px 40px -26px rgba(52, 42, 33, 0.5);
}
@media (max-width: 820px) { .about { grid-template-columns: 1fr; gap: 32px; } .about-photo { max-width: 320px; } }

/* ---------- CTA band ---------- */

.cta-band { background: var(--verde); color: var(--carta); text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.cta-band h2 { color: var(--carta); }
.cta-band h2 em { color: var(--ocra); }
.cta-band p { color: rgba(243, 235, 217, 0.85); max-width: 560px; margin: 0 auto 30px; }
.cta-band .btn { background: var(--carta); color: var(--verde); border-color: var(--carta); }
.cta-band .btn:hover { background: #fff; border-color: #fff; color: var(--verde); }

/* ---------- Form ---------- */

.contact-layout { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }

.form { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 36px; box-shadow: 0 16px 40px -26px rgba(52, 42, 33, 0.45); }
@media (max-width: 560px) { .form { padding: 24px 20px; } }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; gap: 0; } }
.field { margin-bottom: 22px; }
.field label, .field legend { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--noce);
  background: var(--carta);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--verde);
  box-shadow: 0 0 0 3px rgba(53, 69, 54, 0.15);
}
fieldset.field { border: 0; padding: 0; margin: 0 0 22px; }
.options { display: flex; flex-wrap: wrap; gap: 10px; }
.option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--carta);
  cursor: pointer;
  font-size: 0.95rem;
}
.option:has(input:checked) { border-color: var(--ocra); background: #f1e2bf; }
.option input { accent-color: var(--verde); margin: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 24px; }
.consent input { margin-top: 5px; accent-color: var(--verde); flex-shrink: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 18px; padding: 14px 18px; border-radius: 10px; display: none; }
.form-status.success { display: block; background: #e3e8d9; color: var(--verde); }
.form-status.error { display: block; background: #f1d9dc; color: var(--terracotta-testo); }

.side-info .card { margin-bottom: 20px; }

/* ---------- Pagine legali ---------- */

.legal { max-width: 760px; }
.legal h2 { font-size: 2rem; margin-top: 1.6em; }
.legal h3 { font-size: 1.35rem; margin-top: 1.4em; }
.legal ul, .legal ol { padding-left: 1.3em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4em; }
.legal .updated { color: var(--ink-soft); font-size: 0.9rem; }
.legal .box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 1em 0 1.5em; }

/* ---------- Footer ---------- */

.site-footer { background: var(--noce); color: #d9cdb8; padding: 64px 0 32px; font-size: 0.95rem; }
.site-footer a { color: #d9cdb8; text-decoration: none; }
.site-footer a:hover { color: var(--ocra); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid h4 { color: var(--carta); font-family: var(--serif); font-size: 1.35rem; margin: 0 0 12px; font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.site-footer .logo { color: var(--carta); margin-bottom: 16px; }
.site-footer .logo:hover { color: var(--carta); }
.footer-bottom { border-top: 1px solid #4d4136; padding-top: 24px; font-size: 0.85rem; color: #a8998a; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* Barra del browser sul sito reale nella hero */
.mock-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2.2% 3%;
  background: #f8f2e6;
  border-bottom: 1px solid var(--line);
}
.mock-bar .dots { display: flex; gap: 4px; }
.mock-bar .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.mock-url {
  flex: 1;
  max-width: 60%;
  margin: 0 auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--carta);
  font-family: var(--sans);
  font-size: clamp(0.5rem, 0.7vw, 0.65rem);
  color: var(--ink-soft);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock img { width: 100%; height: auto; }

/* ---------- Carosello progetti ---------- */

.carousel { position: relative; min-width: 0; }
.grid > * { min-width: 0; }
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: 20px;
  box-shadow: 0 16px 40px -26px rgba(52, 42, 33, 0.5);
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 3px solid var(--ocra); outline-offset: 4px; }
.carousel .slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}
.carousel .slide:hover { transform: none; }
.carousel .slide img { aspect-ratio: 16 / 10; }
.carousel-btn {
  position: absolute;
  top: calc(50% - 48px);
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--carta);
  color: var(--verde);
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(52, 42, 33, 0.45);
  transition: background 0.15s, color 0.15s;
}
.carousel-btn:hover { background: var(--verde); color: var(--carta); }
.carousel-btn.prev { left: 14px; }
.carousel-btn.next { right: 14px; }
.carousel-dots { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: var(--line);
  cursor: pointer;
  transition: width 0.2s, background 0.2s;
}
.carousel-dots button[aria-current="true"] { width: 28px; background: var(--ocra); }

/* Punti di forza */
.perks-inline {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: var(--ink-soft);
  font-weight: 500;
}
.perks-inline li { position: relative; padding-left: 24px; }
.perks-inline li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--ocra);
  border-bottom: 2px solid var(--ocra);
  transform: rotate(-45deg);
}
.perk .step-num { font-style: normal; }
.page-hero .btn { margin-top: 8px; }

/* =========================================================
   Animazioni
   ========================================================= */

:root {
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --soft: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Header che si "stacca" quando si scorre */
.site-header { transition: box-shadow 0.3s, background-color 0.3s; }
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(52, 42, 33, 0.45); }

/* ---- Hero: entrata ---- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(36px); }
  to { opacity: 1; transform: none; }
}
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.6); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@keyframes mock1In {
  from { opacity: 0; transform: translateY(-70px) rotate(-12deg); }
  to { opacity: 1; transform: translateY(0) rotate(-4deg); }
}
@keyframes mock1Float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-12px) rotate(-3deg); }
}
@keyframes mock2In {
  from { opacity: 0; transform: translateY(80px) rotate(10deg); }
  to { opacity: 1; transform: translateY(0) rotate(3deg); }
}
@keyframes mock2Float {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-16px) rotate(4deg); }
}
@keyframes blobIn {
  from { opacity: 0; transform: scale(0.75) rotate(-6deg); }
  to { opacity: 1; transform: none; }
}
@keyframes blobBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035) rotate(1.5deg); }
}
@keyframes sway {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(-2deg); }
}
@keyframes rays {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.js .hero h1,
.js .hero .subtitle,
.js .hero .perks-inline,
.js .hero .actions { animation: riseIn 0.9s var(--bounce) both; }
.js .hero h1 { animation-delay: 0.05s; }
.js .hero .subtitle { animation-delay: 0.2s; }
.js .hero .perks-inline { animation-delay: 0.32s; }
.js .hero .actions { animation-delay: 0.44s; }

@keyframes wipeIn {
  from { clip-path: inset(-50% 100% -50% 0); }
  to { clip-path: inset(-50% -2% -50% 0); }
}
.js .hero .swoosh svg { animation: wipeIn 0.9s var(--soft) 0.75s both; }
.js .logo svg { animation: wipeIn 0.8s var(--soft) 0.3s both; }
.js .hero .sparkle {
  animation: popIn 0.6s var(--bounce) 1.1s both, spin 14s linear 1.7s infinite, twinkle 2.4s ease-in-out 1.7s infinite;
}

.js .hero-visual .blob-kraft { animation: blobIn 1s var(--bounce) 0.1s both, blobBreathe 9s ease-in-out 1.2s infinite; }
.js .hero-visual .blob-ocra { animation: blobIn 1s var(--bounce) 0.25s both, blobBreathe 11s ease-in-out 1.4s infinite reverse; }
.js .hero-visual .mock-1 { animation: mock1In 1.1s var(--bounce) 0.3s both, mock1Float 6s ease-in-out 1.4s infinite; }
.js .hero-visual .mock-2 { animation: mock2In 1.1s var(--bounce) 0.55s both, mock2Float 7s ease-in-out 1.7s infinite; }
.js .hero-visual .branch { transform-origin: 0% 100%; animation: riseIn 0.9s var(--bounce) 0.9s both, sway 5s ease-in-out 1.8s infinite; }
.js .hero-visual .rays { transform-origin: 80% 80%; animation: popIn 0.5s var(--bounce) 1.2s both, rays 2.2s ease-in-out 1.7s infinite; }

/* Parallasse leggera col mouse (impostata da JS) */
.hero-visual > * { transition: translate 0.4s var(--soft); }
.hero-visual .blob-kraft { translate: calc(var(--mx, 0) * -8px) calc(var(--my, 0) * -8px); }
.hero-visual .blob-ocra { translate: calc(var(--mx, 0) * 10px) calc(var(--my, 0) * 10px); }
.hero-visual .mock-1 { translate: calc(var(--mx, 0) * 14px) calc(var(--my, 0) * 10px); }
.hero-visual .mock-2 { translate: calc(var(--mx, 0) * 24px) calc(var(--my, 0) * 18px); }
.hero-visual .branch { translate: calc(var(--mx, 0) * 30px) calc(var(--my, 0) * 20px); }

/* ---- Comparsa allo scroll ---- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(46px) scale(0.97);
  transition: opacity 0.7s var(--soft), transform 0.9s var(--bounce);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

.js [data-reveal="left"] { transform: translateX(-50px); }
.js [data-reveal="right"] { transform: translateX(50px); }
.js [data-reveal="left"].is-visible,
.js [data-reveal="right"].is-visible { transform: none; }

/* Linea ocra delle etichette che "si allunga" */
.js .eyebrow::after,
.js .center .eyebrow::before {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--soft) 0.25s;
}
.js .center .eyebrow::before { transform-origin: right; }
.js .is-visible .eyebrow::after,
.js .is-visible .eyebrow::before,
.js .eyebrow.is-visible::after,
.js .hero .eyebrow::after,
.js .page-hero .eyebrow::after { transform: scaleX(1); }

/* Numeri dei passaggi che "saltano" */
.js .card[data-reveal] .step-num { display: inline-block; transform: scale(0.4); transition: transform 0.7s var(--bounce); transition-delay: calc(var(--d, 0s) + 0.25s); }
.js .card[data-reveal].is-visible .step-num { transform: none; }

/* ---- Hover ---- */
.card,
.project-tile,
.project-next,
.project { transition: transform 0.45s var(--bounce), box-shadow 0.45s var(--soft), opacity 0.7s var(--soft); }
.card:hover,
.project-next:hover { transform: translateY(-8px) rotate(-0.4deg); box-shadow: 0 26px 46px -26px rgba(52, 42, 33, 0.55); }
.js [data-reveal].is-visible.card:hover,
.js [data-reveal].is-visible.project-next:hover { transform: translateY(-8px) rotate(-0.4deg); }
.card:hover .icon { animation: wiggle 0.6s var(--bounce); }
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-12deg) scale(1.1); }
  60% { transform: rotate(8deg); }
}

.project-tile img,
.project-visual img { transition: transform 0.8s var(--soft); }
.project-tile:hover img,
.project:hover .project-visual img { transform: scale(1.04); }
.project-visual { overflow: hidden; }

.btn { transition: background 0.15s, border-color 0.15s, transform 0.35s var(--bounce), box-shadow 0.35s; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 22px -12px rgba(53, 69, 54, 0.7); }
.btn:active { transform: translateY(0) scale(0.97); }

.carousel-btn { transition: background 0.15s, color 0.15s, transform 0.35s var(--bounce); }
.carousel-btn:hover { transform: translateY(-50%) scale(1.12); }

.nav a:not(.btn) { transition: color 0.2s; }
.lang-switch a { transition: background 0.2s, color 0.2s; }

.option { transition: transform 0.3s var(--bounce), border-color 0.2s, background 0.2s; }
.option:hover { transform: translateY(-2px); }

/* ---- Movimento ridotto ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .eyebrow::after,
  .js .center .eyebrow::before { transform: none; }
  .js .card[data-reveal] .step-num { transform: none; }
}
.js .about-photo[data-reveal].is-visible { transform: rotate(-2deg); }

/* Meno spazio tra la hero e la sezione Progetti */
.hero { padding-bottom: 48px; }
.hero + section:not(.section-sand) { padding-top: 48px; }
@media (max-width: 900px) {
  .hero { padding-bottom: 36px; }
  .hero + section:not(.section-sand) { padding-top: 36px; }
}

/* Foto nella pagina La bottega */
.about-photo { padding: 0; overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Logo immagine */
.logo { padding-bottom: 0; }
.logo img { height: 52px; width: auto; display: block; }
.site-footer .logo img { height: 46px; }
@media (max-width: 1000px) { .logo img { height: 42px; } }

/* Titoli delle card più evidenti */
.card h3 {
  font-size: 2.05rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 0.45em;
}
@media (max-width: 560px) { .card h3 { font-size: 1.85rem; } }

/* ---------- Sezione verde che si apre allo scroll ---------- */
.section-green { position: relative; isolation: isolate; overflow: hidden; }
.section-green::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 88% 12%, rgba(198, 154, 69, 0.28) 0, transparent 34%),
    radial-gradient(circle at 6% 92%, rgba(125, 35, 55, 0.22) 0, transparent 30%),
    var(--verde);
  transition: clip-path 1.1s var(--soft);
}
.section-green::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 360px;
  height: 360px;
  z-index: -1;
  border: 1.5px solid rgba(198, 154, 69, 0.45);
  border-radius: 50%;
  transition: transform 1.4s var(--soft), opacity 1s;
}
.section-green .section-head h2,
.section-green .section-head .lead,
.section-green .eyebrow { transition: color 0.8s var(--soft) 0.15s; }
.section-green .section-head h2 { color: var(--carta); }
.section-green .section-head h2 em { color: var(--ocra); }
.section-green .section-head .lead { color: rgba(243, 235, 217, 0.82); }
.section-green .eyebrow { color: var(--ocra); }

.js .section-green:not(.in-view)::before { clip-path: inset(14% 7% round 80px); }
.js .section-green:not(.in-view)::after { transform: scale(0.6); opacity: 0; }
.js .section-green:not(.in-view) .section-head h2 { color: var(--noce); }
.js .section-green:not(.in-view) .section-head .lead { color: var(--ink-soft); }
.js .section-green:not(.in-view) .eyebrow { color: var(--verde); }
.js .section-green.in-view::before { clip-path: inset(0 0 round 0); }

.section-green .card { border-color: transparent; box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.55); }
.section-green .icon {
  width: 64px;
  height: 64px;
  padding: 14px;
  border-radius: 50%;
  margin-bottom: 20px;
}
.section-green .grid > :nth-child(1) .icon { color: var(--terracotta); background: rgba(125, 35, 55, 0.1); }
.section-green .grid > :nth-child(2) .icon { color: var(--verde); background: rgba(53, 69, 54, 0.1); }
.section-green .grid > :nth-child(3) .icon { color: #a87a2a; background: rgba(198, 154, 69, 0.18); }

@media (prefers-reduced-motion: reduce) {
  .js .section-green:not(.in-view)::before { clip-path: none; }
  .js .section-green:not(.in-view)::after { transform: none; opacity: 1; }
  .js .section-green:not(.in-view) .section-head h2 { color: var(--carta); }
  .js .section-green:not(.in-view) .section-head .lead { color: rgba(243, 235, 217, 0.82); }
  .js .section-green:not(.in-view) .eyebrow { color: var(--ocra); }
}

/* Pixel / mattoncini */
.pixels {
  --cell: 22px;
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.pixels .px {
  position: absolute;
  width: calc(var(--cell) - 5px);
  height: calc(var(--cell) - 5px);
  border-radius: 3px;
  opacity: 0;
  transform: translateY(-140px) scale(0.4) rotate(-30deg);
  transition: opacity 1.2s var(--soft), transform 1.8s var(--bounce);
  transition-delay: calc(var(--i) * 110ms + 1.25s);
}
.in-view > .pixels .px { opacity: 0.85; transform: none; }
.in-view > .pixels .px.twinkle { animation: pxTwinkle 3s ease-in-out calc(var(--i) * 0.2s + 2.5s) infinite; }
@keyframes pxTwinkle {
  0%, 100% { opacity: 0.85; transform: none; }
  50% { opacity: 0.25; transform: scale(0.7) rotate(12deg); }
}
@media (max-width: 720px) { .pixels { --cell: 14px; } }
@media (prefers-reduced-motion: reduce) {
  .pixels .px { opacity: 0.85; transform: none; }
}
@media (max-width: 720px) { .section-green { padding-bottom: 130px; } }
@media (max-width: 720px) { .cta-band .px.mirror { display: none; } .cta-band { padding-bottom: 130px; } }
