/* ════════════════════════════════════════════
   PROGETTO CUCINA — Prof. Vincenzo Pazzi
   Design: Italian Editorial Luxury
   Fonts: Cormorant Garamond · DM Sans · Space Mono
   ════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=DM+Sans:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* ── VARIABLES ── */
:root {
  --bg:      #07090E;
  --bg2:     #0C0E16;
  --bg3:     #111420;
  --surface: #161921;
  --border:  rgba(255,255,255,.07);
  --border2: rgba(255,255,255,.13);

  --text:    #E8E2D9;
  --muted:   rgba(232,226,217,.55);
  --muted2:  rgba(232,226,217,.28);

  --brass:   #C09A62;   /* warm gold accent */
  --brass-d: #9A7A4A;
  --brass-l: #D4B07A;
  --blue:    #4494D9;
  --blue-d:  #1E3A5F;
  --blue-pill:#162C52;
  --blue-hl: #6AADEA;
  --green:   #4CAF89;
  --red:     #E05A5A;
  --cyan:    #2B7FA8;
  --orange:  #C47C2A;
  --forest:  #2A6B4A;

  --fd: 'Cormorant Garamond', serif;
  --fb: 'DM Sans', sans-serif;
  --fm: 'Space Mono', monospace;

  --nav-h: 64px;
  --r:     12px;
  --max-w: 1100px;
}

/* ── RESET + PROTECTION ── */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  user-select: none !important;
  -webkit-user-select: none !important;
}
img {
  pointer-events: none !important;
  -webkit-user-drag: none !important;
  user-drag: none !important;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--fb);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  /* Subtle horizontal rule texture */
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 47px,
    rgba(255,255,255,.018) 47px, rgba(255,255,255,.018) 48px
  );
}

/* Grain overlay for premium feel */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='300' height='300' filter='url(%23n)' opacity='.08'/></svg>");
  opacity: .35; mix-blend-mode: overlay;
  pointer-events: none; z-index: 9999;
}

/* ══════════════════════════════════════════
   SITE HEADER & NAVIGATION
   ══════════════════════════════════════════ */

.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
}

/* Reading progress bar */
.progress-bar {
  height: 2px;
  background: rgba(255,255,255,.06);
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--brass), var(--blue));
  transition: width .12s linear;
}

/* Main nav bar */
.site-nav {
  height: var(--nav-h);
  background: rgba(7,9,14,.94);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 clamp(1.2rem, 4vw, 3rem);
  gap: 1.8rem;
}

/* Logo */
.nav-logo {
  text-decoration: none;
  display: flex; flex-direction: column;
  line-height: 1; flex-shrink: 0;
  gap: .08rem;
}
.logo-pre {
  font-family: var(--fm);
  font-size: .48rem; letter-spacing: .32em;
  color: var(--brass); font-weight: 700;
}
.logo-main {
  font-family: var(--fd);
  font-size: 1.35rem; font-weight: 600;
  color: var(--text); letter-spacing: .04em;
  line-height: 1;
}

.nav-sep {
  width: 1px; height: 30px;
  background: var(--border2); flex-shrink: 0;
}

/* Chapter tabs */
.nav-chapters {
  display: flex; gap: 0; flex: 1;
  align-items: center;
}

.nav-ch {
  position: relative;
}

.nav-ch-tab {
  display: flex; align-items: baseline; gap: .5rem;
  padding: .55rem 1rem;
  text-decoration: none;
  color: var(--muted);
  border-radius: 6px;
  transition: all .2s;
  white-space: nowrap;
  position: relative;
}

.nav-ch-tab:hover { color: var(--text); background: rgba(255,255,255,.05); }

.nav-ch.active .nav-ch-tab { color: var(--text); }
.nav-ch.active .nav-ch-tab::after {
  content: '';
  position: absolute;
  bottom: -1px; /* flush with nav bottom border */
  left: 1rem; right: 1rem;
  height: 2px; background: var(--brass);
  border-radius: 2px 2px 0 0;
}

.ch-n {
  font-family: var(--fm);
  font-size: .58rem; color: var(--brass);
  opacity: .65; letter-spacing: .06em;
}
.nav-ch.active .ch-n { opacity: 1; }
.ch-t {
  font-family: var(--fb);
  font-size: .77rem; font-weight: 500;
}

/* Dropdown */
.nav-drop {
  position: absolute;
  top: calc(100% + 10px); left: 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: .5rem;
  min-width: 210px;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
  box-shadow: 0 24px 60px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04);
  pointer-events: none;
}
.nav-ch:hover .nav-drop {
  opacity: 1; visibility: visible;
  transform: none; pointer-events: auto;
}
/* Tiny bridge to prevent hover gap */
.nav-drop::before {
  content: '';
  position: absolute; top: -10px; left: 0; right: 0;
  height: 10px;
}

.drop-lnk {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem .85rem;
  font-size: .73rem; color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
  transition: all .15s;
  font-family: var(--fb);
}
.drop-lnk::before {
  content: ''; width: 12px; height: 1px;
  background: var(--muted2); flex-shrink: 0;
  transition: all .2s;
}
.drop-lnk:hover {
  color: var(--text);
  background: rgba(255,255,255,.05);
}
.drop-lnk:hover::before { width: 18px; background: var(--brass); }

/* Hamburger */
.ham-btn {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: .5rem;
  margin-left: auto; flex-shrink: 0;
}
.ham-btn span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text);
  transition: all .3s;
  transform-origin: center;
}
.ham-btn.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.ham-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.ham-btn.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE OVERLAY ── */
.mob-nav {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 190;
  display: flex; flex-direction: column;
  padding: calc(var(--nav-h) + 2.5rem) 2rem 3rem;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity .35s, visibility .35s;
}
.mob-nav.open { opacity: 1; visibility: visible; }

.mob-ch {
  display: flex; align-items: flex-start; gap: 1.5rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: all .2s;
}
.mob-ch:hover { padding-left: .5rem; }
.mob-ch-n {
  font-family: var(--fd);
  font-size: 4rem; font-weight: 300;
  color: transparent; line-height: 1;
  -webkit-text-stroke: 1px rgba(192,154,98,.3);
  flex-shrink: 0; width: 80px; padding-top: .2rem;
  transition: -webkit-text-stroke-color .2s;
}
.mob-ch:hover .mob-ch-n { -webkit-text-stroke-color: var(--brass); }
.mob-ch-title {
  font-family: var(--fd);
  font-size: 2rem; font-weight: 500;
  line-height: 1.1; margin-bottom: .4rem;
}
.mob-ch-sub {
  font-family: var(--fm);
  font-size: .6rem; letter-spacing: .05em;
  color: var(--muted); line-height: 1.7;
}

/* ══════════════════════════════════════════
   INDEX HERO
   ══════════════════════════════════════════ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 5rem 5vw 5rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('img/hero.jpg') center/cover no-repeat;
  filter: brightness(.35) saturate(.8);
}
.hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(7,9,14,1) 0%,
    rgba(7,9,14,.7) 30%,
    rgba(7,9,14,.15) 70%,
    transparent 100%);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: var(--max-w);
}
.hero-eyebrow {
  font-family: var(--fm);
  font-size: .58rem; letter-spacing: .28em;
  text-transform: uppercase; color: var(--brass);
  margin-bottom: 1.5rem; display: block;
}
.hero h1 {
  font-family: var(--fd);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 300; line-height: .9;
  letter-spacing: -.01em; margin-bottom: 2rem;
}
.hero h1 em {
  font-style: italic; color: var(--brass-l);
}
.hero-meta {
  display: flex; align-items: center; gap: 1.8rem;
  flex-wrap: wrap;
  font-family: var(--fm);
  font-size: .62rem; letter-spacing: .1em;
  color: var(--muted2);
}
.hero-meta strong { color: var(--brass); font-weight: 700; }
.hero-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted2); }

.scroll-cue {
  position: absolute; bottom: 2.5rem; left: 5vw;
  display: flex; align-items: center; gap: .8rem;
  opacity: .5;
}
.scroll-cue-line { width: 36px; height: 1px; background: var(--muted); }
.scroll-cue-text { font-family: var(--fm); font-size: .55rem; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }

/* ══════════════════════════════════════════
   INDEX CHAPTER LIST
   ══════════════════════════════════════════ */
.ch-list-section {
  padding: 0 clamp(1.5rem, 5vw, 5rem) 8rem;
  padding-top: 6rem;
}
.ch-list-header {
  max-width: var(--max-w);
  margin: 0 auto 3.5rem;
  display: flex; align-items: baseline; gap: 2rem;
}
.ch-list-label {
  font-family: var(--fm); font-size: .58rem;
  letter-spacing: .25em; color: var(--brass);
  text-transform: uppercase; flex-shrink: 0;
}
.ch-list-rule { flex: 1; height: 1px; background: var(--border2); }

.ch-list { max-width: var(--max-w); margin: 0 auto; }

.ch-card {
  display: grid;
  grid-template-columns: 120px 1fr 48px;
  gap: 0 2.5rem;
  align-items: center;
  padding: 2.8rem 0;
  border-top: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  position: relative; overflow: hidden;
  transition: all .3s ease;
}
.ch-card:last-child { border-bottom: 1px solid var(--border); }

/* Animated left accent line */
.ch-card::before {
  content: '';
  position: absolute; left: 0; top: 0;
  width: 2px; height: 0;
  background: var(--brass);
  transition: height .4s ease;
}
.ch-card:hover::before { height: 100%; }

/* Background number ghost */
.ch-card::after {
  content: attr(data-num);
  position: absolute; right: 60px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--fd);
  font-size: 8rem; font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.03);
  line-height: 1; pointer-events: none;
  transition: -webkit-text-stroke-color .3s;
}
.ch-card:hover::after { -webkit-text-stroke-color: rgba(192,154,98,.08); }

.ch-card-num {
  font-family: var(--fd);
  font-size: clamp(3.5rem, 5vw, 5.5rem);
  font-weight: 300; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(192,154,98,.35);
  transition: -webkit-text-stroke-color .3s;
}
.ch-card:hover .ch-card-num { -webkit-text-stroke-color: var(--brass); }

.ch-card-body { min-width: 0; }
.ch-card-title {
  font-family: var(--fd);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500; margin-bottom: .5rem;
  line-height: 1.1;
}
.ch-card-desc {
  font-size: .8rem; color: var(--muted);
  line-height: 1.5; margin-bottom: .9rem;
}
.ch-card-topics {
  display: flex; flex-wrap: wrap; gap: .35rem;
}
.ch-topic {
  font-family: var(--fm); font-size: .58rem;
  letter-spacing: .06em; color: var(--muted2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px; padding: .2rem .65rem;
}

.ch-card-arrow {
  font-size: 1.4rem; color: var(--brass);
  opacity: 0; transform: translateX(-12px);
  transition: all .3s; flex-shrink: 0;
}
.ch-card:hover .ch-card-arrow { opacity: 1; transform: none; }

/* ══════════════════════════════════════════
   CHAPTER HERO
   ══════════════════════════════════════════ */
.chapter-hero {
  padding-top: var(--nav-h);
  min-height: 38vh;
  display: flex; align-items: flex-end;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.chapter-hero-inner {
  padding: 3.5rem clamp(1.5rem, 5vw, 5rem) 3rem;
  max-width: 820px;
  position: relative; z-index: 1;
}

/* Huge ghost number */
.chapter-hero-num {
  position: absolute;
  right: clamp(1rem, 4vw, 3rem); bottom: -1rem;
  font-family: var(--fd);
  font-size: clamp(12rem, 22vw, 22rem);
  font-weight: 700; color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.04);
  line-height: 1; pointer-events: none;
  z-index: 0;
}

.ch-hero-label {
  font-family: var(--fm);
  font-size: .58rem; letter-spacing: .28em;
  text-transform: uppercase; color: var(--brass);
  margin-bottom: 1rem; display: block;
}
.ch-hero-title {
  font-family: var(--fd);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 400; line-height: .92;
  letter-spacing: -.01em; margin-bottom: 1rem;
}
.ch-hero-title em { font-style: italic; color: var(--brass-l); }
.ch-hero-sub {
  font-size: .88rem; color: var(--muted);
  max-width: 520px; line-height: 1.65;
}

/* ══════════════════════════════════════════
   IN-PAGE TABLE OF CONTENTS (right rail)
   ══════════════════════════════════════════ */
.page-toc {
  position: fixed;
  right: 2rem; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column;
  gap: 0; z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity .4s;
}
.page-toc.vis { opacity: 1; pointer-events: auto; }

.toc-heading {
  font-family: var(--fm);
  font-size: .5rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted2);
  margin-bottom: .8rem;
}
.toc-item {
  display: flex; align-items: center; gap: .55rem;
  padding: .32rem 0;
  font-family: var(--fb);
  font-size: .68rem; color: var(--muted);
  text-decoration: none; transition: all .2s;
}
.toc-item .toc-tick {
  width: 16px; height: 1px;
  background: var(--muted2); flex-shrink: 0;
  transition: all .25s;
}
.toc-item:hover { color: var(--text); }
.toc-item:hover .toc-tick { width: 20px; background: var(--text); }
.toc-item.active { color: var(--brass); }
.toc-item.active .toc-tick { width: 24px; background: var(--brass); }

@media (max-width: 1380px) { .page-toc { display: none; } }

/* ══════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════ */
.page-body { padding-top: 0; }

section {
  padding: 5.5rem clamp(1.5rem, 5vw, 5rem);
  position: relative;
}
section:nth-child(odd) { background: var(--bg); }
section:nth-child(even) { background: var(--bg2); }

.sec-inner { max-width: var(--max-w); margin: 0 auto; }

.sec-label {
  font-family: var(--fm); font-size: .58rem;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--brass); margin-bottom: .7rem; display: block;
}
.sec-title {
  font-family: var(--fd);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400; margin-bottom: .5rem; line-height: 1.05;
}
.sec-title em { font-style: italic; color: var(--brass-l); }
.sec-rule { width: 48px; height: 1px; background: var(--brass); margin-bottom: 1.6rem; }
.sec-sub {
  font-size: clamp(.85rem, 1.3vw, .95rem);
  color: var(--muted); max-width: 640px;
  margin-bottom: 2.2rem; line-height: 1.75;
}
.sec-accent {
  font-family: var(--fm); font-size: .68rem;
  letter-spacing: .08em; color: var(--blue-hl);
  text-transform: uppercase; font-weight: 700;
}
.sec-credit {
  margin-top: 2.5rem; font-family: var(--fm);
  font-size: .55rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted2);
}

/* ── REVEAL ANIMATION ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.reveal.vis { opacity: 1; transform: none; }
.d1 { transition-delay: .08s } .d2 { transition-delay: .16s }
.d3 { transition-delay: .24s } .d4 { transition-delay: .32s }

/* ══════════════════════════════════════════
   COMPONENTS
   ══════════════════════════════════════════ */

/* ── PILL LIST ── */
.pill-list { display: flex; flex-direction: column; gap: .6rem; max-width: 580px; }
.pill {
  display: flex; align-items: center; gap: 1rem;
  background: var(--blue-pill);
  border: 1px solid rgba(68,148,217,.18);
  border-radius: 50px;
  padding: .85rem 1.4rem;
  font-size: .88rem; transition: all .2s;
}
.pill:hover { background: rgba(30,55,100,.9); border-color: rgba(68,148,217,.35); }
.pill-n {
  width: 34px; height: 34px; min-width: 34px;
  border-radius: 50%; background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fm); font-size: .78rem; font-weight: 700;
  flex-shrink: 0;
}

/* ── TWO-COL ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.two-col.img-right .col-img { order: 2; }
.col-img { border-radius: var(--r); overflow: hidden; }
.col-img img { width: 100%; display: block; border-radius: var(--r); object-fit: cover; }

/* ── TRIANGLE ICONS ── */
.tri-icons { display: flex; gap: 3.5rem; align-items: flex-start; flex-wrap: wrap; }
.tri-icon { display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.tri-circle {
  width: 136px; height: 136px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.tri-circle.cyan   { background: #2B7FA8; }
.tri-circle.orange { background: #C47C2A; }
.tri-circle.forest { background: #2A6B4A; }
.tri-circle svg { width: 68px; height: 68px; }
.tri-label { font-family: var(--fd); font-size: 1.15rem; font-weight: 500; color: var(--brass-l); }
.tri-sublabel { font-family: var(--fm); font-size: .6rem; letter-spacing: .06em; color: var(--muted); }

/* ── TRIANGLE DIAGRAM ── */
.triangle-wrap { display: flex; align-items: flex-start; gap: 3.5rem; flex-wrap: wrap; margin-top: 2rem; }
.tri-rules { min-width: 220px; }
.tri-rules h4 {
  font-family: var(--fm); font-size: .58rem;
  font-weight: 700; color: var(--brass);
  letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: .9rem;
}
.tri-rule-item {
  font-size: .85rem; color: var(--muted);
  margin-bottom: .45rem; display: flex;
  align-items: center; gap: .6rem;
}
.tri-rule-item::before { content: '–'; color: var(--brass); }
.tri-fluidi { display: flex; flex-direction: column; gap: .9rem; min-width: 180px; }
.tri-box {
  border: 1px solid var(--border2);
  border-radius: 8px; padding: .65rem 1.1rem;
  font-size: .82rem; text-align: center;
  font-family: var(--fb);
}
.tri-arrow { text-align: center; font-size: 1.1rem; color: var(--muted); }

/* ── FLOW STEPS ── */
.flow { display: flex; flex-wrap: nowrap; gap: 0; }
.flow-step {
  flex: 1; background: var(--blue-pill);
  border: 1px solid rgba(68,148,217,.18);
  padding: 1.2rem .7rem 1rem;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
  text-align: center; transition: background .2s;
}
.flow-step:first-child { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); }
.flow-step:last-child  { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%); }
.flow-step:hover { background: rgba(30,55,100,.9); }
.flow-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue); margin: 0 auto .45rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fm); font-weight: 700; font-size: .78rem;
}
.flow-lbl {
  font-family: var(--fm); font-size: .58rem;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
}
.flow-sub { font-size: .8rem; color: var(--muted); margin-top: 1.2rem; text-align: center; }

/* ── ERGO TABLE ── */
.ergo-table {
  background: var(--surface);
  border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--border); margin-bottom: 1.5rem;
}
.ergo-row {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.ergo-row:last-child { border-bottom: none; }
.ergo-cell { padding: .9rem 1.3rem; font-size: .85rem; }
.ergo-cell:first-child { color: var(--muted); border-right: 1px solid var(--border); }
.ergo-cell:last-child { color: var(--blue-hl); font-family: var(--fm); font-size: .82rem; font-weight: 700; }
.ergo-head {
  background: var(--blue-d); font-family: var(--fm);
  font-size: .6rem; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 700; color: var(--blue-hl);
}

/* ── PASSAGGIO GRID ── */
.passaggio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.pass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.5rem 1.2rem;
  text-align: center; transition: all .2s;
}
.pass-card:hover { border-color: var(--border2); transform: translateY(-3px); }
.pass-label { font-size: .78rem; color: var(--muted); margin-top: .8rem; }
.pass-value { font-family: var(--fm); font-size: 1.1rem; font-weight: 700; color: var(--brass-l); margin-top: .3rem; }

/* ── CONFIG TABS ── */
.cfg-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 2rem; }
.cfg-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px; padding: .5rem 1.1rem;
  font-family: var(--fb); font-size: .76rem;
  cursor: pointer; transition: all .2s; color: var(--muted);
}
.cfg-tab:hover { color: var(--text); border-color: var(--border2); }
.cfg-tab.active {
  background: var(--blue-pill);
  border-color: rgba(68,148,217,.35); color: var(--text);
}
.cfg-panel { display: none; }
.cfg-panel.active {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: start;
}
.cfg-desc { font-size: .87rem; color: var(--muted); line-height: 1.72; margin-bottom: 1.3rem; }
.cfg-vl { margin-bottom: .4rem; font-family: var(--fm); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.cfg-vl.green { color: var(--green); }
.cfg-vl.red   { color: var(--red); }
.cfg-li { font-size: .84rem; color: var(--muted); margin-bottom: .28rem; display: flex; align-items: flex-start; gap: .5rem; }
.cfg-li .icon { flex-shrink: 0; }
.cfg-li.pro .icon { color: var(--green); }
.cfg-li.con .icon { color: var(--red); }
.cfg-img { border-radius: var(--r); overflow: hidden; }
.cfg-img img { width: 100%; border-radius: var(--r); display: block; }

/* ── MATERIAL CARDS ── */
.mat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.3rem; }
.mat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  transition: all .25s;
}
.mat-card:hover { transform: translateY(-4px); border-color: var(--border2); }
.mat-img { height: 175px; overflow: hidden; }
.mat-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mat-body { padding: 1.3rem; }
.mat-name {
  font-family: var(--fm); font-size: .62rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--brass); font-weight: 700; margin-bottom: .45rem;
}
.mat-desc { font-size: .78rem; color: var(--muted); line-height: 1.65; margin-bottom: .9rem; }
.mat-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.mat-tag {
  background: var(--blue-pill);
  border: 1px solid rgba(68,148,217,.18);
  border-radius: 4px; padding: .2rem .7rem;
  font-family: var(--fm); font-size: .6rem; letter-spacing: .04em;
}

/* ── ILLUMINAZIONE ── */
.illu-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.illu-item {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  transition: border-color .2s;
}
.illu-item:hover { border-color: var(--border2); }
.illu-item:nth-child(even) .illu-text { order: 2; }
.illu-item:nth-child(even) .illu-img  { order: 1; }
.illu-text { padding: 2.2rem; display: flex; flex-direction: column; justify-content: center; }
.illu-text h3 {
  font-family: var(--fm); font-size: .6rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--brass); font-weight: 700; margin-bottom: .65rem;
}
.illu-text p { font-size: .85rem; color: var(--muted); line-height: 1.72; }
.illu-img { min-height: 220px; overflow: hidden; }
.illu-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── ERRORI ── */
.errori-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.errori-list { display: flex; flex-direction: column; gap: .8rem; }
.errori-item {
  display: flex; align-items: center; gap: .9rem;
  font-size: .88rem; color: var(--muted);
  padding: .7rem 1rem;
  background: var(--surface); border-radius: 8px;
  border-left: 2px solid var(--red);
}
.errori-item .x { color: var(--red); font-size: 1rem; font-weight: 700; flex-shrink: 0; font-family: var(--fm); }

/* ── PRESE LIST ── */
.prese-list { list-style: none; display: flex; flex-direction: column; gap: .65rem; }
.prese-list li {
  display: flex; align-items: center; gap: .8rem;
  font-size: .9rem; color: var(--muted); padding: .6rem .9rem;
  background: var(--surface); border-radius: 8px;
  border: 1px solid var(--border);
}
.prese-list li::before { content: '●'; color: var(--blue); font-size: .45rem; flex-shrink: 0; }

/* ── OTTIMIZZAZIONE / SPLIT LAYOUT ── */
.split-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }

/* ── FASI TIMELINE ── */
.fasi-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.timeline::before {
  content: ''; position: absolute;
  left: 17px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, var(--brass), var(--blue-pill));
}
.tl-item { display: flex; align-items: flex-start; gap: 1.2rem; padding: 0 0 1.6rem; position: relative; }
.tl-dot {
  width: 36px; height: 36px; min-width: 36px;
  border-radius: 50%; background: var(--blue);
  border: 3px solid var(--bg2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fm); font-weight: 700; font-size: .78rem; z-index: 1;
}
.tl-text h4 { font-size: .9rem; font-weight: 600; margin-bottom: .2rem; }
.tl-text p { font-size: .78rem; color: var(--muted); }

/* ── FOOTER ── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 4rem clamp(1.5rem, 5vw, 5rem);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center; gap: 2rem;
}
.ft-left {}
.ft-school {
  font-family: var(--fm); font-size: .58rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--brass); margin-bottom: .5rem;
}
.ft-name {
  font-family: var(--fd); font-size: 1.8rem; font-weight: 400;
}
.ft-sub { font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.ft-nav { display: flex; flex-direction: column; gap: .3rem; align-items: flex-end; }
.ft-nav a {
  font-family: var(--fm); font-size: .62rem;
  letter-spacing: .08em; color: var(--muted2);
  text-decoration: none; transition: color .2s;
}
.ft-nav a:hover { color: var(--text); }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 960px) {
  .nav-chapters { display: none; }
  .ham-btn { display: flex; }

  .ch-card { grid-template-columns: 80px 1fr 40px; gap: 0 1.5rem; padding: 2rem 0; }
  .ch-card-num { font-size: 3.5rem; }

  .two-col, .errori-wrap, .split-wrap, .fasi-wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .two-col.img-right .col-img { order: 0; }
  .illu-item { grid-template-columns: 1fr; }
  .illu-item:nth-child(even) .illu-text { order: 0; }
  .illu-item:nth-child(even) .illu-img  { order: 0; }
  .passaggio-grid { grid-template-columns: 1fr; }
  .cfg-panel.active { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; }
  .ft-nav { align-items: flex-start; }
}

@media (max-width: 640px) {
  .flow { flex-direction: column; }
  .flow-step { clip-path: none !important; }
  .tri-icons { gap: 2rem; }
  .mat-grid { grid-template-columns: 1fr; }
  .ch-card-arrow { display: none; }
  .chapter-hero-num { display: none; }
}

/* ══════════════════════════════════════════
   NAV BREADCRUMB + CONTACT BUTTON
   ══════════════════════════════════════════ */
.nav-breadcrumb {
  display: flex; align-items: center; gap: .4rem;
  flex-shrink: 0;
}
.nav-bc-link {
  font-family: var(--fm); font-size: .44rem; letter-spacing: .18em;
  color: var(--muted2); text-transform: uppercase; text-decoration: none;
  transition: color .22s;
}
.nav-bc-link:hover { color: var(--brass); }
.nav-bc-sep {
  font-family: var(--fm); font-size: .44rem;
  color: var(--muted2); opacity: .4;
}
.nav-contact-btn {
  font-family: var(--fm); font-size: .46rem; letter-spacing: .18em;
  color: var(--brass); text-transform: uppercase;
  background: transparent;
  border: 1px solid rgba(192,154,98,.35);
  border-radius: 6px; padding: .42rem .9rem;
  cursor: pointer; flex-shrink: 0;
  transition: background .25s, border-color .25s;
}
.nav-contact-btn:hover {
  background: rgba(192,154,98,.08);
  border-color: var(--brass);
}
@media (max-width: 860px) {
  .nav-breadcrumb { display: none; }
}
@media (max-width: 600px) {
  .nav-contact-btn { display: none; }
}

/* ══════════════════════════════════════════
   CONTACT MODAL
   ══════════════════════════════════════════ */
.cucina-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(4,5,8,.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; pointer-events: none;
  transition: opacity .35s;
}
.cucina-modal-overlay.open { opacity: 1; pointer-events: auto; }
.cucina-modal-box {
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  width: 100%; max-width: 520px;
  padding: 2.8rem 2.5rem 2.5rem;
  position: relative;
  transform: translateY(28px) scale(.97);
  transition: transform .38s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
}
.cucina-modal-overlay.open .cucina-modal-box { transform: translateY(0) scale(1); }
.cucina-modal-box::before {
  content: ''; position: absolute; top: 0; left: 2.5rem; right: 2.5rem; height: 2px;
  background: linear-gradient(to right, var(--brass), transparent); border-radius: 2px;
}
.cucina-modal-close {
  position: absolute; top: 1.4rem; right: 1.6rem;
  background: none; border: none; font-family: var(--fm); font-size: .9rem;
  color: rgba(232,226,217,.28); cursor: pointer; transition: color .2s;
  line-height: 1; padding: .3rem .5rem;
  user-select: none !important;
}
.cucina-modal-close:hover { color: var(--text); }
.cucina-modal-eyebrow {
  font-family: var(--fm); font-size: .48rem; letter-spacing: .28em;
  color: rgba(232,226,217,.28); text-transform: uppercase; margin-bottom: .9rem;
}
.cucina-modal-title {
  font-family: var(--fd); font-size: 2rem; font-weight: 600;
  letter-spacing: .06em; color: var(--text); margin-bottom: .4rem;
}
.cucina-modal-title em { font-style: italic; color: var(--brass); }
.cucina-modal-divider {
  width: 40px; height: 1px;
  background: linear-gradient(to right, var(--brass), transparent);
  margin: 1.2rem 0 1.8rem;
}
.cucina-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .cucina-form-row { grid-template-columns: 1fr; } }
.cucina-form-group { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.1rem; }
.cucina-form-group label {
  font-family: var(--fm); font-size: .44rem; letter-spacing: .2em;
  color: rgba(232,226,217,.28); text-transform: uppercase;
}
.cucina-form-group input,
.cucina-form-group textarea {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px; color: var(--text); font-family: var(--fb); font-size: .88rem;
  padding: .75rem 1rem; outline: none;
  transition: border-color .25s, background .25s; resize: none;
  user-select: text !important; -webkit-user-select: text !important;
}
.cucina-form-group input:focus,
.cucina-form-group textarea:focus { border-color: var(--brass); background: rgba(192,154,98,.05); }
.cucina-form-group input::placeholder,
.cucina-form-group textarea::placeholder { color: rgba(232,226,217,.28); }
.cucina-form-group textarea { height: 120px; }
.cucina-form-submit {
  width: 100%; margin-top: .4rem; background: transparent;
  border: 1px solid rgba(192,154,98,.5); border-radius: 8px;
  color: var(--brass); font-family: var(--fm); font-size: .54rem;
  letter-spacing: .22em; text-transform: uppercase; padding: .9rem;
  cursor: pointer; transition: background .25s, border-color .25s;
  user-select: none !important;
}
.cucina-form-submit:hover { background: rgba(192,154,98,.1); border-color: var(--brass); }
.cucina-form-success { display: none; text-align: center; padding: 2rem 0 1rem; }
.cucina-form-success-icon { font-size: 2.2rem; margin-bottom: 1rem; }
.cucina-form-success p { font-family: var(--fd); font-size: 1.2rem; font-style: italic; color: rgba(232,226,217,.55); }
