/* ============================================================
   SHOEPEI — scarpe che tornano alla terra
   Palette: carta grezza · inchiostro terra · sughero ·
            terracotta (accento) · muschio (vita / biodegradabile)
   Type:   Fraunces (display) · Hanken Grotesk (corpo) · IBM Plex Mono (tecnico)
   ============================================================ */

:root {
  --paper:      #f1e9d9;
  --paper-2:    #e7dcc6;
  --paper-3:    #ddd0b6;
  --soil:       #2b2018;
  --soil-2:     #4a3a2c;
  --soil-soft:  #6b584660;
  --cork:       #c6995f;
  --cork-light: #d9bd8a;
  --terra:      #b14a2b;
  --terra-deep: #8f3a20;
  --moss:       #586b40;
  --moss-deep:  #3f4d2c;
  --line:       rgba(43, 32, 24, 0.16);
  --line-soft:  rgba(43, 32, 24, 0.09);

  --ff-display: "Fraunces", Georgia, serif;
  --ff-body:    "Hanken Grotesk", system-ui, sans-serif;
  --ff-mono:    "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-body);
  background: var(--paper);
  color: var(--soil);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--terra); color: var(--paper); }

a { color: inherit; text-decoration: none; }

/* ---------- grain overlay ---------- */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- shared ---------- */
.eyebrow, .section-tag {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--soil-2);
  display: inline-flex; align-items: center; gap: 0.6em;
}
.section-tag { margin-bottom: 1.6rem; color: var(--terra-deep); }
.section-tag.light { color: var(--cork-light); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--terra); display: inline-block; }
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--cork-light);
  box-shadow: 0 0 0 0 rgba(217,189,138,0.6); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(217,189,138,0.55); }
  70% { box-shadow: 0 0 0 9px rgba(217,189,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,189,138,0); }
}

.btn {
  font-family: var(--ff-mono);
  font-size: 0.82rem; letter-spacing: 0.04em;
  padding: 0.95em 1.7em; border-radius: 2px;
  display: inline-block; transition: all 0.35s var(--ease);
  border: 1px solid var(--soil); cursor: pointer;
}
.btn.sm { padding: 0.78em 1.35em; font-size: 0.76rem; }
.btn--solid { background: var(--soil); color: var(--paper); }
.btn--solid:hover { background: var(--terra-deep); border-color: var(--terra-deep); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--soil); }
.btn--ghost:hover { background: var(--soil); color: var(--paper); transform: translateY(-2px); }

h1, h2, h3 { font-family: var(--ff-display); font-weight: 400; line-height: 1.02; letter-spacing: -0.015em; }
em { font-style: italic; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem clamp(1.2rem, 4vw, 3rem);
  mix-blend-mode: multiply;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease);
}
.nav.scrolled {
  background: rgba(241,233,217,0.86);
  backdrop-filter: blur(10px);
  mix-blend-mode: normal;
  padding-top: 0.9rem; padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line-soft);
}
.nav__mark { font-family: var(--ff-display); font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.2rem); }
.nav__links a { font-family: var(--ff-mono); font-size: 0.78rem; letter-spacing: 0.03em; position: relative; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0; background: var(--terra);
  transition: width 0.3s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta { border: 1px solid var(--soil); padding: 0.45em 0.9em; border-radius: 2px; transition: all 0.3s var(--ease); }
.nav__cta:hover { background: var(--soil); color: var(--paper); }
@media (max-width: 720px) { .nav__links a:not(.nav__cta) { display: none; } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 7rem clamp(1.2rem, 4vw, 3rem) 0;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 80% -10%, rgba(217,189,138,0.35), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 70%, var(--paper-3) 100%);
}
.hero__topo {
  position: absolute; inset: 0; color: var(--cork);
  opacity: 0.32; pointer-events: none;
}
.hero__topo svg { width: 100%; height: 100%; }
.hero__inner { position: relative; z-index: 3; max-width: var(--maxw); margin: 0 auto; width: 100%; }

.hero__title {
  font-size: clamp(4.5rem, 17vw, 15rem);
  font-weight: 300; line-height: 0.86; letter-spacing: -0.04em;
  margin: 0.5rem 0 1.8rem; display: flex; flex-wrap: wrap;
}
.hero__title .reveal { display: inline-block; }
.hero__title-alt { font-style: italic; font-weight: 400; color: var(--terra-deep); }

.hero__lede {
  font-family: var(--ff-display); font-size: clamp(1.4rem, 3.2vw, 2.5rem);
  font-weight: 400; line-height: 1.18; max-width: 18ch; margin-bottom: 1.6rem;
}
.hero__sub { font-size: clamp(1rem, 1.5vw, 1.18rem); max-width: 46ch; color: var(--soil-2); margin-bottom: 2.6rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* sediment strata at the very bottom */
.strata { position: absolute; bottom: 0; left: 0; right: 0; height: 64px; display: flex; flex-direction: column; z-index: 2; }
.strata__band { flex: 1; width: 100%; }
.strata .b1 { background: var(--cork-light); opacity: 0.5; }
.strata .b2 { background: var(--cork); opacity: 0.55; }
.strata .b3 { background: var(--moss); opacity: 0.4; }
.strata .b4 { background: var(--soil-2); opacity: 0.5; }

.scrollcue {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%); z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-family: var(--ff-mono); font-size: 0.62rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--soil-2);
}
.scrollcue i { width: 1px; height: 30px; background: var(--soil-2); position: relative; overflow: hidden; }
.scrollcue i::after { content: ""; position: absolute; top: -100%; left: 0; width: 100%; height: 100%; background: var(--terra); animation: drip 2s var(--ease) infinite; }
@keyframes drip { 0% { top: -100%; } 60%,100% { top: 100%; } }

/* ============================================================
   MANIFESTO
   ============================================================ */
.manifesto {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(5rem, 11vw, 9rem) clamp(1.2rem, 4vw, 3rem);
}
.manifesto__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.manifesto__lead {
  font-family: var(--ff-display); font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 400; line-height: 1.22; letter-spacing: -0.01em;
}
.manifesto__lead em { color: var(--terra-deep); }
.manifesto__body { padding-top: 0.6rem; }
.manifesto__body p { font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--soil-2); margin-bottom: 1.4rem; }
.manifesto__body strong { color: var(--soil); font-weight: 600; }
@media (max-width: 820px) { .manifesto__grid { grid-template-columns: 1fr; } }

/* ============================================================
   SCIUPEI 1.0  (dark soil block)
   ============================================================ */
.one {
  background:
    radial-gradient(100% 120% at 90% 0%, rgba(177,74,43,0.18), transparent 50%),
    linear-gradient(180deg, var(--soil) 0%, #241a13 100%);
  color: var(--paper);
  padding: clamp(5rem, 11vw, 9rem) clamp(1.2rem, 4vw, 3rem);
}
.one__head { max-width: var(--maxw); margin: 0 auto 3.5rem; }
.one h2 { font-size: clamp(3rem, 8vw, 6.5rem); font-weight: 300; margin: 1rem 0 1.5rem; }
.one h2 { color: var(--cork-light); }
.one__intro { max-width: 52ch; color: #d9cdb8; font-size: clamp(1.02rem, 1.5vw, 1.2rem); }

.parts {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: rgba(217,189,138,0.16); border: 1px solid rgba(217,189,138,0.16);
}
.part {
  background: linear-gradient(180deg, #241a13, #2b2018);
  padding: clamp(1.8rem, 3vw, 2.8rem); position: relative;
  transition: background 0.4s var(--ease);
}
.part:hover { background: linear-gradient(180deg, #2e221a, #34271d); }
.part__idx { font-family: var(--ff-mono); font-size: 0.74rem; color: var(--terra); letter-spacing: 0.1em; }
.part h3 { font-size: 2rem; margin: 1.2rem 0 0.3rem; color: var(--paper); }
.part__mat { font-family: var(--ff-mono); font-size: 0.82rem; letter-spacing: 0.08em; color: var(--cork-light); text-transform: uppercase; margin-bottom: 1.1rem; }
.part__desc { color: #c9bca6; font-size: 0.98rem; margin-bottom: 1.8rem; }
.part__file {
  font-family: var(--ff-mono); font-size: 0.78rem; color: var(--moss);
  border: 1px solid rgba(88,107,64,0.5); padding: 0.35em 0.7em; border-radius: 2px;
  display: inline-block; color: #9db076;
}
@media (max-width: 760px) { .parts { grid-template-columns: 1fr; } }

.one__note {
  max-width: var(--maxw); margin: 3.2rem auto 0;
  font-family: var(--ff-display); font-style: italic; font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--cork-light); text-align: center;
}
.brace { font-family: var(--ff-mono); color: var(--terra); font-style: normal; }

/* ============================================================
   MATERIALI — ledger
   ============================================================ */
.materials {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(5rem, 11vw, 9rem) clamp(1.2rem, 4vw, 3rem);
}
.materials__intro { margin-bottom: 3.5rem; }
.materials h2 { font-size: clamp(2.2rem, 5.5vw, 4.2rem); font-weight: 300; }
.materials h2 em { color: var(--terra-deep); }

.ledger { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(1rem, 3vw, 2.5rem); align-items: stretch; }
.ledger__col { border: 1px solid var(--line); border-radius: 3px; padding: clamp(1.6rem, 3vw, 2.4rem); background: rgba(255,255,255,0.18); }
.ledger__col.goal { background: linear-gradient(180deg, rgba(88,107,64,0.12), rgba(88,107,64,0.04)); border-color: rgba(88,107,64,0.4); }
.ledger__col header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.ledger__when { font-family: var(--ff-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.ledger__badge {
  font-family: var(--ff-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.35em 0.7em; border-radius: 99px; background: var(--cork); color: var(--soil);
}
.ledger__badge.alt { background: var(--moss); color: var(--paper); }
.ledger__col ul { list-style: none; }
.ledger__col li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px dashed var(--line); }
.ledger__col li span { font-size: 0.9rem; color: var(--soil-2); }
.ledger__col li b { font-family: var(--ff-mono); font-size: 0.92rem; font-weight: 500; text-align: right; }
.ledger__col.goal li b { color: var(--moss-deep); }
.ledger__col > p { margin-top: 1.4rem; font-size: 0.95rem; color: var(--soil-2); }
.ledger__arrow { display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--terra); }

.materials__credo {
  margin-top: 3.5rem; max-width: 40ch;
  font-family: var(--ff-display); font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1.3;
}
.materials__credo em { color: var(--moss-deep); }
@media (max-width: 820px) {
  .ledger { grid-template-columns: 1fr; }
  .ledger__arrow { transform: rotate(90deg); padding: 0.5rem 0; }
}

/* ============================================================
   ROADMAP
   ============================================================ */
.roadmap {
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  padding: clamp(5rem, 11vw, 9rem) clamp(1.2rem, 4vw, 3rem);
  border-top: 1px solid var(--line-soft);
}
.roadmap__head { max-width: var(--maxw); margin: 0 auto 3.5rem; }
.roadmap h2 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 300; margin-top: 1rem; }
.roadmap__intro { max-width: 48ch; color: var(--soil-2); margin-top: 1.2rem; font-size: 1.05rem; }

.timeline { max-width: var(--maxw); margin: 0 auto; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 0; right: 0; top: 26px; height: 2px;
  background: linear-gradient(90deg, var(--cork), var(--moss));
  opacity: 0.5;
}
.timeline__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 3vw, 2rem); }
.stage { position: relative; padding-top: 64px; }
.stage__node {
  position: absolute; top: 16px; left: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--soil); display: grid; place-items: center;
}
.stage__node::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--soil); }
.stage.is-now .stage__node { border-color: var(--terra); box-shadow: 0 0 0 5px rgba(177,74,43,0.16); }
.stage.is-now .stage__node::after { background: var(--terra); }
.stage.is-done .stage__node::after { background: var(--cork); }
.stage.is-goal .stage__node { border-color: var(--moss); }
.stage.is-goal .stage__node::after { background: var(--moss); }

.stage__when { font-family: var(--ff-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soil-2); }
.stage.is-now .stage__when { color: var(--terra-deep); }
.stage h3 { font-size: 1.5rem; margin: 0.5rem 0 0.7rem; }
.stage p { font-size: 0.94rem; color: var(--soil-2); }
.stage__tag {
  display: inline-block; margin-top: 1rem; font-family: var(--ff-mono); font-size: 0.64rem;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 0.3em 0.65em; border-radius: 99px;
  border: 1px solid var(--line); color: var(--soil-2);
}
.stage.is-now .stage__tag { background: var(--terra); color: var(--paper); border-color: var(--terra); }
.stage.is-goal .stage__tag { background: var(--moss); color: var(--paper); border-color: var(--moss); }

@media (max-width: 860px) {
  .timeline::before { left: 10px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .timeline__row { grid-template-columns: 1fr; gap: 2.4rem; }
  .stage { padding-top: 0; padding-left: 44px; }
  .stage__node { top: 2px; left: 0; }
}

/* ============================================================
   OPEN SOURCE
   ============================================================ */
.open {
  background:
    radial-gradient(90% 120% at 10% 0%, rgba(88,107,64,0.22), transparent 55%),
    linear-gradient(180deg, #232c1c 0%, #1b2316 100%);
  color: var(--paper);
  padding: clamp(5rem, 11vw, 9rem) clamp(1.2rem, 4vw, 3rem);
}
.open__head { max-width: var(--maxw); margin: 0 auto 3.5rem; }
.open h2 { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 300; color: var(--paper); margin: 1rem 0 1.2rem; }
.open__intro { color: #cdd4be; max-width: 46ch; font-size: 1.1rem; }

.paths { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 2rem); }
.path {
  border: 1px solid rgba(205,212,190,0.22); border-radius: 4px;
  padding: clamp(1.8rem, 3.5vw, 3rem); background: rgba(0,0,0,0.16);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.path:hover { transform: translateY(-5px); background: rgba(0,0,0,0.28); border-color: rgba(205,212,190,0.4); }
.path__num { font-family: var(--ff-mono); font-size: 0.74rem; color: var(--cork-light); letter-spacing: 0.1em; }
.path h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0.8rem 0 1rem; color: var(--paper); }
.path > p { color: #c4ccb6; margin-bottom: 1.6rem; }
.path__list { list-style: none; margin-bottom: 2rem; }
.path__list li { font-family: var(--ff-mono); font-size: 0.82rem; color: #aeb89c; padding: 0.55rem 0; border-bottom: 1px solid rgba(205,212,190,0.12); position: relative; padding-left: 1.4rem; }
.path__list li::before { content: "→"; position: absolute; left: 0; color: var(--cork-light); }
.path .btn--solid { background: var(--cork-light); color: var(--soil); border-color: var(--cork-light); }
.path .btn--solid:hover { background: var(--paper); border-color: var(--paper); }
.path .btn--ghost { color: var(--paper); border-color: rgba(241,233,217,0.5); }
.path .btn--ghost:hover { background: var(--paper); color: var(--soil); border-color: var(--paper); }
@media (max-width: 760px) { .paths { grid-template-columns: 1fr; } }

.open__test {
  max-width: var(--maxw); margin: 3.5rem auto 0; text-align: center;
  font-family: var(--ff-display); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.35; color: var(--cork-light);
}

/* ============================================================
   CLOSING CREDO
   ============================================================ */
.credo {
  min-height: 88svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: clamp(4rem, 10vw, 8rem) 1.2rem;
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(217,189,138,0.4), transparent 60%),
    linear-gradient(180deg, var(--paper-3), var(--paper-2));
}
.credo__mono { font-family: var(--ff-mono); font-size: 0.78rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--terra-deep); margin-bottom: 1.8rem; }
.credo__big { font-size: clamp(3.2rem, 12vw, 9rem); font-weight: 300; line-height: 0.92; }
.credo__big em { color: var(--terra-deep); }
.credo__sub { font-family: var(--ff-display); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.9rem); margin-top: 1.6rem; color: var(--soil-2); }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { background: var(--soil); color: var(--paper); padding: clamp(3.5rem, 7vw, 6rem) clamp(1.2rem, 4vw, 3rem) 2rem; }
.foot__top { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.2fr 2fr; gap: clamp(2rem, 5vw, 4rem); padding-bottom: 3rem; border-bottom: 1px solid rgba(241,233,217,0.16); }
.foot__mark { font-family: var(--ff-display); font-size: 2rem; font-weight: 500; }
.foot__brand p { color: #c9bca6; font-size: 0.95rem; margin-top: 0.8rem; }
.foot__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.foot__cols h4 { font-family: var(--ff-mono); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--cork-light); margin-bottom: 1.1rem; font-weight: 500; }
.foot__cols a, .foot__cols span { display: block; color: #c9bca6; font-size: 0.9rem; margin-bottom: 0.6rem; transition: color 0.3s var(--ease); }
.foot__cols a:hover { color: var(--paper); }
.foot__bottom { max-width: var(--maxw); margin: 1.8rem auto 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.8rem; font-family: var(--ff-mono); font-size: 0.74rem; letter-spacing: 0.05em; color: #9b8c76; }
@media (max-width: 760px) { .foot__top { grid-template-columns: 1fr; } .foot__cols { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   REVEAL animations
   ============================================================ */
/* contenuto visibile di default; nascosto solo se il JS è attivo (.js) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
/* hero load stagger */
.js .hero .reveal { transition-delay: calc(var(--d, 0) * 0.09s + 0.15s); }
.js .hero .reveal[data-d] { will-change: opacity, transform; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
