/* =====================================================
   Sand.B — main.css
   Design system + all sections
   ===================================================== */

/* ── FONTS ─────────────────────────────────────────── */
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/Satoshi-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/Satoshi-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/Satoshi-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ── CSS VARIABLES ─────────────────────────────────── */
:root {
  --coral:       #EF5349;
  --coral-dark:  #D03E38;
  --coral-pale:  #FDF0EF;
  --cream:       #F8F4EE;
  --cream-2:     #F2EDE4;
  --white:       #FEFCF8;
  --dark:        #111009;
  --dark-2:      #1E1A14;
  --mid:         #3A342C;
  --muted:       #8C8278;
  --border:      rgba(17,16,9,0.10);
  --border-soft: rgba(17,16,9,0.06);

  --sanj:        #2A5CFF;
  --sanj-pale:   #EEF2FF;

  /* Feedback colors */
  --danger:      #B91C1C;
  --danger-bg:   #FFF0F0;
  --danger-border:#FCA5A5;

  --font:        'Satoshi', system-ui, -apple-system, sans-serif;
  --font-serif:  'Instrument Serif', Georgia, serif;
  --expo:        cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);

  --container:   1280px;
  --gutter:      clamp(20px, 5vw, 64px);
  --sp-section:  clamp(40px, 5vw, 72px);
  --radius:      14px;
  --radius-sm:   8px;
}

/* ── RESET ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
/* viewport safety — layout viewport never exceeds visible width */
html { overflow-x: clip; max-width: 100%; }
/* scroll-behavior handled by JS to avoid double-scroll conflicts */
body {
  background: var(--cream);
  color: var(--dark);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.55;
  overflow-x: hidden;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }

/* Grain texture */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none; opacity: 0.03;
  will-change: transform;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── A11Y ──────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -40px; left: 16px;
  background: var(--dark); color: #fff;
  padding: 10px 16px; z-index: 10000;
  font-size: 14px; font-weight: 500; border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── REVEAL ANIMATIONS ─────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--expo), transform 0.65s var(--expo);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.10s; }
.reveal[data-delay="2"] { transition-delay: 0.20s; }
.reveal[data-delay="3"] { transition-delay: 0.30s; }
.reveal[data-delay="4"] { transition-delay: 0.40s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── GLOBAL COMPONENTS ─────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-section) var(--gutter);
}
.eyebrow {
  display: block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px;
}
.section-h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.1; margin-bottom: 14px;
}
.section-h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.section-sub {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--mid); max-width: 600px;
  margin-bottom: 48px; line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600;
  transition: background 0.2s var(--ease-out), transform 0.15s var(--ease-out), box-shadow 0.2s;
  white-space: nowrap; cursor: pointer;
}
.btn-primary {
  background: var(--coral); color: var(--white); border: none;
}
@media (hover: hover) {
  .btn-primary:hover { background: var(--coral-dark); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(239,83,73,.28); }
}
.btn-ghost {
  background: transparent; color: var(--dark);
  border: 1.5px solid var(--border);
}
@media (hover: hover) {
  .btn-ghost:hover { border-color: var(--dark); transform: translateY(-1px); }
}
.btn-white {
  background: var(--white); color: var(--dark); border: none;
}
@media (hover: hover) {
  .btn-white:hover { background: var(--cream); transform: translateY(-1px); }
}
.btn-ghost-white {
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,.4);
}
@media (hover: hover) {
  .btn-ghost-white:hover { border-color: rgba(255,255,255,.8); transform: translateY(-1px); }
}
.btn:active { transform: scale(0.98) !important; }

/* Dual-label CTA (primary label + micro sub-label stacked) */
.btn-dual {
  flex-direction: column;
  gap: 2px;
  padding: 13px 26px;
  line-height: 1.15;
}
.btn-dual .btn-label {
  font-size: 15px; font-weight: 700;
  letter-spacing: -0.01em;
}
.btn-dual .btn-sub {
  font-size: 11.5px; font-weight: 500;
  opacity: 0.72;
  letter-spacing: 0.01em;
}

/* ── SCROLL MARGIN (fixed header offset) ──────────────── */
#filosofia, #per-chi, #partnership, #inizia-ora, #faq, #footer-format {
  scroll-margin-top: 72px;
}

/* ── HEADER ─────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  height: 64px;
  transition: background 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s;
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto; height: 100%;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.site-header.scrolled {
  background: rgba(248,244,238,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

/* Logo swap */
.logo-link { display: flex; align-items: center; }
.logo-white,
.logo-dark  { height: 28px; width: auto; }
.site-header:not(.scrolled) .logo-dark  { display: none; }
.site-header.scrolled       .logo-white { display: none; }

/* Desktop nav */
.site-nav {
  display: flex; align-items: center; gap: 28px;
  margin-left: auto;
}
.site-nav a {
  font-size: 14px; font-weight: 500;
  transition: color 0.2s;
}
.site-header:not(.scrolled) .site-nav a { color: rgba(255,255,255,.85); }
.site-header:not(.scrolled) .site-nav a:hover { color: #fff; }
.site-header.scrolled .site-nav a { color: var(--mid); }
.site-header.scrolled .site-nav a:hover { color: var(--dark); }

/* Nav CTA */
.nav-cta {
  display: inline-flex; align-items: center;
  padding: 9px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer; margin-left: 8px;
}
.site-header:not(.scrolled) .nav-cta {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.35);
}
.site-header:not(.scrolled) .nav-cta:hover {
  background: rgba(255,255,255,.25);
}
.site-header.scrolled .nav-cta {
  background: var(--coral); color: #fff; border: none;
}
.site-header.scrolled .nav-cta:hover {
  background: var(--coral-dark);
}

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 12px; margin-left: 4px;
  min-width: 44px; min-height: 44px;
  cursor: pointer;
}
.hamburger span {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  transition: background 0.2s, transform 0.3s var(--expo), opacity 0.2s;
}
.site-header:not(.scrolled) .hamburger span { background: #fff; }
.site-header.scrolled .hamburger span { background: var(--dark); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  position: absolute; top: 64px; left: 0; right: 0;
  background: var(--cream);
  padding: 16px var(--gutter) 24px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.nav-mobile-link {
  font-size: 18px; font-weight: 600;
  padding: 10px 0; color: var(--dark);
  border-bottom: 1px solid var(--border-soft);
}
.nav-mobile-cta {
  margin-top: 16px; padding: 14px;
  background: var(--coral); color: #fff;
  border-radius: var(--radius); font-size: 15px; font-weight: 700;
  text-align: center;
}

/* ── HERO ───────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100svh;
  background: var(--coral);
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}

/* Hero decorative geometries — left-asymmetric composition respects copy block on the left */
#hero-stage {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.stage-obj {
  position: absolute;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.9s var(--expo), transform 1.1s var(--expo);
  will-change: opacity, transform;
}
.stage-obj.in {
  opacity: 1;
  transform: scale(1);
}
/* Two stacked columns — right edge */
.stage-col-a {
  width: 80px; height: clamp(160px, 22vh, 240px);
  background: linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.04) 100%);
  border-radius: 8px 8px 0 0;
  bottom: 0; right: 7%;
  transition-delay: 0.25s;
}
.stage-col-b {
  width: 56px; height: clamp(120px, 17vh, 180px);
  background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.03) 100%);
  border-radius: 6px 6px 0 0;
  bottom: 0; right: calc(7% + 96px);
  transition-delay: 0.35s;
}
/* Hollow circle — upper right */
.stage-arch {
  width: clamp(120px, 14vw, 180px); height: clamp(120px, 14vw, 180px);
  border: clamp(14px, 1.6vw, 22px) solid rgba(255,255,255,.18);
  border-radius: 50%;
  top: 12%; right: 12%;
  transition-delay: 0.15s;
}
/* Half-round bust — right mid */
.stage-bust {
  width: 54px; height: 72px;
  background: rgba(255,255,255,.1);
  border-radius: 50% 50% 0 0;
  top: 44%; right: 4%;
  transition-delay: 0.45s;
}
/* Dome arc — upper right zone, offset from arch */
.stage-dome {
  width: 110px; height: 55px;
  border: 10px solid rgba(255,255,255,.1);
  border-bottom: none;
  border-radius: 50% 50% 0 0;
  top: 28%; right: 32%;
  transition-delay: 0.55s;
}
/* Triangle — mid-right */
.stage-cone {
  width: 0; height: 0;
  border-left: 34px solid transparent;
  border-right: 34px solid transparent;
  border-bottom: 80px solid rgba(255,255,255,.11);
  bottom: 24%; right: 22%;
  transition-delay: 0.65s;
}
/* Sphere with radial highlight — far right */
.stage-sphere {
  width: 68px; height: 68px;
  background: radial-gradient(circle at 38% 36%, rgba(255,255,255,.32) 0%, rgba(255,255,255,.05) 75%);
  border-radius: 50%;
  top: 62%; right: 44%;
  transition-delay: 0.75s;
}
/* Tablet: reduce density */
@media (max-width: 900px) {
  .stage-dome, .stage-cone { display: none; }
  .stage-arch { top: 8%; right: 6%; }
  .stage-col-a { right: 4%; }
  .stage-col-b { right: calc(4% + 80px); }
}
/* Mobile: keep only structural anchors */
@media (max-width: 600px) {
  .stage-bust, .stage-sphere { display: none; }
  .stage-arch { width: 100px; height: 100px; border-width: 12px; }
  .stage-col-a { width: 60px; }
  .stage-col-b { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-obj { transition: none; opacity: 1; transform: none; }
}
.hero-inner {
  max-width: 720px;
  margin: 0;
  padding: 96px var(--gutter) 64px;
  position: relative; z-index: 1;
}
.hero-eyebrow {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}
.hero-h1 {
  font-size: clamp(48px, 7.5vw, 104px);
  font-weight: 700; letter-spacing: -0.04em;
  line-height: 0.98; color: #fff;
  margin-bottom: 22px;
}
.hero-h1 em {
  font-family: var(--font-serif);
  font-style: italic; font-weight: 400;
  color: #fff;
}
.hero-sub {
  font-size: clamp(15px, 1.25vw, 18px);
  color: rgba(255,255,255,.96);
  max-width: 480px; line-height: 1.55;
  margin-bottom: 28px;
}
@media (max-width: 768px) {
  #hero { justify-content: center; }
  .hero-inner {
    padding-top: 80px; padding-bottom: 48px;
    text-align: center;
    margin: 0 auto;
  }
  .hero-inner .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-inner .hero-chips { justify-content: center; }
  .hero-inner .hero-cta-row { justify-content: center; }
  .hero-h1 { font-size: clamp(56px, 14.5vw, 120px); }
}
/* Hero-scoped button overrides (coral bg) */
#hero .btn-primary {
  background: var(--white); color: var(--coral);
}
@media (hover: hover) {
  #hero .btn-primary:hover { background: var(--cream); color: var(--coral-dark); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
}
#hero .btn-ghost {
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,.55);
}
@media (hover: hover) {
  #hero .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
}
/* Chips on coral */
#hero .chip {
  background: rgba(255,255,255,.14);
  color: rgba(255,255,255,.95);
  border: 1px solid rgba(255,255,255,.28);
}
#hero .chip-sanj {
  background: rgba(255,255,255,.2);
  color: #fff;
  border-color: rgba(255,255,255,.35);
}

/* Format chips */
.hero-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 28px;
}
.chip {
  display: inline-flex; align-items: center;
  padding: 7px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.75);
  border: 1px solid rgba(255,255,255,.15);
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.chip-sanj {
  background: rgba(42,92,255,.2);
  color: #a5b4fc;
  border-color: rgba(42,92,255,.35);
}
.chip-more {
  color: rgba(255,255,255,.55);
  border-color: rgba(255,255,255,.1);
}
@media (hover: hover) {
  .chip:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); }
  .chip-sanj:hover { background: rgba(42,92,255,.3); }
}

.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Watermark */
.hero-watermark {
  position: absolute; right: -2vw; bottom: -8vw;
  font-size: clamp(180px, 30vw, 400px);
  font-weight: 900; color: rgba(255,255,255,.03);
  line-height: 1; pointer-events: none; user-select: none;
  letter-spacing: -0.05em;
}

/* Scroll hint */
.scroll-hint {
  position: absolute; bottom: 32px; left: var(--gutter);
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 6px;
}
.scroll-hint span {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,.6);
}
.scroll-bar {
  width: 1px; height: 40px; background: rgba(255,255,255,.55);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(0.6); }
}

/* ── FILOSOFIA ──────────────────────────────────────── */
#filosofia { background: var(--cream); }

.filosofia-lead {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.08; max-width: 680px;
  margin-bottom: 56px;
}
.filosofia-lead em {
  font-family: var(--font-serif);
  font-style: italic; font-weight: 400;
}

.filosofia-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-bottom: 56px;
}
.filo-block {
  padding: 28px 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
}
.filo-num {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--coral);
  margin-bottom: 6px;
}
.filo-label {
  font-size: 13px; font-weight: 600;
  color: var(--muted); margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.filo-text { font-size: 14.5px; color: var(--mid); line-height: 1.65; }
.filo-text strong { color: var(--dark); }

/* 4 verbi */
.metodo-verbi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px; margin-bottom: 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.metodo-verb {
  padding: 24px 20px;
  background: var(--white);
  border-right: 1px solid var(--border-soft);
  transition: background 0.2s;
}
.metodo-verb:last-child { border-right: none; }
@media (hover: hover) {
  .metodo-verb:hover { background: var(--coral-pale); }
}
.verb-num { font-size: 10px; font-weight: 700; color: var(--coral); margin-bottom: 4px; letter-spacing: 0.1em; }
.verb-name { font-size: 18px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.02em; }
.verb-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* PwC quote — typographic, no side-stripe */
.filosofia-quote {
  position: relative;
  padding: clamp(48px, 6vw, 72px) clamp(28px, 5vw, 64px) clamp(36px, 5vw, 56px);
  background: var(--dark-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.filosofia-quote::before {
  content: "\201C"; /* curly opening quote */
  position: absolute;
  top: clamp(-24px, -1vw, -12px); left: clamp(16px, 3vw, 40px);
  font-family: var(--font-serif);
  font-size: clamp(140px, 18vw, 240px);
  font-style: italic;
  line-height: 1;
  color: var(--coral);
  pointer-events: none; user-select: none;
}
.filosofia-quote blockquote {
  position: relative;
  font-size: clamp(20px, 2.2vw, 28px);
  font-family: var(--font-serif);
  font-style: italic; color: #fff;
  line-height: 1.45; margin-bottom: 20px;
  max-width: 62ch;
}
.quote-source {
  position: relative;
  font-size: 13px; color: rgba(255,255,255,.6);
  letter-spacing: 0.01em;
}
.quote-source strong { color: rgba(255,255,255,.85); font-weight: 600; }

/* ── PER CHI ─────────────────────────────────────────── */
#per-chi { background: var(--white); }

.perchi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.perchi-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
@media (hover: hover) {
  .perchi-card:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,.08);
    transform: translateY(-3px);
  }
}
.perchi-card-head {
  background: var(--cream-2);
  padding: 28px 24px 20px;
  display: flex; align-items: flex-end; gap: 12px;
}
.perchi-num {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--coral);
}
.perchi-label {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
}
.perchi-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.perchi-card-body h3 {
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.25;
}
.perchi-card-body > p { font-size: 14px; color: var(--mid); line-height: 1.6; }
.perchi-list {
  list-style: none; padding: 0; flex: 1;
  display: flex; flex-direction: column; gap: 7px;
}
.perchi-list li {
  font-size: 13.5px; color: var(--mid);
  padding-left: 16px; position: relative;
}
.perchi-list li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--coral); font-size: 11px; top: 1px;
}
.perchi-cta {
  width: 100%; padding: 13px;
  background: var(--coral); color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700;
  transition: background 0.2s, transform 0.15s;
  margin-top: 4px;
}
@media (hover: hover) {
  .perchi-cta:hover { background: var(--coral-dark); transform: translateY(-1px); }
}

/* ── PARTNERSHIP ─────────────────────────────────────── */
#partnership { background: var(--cream); }

.partner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px; margin-top: 0; margin-bottom: 28px;
  align-items: stretch;
}
.partner-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
@media (hover: hover) {
  .partner-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,.07);
    transform: translateY(-2px);
  }
}
.partner-card--main {
  border-color: rgba(239,83,73,.2);
}

/* Card inner — default stacked (Innovation Island) */
.partner-card-inner {
  display: flex; flex-direction: column;
  height: 100%;
}

/* Logo panel shared base */
.partner-logo-panel {
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  overflow: hidden;
  position: relative;
}
.partner-logo-panel img {
  width: auto; height: auto;
  object-fit: contain;
  position: relative; z-index: 1;
}
.partner-logo-placeholder {
  font-size: 22px; font-weight: 800;
  color: var(--muted); letter-spacing: -0.05em;
}

/* Logo panels */
.partner-card--main .partner-logo-panel,
.partner-card--stacked .partner-logo-panel {
  border-bottom: 1px solid var(--border-soft);
  min-height: 140px;
  background: var(--cream);
}

/* Both cards — image fills panel */
.partner-card--main .partner-logo-panel,
.partner-card--stacked .partner-logo-panel {
  padding: 0;
  aspect-ratio: 2 / 1;
  min-height: 0;
}
/* II: cover (photo, crop OK) */
.partner-logo-panel--horizontal img {
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  object-fit: cover;
  position: absolute; inset: 0;
}
/* CD: contain (logo must not be cropped), panel bg matches image bg */
.partner-card--stacked .partner-logo-panel {
  background: #E6E4DF;
}
.partner-logo-panel--vertical img {
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  object-fit: contain;
  position: absolute; inset: 0;
}

.partner-body {
  flex: 1; min-width: 0;
  padding: 28px;
  display: flex; flex-direction: column;
}
.partner-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.partner-header h3 {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.02em;
}
.partner-badge {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--coral-pale); color: var(--coral-dark);
  padding: 3px 8px; border-radius: 999px;
}
.partner-body p {
  font-size: 14px; color: var(--mid);
  line-height: 1.65; margin-bottom: 12px;
}
.partner-meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin-bottom: 14px;
}
.partner-meta-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted);
}
.partner-meta-item svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
  color: var(--coral);
}
.partner-link {
  font-size: 13px; font-weight: 600;
  color: var(--coral);
  transition: color 0.2s;
}
@media (hover: hover) {
  .partner-link:hover { color: var(--coral-dark); }
}
.partner-note {
  font-size: 14px; color: var(--mid);
  text-align: center; margin-top: 4px;
}
.partner-cta-inline {
  color: var(--coral); font-weight: 600; font-size: 14px;
  text-decoration: underline; text-underline-offset: 2px;
  transition: color 0.2s;
}
@media (hover: hover) {
  .partner-cta-inline:hover { color: var(--coral-dark); }
}

/* ── INIZIA ORA ──────────────────────────────────────── */
#inizia-ora .eyebrow { color: rgba(255,255,255,.55); }
#inizia-ora {
  background: var(--coral);
  position: relative; overflow: hidden;
}
#inizia-ora .container {
  display: flex; justify-content: center;
}
.inizia-inner {
  max-width: 640px; width: 100%;
  text-align: center;
}
.inizia-h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700; letter-spacing: -0.035em;
  line-height: 1.05; color: var(--white);
  margin-bottom: 16px;
}
.inizia-sub {
  font-size: 17px; color: rgba(255,255,255,.75);
  margin-bottom: 32px; line-height: 1.55;
}
.inizia-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 20px; }
.trust-line { font-size: 12.5px; color: rgba(255,255,255,.55); }

/* ── FAQ ─────────────────────────────────────────────── */
#faq { background: var(--white); }

.faq-list { margin-top: 40px; max-width: 760px; }
.faq-item { background: var(--white); border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; display: flex; align-items: center;
  justify-content: space-between; padding: 20px 0;
  font-size: clamp(15px, 1.3vw, 18px); font-weight: 500;
  text-align: left; color: var(--dark); gap: 16px;
  background: none; border: none; cursor: pointer;
  transition: color 0.2s;
}
@media (hover: hover) {
  .faq-question:hover { color: var(--coral); }
}
.faq-toggle {
  flex-shrink: 0; width: 28px; height: 28px;
  border-radius: 50%; background: var(--coral);
  color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 18px; font-weight: 400;
  transition: transform 0.35s var(--expo);
  line-height: 1;
}
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--expo);
}
.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-answer-inner {
  overflow: hidden;
  min-height: 0;
  font-size: 14.5px; line-height: 1.7;
  color: var(--mid); max-width: 600px;
}
.faq-item.open .faq-answer-inner { padding: 0 0 20px; }
@media (prefers-reduced-motion: reduce) {
  .faq-answer { transition: none; }
}

/* ── FOOTER ─────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: rgba(248,244,238,.65);
  padding: 64px var(--gutter) 32px;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(248,244,238,.1);
}
.footer-brand img { margin-bottom: 16px; }
.footer-logo { height: 32px; width: auto; display: block; }
.footer-brand p { font-size: 13.5px; line-height: 1.6; max-width: 280px; }
.footer-tagline { font-size: 11.5px; font-style: italic; color: rgba(248,244,238,.35); margin-top: 8px; }
.footer-col h5 {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--white); margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; font-size: 13px; }
.footer-col a { transition: color 0.2s; }
@media (hover: hover) {
  .footer-col a:hover { color: var(--coral); }
}
.footer-bottom {
  max-width: var(--container);
  margin: 24px auto 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px;
  color: rgba(248,244,238,.55);
}
.footer-bottom a { color: rgba(248,244,238,.7); transition: color 0.2s; }
.footer-bottom a:hover { color: var(--coral); }

/* ── COOKIE BANNER — granulare (Garante IT 2021) ───────────────── */
.cookie-banner {
  position: fixed; bottom: 20px; right: 20px;
  max-width: 400px; padding: 20px 22px;
  background: var(--dark); color: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.4);
  z-index: 800; font-size: 13px; line-height: 1.6;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner { max-height: 70vh; overflow-y: auto; }
.cookie-view[hidden] { display: none; }

.cookie-title {
  font-size: 15px; font-weight: 700;
  margin: 0 0 8px; color: var(--white);
  letter-spacing: -0.01em;
}
.cookie-text { margin: 0 0 14px; color: rgba(255,255,255,.72); }
.cookie-banner a { color: var(--coral); font-weight: 600; text-decoration: underline; }

.cookie-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 12px;
}
.cookie-btn {
  padding: 9px 16px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.cookie-btn-accept    { background: var(--coral); color: #fff; border: 1px solid var(--coral); }
.cookie-btn-accept:hover { background: var(--coral-dark); border-color: var(--coral-dark); }
.cookie-btn-decline   {
  background: transparent; color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.22);
}
.cookie-btn-decline:hover { border-color: rgba(255,255,255,.45); color: #fff; }
.cookie-btn-customize {
  background: transparent; color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.22);
}
.cookie-btn-customize:hover { border-color: rgba(255,255,255,.45); color: #fff; }

/* Granular view — categorie */
.cookie-category {
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.cookie-category:first-of-type { border-top: none; }
.cookie-category-head {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
}
.cookie-category-name {
  font-size: 13px; font-weight: 600; color: var(--white);
}
.cookie-required { color: rgba(255,255,255,.45); font-weight: 400; font-size: 11.5px; }
.cookie-category-desc {
  margin: 4px 0 0 26px;
  font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.5;
}
.cookie-toggle {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 4px; background: transparent;
  cursor: pointer; position: relative; flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.cookie-toggle:checked { background: var(--coral); border-color: var(--coral); }
.cookie-toggle:checked::after {
  content: ''; position: absolute;
  left: 4px; top: 0px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.cookie-toggle:disabled { opacity: 0.5; cursor: not-allowed; }

/* Footer — riapertura preferenze */
.footer-cookie-reopen {
  background: none; border: none; padding: 0;
  color: inherit; font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(248,244,238,.3);
}
.footer-cookie-reopen:hover { color: var(--coral); }
.footer-piva { opacity: 0.8; }

/* Mobile */
@media (max-width: 600px) {
  .cookie-banner { bottom: 12px; right: 12px; left: 12px; max-width: none; }
}

/* ── FORM CONSENT — GDPR art. 13 ─────────────────────────────── */
.form-consent { margin-top: 4px; }
.form-consent-label {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer;
}
.form-consent-input {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; flex-shrink: 0;
  margin-top: 2px;
  border: 1.5px solid rgba(17,16,9,.25);
  border-radius: 4px; background: transparent;
  cursor: pointer; position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.form-consent-input:checked { background: var(--coral); border-color: var(--coral); }
.form-consent-input:checked::after {
  content: ''; position: absolute;
  left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.form-consent-input:focus-visible {
  outline: 2px solid var(--coral); outline-offset: 2px;
}
.form-consent-text {
  font-size: 13px; line-height: 1.5; color: var(--mid);
}
.form-consent-text a { color: var(--coral); text-decoration: underline; font-weight: 600; }
.form-consent-help {
  margin: 6px 0 0 28px;
  font-size: 11.5px; color: var(--muted); line-height: 1.5;
}
.form-consent-help a { color: var(--muted); text-decoration: underline; }

/* ── MODAL ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(17,16,9,.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: var(--white);
  border-radius: 20px;
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  padding: 40px 40px 32px;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,.25);
}
.modal-close {
  position: absolute; top: 16px; right: 20px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--cream); font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--border); color: var(--dark); }
.modal-progress {
  height: 3px; background: var(--border);
  border-radius: 999px; overflow: hidden;
  margin-bottom: 28px;
}
.modal-progress-fill {
  height: 100%; background: var(--coral);
  border-radius: 999px;
  transition: width 0.4s var(--expo);
}
.modal-title {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.025em; margin-bottom: 8px;
}
.modal-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }

/* Tipo selection */
.tipo-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tipo-card {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 4px; padding: 18px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-align: left; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.tipo-card:hover { border-color: var(--coral); background: var(--coral-pale); transform: translateY(-1px); }
.tipo-card.selected { border-color: var(--coral); background: var(--coral-pale); }
.tipo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  color: var(--coral);
  margin-bottom: 4px;
}
.tipo-icon svg { width: 100%; height: 100%; }
.tipo-label { font-size: 14px; font-weight: 700; color: var(--dark); }
.tipo-sub { font-size: 12px; color: var(--muted); }

/* Form */
.modal-form { display: flex; flex-direction: column; gap: 0; }
.form-group { margin-bottom: 12px; }
.form-input {
  width: 100%; padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 14.5px; font-family: var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  outline: none; border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(239,83,73,.08);
}
.form-input::placeholder { color: var(--muted); }
textarea.form-input { resize: vertical; min-height: 80px; }
.form-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; gap: 12px;
}
.btn-back {
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  transition: color 0.2s;
}
.btn-back:hover { color: var(--dark); }
.btn-submit { flex-shrink: 0; }
.form-trust { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 12px; }

/* Success state */
.modal-success { text-align: center; padding: 16px 0; }
.success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--coral); color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.success-icon svg { width: 28px; height: 28px; }

/* ── MODAL EXTRAS ────────────────────────────────────── */
.tipo-grid--3 { grid-template-columns: repeat(3, 1fr); }
.tipo-partnership-link {
  margin-top: 14px; font-size: 13px;
  color: var(--muted); text-align: center;
}
.form-error {
  background: var(--danger-bg); border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 13.5px; color: var(--danger);
  margin-bottom: 14px;
}
.form-error[hidden] { display: none; }

/* Inizia Ora — italic on scarcity heading */
.inizia-h2 em {
  font-family: var(--font-serif);
  font-style: italic; font-weight: 400;
}

/* Filosofia — differentiate verbi block visually */
.metodo-verbi .verb-num {
  font-size: 9px; opacity: 0.6;
  font-weight: 500; letter-spacing: 0.05em;
}

/* ── LINE OVERLAY (user-traced path, scroll-cumulative draw) ── */
main#main { position: relative; }
.line-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.line-overlay svg {
  width: 100%; height: 100%;
  display: block;
  overflow: visible;
}
.line-overlay #main-line {
  filter: drop-shadow(0 1px 0.5px rgba(0,0,0,0.08));
}
/* Content carpet coverage: everything above line (z 1).
   Use section containers + all visible content as stacking hooks. */
#hero .container, #filosofia .container, #per-chi .container,
#partnership .container, #inizia-ora .container, #faq .container,
.site-footer,
.hero-inner,
.filosofia-blocks, .filo-block,
.metodo-verbi, .metodo-verb,
.filosofia-quote,
.perchi-grid, .perchi-card, .perchi-card-head, .perchi-card-body,
.partner-grid, .partner-card, .partner-card-inner, .partner-logo-panel, .partner-body, .partner-note,
.inizia-inner, .inizia-actions,
.faq-list, .faq-item, .faq-question, .faq-answer,
.filosofia-lead, .section-h2, .section-sub, .eyebrow, .inizia-h2,
.hero-chips, .chip, .hero-cta-row {
  position: relative;
  z-index: 10;
}
.hero-watermark, .scroll-hint { z-index: 10; }
/* Chips on hero have translucent bg — promote opacity via a backing */
.chip { background: rgba(255,255,255,.18); }
#hero .chip { backdrop-filter: blur(2px); }
@media (max-width: 767px) {
  .line-overlay { display: none; }
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .partner-grid { grid-template-columns: 1fr; }
  .metodo-verbi { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .filosofia-blocks { grid-template-columns: 1fr; }
  .perchi-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .site-nav, .nav-cta { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr !important; gap: 28px !important; }
  .tipo-grid { grid-template-columns: 1fr; }
  .modal-box { padding: 28px 24px 24px; }
  .metodo-verbi { grid-template-columns: 1fr 1fr; }
  .inizia-actions { flex-direction: column; }
  .filosofia-quote { padding: 28px 24px; }
}

/* ── MOBILE VIEWPORT SAFETY (global) ─────────────────── */
/* override inline grid styles on footer at tablet too */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr !important; gap: 28px !important; }
}

/* form inputs: never exceed container, prevent iOS auto-zoom */
.form-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 640px) {
  .form-input { font-size: 16px; }
  textarea.form-input { min-height: 90px; }
  .modal-overlay { padding: 12px; }
  .modal-box {
    width: min(100% - 24px, 520px);
    max-width: calc(100vw - 24px);
    margin: 0 auto;
    padding: 26px 20px 22px;
    box-sizing: border-box;
  }
  .form-nav { gap: 10px; flex-wrap: wrap; }
  .tipo-grid, .tipo-grid--3 { grid-template-columns: 1fr !important; }
}
