/* VinAppunti, landing. Colori e regole: docs/brand/README.md */

@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 650;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 650;
  font-display: swap;
}

:root {
  --inchiostro: #24262D;
  --carta: #F5EFE3;
  --vinaccia: #7B2234;
  --vinaccia-chiara: #C35A6E;
  --rosa-vinaccia: #E39AA6;
  --mina: #8B877F;

  --bg: var(--carta);
  --bg-tint: #EDE5D5;
  --text: var(--inchiostro);
  --text-soft: #4A4B50;
  --accent: var(--vinaccia);
  --rule: rgba(139, 135, 127, 0.35);

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --logo-h: 3rem;
  --wrap: 68rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--inchiostro);
    --bg-tint: #2D2F37;
    --text: var(--carta);
    --text-soft: #CFC9BD;
    --accent: var(--rosa-vinaccia);
    --rule: rgba(139, 135, 127, 0.4);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 em, h2 em { font-weight: 420; color: var(--accent); }
p { margin: 0; }

a { color: var(--accent); text-underline-offset: 0.2em; }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--vinaccia-chiara);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section-dark p { max-width: 38rem; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--inchiostro); color: var(--carta);
  padding: 0.5rem 1rem; font-family: var(--sans); z-index: 10;
}
.skip:focus { top: 1rem; }

/* Etichette piccole: carattere di sistema, come nell'app */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* Intestazione */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 1.5rem;
}
.brand { display: block; }
.logo { height: var(--logo-h); width: auto; }
@media (prefers-color-scheme: dark) {
  /* il logo scuro include 20 unità di fondo Inchiostro su ogni lato */
  .logo { height: calc(var(--logo-h) * 1.4); margin: calc(var(--logo-h) * -0.2); }
}
.header-link {
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 600;
  text-decoration: none; padding: 0.5rem 0.25rem;
}
.header-link:hover { text-decoration: underline; }

/* Hero: margine del quaderno a sinistra, solo su schermi larghi */
.hero {
  padding-block: clamp(3rem, 10vw, 7.5rem) clamp(3.5rem, 9vw, 6.5rem);
  position: relative;
}
.hero h1 {
  font-size: clamp(2.5rem, 7.5vw, 5rem);
  letter-spacing: -0.01em;
  max-width: 14ch;
}
.hero h1 em { display: inline-block; }
.lead {
  font-size: clamp(1.1875rem, 2.2vw, 1.375rem);
  color: var(--text-soft);
  max-width: 34rem;
  margin-top: 1.75rem;
}
@media (min-width: 60rem) {
  .hero { padding-left: calc(var(--gutter) + 2.5rem); }
  .hero::before {
    content: ""; position: absolute; top: 0; bottom: 0;
    left: calc(var(--gutter) + 0.25rem);
    border-left: 2px solid var(--rosa-vinaccia);
    opacity: 0.7;
  }
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2.25rem; }
.button {
  display: inline-block;
  font-family: var(--sans); font-size: 1rem; font-weight: 600;
  text-decoration: none;
  background: var(--vinaccia); color: var(--carta);
  padding: 0.875rem 1.5rem; border-radius: 999px;
  min-height: 44px;
}
.button:hover { background: #64192A; }
@media (prefers-color-scheme: dark) {
  .button { background: var(--rosa-vinaccia); color: var(--inchiostro); }
  .button:hover { background: #EDB3BC; }
}
.text-link { font-family: var(--sans); font-weight: 600; font-size: 1rem; }

/* Sezioni */
.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); border-top: 1px solid var(--rule); }
.section h2 { font-size: clamp(1.875rem, 4.5vw, 3rem); max-width: 22ch; }
.section-tinted { background: var(--bg-tint); border-top: 0; }

/* Come funziona: righe del quaderno sotto ogni passo */
.steps {
  list-style: none; padding: 0; margin: 3rem 0 0;
  display: grid; gap: 2.5rem;
}
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.steps li { border-top: 2px solid var(--text); padding-top: 1.25rem; }
.step-n {
  display: block;
  font-style: italic; font-weight: 420;
  font-size: 2.75rem; line-height: 1;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.steps h3, .benefits h3 { font-size: 1.375rem; margin-bottom: 0.5rem; }
.steps p, .benefits p { color: var(--text-soft); }

/* Vantaggi */
.benefits {
  list-style: none; padding: 0; margin: 3rem 0 0;
  display: grid; gap: 2rem;
}
@media (min-width: 48rem) { .benefits { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.benefits li {
  padding-top: 1.25rem;
  background-image: linear-gradient(var(--rule), var(--rule));
  background-size: 2.5rem 2px; background-repeat: no-repeat;
}
.aside {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px dashed var(--rule);
  font-style: italic; color: var(--text-soft);
  max-width: 40rem;
}

/* Anteprima: cornici neutre, pronte per gli screenshot reali */
.preview {
  display: grid; gap: 2rem; align-items: end;
  margin-top: 3rem;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}
@media (min-width: 48rem) { .preview { grid-template-columns: 15rem minmax(0, 1fr); justify-items: stretch; } }
.device { margin: 0; width: 100%; }
.device figcaption {
  font-family: var(--sans); font-size: 0.8125rem; color: var(--text-soft);
  text-align: center; margin-top: 0.75rem;
}
.screen {
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(to bottom, transparent 0 27px, rgba(139, 135, 127, 0.22) 27px 28px),
    var(--carta);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.screen-mark { opacity: 0.35; }
.device-phone { max-width: 15rem; }
.device-phone .screen {
  aspect-ratio: 9 / 19.5;
  border: 8px solid var(--inchiostro);
  border-radius: 2.25rem;
}
.device-desktop .screen {
  aspect-ratio: 16 / 10;
  border: 8px solid var(--inchiostro);
  border-top-width: 22px;
  border-radius: 0.75rem;
}
@media (prefers-color-scheme: dark) {
  .device-phone .screen, .device-desktop .screen { border-color: #3A3C44; }
}
.note { margin-top: 1.5rem; font-style: italic; color: var(--text-soft); text-align: center; }

/* Beta: fondo Vinaccia, testo Carta (contrasto 8,6) */
.section-dark { background: var(--vinaccia); color: var(--carta); border-top: 0; }
.section-dark .eyebrow { color: var(--rosa-vinaccia); }
.section-dark p + p { margin-top: 1rem; }
.section-dark h2 { margin-bottom: 1.5rem; }
.section-dark .button,
.section-dark .button:hover { background: var(--carta); color: var(--vinaccia); }
.section-dark .button:hover { background: #FFFFFF; }
.section-dark a:focus-visible { outline-color: var(--carta); }
.mail { font-family: var(--sans); font-size: 0.9375rem; color: var(--carta); opacity: 0.85; user-select: all; }

/* Piè di pagina */
.site-footer {
  padding-block: 3rem 3.5rem;
  display: grid; gap: 0.5rem; justify-items: start;
}
.footer-mark { margin-bottom: 0.75rem; }
.site-footer .small { font-family: var(--sans); font-size: 0.8125rem; color: var(--text-soft); }

/* 404 */
.not-found { padding-block: 6rem; }
.not-found h1 { font-size: clamp(2rem, 6vw, 3.5rem); margin-bottom: 1.25rem; }
