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

:root {
  --paper:        #F7F2EA;
  --paper-warm:   #F0E9DC;
  --paper-aged:   #E9E0CC;
  --paper-letter: #FBF7F0;
  --ink:          #251828;
  --ink-mid:      #4a3850;
  --ink-faded:    #6a5872;
  --ink-ghost:    #73617b;
  --red-ink:      #7D3222;
  --sage:         #4A6B4D;
  --ocra:         #9A7A2E;
  --fold:         rgba(37, 24, 40, 0.07);
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'Lora', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Noise grain layer ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  background-image: 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.68' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  mix-blend-mode: multiply;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.88' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='70' height='70' filter='url(%23f)' opacity='0.025'/%3E%3C/svg%3E");
  background-size: 70px 70px;
  mix-blend-mode: multiply;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--ink);
  line-height: 1.12;
}
p, li { color: var(--ink-mid); line-height: 1.9; }
a { text-decoration: none; color: inherit; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }
.wrap-flush { max-width: 920px; margin: 0 auto; padding: 0; position: relative; z-index: 2; }

/* ── Ink rules ── */
.rule { height: 1px; background: linear-gradient(90deg, transparent, rgba(37,24,40,0.18) 20%, rgba(37,24,40,0.18) 80%, transparent); }
.rule-short { width: 48px; height: 1.5px; background: var(--red-ink); opacity: 0.45; }

/* ── Reveal animation: ink appearing ── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(3px);
  transition:
    opacity  0.9s cubic-bezier(.18,.68,0,1),
    transform 0.9s cubic-bezier(.18,.68,0,1),
    filter   0.9s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); filter: blur(0); }
.d1 { transition-delay: 0.10s; }
.d2 { transition-delay: 0.20s; }
.d3 { transition-delay: 0.30s; }
.d4 { transition-delay: 0.42s; }
.d5 { transition-delay: 0.54s; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 26px;
  font-family: 'Lora', serif; font-size: 0.88rem; letter-spacing: 0.03em;
  cursor: pointer; transition: all 0.22s; border: none;
  position: relative;
}
.btn-ink {
  background: var(--ink); color: var(--paper);
}
.btn-ink::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid var(--ink);
  transform: translate(4px,4px);
  transition: transform 0.22s;
  pointer-events: none;
}
.btn-ink:hover { background: var(--red-ink); }
.btn-ink:hover::after { transform: translate(2px,2px); }
.btn-ink-sage:hover { background: var(--sage); }

.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid rgba(37,24,40,0.28);
}
.btn-ghost:hover { border-color: var(--red-ink); color: var(--red-ink); }
.btn--fixed { flex-shrink: 0; }

/* ── Tags ── */
.mono { font-family: 'DM Mono', monospace; }
.tag {
  font-family: 'DM Mono', monospace; font-size: 0.65rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-ghost);
  display: inline-flex; align-items: center; gap: 7px;
}
.pill {
  font-family: 'DM Mono', monospace; font-size: 0.62rem;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 2px 9px; border: 1px solid currentColor; color: var(--sage);
  flex-shrink: 0;
}
.stamp {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 12px; border: 1px solid var(--red-ink);
  color: var(--red-ink); opacity: 0.9;
  font-family: 'DM Mono', monospace; font-size: 0.62rem;
  letter-spacing: 0.07em; text-transform: uppercase;
}
.stamp-ocra {
  border-color: var(--ocra); color: #7a5f22;
}
.stamp-sage {
  border-color: var(--sage); color: var(--sage);
}

/* ── Paper sheet ── */
.sheet {
  background: var(--paper-letter);
  box-shadow:
    0 1px 3px rgba(37,24,40,0.04),
    0 6px 18px rgba(37,24,40,0.07),
    0 24px 56px rgba(37,24,40,0.06);
  position: relative;
}
.sheet::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 26px; height: 26px;
  background: linear-gradient(225deg, var(--paper-warm) 50%, transparent 50%);
  box-shadow: -1px -1px 4px rgba(37,24,40,0.07);
}
.sheet-tilt-r { transform: rotate(0.45deg); }
.sheet-hover { transition: transform 0.35s, box-shadow 0.35s; }
.sheet-hover:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow:
    0 2px 6px rgba(37,24,40,0.05),
    0 14px 40px rgba(37,24,40,0.11),
    0 40px 80px rgba(37,24,40,0.07);
}
.sheet--flush { padding: 0; overflow: hidden; }

/* ── Hatch placeholder ── */
.hatch {
  background: repeating-linear-gradient(
    -45deg,
    rgba(37,24,40,0.025) 0px, rgba(37,24,40,0.025) 1px,
    transparent 1px, transparent 10px
  );
  border: 1px dashed rgba(37,24,40,0.14);
}

/* ── Value border-top card ── */
.vcard { padding: 28px 24px 28px; border-top: 2px solid; }

/* ── Letter section ── */
.letter-paper {
  background: #F5EFDF;
  border-left: 3px solid rgba(125,50,34,0.3);
  box-shadow:
    0 2px 6px rgba(37,24,40,0.04),
    0 10px 32px rgba(37,24,40,0.08);
  position: relative;
}
.letter-paper::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--red-ink), transparent);
  opacity: 0.2;
}
/* Ruled lines */
.ruled-lines {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 31px,
    rgba(154,122,46,0.1) 31px,
    rgba(154,122,46,0.1) 32px
  );
  background-position: 0 52px;
}

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s, border-color 0.4s;
}
nav.scrolled {
  background: rgba(247,242,234,0.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(37,24,40,0.09);
}
.nav-inner {
  max-width: 920px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  height: 62px; position: relative; z-index: 2;
}
.nav-logo {
  font-family: 'Playfair Display', serif; font-size: 1.3rem;
  color: var(--ink); letter-spacing: -0.02em;
}
.nav-logo em { color: var(--red-ink); font-style: normal; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-family: 'Lora', serif; font-size: 0.85rem;
  color: var(--ink-mid); transition: color 0.2s; white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.nav-lang {
  font-family: 'DM Mono', monospace; font-size: 0.7rem; letter-spacing: 0.08em;
  padding: 3px 8px; border: 1px solid rgba(37,24,40,0.18); color: var(--ink-mid);
}
.nav-links a.nav-lang:hover { border-color: var(--ink); color: var(--ink); }

#hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
#hamburger span { display: block; width: 21px; height: 1.5px; background: var(--ink-mid); }
#mobile-menu { display: none; }
#mobile-menu.open { display: flex; flex-direction: column; }

section { padding: 100px 0; }

/* ── Phone mockup ── */
@keyframes float-paper {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50%       { transform: rotate(-2deg) translateY(-9px); }
}
.phone-float { animation: float-paper 6s ease-in-out infinite; }

@keyframes float-paper-r {
  0%, 100% { transform: rotate(2deg) translateY(0); }
  50%       { transform: rotate(2deg) translateY(-9px); }
}
.phone-float-r { animation: float-paper-r 6s ease-in-out infinite; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--ink-ghost); border-radius: 2px; }

/* ── Utilities ── */
.ink         { color: var(--ink); }
.ink-mid     { color: var(--ink-mid); }
.ink-red     { color: var(--red-ink); }
.strong-ink  { font-style: normal; color: var(--ink); }
.section-head { margin-bottom: 14px; }
.rule-short--spaced { margin-bottom: 12px; }
.rule-short--sage { background: var(--sage); }
.dot {
  width: 6px; height: 6px; border-radius: 50%; display: inline-block;
}
.dot--sage { background: var(--sage); }
.dot--red  { background: var(--red-ink); opacity: 0.7; }
.heading-xl {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
}

/* ── Nav ── */
/* più specifico di .nav-links a, come faceva lo stile inline */
.nav-links a.nav-cta,
.nav-links a.nav-cta:hover {
  padding: 7px 18px;
  font-size: 0.82rem;
  color: #F7F2EA;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.mobile-menu {
  background: rgba(247,242,234,0.97);
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(37,24,40,0.08);
}
.mobile-link {
  display: block;
  padding: 13px 0;
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  color: var(--ink-mid);
  border-bottom: 1px solid rgba(37,24,40,0.06);
}
.mobile-cta {
  margin-top: 16px;
  justify-content: center;
  width: 100%;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 62px;
  overflow: hidden;
  position: relative;
}
.hero-blob {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.hero-blob--top {
  top: -15%; right: -8%;
  width: 520px; height: 520px;
  background: radial-gradient(ellipse, rgba(154,122,46,0.07) 0%, transparent 68%);
}
.hero-blob--bottom {
  bottom: -5%; left: -6%;
  width: 380px; height: 380px;
  background: radial-gradient(ellipse, rgba(74,107,77,0.05) 0%, transparent 65%);
}
.hero-blob--center {
  top: 40%; left: 40%;
  width: 300px; height: 300px;
  background: radial-gradient(ellipse, rgba(125,50,34,0.04) 0%, transparent 65%);
}
.wrap.hero-wrap {
  padding-top: 52px;
  padding-bottom: 72px;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
}
.hero-title {
  font-size: clamp(3.8rem, 10vw, 8rem);
  line-height: 0.93;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  font-weight: 700;
}
.hero-sub {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ink-faded);
  margin-bottom: 36px;
}
.hero-tagline {
  max-width: 580px;
  margin-bottom: 44px;
}
.hero-lead {
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  line-height: 2.05;
  font-style: italic;
  letter-spacing: 0.01em;
  color: var(--ink-mid);
  margin-bottom: 16px;
}
.hero-note {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-ghost);
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.reveal.scroll-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 80px;
  opacity: 0.3;
}
.scroll-hint-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--ink), transparent);
}
.scroll-hint-label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faded);
}

/* ── Card capitolo (ContaSogni, Myna) ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.grid-2--projects {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
}
.chapter-strip {
  height: 4px;
  background: linear-gradient(90deg, var(--red-ink), rgba(125,50,34,0.2));
  opacity: 0.35;
}
.chapter-strip--sage {
  background: linear-gradient(90deg, var(--sage), rgba(74,107,77,0.2));
}
.chapter-text {
  padding: 52px 48px;
  border-right: 1px solid rgba(37,24,40,0.07);
  position: relative;
}
.myna-text {
  border-right: 0;
}
.margin-line {
  position: absolute;
  left: 72px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(154,122,46,0.14);
}
.chapter-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
}
.icon-box {
  width: 68px;
  height: 68px;
  border: 1.5px solid rgba(37,24,40,0.15);
  background: var(--paper-aged);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chapter-title {
  font-size: 2.5rem;
  letter-spacing: -0.025em;
  line-height: 1.0;
  margin-bottom: 5px;
}
.chapter-sub {
  font-size: 0.68rem;
  color: var(--ink-ghost);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.chapter-lead {
  font-size: 1rem;
  line-height: 2;
  font-style: italic;
  margin-bottom: 10px;
}
.chapter-body {
  font-size: 0.9rem;
  line-height: 1.95;
  color: var(--ink-faded);
  margin-bottom: 30px;
}
.stamp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}
.chapter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.chapter-tech {
  margin: 24px 0;
  align-items: center;
}
.tech-label {
  font-size: 0.6rem;
  color: var(--ink-ghost);
  letter-spacing: 0.05em;
}
.chapter-tech + .footnote {
  margin-top: 24px;
}
.footnote {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(37,24,40,0.09);
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.footnote-icon {
  flex-shrink: 0;
  margin-top: 2px;
}
.footnote-text {
  font-size: 0.65rem;
  color: var(--ink-ghost);
  line-height: 1.75;
  letter-spacing: 0.03em;
}
.link-red,
.link-sage {
  padding-bottom: 1px;
  transition: opacity 0.2s;
}
.link-red {
  color: var(--red-ink);
  border-bottom: 1px solid rgba(125,50,34,0.25);
}
.link-sage {
  color: var(--sage);
  border-bottom: 1px solid rgba(74,107,77,0.28);
}
.link-red:hover,
.link-sage:hover { opacity: 0.7; }
.link--spaced { margin-left: 4px; }

/* ── Telefono finto ── */
.mockup-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 40px;
  position: relative;
  background: linear-gradient(135deg, rgba(240,233,220,0.5), rgba(247,242,234,0.3));
}
.mockup-sketch {
  position: absolute;
  opacity: 0.06;
  pointer-events: none;
}
.phone {
  position: relative;
  z-index: 2;
}
.phone-shadow {
  position: absolute;
  bottom: -16px;
  left: 10px;
  right: 10px;
  height: 30px;
  background: radial-gradient(ellipse, rgba(37,24,40,0.2) 0%, transparent 70%);
  filter: blur(8px);
}
.phone-body {
  width: 188px;
  height: 355px;
  background: #F8F4EB;
  border: 1.5px solid rgba(37,24,40,0.17);
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  box-shadow:
    3px 6px 20px rgba(37,24,40,0.14),
    1px 2px 5px rgba(37,24,40,0.1),
    inset 0 1px 0 rgba(255,255,255,0.5);
}
.phone-body--shot {
  width: 220px;
  height: auto;
  display: flex;
  flex-direction: column;
}
.phone-screen {
  display: block;
  width: 100%;
  height: auto;
  filter: sepia(0.08) saturate(0.95);
}
.phone-status {
  height: 25px;
  background: rgba(37,24,40,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  flex-shrink: 0;
}
.phone-time {
  font-size: 8.5px;
  color: var(--ink-ghost);
}
.phone-battery {
  width: 10px;
  height: 5px;
  border: 1px solid rgba(37,24,40,0.25);
  border-radius: 1px;
  position: relative;
}
.phone-battery-fill {
  position: absolute;
  left: 1px;
  top: 1px;
  right: 2px;
  bottom: 1px;
  background: var(--sage);
  opacity: 0.7;
  border-radius: 0.5px;
}
.phone-appbar {
  padding: 13px 15px 9px;
  border-bottom: 1px solid rgba(37,24,40,0.08);
}
.phone-appname {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-style: italic;
}
.phone-appmeta {
  font-size: 8px;
  color: var(--ink-ghost);
  margin-top: 2px;
}
.phone-entries {
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.phone-entry {
  padding: 8px 10px;
  border: 1px solid rgba(37,24,40,0.08);
}
.phone-entry--active {
  background: #EFE9D8;
  border: 0;
  border-left: 2px solid var(--red-ink);
}
.phone-entry-date {
  font-size: 7.5px;
  color: var(--ink-ghost);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.phone-entry-date--red {
  color: var(--red-ink);
  opacity: 0.75;
}
.phone-entry-title {
  font-family: 'Playfair Display', serif;
  font-size: 10.5px;
  color: var(--ink);
  font-style: italic;
}
.phone-entry-text {
  font-family: 'Lora', serif;
  font-size: 7.5px;
  color: var(--ink-ghost);
  margin-top: 2px;
  line-height: 1.5;
}
.phone-fab {
  position: absolute;
  bottom: 13px;
  right: 12px;
  width: 33px;
  height: 33px;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Chi sono ── */
.about-title {
  margin-bottom: 48px;
}
.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  align-items: start;
}
.about-grid--solo {
  grid-template-columns: 1fr;
  max-width: 720px;
}

/* Polaroid */
.photo-frame {
  width: 100%;
  max-width: 260px;
  background: var(--paper-letter);
  padding: 12px 12px 18px;
  box-shadow:
    0 1px 3px rgba(37,24,40,0.04),
    0 6px 18px rgba(37,24,40,0.07),
    0 24px 56px rgba(37,24,40,0.06);
  transform: rotate(-2deg);
  position: relative;
}
.photo-frame::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 86px;
  height: 24px;
  background: rgba(233,224,204,0.85);
  box-shadow: 0 1px 2px rgba(37,24,40,0.08);
  transform: translateX(-50%) rotate(3deg);
}
.photo-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.photo-placeholder {
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.photo-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-ghost);
}
.photo-caption {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
  text-align: center;
  margin-top: 12px;
}

/* Testo */
.about-lead {
  font-style: italic;
  font-size: 1.08rem;
  color: var(--ink-mid);
  line-height: 1.9;
}
.about-body {
  font-size: 0.95rem;
  color: var(--ink-mid);
  line-height: 1.9;
  margin-top: 18px;
}
.about-quote {
  margin-top: 32px;
  padding-left: 20px;
  border-left: 2px solid var(--sage);
}
.about-quote p {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1.5;
}
.about-quote footer {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-ghost);
  margin-top: 8px;
}

/* Scheda «In breve» */
.about-card {
  margin-top: 56px;
  padding: 32px 40px 36px;
}
.about-card > .tag {
  display: flex;
  margin-bottom: 16px;
}
.about-facts {
  display: grid;
  grid-template-columns: 170px 1fr;
}
.about-facts dt {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-ghost);
  padding: 13px 0;
  border-bottom: 1px dashed rgba(37,24,40,0.12);
}
.about-facts dd {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 13px 0;
  border-bottom: 1px dashed rgba(37,24,40,0.12);
}
.about-facts dt:last-of-type,
.about-facts dd:last-of-type {
  border-bottom: 0;
}

/* ── Pensiero ── */
.philosophy {
  background: var(--paper-warm);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}
.section-blob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(154,122,46,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.philosophy-head {
  margin-bottom: 56px;
}
.philosophy-title {
  max-width: 640px;
  line-height: 1.1;
}

/* ── Lettera ── */
.letter {
  padding: 52px 56px 56px;
  max-width: 740px;
}
.letter-date {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  margin-bottom: 32px;
}
.letter-lead {
  font-size: 1.06rem;
  line-height: 2.1;
  font-style: italic;
  margin-bottom: 24px;
}
.letter-body {
  font-size: 0.97rem;
  line-height: 2.05;
  color: var(--ink-mid);
  margin-bottom: 36px;
}
.letter-body--tight {
  margin-bottom: 8px;
}
.letter-rule {
  margin-bottom: 32px;
  opacity: 0.4;
}
.promise {
  background: rgba(37,24,40,0.04);
  border-left: 3px solid var(--red-ink);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.promise-title {
  font-size: 0.95rem;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.promise-text {
  font-size: 0.9rem;
  line-height: 1.95;
  color: var(--ink-mid);
}
.signature {
  margin-top: 44px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
}
.signature-label {
  font-size: 0.82rem;
  color: var(--ink-ghost);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.signature-meta {
  padding-bottom: 10px;
}
.signature-text {
  font-size: 0.65rem;
  color: var(--ink-ghost);
  letter-spacing: 0.06em;
  line-height: 1.7;
}

/* ── Progetti ── */
.projects-head {
  margin-bottom: 52px;
}
.projects-title {
  margin-bottom: 12px;
}
.projects-sub {
  font-style: italic;
  max-width: 440px;
}
.card-project {
  padding: 36px;
}
.card-project--vault {
  background: #F5F0E6;
}
.card-project--wide {
  background: #F2EBD8;
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-items: flex-start;
}
.card-project--deer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-items: center;
}
.deer-hatch {
  flex: 0 0 220px;
  width: 220px;
  height: auto;
  min-height: 150px;
  margin-bottom: 0;
}
.deer-body {
  flex: 1;
  min-width: 240px;
}
.project-hatch {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.project-hatch--sage {
  background: repeating-linear-gradient(-45deg, rgba(74,107,77,0.03) 0px, rgba(74,107,77,0.03) 1px, transparent 1px, transparent 10px);
  border-color: rgba(74,107,77,0.15);
}
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.placeholder-ring {
  position: relative;
  width: 88px;
  height: 88px;
}
.placeholder-ring--lg {
  width: 104px;
  height: 104px;
}
.placeholder-svg {
  position: absolute;
  inset: 0;
}
.placeholder-deer-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 16px;
}
.placeholder-deer {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(74,107,77,0.42);
  letter-spacing: 0.1em;
}
.placeholder-label {
  font-family: 'DM Mono', monospace;
  font-size: 6px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(37,24,40,0.22);
}
.placeholder-label--sage {
  color: rgba(74,107,77,0.32);
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.card-title {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}
.card-text {
  font-size: 0.9rem;
  line-height: 1.9;
  font-style: italic;
  margin-bottom: 18px;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tech {
  font-size: 0.6rem;
  color: var(--ink-ghost);
  border: 1px solid rgba(37,24,40,0.1);
  padding: 2px 8px;
  letter-spacing: 0.05em;
}
.tech--lg {
  font-size: 0.62rem;
  padding: 4px 10px;
}
.card-left {
  flex: 1;
  min-width: 240px;
}
.canili-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.icon-box-sm {
  width: 46px;
  height: 46px;
  border: 1.5px solid rgba(154,122,46,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(154,122,46,0.07);
}
.canili-title {
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  line-height: 1.0;
}
.canili-sub {
  font-size: 0.65rem;
  color: var(--ink-ghost);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
}
.canili-lead {
  font-size: 0.97rem;
  line-height: 1.95;
  font-style: italic;
  margin-bottom: 18px;
}
.canili-body {
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--ink-mid);
}
.canili-side {
  flex: 0 0 280px;
  min-width: 240px;
}
.note-box {
  border: 1px solid rgba(154,122,46,0.28);
  padding: 24px;
  background: rgba(154,122,46,0.05);
  position: relative;
}
.note-label {
  position: absolute;
  top: -10px;
  left: 16px;
  background: #F2EBD8;
  padding: 0 8px;
}
.note-label-text {
  font-size: 0.62rem;
  color: var(--ocra);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.note-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.note-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.note-item svg {
  flex-shrink: 0;
  margin-top: 3px;
}
.note-text {
  font-size: 0.83rem;
  line-height: 1.8;
}
.canili-tags {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Beta ── */
.beta {
  padding: 72px 0;
}
.beta-strip {
  height: 3px;
  background: linear-gradient(90deg, var(--red-ink), rgba(125,50,34,0.15));
  opacity: 0.3;
}
.beta-inner {
  padding: 48px 52px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.beta-tag {
  display: block;
  margin-bottom: 16px;
}
.beta-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.beta-text {
  font-style: italic;
  max-width: 420px;
  font-size: 0.95rem;
  line-height: 1.95;
}

/* ── Footer ── */
.footer-main {
  padding: 80px 0 44px;
}
.footer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 60px;
}
.footer-title {
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  max-width: 600px;
}
.footer-rule {
  margin-bottom: 36px;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.socials {
  display: flex;
  align-items: center;
  gap: 28px;
}
.social {
  color: var(--ink-ghost);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.social--ig:hover { color: var(--red-ink); }
.social--gh:hover { color: var(--ink); }
.social--coffee:hover { color: var(--ocra); }
.social-label {
  font-size: 0.65rem;
  letter-spacing: 0.07em;
}
.legal {
  display: flex;
  align-items: center;
  gap: 14px;
}
.copyright {
  font-size: 0.62rem;
  color: var(--ink-ghost);
  letter-spacing: 0.05em;
  opacity: 0.85;
}
.dot-sep {
  color: var(--ink-ghost);
  opacity: 0.3;
}
.legal-link {
  font-size: 0.62rem;
  color: var(--ink-ghost);
  letter-spacing: 0.05em;
  opacity: 0.85;
  border-bottom: 1px solid rgba(37,24,40,0.18);
  padding-bottom: 1px;
  transition: opacity 0.2s;
}
.legal-link:hover { opacity: 1; }
.legal-back {
  font-size: 0.62rem;
  color: var(--ink-ghost);
  letter-spacing: 0.05em;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.legal-back:hover { opacity: 1; }
.watermark {
  margin-top: 56px;
  display: flex;
  justify-content: flex-end;
  opacity: 0.08;
  pointer-events: none;
}

/* ── Pagina privacy ── */
.privacy-section {
  min-height: 100vh;
  padding-top: 120px;
  padding-bottom: 80px;
}
.back {
  margin-bottom: 40px;
}
.back-link {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-faded);
  border-bottom: 1px solid rgba(37,24,40,0.18);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--red-ink); }
.privacy-title-wrap {
  margin-bottom: 48px;
}
.privacy-title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.privacy-date {
  font-size: 0.72rem;
  color: var(--ink-ghost);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.privacy-intro {
  max-width: 740px;
  margin-bottom: 56px;
}
.privacy-intro-text {
  font-size: 1.06rem;
  line-height: 2.1;
  font-style: italic;
  color: var(--ink-mid);
}
.privacy-sheet {
  margin-bottom: 40px;
}
.privacy-sheet-inner {
  padding: 48px 52px;
}
.policy {
  margin-bottom: 44px;
}
.policy--last {
  margin-bottom: 8px;
}
.policy-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.policy-num {
  font-size: 0.72rem;
  color: var(--red-ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}
.policy-title {
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.policy-body {
  padding-left: 34px;
  border-left: 2px solid rgba(37,24,40,0.08);
}
.policy-text {
  font-size: 0.97rem;
  line-height: 2.05;
  color: var(--ink-mid);
}
.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 740px;
}
.footer-privacy {
  padding: 44px 0;
}

/* ── Pagina 404 ── */
.notfound-section {
  min-height: 100vh;
  padding: 62px 0 0;
  display: flex;
  align-items: center;
}
.notfound-section .wrap {
  width: 100%;
}
.notfound-content {
  max-width: 620px;
}
.notfound-text {
  margin-bottom: 32px;
}

/* ── Myna: colonne specchiate ── */
@media (min-width: 641px) {
  .myna-mockup { order: -1; }
  .myna-text { border-left: 1px solid rgba(37,24,40,0.07); }
}

/* tablet: sei voci nel menu, si stringono un po' */
@media (min-width: 641px) and (max-width: 860px) {
  .nav-inner { padding: 0 24px; }
  .nav-links { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .phone-float { animation: none; transform: rotate(-2deg); }
  .phone-float-r { animation: none; transform: rotate(2deg); }
}

@media (max-width: 640px) {
  section { padding: 64px 0; }
  .wrap { padding: 0 20px; }
  #hamburger { display: flex; }
  .nav-links { display: none; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .grid-3 { grid-template-columns: 1fr !important; }
  .hide-mobile { display: none !important; }
  .chapter-text { padding: 40px 24px !important; }
  .margin-line { display: none; }
  .card-project--deer { flex-direction: column; gap: 24px; }
  .deer-hatch { flex-basis: auto; width: 100%; height: 160px; min-height: 0; }
  .letter { padding: 36px 22px 40px; }
  .signature { flex-wrap: wrap; gap: 6px 20px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .photo-frame { max-width: 220px; margin: 0 auto; }
  .about-card { padding: 26px 22px 28px; }
  .about-facts { grid-template-columns: 1fr; }
  .about-facts dt {
    padding: 13px 0 2px;
    border-bottom: 0;
  }
  .about-facts dd { padding: 0 0 13px; }
  .about-facts dd:last-of-type { border-bottom: 0; }
}
