@import url('https://fonts.googleapis.com/css2?family=Patrick+Hand&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  --paper: #FBF8F2;
  --paper-line: #E8E2D2;
  --ink: #1F2421;
  --ink-soft: #4A4E48;
  --sage: #5C7A5E;
  --sage-dark: #3F5940;
  --ochre: #E3A72F;
  --brick: #C0533E;
  --max: 640px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .hand {
  font-family: 'Patrick Hand', cursive;
  font-weight: 400;
  letter-spacing: 0.02em;
}

a { color: inherit; }

/* ---------- NAV (barra fissa: logo + hamburger, uguale su tutte le pagine) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--paper-line);
}

.nav .logo {
  font-family: 'Patrick Hand', cursive;
  font-size: clamp(0.95rem, 4vw, 1.4rem);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav-toggle {
  background: none;
  border: 2px solid var(--ink);
  border-radius: 8px;
  width: 40px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
}

/* ---------- MENU A COMPARSA (condiviso da tutte le pagine, Home compresa) ---------- */
.hb-hotspot {
  position: absolute;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 40;
  padding: 0;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.site-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 36, 33, 0.55);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.site-menu-overlay.open { opacity: 1; pointer-events: auto; }

.site-menu-panel {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
  padding: 20px 22px 26px;
  z-index: 201;
  transform: translateY(-110%);
  transition: transform 0.25s ease;
  max-width: var(--max);
  margin: 0 auto;
  border-left: 1px solid var(--paper-line);
  border-right: 1px solid var(--paper-line);
}
.site-menu-panel.open { transform: translateY(0); }

.site-menu-panel .menu-logo {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.6rem;
  margin-bottom: 6px;
  display: block;
}

.site-menu-panel a.menu-link {
  display: block;
  padding: 10px 2px;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--paper-line);
}
.site-menu-panel a.menu-link.active {
  color: var(--sage-dark);
}
.site-menu-panel a.menu-link.nav-cta {
  display: inline-block;
  margin-top: 12px;
  border-bottom: none !important;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.15rem;
}

.menu-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: 2px solid var(--ink);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 1rem;
  cursor: pointer;
}

/* ---------- SCROLL PAGE (immagine + pulsanti a tot altezza) ---------- */
.scroll-page {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}

.scroll-page img.bg {
  display: block;
  width: 100%;
  height: auto;
}

.pin {
  position: absolute;
  text-decoration: none;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.05rem;
  line-height: 1.15;
  text-align: center;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(var(--tilt, -1deg));
  transition: transform 0.15s ease;
}
.pin:hover { transform: rotate(0deg) translateY(-2px); }

.pin.sage   { background: var(--sage);  color: #fff; }
.pin.ochre  { background: var(--ochre); color: var(--ink); }
.pin.brick  { background: var(--brick); color: #fff; }
.pin.paper  { background: var(--paper); color: var(--ink); }

.pin small {
  display: block;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

/* ---------- FLOATING BOOK BUTTON ---------- */
.float-cta {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  background: var(--brick);
  color: #fff;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.05rem;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.float-cta:hover { transform: translateY(-2px); }

/* ---------- pulsanti compatti "in mano" ---------- */
.hand-pin {
  position: absolute;
  text-decoration: none;
  font-family: 'Patrick Hand', cursive;
  font-size: 0.85rem;
  line-height: 1.1;
  text-align: center;
  padding: 6px 11px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(-50%, -50%) rotate(var(--tilt, 0deg));
  transition: transform 0.15s ease;
  white-space: nowrap;
}
.hand-pin:hover { transform: translate(-50%, -50%) rotate(0deg) translateY(-2px); }
.hand-pin.pin-right { transform: translate(-88%, -50%) rotate(var(--tilt, 0deg)); }
.hand-pin.pin-right:hover { transform: translate(-88%, -50%) rotate(0deg) translateY(-2px); }
.hand-pin.sage  { background: var(--sage);  color: #fff; }
.hand-pin.ochre { background: var(--ochre); color: var(--ink); }
.hand-pin.brick { background: var(--brick); color: #fff; }

.simple {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 22px 100px;
}
.simple h1 { font-size: 2.4rem; margin-bottom: 8px; }
.simple p { color: var(--ink-soft); line-height: 1.6; font-size: 1.02rem; }
.tape {
  display: inline-block;
  background: var(--ochre);
  color: var(--ink);
  font-family: 'Patrick Hand', cursive;
  padding: 4px 12px;
  border-radius: 4px;
  transform: rotate(-2deg);
  margin-bottom: 14px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px 18px 90px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
}

.to-top {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.to-top:hover { background: var(--sage); color: #fff; border-color: var(--sage); }
