/* =========================================================
   Paul Puciu · Numerologo — la discesa lungo l'Albero
   Metà sinistra ferma: l'Albero della Vita (3D, o SVG senza 3D).
   Metà destra: la colonna di lettura, una sezione per sfera, da Keter a Malkhut.
   Solo i colori del brand: prugna, sabbia, avorio, corallo.
   ========================================================= */

@font-face { font-family: 'Erode'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('../assets/fonts/erode-variable.woff2') format('woff2'); }
@font-face { font-family: 'Erode'; font-style: italic; font-weight: 300 700; font-display: swap; src: url('../assets/fonts/erode-variable-italic.woff2') format('woff2'); }
@font-face { font-family: 'Satoshi'; font-style: normal; font-weight: 300 900; font-display: swap; src: url('../assets/fonts/satoshi-variable.woff2') format('woff2'); }

:root {
  --plum-900: #2E1838;
  --plum-800: #3A2146;
  --plum-700: #3F1B4F;
  --sand-300: #ECE0B8;
  --sand-200: #EFE6CC;
  --ivory-50: #FBF8F1;
  --coral-500: #D04A53;
  --coral-600: #C03F48;
  --coral-700: #A8343D;
  --ink: var(--plum-900);
  --ink-soft: #5E4F6A;

  --display: 'Erode', 'Iowan Old Style', Georgia, serif;
  --text: 'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Cinque misure: enorme, titolo, enunciato, testo, nota */
  --t-xxl: clamp(6rem, 11vw, 11rem);
  --t-xl: clamp(2.5rem, 3.6vw, 3.6rem);
  --t-l: clamp(1.5rem, 2.1vw, 2.125rem);
  --t-m: 1.125rem;
  --t-s: .9375rem;

  --header-h: 64px;
  --pad: clamp(1.25rem, 4.5vw, 4.5rem);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}
@media (max-width: 1023.98px) { :root { --header-h: 56px; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--plum-900); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body { margin: 0; font: 400 var(--t-m)/1.55 var(--text); font-kerning: normal; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
a { color: inherit; }
::selection { background: var(--sand-300); color: var(--plum-900); }
:focus-visible { outline: 3px solid var(--coral-600); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 20; padding: .75rem 1.25rem; background: var(--ivory-50); color: var(--plum-900); border-radius: 999px; }
.skip-link:focus { top: .75rem; }

h1, h2 { font: 500 var(--t-xl)/1.02 var(--display); letter-spacing: -.025em; text-wrap: balance; }
h3 { font: 500 var(--t-l)/1.1 var(--display); letter-spacing: -.015em; }
.lead { font-size: var(--t-l); font-family: var(--display); line-height: 1.25; letter-spacing: -.01em; max-width: 30ch; }
.note { font-size: var(--t-s); color: var(--ink-soft); }

/* ---------- Pulsanti e link ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.25rem; padding: .85rem 1.6rem; border: 0; border-radius: 999px;
  font: 600 1rem/1.2 var(--text); text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .16s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn--coral { background: var(--coral-600); color: var(--ivory-50); }
.btn--plum { background: var(--plum-900); color: var(--ivory-50); }
.btn--ivory { background: var(--ivory-50); color: var(--plum-900); }
.btn--block { width: 100%; }
@media (hover: hover) {
  .btn--coral:hover { background: var(--plum-700); }
  .btn--plum:hover { background: var(--coral-600); }
  .btn--ivory:hover { background: var(--plum-900); color: var(--ivory-50); }
  .reading--plum .btn--ivory:hover { background: var(--coral-600); }
}
.link { font-weight: 600; text-decoration: underline; text-decoration-color: var(--coral-600); text-decoration-thickness: 2px; text-underline-offset: .3em; transition: color .2s ease; }
@media (hover: hover) { .link:hover { color: var(--coral-700); } .link--light:hover { color: var(--sand-300); } }

/* ---------- Barra ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 10; height: var(--header-h);
  display: flex; align-items: center; gap: 2rem; padding: 0 var(--pad);
  background: var(--plum-900); color: var(--ivory-50);
}
.bar__brand { display: flex; align-items: center; gap: .65rem; font: 500 1.375rem/1 var(--display); text-decoration: none; letter-spacing: -.01em; }
.bar__brand svg { width: 18px; height: 37px; }
.bar__nav { display: flex; gap: 1.75rem; margin-left: auto; font-size: var(--t-s); font-weight: 500; }
.bar__nav a { text-decoration: none; opacity: .86; transition: opacity .2s ease; }
@media (hover: hover) { .bar__nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: .35em; } }
.bar__cta { min-height: 2.5rem; padding: .55rem 1.25rem; }
@media (max-width: 1023.98px) {
  .bar { gap: 1rem; }
  .bar__nav { display: none; }
  .bar__cta { margin-left: auto; }
}

/* ---------- L'albero disegnato (senza 3D, e sotto la tela finché il 3D non c'è) ---------- */
.tree { display: block; height: 100%; width: auto; overflow: visible; }
.tree line { stroke: var(--sand-300); stroke-opacity: .35; stroke-width: 2.5; }
.tree circle { fill: var(--plum-800); stroke: var(--sand-300); stroke-width: 2.5; transition: fill .5s ease, stroke .5s ease; }
.tree circle.is-here, .tree.is-whole circle[data-s="0"] { fill: var(--sand-300); }
.tree circle.is-mine { fill: var(--coral-500); stroke: var(--coral-500); }

/* ---------- La scena divisa ---------- */
main { display: block; }
.column > .sec { position: relative; }
.sheet { position: relative; display: flex; flex-direction: column; gap: 2rem; padding: calc(var(--header-h) + 4.5rem) var(--pad) 7.5rem; }
.sheet > * { max-width: 40rem; }

/* I fondi: ogni sezione il suo campo pieno */
.sec--hero .sheet, .sec--ivory .sheet { background: var(--ivory-50); }
.sec--sand .sheet { background: var(--sand-200); }
.sec--sand-deep .sheet { background: var(--sand-300); }
.sec--plum .sheet { background: var(--plum-800); color: var(--ivory-50); }
.sec--plum .note { color: rgba(251, 248, 241, .78); }

.stage__name { position: absolute; left: var(--pad); bottom: 2.5rem; max-width: calc(100% - 2 * var(--pad)); padding: .6rem .9rem .7rem; margin-left: -.9rem; background: var(--plum-900); color: var(--ivory-50); font: 400 var(--t-l)/1.2 var(--display); letter-spacing: -.01em; }
.stage__mine { display: block; margin-top: .35rem; font: 500 var(--t-s)/1.4 var(--text); letter-spacing: 0; color: var(--sand-300); }

@media (min-width: 1024px) {
  .split { display: grid; grid-template-columns: 1fr 1fr; }
  .stage { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; padding-top: var(--header-h); }
  .stage .tree { height: min(74svh, 640px); }
  .column .sec { min-height: 100svh; }
  .column .sheet { min-height: 100svh; }
  .window { display: none; }
}

/* Telefono e tablet: in testa a ogni sezione una finestra sull'albero, poi il foglio */
@media (max-width: 1023.98px) {
  .stage { display: none; }
  .sheet { padding: 3.5rem var(--pad) 5rem; gap: 1.5rem; }
  .window { height: 0; }
  .sec--hero .window { height: calc(var(--header-h) + 42svh); display: grid; place-items: center; padding-top: var(--header-h); }
  .sec--hero .window .tree { height: 34svh; }
  .has-world .window { height: 46svh; }
  .has-world .sec--hero .window { height: calc(var(--header-h) + 44svh); }
}
.has-world .tree { opacity: 0; }
.has-world .stage .tree, .has-world .window .tree { transition: opacity .6s ease; }

/* ---------- Apertura: la striscia delle otto cifre, il titolo, il calcolo ---------- */
.digits { display: flex; gap: 4px; max-width: none; }
.digits span {
  display: grid; place-items: center; width: clamp(2.25rem, 3.6vw, 3.5rem); height: clamp(3rem, 4.6vw, 4.5rem);
  background: var(--plum-900); color: rgba(236, 224, 184, .45); font: 500 clamp(1.4rem, 2.2vw, 2.1rem)/1 var(--display);
  transition: background-color .25s ease, color .25s ease;
}
.digits span:nth-child(2), .digits span:nth-child(4) { margin-right: clamp(.5rem, 1vw, 1rem); }
.digits span.is-on { background: var(--coral-600); color: var(--ivory-50); }
.sec--hero h1 { max-width: 13ch; }
.sec--hero .lead { font-family: var(--text); font-size: var(--t-m); line-height: 1.55; max-width: 34rem; }

.calc label { display: block; margin-bottom: .6rem; font-weight: 600; font-size: var(--t-s); }
.calc__row { display: flex; gap: .75rem; flex-wrap: wrap; }
.calc input {
  flex: 1 1 12rem; min-height: 3.25rem; padding: .7rem 1rem; border: 2px solid var(--plum-900); border-radius: 999px;
  background: var(--ivory-50); color: var(--ink); font: 500 1.25rem/1 var(--text); letter-spacing: .04em;
}
.calc input:focus { outline: none; border-color: var(--coral-600); }
.calc__error { min-height: 0; margin-top: .5rem; color: var(--coral-700); font-size: var(--t-s); font-weight: 600; }
.calc__error:empty { display: none; }
.calc .note { margin-top: .6rem; }

.result { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem 2rem; align-items: start; }
.result[hidden] { display: none; }
.result__number { font: 500 var(--t-xxl)/.8 var(--display); letter-spacing: -.05em; color: var(--coral-600); }
.result__text { display: flex; flex-direction: column; gap: .8rem; align-items: flex-start; }
.result__name { font: 500 var(--t-l)/1.1 var(--display); }
.result .btn { margin-top: .5rem; }
@media (max-width: 559.98px) { .result { grid-template-columns: 1fr; } }

/* ---------- Numerologia Sacra ---------- */
.figure-row { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: end; }
.big-figure, .score__figure { font: 500 var(--t-xxl)/.8 var(--display); letter-spacing: -.05em; }
.figure-row p:last-child { max-width: 24ch; padding-bottom: .4rem; }
@media (max-width: 559.98px) {
  .figure-row, .score { grid-template-columns: 1fr; gap: .75rem; }
  .figure-row p:last-child, .score p:last-child { padding-bottom: 0; }
}
.runin { display: flex; flex-direction: column; gap: 1rem; }
.runin strong, .answers strong { font-weight: 700; }
.plate { display: flex; flex-direction: column; gap: .75rem; }
.plate img { width: min(100%, 26rem); }
.plate--wide img { width: 100%; }
.plate figcaption { font-size: var(--t-s); color: var(--ink-soft); max-width: 40ch; }

/* ---------- La lettera ---------- */
.letter { display: flex; flex-direction: column; gap: 1.1rem; max-width: 36rem; }
.letter p:first-child { font-weight: 600; }
.letter__sign { margin-top: .75rem; font: italic 400 var(--t-l)/1.1 var(--display); }
.letter__sign span { display: block; margin-top: .35rem; font: 400 var(--t-s)/1.4 var(--text); font-style: normal; opacity: .78; }

/* ---------- Formazione: il 110 e le righe a due capi ---------- */
.score { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: end; }
.score p:last-child { max-width: 26ch; padding-bottom: .4rem; }
.rows { display: flex; flex-direction: column; }
.rows div { display: flex; justify-content: space-between; gap: 1.5rem; padding: .55rem 0; }
.rows dt { font-weight: 500; }
.rows dd { color: var(--ink-soft); font-size: var(--t-s); white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: .15rem; }

/* ---------- Le tre letture: tre campi pieni a tutta larghezza ---------- */
.readings { position: relative; background: var(--ivory-50); }
.readings__title { padding: 7rem var(--pad) 3rem; max-width: 18ch; box-sizing: content-box; }
.readings__fields { display: grid; grid-template-columns: 3fr 4fr 3fr; }
.reading { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; min-height: 88svh; padding: 3rem var(--pad) 3.5rem; }
.reading h3 { font-size: var(--t-xl); line-height: 1; max-width: 9ch; }
.reading > p:not(.reading__time) { max-width: 30ch; }
.reading__time { margin-top: auto; font-size: var(--t-s); }
.reading__time span { display: block; font: 500 var(--t-xxl)/.85 var(--display); letter-spacing: -.05em; }
.reading--plum { background: var(--plum-900); color: var(--ivory-50); }
.reading--coral { background: var(--coral-600); color: var(--ivory-50); }
.reading--sand { background: var(--sand-300); color: var(--plum-900); }
@media (max-width: 899.98px) {
  .readings__title { padding-top: 4.5rem; }
  .readings__fields { grid-template-columns: 1fr; }
  .reading { min-height: 0; padding-top: 2.5rem; }
  .reading--coral { order: -1; }
  .reading__time { margin-top: 1rem; }
}

/* ---------- Corsi ---------- */
.course { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.course__img { width: 100%; }
.course--pair { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.5rem; align-items: start; }
.course--pair > div { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.plain { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .45rem; }

/* ---------- Tre passi: il foglietto ---------- */
.slip {
  list-style: none; padding: 1.75rem 1.75rem 2.75rem; background: var(--ivory-50); max-width: 34rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 95% 100%, 90% calc(100% - 12px), 85% 100%, 80% calc(100% - 12px), 75% 100%, 70% calc(100% - 12px), 65% 100%, 60% calc(100% - 12px), 55% 100%, 50% calc(100% - 12px), 45% 100%, 40% calc(100% - 12px), 35% 100%, 30% calc(100% - 12px), 25% 100%, 20% calc(100% - 12px), 15% 100%, 10% calc(100% - 12px), 5% 100%, 0 calc(100% - 12px));
}
.slip li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: .9rem 0; }
.slip__when { font-weight: 700; font-size: var(--t-s); font-variant-numeric: tabular-nums; padding-top: .15rem; }
.slip__end { display: block !important; margin: 1rem -1.75rem 0; padding: 1rem 1.75rem !important; background: var(--plum-900); color: var(--ivory-50); font-weight: 600; }
@media (max-width: 559.98px) { .slip li { grid-template-columns: 1fr; gap: .2rem; } }

/* ---------- Voci ---------- */
.quote { display: flex; flex-direction: column; gap: .75rem; max-width: 34rem; }
.quote p { font: 400 1.375rem/1.35 var(--display); }
.quote--big p { font-size: var(--t-l); line-height: 1.2; max-width: 22ch; }
.quote footer { font-size: var(--t-s); font-weight: 600; color: var(--sand-300); }
.quote:not(.quote--big) { margin-left: clamp(0rem, 6vw, 6rem); }

/* ---------- Domande: testo da leggere, niente fisarmoniche ---------- */
.answers { display: flex; flex-direction: column; gap: 1.25rem; max-width: 38rem; }

/* ---------- Modulo ---------- */
.booking { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; max-width: 40rem; }
.booking > * { grid-column: 1 / -1; }
.booking > .field--half { grid-column: span 1; }
.field { display: flex; flex-direction: column; margin-bottom: 1.25rem; }
.field label { font-size: var(--t-s); font-weight: 600; margin-bottom: .4rem; }
.field__optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3.25rem; padding: .75rem .9rem; border: 2px solid rgba(46, 24, 56, .28); border-radius: 4px;
  background: #fff; color: var(--ink); font: 400 1.0625rem/1.4 var(--text);
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--coral-600); }
.field ::placeholder { color: #8a7d93; }
.field__error { margin: .4rem 0 0; font-size: var(--t-s); color: var(--coral-700); }
.field__error:empty { display: none; }
.field.is-invalid input { border-color: var(--coral-700); }
.field--check { display: grid; grid-template-columns: 1.25rem 1fr; gap: .2rem .85rem; align-items: start; }
.field--check input { width: 1.15rem; height: 1.15rem; min-height: 0; margin: .3rem 0 0; accent-color: var(--coral-600); }
.field--check label { margin: 0; font-weight: 400; color: var(--ink-soft); }
.field--check .field__error { grid-column: 2; }
.captcha { min-height: 65px; margin-bottom: 1rem; }
.form-status { margin: 1rem 0 0; font-size: var(--t-s); }
.form-status:empty { display: none; }
.form-status.is-success { padding: 1.25rem; background: var(--sand-200); }
.form-status.is-error { color: var(--coral-700); }
@media (max-width: 559.98px) { .booking > .field--half { grid-column: 1 / -1; } }

/* ---------- Piè di pagina: la torre e il menu ---------- */
.foot { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--plum-900); color: var(--ivory-50); }
.foot__photo { overflow: hidden; min-height: 100svh; }
.foot__photo img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 30%; }
.foot__menu { display: flex; flex-direction: column; gap: 2.5rem; padding: 5rem var(--pad) 3rem; }
.foot__line { font: 400 var(--t-l)/1.2 var(--display); max-width: 22ch; }
.foot__nav { display: flex; flex-direction: column; gap: .4rem; }
.foot__nav a { font: 500 var(--t-l)/1.25 var(--display); text-decoration: none; transition: transform .25s var(--ease-out), opacity .2s ease; }
@media (hover: hover) {
  .foot__nav:hover a { opacity: .6; }
  .foot__nav a:hover { opacity: 1; transform: translateX(12px); }
}
.foot__info { display: flex; gap: 3rem; flex-wrap: wrap; font-size: var(--t-s); }
.foot__name { margin-top: auto; font: 500 var(--t-xxl)/.85 var(--display); letter-spacing: -.05em; }
.foot .note { color: rgba(251, 248, 241, .72); max-width: 60ch; }
@media (max-width: 1023.98px) {
  .foot { grid-template-columns: 1fr; }
  .foot__photo { min-height: 0; height: 50svh; }
  .foot__menu { padding-top: 3rem; }
  .foot__name { font-size: 20vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
