/* ============================================================
   Landing + autenticazione
   ============================================================ */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 241, 231, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-head__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.05rem 0;
}

.brand__text small {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.9rem;
}

.site-nav a {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover {
  color: var(--burgundy);
  border-color: var(--burgundy);
}

.site-head__actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

/* ------------------------------ hero ------------------------------ */

.hero {
  position: relative;
  padding: clamp(2.6rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__kicker {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}

.hero__kicker::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-strong);
  max-width: 90px;
}

.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.028em;
  font-weight: 300;
}

.hero h1 em {
  font-style: italic;
  color: var(--burgundy);
}

.hero__lede {
  margin-top: 1.6rem;
  max-width: 34ch;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
  line-height: 1.65;
  color: var(--ink-soft);
}

.hero__actions {
  margin-top: 2.3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.6rem;
}

.hero__meta {
  display: flex;
  gap: 2.2rem;
  margin-top: 2.8rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--line);
}

.hero__meta div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.hero__meta b {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1;
  color: var(--burgundy);
}

.hero__meta span {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* pila di pagine */
.hero__stack {
  position: relative;
  display: grid;
  place-items: center;
  padding: 1.4rem;
  min-height: 0;
}

.hero__stack::before {
  content: '';
  position: absolute;
  inset: 8% -6% 2% 6%;
  background: var(--brand);
  z-index: 0;
}

.hero__stack .hero-slot {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  width: 25rem;
  max-width: 100%;
  transform: rotate(-1.6deg);
}

.hero__stack .hero-slot .sheet {
  width: 100%;
  box-shadow: 0 40px 70px -40px rgba(40, 18, 16, 0.6);
}

.hero__stack .hero-slot--back {
  position: absolute;
  z-index: 0;
  width: 21rem;
  max-width: 88%;
  transform: rotate(3.4deg) translate(1.2rem, 0.8rem);
  opacity: 0.92;
}

.hero__badge {
  position: absolute;
  right: -0.4rem;
  bottom: 1.6rem;
  z-index: 2;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 0.7rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero__badge b {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1;
  color: var(--burgundy);
}

.hero__badge span {
  font-size: 0.54rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------------------------- sezioni ---------------------------- */

section {
  position: relative;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2rem, 4vw, 3.2rem);
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  font-weight: 300;
  line-height: 1.1;
}

.section-head p {
  max-width: 40ch;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.band {
  background: var(--brand);
  color: var(--paper);
  padding: clamp(3.4rem, 7vw, 5.6rem) 0;
  --line: rgba(246, 241, 231, 0.25);
  --line-strong: rgba(246, 241, 231, 0.5);
  --ink: var(--paper);
  --ink-soft: rgba(246, 241, 231, 0.82);
  --ink-faint: rgba(246, 241, 231, 0.62);
}

.band .section-head {
  border-color: rgba(246, 241, 231, 0.28);
}

.band .eyebrow,
.band .eyebrow--muted {
  color: rgba(246, 241, 231, 0.72);
}

.band .step__num {
  color: rgba(246, 241, 231, 0.72);
}

/* i bottoni dentro la fascia rossa non devono confondersi con lo sfondo */
.band .btn {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--brand);
}

.band .btn:hover {
  background: var(--burgundy-deep);
  border-color: var(--burgundy-deep);
  color: var(--paper);
}

.band .btn--ghost {
  background: transparent;
  border-color: rgba(246, 241, 231, 0.55);
  color: var(--paper);
}

.band .btn--ghost:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--brand);
}

.band .btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--paper);
}

.band .btn--quiet:hover {
  background: transparent;
  color: var(--paper);
}

/* la pagina di oggi resta avorio: la cornice la stacca dal fondo rosso */
.band .today-sheet .sheet {
  box-shadow: 0 40px 70px -34px rgba(20, 8, 8, 0.65);
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: center;
}

.today-grid .today-sheet {
  width: min(100%, 22rem);
}

/* griglia di pagine-esempio */
.plate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr));
  gap: clamp(1rem, 2.4vw, 2rem);
}

.plate {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

/* griglia dei giorni dentro la tessera mensile */
.plate-mini {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1.1cqw 0;
  font-family: var(--sans);
  font-size: 3.3cqw;
  line-height: 1.4;
  text-align: center;
  color: var(--ink-soft);
  opacity: 0.62;
  font-variant-numeric: tabular-nums;
}

.plate-mini i {
  font-style: normal;
}

.plate-mini i.is-today {
  color: var(--burgundy);
  font-weight: 600;
  opacity: 1;
}

.sheet--burgundy .plate-mini {
  color: var(--paper);
  opacity: 0.7;
}

.sheet--burgundy .plate-mini i.is-today {
  color: var(--paper);
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.4cqw;
}

.plate__caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.plate__caption b {
  font-weight: 500;
  color: var(--ink-soft);
}

/* passi */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1.6rem, 3vw, 2.8rem);
}

.step {
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-strong);
}

.step__num {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--burgundy);
}

.step h3 {
  font-size: 1.3rem;
  margin: 0.5rem 0 0.6rem;
}

.step p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* anteprima stampa */
.print-viz {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.print-viz__stack {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: end;
}

.print-viz__stack .sheet {
  box-shadow: var(--shadow);
}

.print-viz__stack .sheet:nth-child(2) {
  transform: translateY(-1.6rem);
}

.print-viz__stack .sheet:nth-child(3) {
  transform: translateY(0.7rem) rotate(-2deg);
}

.print-viz__stack .sheet:nth-child(4) {
  transform: translateY(-0.8rem) rotate(1.6deg);
}

.spec-list {
  margin-top: 1.8rem;
  border-top: 1px solid var(--line);
}

.spec-list div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}

.spec-list dt {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.15rem;
}

.spec-list dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
}

/* CTA finale */
.cta-box {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2.4rem, 5vw, 4rem);
  border: 1px solid var(--line-strong);
  background: #fffdf8;
}

.cta-box h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  font-weight: 300;
  line-height: 1.06;
}

.cta-box p {
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ---------------------------- footer ----------------------------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 3rem 0 2.4rem;
  margin-top: clamp(3rem, 6vw, 5rem);
}

.site-foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr));
  gap: 2.4rem;
}

.site-foot h4 {
  font-size: 0.62rem;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
}

.site-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.site-foot ul a:hover {
  color: var(--burgundy);
}

.site-foot__bottom {
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* --------------------------- responsive -------------------------- */

@media (max-width: 960px) {
  .hero__grid,
  .print-viz,
  .cta-box {
    grid-template-columns: minmax(0, 1fr);
  }

  .today-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .today-grid .today-sheet {
    width: min(100%, 18rem);
  }

  .hero__stack {
    order: -1;
    padding: 1rem clamp(0.5rem, 4vw, 2rem);
  }

  .hero__stack .hero-slot {
    width: min(19rem, 100%);
  }

  .hero__stack .hero-slot--back {
    width: min(16rem, 86%);
  }

  .hero__badge {
    right: 0.4rem;
    bottom: 0.2rem;
    padding: 0.55rem 0.8rem;
  }

  .hero__badge b {
    font-size: 1.15rem;
  }

  .hero__meta {
    gap: 1.5rem;
  }

  .site-nav {
    display: none;
  }

  .site-foot__grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: clamp(2.3rem, 10vw, 3rem);
  }

  /* l'indice dei mesi resta leggibile anche a due colonne */
  .plate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 0.9rem;
  }

  .plate__caption {
    font-size: 0.52rem;
    letter-spacing: 0.14em;
  }

  .plate-mini {
    font-size: 4.4cqw;
    gap: 1.4cqw 0;
  }

  .hero__meta {
    flex-wrap: wrap;
    gap: 1.2rem 1.8rem;
  }

  .site-head__actions .btn--ghost {
    display: none;
  }

  .print-viz__stack {
    gap: 0.6rem;
  }

  .site-foot__grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
}
