/* Lo scavo allo scroll */
:root {
  --fondo: #16110d;              /* the page, dark as the bottom of the trench */
  --carta: #f1e8d8;              /* the words */
  --carta-tenue: rgba(241, 232, 216, 0.62);
  --accento: #e2a24c;            /* ochre, for the brand and the ruler */
  --cielo-alto: #c9d3cf;         /* the sky above the trench */
  --cielo-basso: #efe6d0;
  --erba: #6f8a3c;               /* the grass on top */
  --erba-scura: #435b25;
  --strato-0: #4b3324;           /* topsoil */
  --strato-1: #7c5634;           /* loam */
  --strato-2: #a9623c;           /* clay */
  --strato-3: #8e8576;           /* gravel */
  --strato-4: #4c5157;           /* bedrock */
  --cavo-0: #22170f;             /* the hole the shovel leaves in each layer */
  --cavo-1: #3a2716;
  --cavo-2: #55301c;
  --cavo-3: #46413a;
  --cavo-4: #1f2226;
  --radice: #c7a477;             /* the roots */
  --argento: #cfd4d3;            /* the penny */
  --terracotta: #c76d3b;         /* the jar */
  --ingobbio: #f0dcb4;
  --selce: #3d4351;              /* the arrowhead */
  --conchiglia: #ead9b6;         /* the ammonite */
  --osso: #eee3cb;               /* the bones */
  --acciaio: #b8bcbf;            /* the shovel */
  --legno: #8a5a33;
  --cartellino: #f6f0e3;         /* the museum labels */
  --inchiostro: #1f1a15;
  --alto: 100vh;
  --alto-grande: 100vh;
}
@supports (height: 100svh) {
  :root { --alto: 100svh; }
}
/* the still stage is as tall as the screen with the Safari bar pulled back */
@supports (height: 100lvh) {
  :root { --alto-grande: 100lvh; }
}

* { box-sizing: border-box; }
html,
body {
  margin: 0;
  background: var(--fondo);
}
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  color: var(--carta);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }

/* ---------------------------------------------------------------- the opening */
.apertura {
  position: relative;
  min-height: var(--alto);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 110px clamp(16px, 6vw, 88px) 80px;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 80% 110%, rgba(169, 98, 60, 0.32), transparent 60%),
    var(--fondo);
}
.testata {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(16px, 4vw, 44px);
}
.marchio {
  margin: 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: 21px;
  font-weight: 640;
  font-variation-settings: 'SOFT' 50, 'opsz' 40;
  letter-spacing: -0.01em;
}
.marchio span {
  font-style: italic;
  font-weight: 400;
  color: var(--accento);
}
.menu {
  display: flex;
  gap: 6px;
}
.menu a {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 560;
  text-decoration: none;
  background: rgba(241, 232, 216, 0.08);
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.5s cubic-bezier(0.34, 1.8, 0.5, 1);
}
@media (hover: hover) {
  .menu a:hover {
    background: var(--accento);
    color: var(--fondo);
    transform: translateY(-2px) rotate(-2deg) scale(1.06);
  }
}
.apertura__etichetta {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 620;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accento);
}
.apertura__titolo {
  margin: 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(50px, 10vw, 156px);
  font-weight: 560;
  font-variation-settings: 'SOFT' 50, 'opsz' 144;
  line-height: 0.94;
  letter-spacing: -0.035em;
}
.apertura__titolo em,
.fine__frase em {
  font-weight: 360;
  color: var(--accento);
}
.riga {
  display: block;
  overflow: hidden;
  padding: 0.04em 0 0.14em;
  margin-bottom: -0.14em;
}
.riga > span { display: inline-block; }
.apertura__testo {
  max-width: 34ch;
  margin: 28px 0 0;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.45;
  color: var(--carta-tenue);
}
.apertura__cenno {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.apertura__cenno svg {
  width: 16px;
  height: 22px;
  fill: none;
  stroke: var(--accento);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- the trench */
.scavo {
  position: relative;
  height: calc(var(--alto-grande) * 9);
}
.palco {
  position: sticky;
  top: 0;
  height: var(--alto-grande);
  overflow: hidden;
  background: var(--strato-0);
}
.terreno {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* the drawing */
.stop-cielo-alto { stop-color: var(--cielo-alto); }
.stop-cielo-basso { stop-color: var(--cielo-basso); }
.stop-acciaio { stop-color: var(--acciaio); }
.stop-acciaio-chiaro { stop-color: color-mix(in srgb, var(--acciaio) 30%, #fff); }
.stop-acciaio-scuro { stop-color: color-mix(in srgb, var(--acciaio) 60%, #000); }
.stop-legno { stop-color: var(--legno); }
.stop-legno-chiaro { stop-color: color-mix(in srgb, var(--legno) 70%, #fff); }
.stop-argento { stop-color: var(--argento); }
.stop-argento-chiaro { stop-color: color-mix(in srgb, var(--argento) 40%, #fff); }
.stop-argento-scuro { stop-color: color-mix(in srgb, var(--argento) 55%, #000); }
.stop-selce { stop-color: var(--selce); }
.stop-selce-chiara { stop-color: color-mix(in srgb, var(--selce) 62%, #fff); }
.stop-selce-scura { stop-color: color-mix(in srgb, var(--selce) 65%, #000); }
.stop-conchiglia { stop-color: var(--conchiglia); }
.stop-conchiglia-scura { stop-color: color-mix(in srgb, var(--conchiglia) 62%, #6b4e2a); }
.stop-terracotta { stop-color: var(--terracotta); }
.stop-terracotta-chiara { stop-color: color-mix(in srgb, var(--terracotta) 72%, #fff); }
.stop-terracotta-scura { stop-color: color-mix(in srgb, var(--terracotta) 62%, #000); }

.strato--0 { fill: var(--strato-0); }
.strato--1 { fill: var(--strato-1); }
.strato--2 { fill: var(--strato-2); }
.strato--3 { fill: var(--strato-3); }
.strato--4 { fill: var(--strato-4); }
.cavo--0 { fill: var(--cavo-0); stroke: color-mix(in srgb, var(--cavo-0) 60%, #000); }
.cavo--1 { fill: var(--cavo-1); stroke: color-mix(in srgb, var(--cavo-1) 60%, #000); }
.cavo--2 { fill: var(--cavo-2); stroke: color-mix(in srgb, var(--cavo-2) 60%, #000); }
.cavo--3 { fill: var(--cavo-3); stroke: color-mix(in srgb, var(--cavo-3) 60%, #000); }
.cavo--4 { fill: var(--cavo-4); stroke: color-mix(in srgb, var(--cavo-4) 60%, #000); }
.cavo { stroke-width: 4; stroke-linejoin: round; }
.cavo-ombra { fill: rgba(0, 0, 0, 0.28); }
.zolla { pointer-events: none; }
.zolla__corpo { stroke-width: 2.2; stroke-linejoin: round; }
.zolla__trama { stroke: none; }
.zolla--0 .zolla__corpo { fill: var(--strato-0); stroke: var(--cavo-0); }
.zolla--1 .zolla__corpo { fill: var(--strato-1); stroke: var(--cavo-1); }
.zolla--2 .zolla__corpo { fill: var(--strato-2); stroke: var(--cavo-2); }
.zolla--3 .zolla__corpo { fill: var(--strato-3); stroke: var(--cavo-3); }
.zolla--4 .zolla__corpo { fill: var(--strato-4); stroke: var(--cavo-4); }
.zolla .bricia-chiara { fill: rgba(255, 244, 222, 0.16); }
.zolla .bricia-scura { fill: rgba(0, 0, 0, 0.22); }
.polvere { pointer-events: none; }
.polvere--0 { fill: color-mix(in srgb, var(--strato-0) 70%, #fff); }
.polvere--1 { fill: color-mix(in srgb, var(--strato-1) 70%, #fff); }
.polvere--2 { fill: color-mix(in srgb, var(--strato-2) 70%, #fff); }
.polvere--3 { fill: color-mix(in srgb, var(--strato-3) 70%, #fff); }
.polvere--4 { fill: color-mix(in srgb, var(--strato-4) 70%, #fff); }

.trama-scura { fill: rgba(0, 0, 0, 0.2); }
.trama-chiara { fill: rgba(255, 240, 214, 0.12); }
.trama-linea { fill: none; stroke: rgba(0, 0, 0, 0.16); stroke-width: 2; }
.trama-linea-chiara { fill: none; stroke: rgba(255, 236, 210, 0.14); stroke-width: 1.4; }
.ciottolo { stroke: rgba(0, 0, 0, 0.32); stroke-width: 1.6; }
.ciottolo--a { fill: #b3aa99; }
.ciottolo--b { fill: #9d9483; }
.ciottolo--c { fill: #c7bfae; }
.ciottolo--d { fill: #7b7365; }
.crepa-roccia { fill: none; stroke: rgba(0, 0, 0, 0.36); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.vena { fill: none; stroke: rgba(230, 226, 214, 0.18); stroke-width: 3; stroke-linecap: round; }

.erba-fascia { fill: var(--erba-scura); }
.filo-erba { fill: var(--erba); }
.filo-erba--scuro { fill: var(--erba-scura); }
.radice {
  fill: none;
  stroke: var(--radice);
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-opacity: 0.72;
}
.nuvola { fill: rgba(255, 255, 255, 0.62); }
.picchetto { fill: none; stroke: var(--legno); stroke-width: 7; stroke-linecap: round; }
.spago { fill: none; stroke: #f3e2b5; stroke-width: 2; }
.cartello__asse { fill: color-mix(in srgb, var(--legno) 80%, #fff); stroke: color-mix(in srgb, var(--legno) 70%, #000); stroke-width: 3; }
.cartello__titolo,
.cartello__sotto {
  text-anchor: middle;
  fill: var(--inchiostro);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
}
.cartello__titolo { font-size: 17px; font-weight: 800; letter-spacing: 0.08em; font-stretch: 112%; }
.cartello__sotto { font-size: 10.5px; font-weight: 560; }

.pala { pointer-events: none; }
.pala-impugnatura { fill: none; stroke: color-mix(in srgb, var(--legno) 80%, #000); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.pala-collo { fill: color-mix(in srgb, var(--acciaio) 55%, #000); }
.pala-lama { stroke: color-mix(in srgb, var(--acciaio) 50%, #000); stroke-width: 2; }
.pala-piega { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 2; stroke-linecap: round; }

/* the finds */
.dentro { cursor: pointer; }
.moneta { stroke: color-mix(in srgb, var(--argento) 50%, #000); stroke-width: 2.5; }
.moneta-giro { fill: none; stroke: color-mix(in srgb, var(--argento) 55%, #000); stroke-width: 2; }
.moneta-perla,
.moneta-pallino { fill: color-mix(in srgb, var(--argento) 55%, #000); }
.moneta-croce { fill: none; stroke: color-mix(in srgb, var(--argento) 50%, #000); stroke-width: 6; stroke-linecap: round; }
.vaso-ansa { fill: none; stroke: color-mix(in srgb, var(--terracotta) 85%, #000); stroke-width: 8; stroke-linecap: round; }
.vaso-fascia { fill: var(--ingobbio); }
.vaso-onda { fill: none; stroke: var(--ingobbio); stroke-width: 3; stroke-linejoin: round; }
.vaso-ombra { fill: rgba(0, 0, 0, 0.12); }
.vaso-labbro { fill: color-mix(in srgb, var(--terracotta) 78%, #000); }
.crepa { fill: none; stroke: rgba(40, 18, 8, 0.55); stroke-width: 1.6; stroke-linejoin: round; }
.punta { stroke: color-mix(in srgb, var(--selce) 55%, #000); stroke-width: 2; stroke-linejoin: round; }
.scheggie path {
  fill: none;
  stroke: color-mix(in srgb, var(--selce) 45%, #fff);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-opacity: 0.75;
}
.scheggie .cresta { stroke-opacity: 0.45; stroke-width: 1.4; }
.ammonite-guscio { stroke: color-mix(in srgb, var(--conchiglia) 45%, #4a3418); stroke-width: 2.4; }
.ammonite-spirale,
.ammonite-costa {
  fill: none;
  stroke: color-mix(in srgb, var(--conchiglia) 45%, #4a3418);
  stroke-linecap: round;
  stroke-dasharray: 1;
}
.ammonite-spirale { stroke-width: 2.6; }
.osso path { fill: var(--osso); stroke: color-mix(in srgb, var(--osso) 55%, #3a2e1c); stroke-width: 1.6; stroke-linejoin: round; }
.osso line { stroke: var(--osso); stroke-linecap: round; }
.osso circle { fill: var(--osso); }
.osso--dietro path { fill: color-mix(in srgb, var(--osso) 72%, #2a2a2a); }
.osso--dietro line { stroke: color-mix(in srgb, var(--osso) 72%, #2a2a2a); }
.osso--dietro circle { fill: color-mix(in srgb, var(--osso) 72%, #2a2a2a); }
.osso .orbita { fill: var(--cavo-4); stroke: none; }

/* ---------------------------------------------------------------- the ruler */
.righello {
  position: absolute;
  inset: 0 auto 0 0;
  width: 92px;
  pointer-events: none;
  background: rgba(22, 17, 13, 0.72);
  box-shadow: 1px 0 0 rgba(241, 232, 216, 0.14);
}
.righello__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.tacca { stroke: var(--carta); stroke-width: 1.2; vector-effect: non-scaling-stroke; opacity: 0.6; }
.tacca--grande { opacity: 0.95; stroke-width: 1.6; }
.tacca--confine { stroke: var(--accento); opacity: 1; stroke-width: 2; }
.tacca-numero {
  fill: var(--carta);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.lettura__punta {
  position: absolute;
  left: calc(100% - 13px);
  top: var(--lettura, 50%);
  width: 12px;
  height: 16px;
  transform: translateY(-50%);
  fill: var(--accento);
}
.lettura {
  position: absolute;
  left: calc(100% + 8px);
  top: var(--lettura, 50%);
  width: max-content;
  transform: translateY(-50%);
}
.lettura__testo {
  display: grid;
  gap: 2px;
  padding: 7px 12px 8px;
  border-radius: 10px;
  background: rgba(22, 17, 13, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}
.lettura__metri {
  font-size: 19px;
  font-weight: 720;
  font-stretch: 110%;
  font-variant-numeric: tabular-nums;
  color: var(--carta);
}
.lettura__strati {
  position: relative;
  display: grid;
  overflow: hidden;
  font-size: 11px;
  font-weight: 640;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accento);
}
.lettura__strati span { grid-area: 1 / 1; }

/* ---------------------------------------------------------------- the labels */
.cartellini {
  position: absolute;
  top: 50%;
  right: clamp(24px, 5vw, 80px);
  width: min(360px, 30vw);
  transform: translateY(-50%);
  display: grid;
}
.cartellino {
  grid-area: 1 / 1;
  align-self: center;
  visibility: hidden;
  transform-origin: 50% 0;
}
.cartellino__filo {
  display: block;
  width: 80px;
  height: 34px;
  margin: 0 auto -2px;
  overflow: visible;
}
.cartellino__filo path { fill: none; stroke: var(--carta-tenue); stroke-width: 1.5; }
.cartellino__filo circle { fill: var(--accento); }
.cartellino__carta {
  position: relative;
  padding: 22px 24px 20px;
  border-radius: 6px;
  background: var(--cartellino);
  color: var(--inchiostro);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 2px 0 rgba(0, 0, 0, 0.08);
  transform-origin: 50% -34px;
}
.cartellino__strato {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accento) 70%, #000);
}
.cartellino__nome {
  margin: 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 600;
  font-variation-settings: 'SOFT' 50, 'opsz' 72;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.intero { white-space: nowrap; }
.cartellino__data {
  margin: 6px 0 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: 17px;
  font-style: italic;
  color: rgba(31, 26, 21, 0.72);
}
.cartellino__testo {
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(31, 26, 21, 0.82);
}
.cartellino__dato {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(31, 26, 21, 0.16);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(31, 26, 21, 0.6);
}
.cartellino__dato strong {
  font-size: 15px;
  font-weight: 760;
  font-stretch: 108%;
  letter-spacing: 0;
  text-transform: none;
  color: var(--inchiostro);
}

/* the narrow and tall layout: the label sits at the bottom */
.palco[data-modo='alto'] .cartellini {
  top: auto;
  bottom: 14px;
  left: 50%;
  right: auto;
  width: min(440px, calc(100% - 32px));
  transform: translateX(-50%);
}
.palco[data-modo='alto'] .righello { width: 50px; }
.palco[data-modo='alto'] .lettura { top: 12px; transform: none; }

/* ---------------------------------------------------------------- the close */
.fine {
  position: relative;
  min-height: calc(var(--alto) * 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 80px 16px;
  text-align: center;
  background: var(--strato-4);
}
.fine__etichetta {
  margin: 0;
  font-size: 13px;
  font-weight: 640;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accento);
}
.fine__frase {
  margin: 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(40px, 7vw, 104px);
  font-weight: 540;
  font-variation-settings: 'SOFT' 50, 'opsz' 144;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.fine__frase em { display: block; }
.fine__bottone {
  position: relative;
  display: inline-flex;
  padding: 17px 32px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 640;
  font-stretch: 100%;
  color: var(--fondo);
  isolation: isolate;
}
.fine__bottone::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 999px;
  background: var(--accento);
  transition: transform 0.6s cubic-bezier(0.34, 1.8, 0.5, 1);
}
.fine__bottone span {
  display: inline-block;
  transition: font-stretch 0.5s cubic-bezier(0.34, 1.6, 0.5, 1);
}
@media (hover: hover) {
  .fine__bottone:hover::before { transform: scale(1.08, 1.16); }
  .fine__bottone:hover span { font-stretch: 118%; }
}

/* ---------------------------------------------------------------- the phone */
@media (max-width: 720px) {
  .menu { display: none; }
  .cartellino__carta { padding: 16px 18px 14px; }
  .cartellino__filo { width: 60px; height: 24px; }
  .cartellino__carta { transform-origin: 50% -24px; }
  .cartellino__strato { margin-bottom: 6px; font-size: 10.5px; }
  .cartellino__nome { font-size: 24px; }
  .cartellino__data { font-size: 15px; margin-top: 3px; }
  .cartellino__testo { margin-top: 8px; font-size: 13.5px; line-height: 1.42; }
  .cartellino__dato { margin-top: 10px; padding-top: 8px; font-size: 10.5px; }
  .cartellino__dato strong { font-size: 14px; }
  .lettura__metri { font-size: 16px; }
  .lettura__strati { font-size: 10px; }
  .lettura__testo { padding: 6px 10px 7px; }
}

/* schermi bassi (la casella dell'anteprima sul telefono, 341 per 410): l'apertura sta tutta in uno schermo */
@media (max-height: 520px) {
  .testata { padding-top: 12px; padding-bottom: 12px; }
  .apertura { padding-top: 64px; padding-bottom: 24px; }
  .apertura__etichetta { margin-bottom: 10px; font-size: 11px; }
  .apertura__titolo { font-size: clamp(40px, 11.5vh, 156px); }
  .apertura__testo { margin-top: 14px; font-size: 15px; line-height: 1.4; }
  .apertura__cenno { margin-top: 16px; font-size: 12px; }
}
