/* michelebrizi.it — foglio di stile unico per tutto il sito.
   Caratteri: gli stessi dei libri (EB Garamond per i titoli, Libre Franklin per il testo).

   I file dei caratteri stanno dentro questo sito, in /fonts/. Non vengono
   scaricati da Google: cosi' nessun server esterno vede l'indirizzo IP di chi
   apre la pagina, e non serve nessun avviso sui cookie. */

@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond.ttf") format("truetype-variations"),
       url("/fonts/eb-garamond.ttf") format("truetype");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-italic.ttf") format("truetype-variations"),
       url("/fonts/eb-garamond-italic.ttf") format("truetype");
  font-weight: 400 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("/fonts/libre-franklin.ttf") format("truetype-variations"),
       url("/fonts/libre-franklin.ttf") format("truetype");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --paper:      #F1F3EF;
  --surface:    #FFFFFF;
  --surface-2:  #E8ECE6;
  --ink:        #17241D;
  --ink-soft:   #3D4C44;
  --muted:      #5F6D65;
  --line:       #D3DBD2;
  --green:      #1F6B45;
  --green-deep: #14472F;
  --green-lit:  #3E9E6A;
  --brass:      #9A6B23;
  --shadow:     0 1px 2px rgba(20,40,30,.06), 0 8px 28px rgba(20,40,30,.07);
  --btn-fg:     #FFFFFF;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #0F1714;
    --surface:    #16211C;
    --surface-2:  #1D2A24;
    --ink:        #E7EDE8;
    --ink-soft:   #C2CFC6;
    --muted:      #93A39A;
    --line:       #2A3A32;
    --green:      #4FB37D;
    --green-deep: #8FD6AC;
    --green-lit:  #62C48D;
    --brass:      #D6A557;
    --shadow:     0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
    --btn-fg:     #0F1714;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper:      #0F1714;
  --surface:    #16211C;
  --surface-2:  #1D2A24;
  --ink:        #E7EDE8;
  --ink-soft:   #C2CFC6;
  --muted:      #93A39A;
  --line:       #2A3A32;
  --green:      #4FB37D;
  --green-deep: #8FD6AC;
  --green-lit:  #62C48D;
  --brass:      #D6A557;
  --shadow:     0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  --btn-fg:     #0F1714;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 "Libre Franklin", "Segoe UI", system-ui, -apple-system, sans-serif;
  letter-spacing: .002em;
}
img { max-width: 100%; display: block; }
a { color: var(--green); }

.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 720px; }

h1, h2, h3 { font-family: "EB Garamond", Georgia, "Times New Roman", serif; font-weight: 600;
             line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -.005em; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1.05em; max-width: 68ch; }

.eyebrow {
  font-size: .73rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--green); margin: 0 0 .9rem;
}

/* ---------- testata ---------- */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 24px;
                   padding-block: 13px; }
.brand { font-family: "EB Garamond", Georgia, serif; font-size: 1.24rem; font-weight: 600;
         color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { display: block; font-family: "Libre Franklin", sans-serif; font-size: .62rem;
              font-weight: 600; letter-spacing: .17em; text-transform: uppercase;
              color: var(--muted); margin-top: 1px; }
.site-nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: .9rem; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--green); }

/* ---------- pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  background: var(--green); color: var(--btn-fg); text-decoration: none;
  font-weight: 600; font-size: .96rem; padding: .82em 1.5em; border-radius: 2px;
  border: 1px solid var(--green); cursor: pointer; transition: background .15s ease;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn-ghost { background: transparent; color: var(--green); border-color: var(--green); }
.btn-ghost:hover { background: var(--surface-2); color: var(--green-deep); border-color: var(--green); }

/* ---------- sezioni ---------- */
section { padding-block: clamp(52px, 8vw, 92px); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- apertura ---------- */
.hero { padding-block: clamp(56px, 9vw, 104px) clamp(44px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: clamp(28px, 5vw, 60px);
             align-items: start; }
.hero h1 { margin-bottom: .55rem; }
.hero .lede { font-size: clamp(1.05rem, 1.9vw, 1.22rem); color: var(--ink-soft); max-width: 40ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.8rem; }
.pull {
  border-left: 3px solid var(--green); padding: 2px 0 2px 20px;
  font-family: "EB Garamond", Georgia, serif; font-size: clamp(1.25rem, 2.3vw, 1.62rem);
  line-height: 1.3; color: var(--ink); font-style: italic;
}
.pull cite { display: block; font-family: "Libre Franklin", sans-serif; font-size: .74rem;
             font-style: normal; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
             color: var(--muted); margin-top: 14px; }

/* ---------- dati ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
         background: var(--line); border: 1px solid var(--line); }
.fact { background: var(--surface); padding: 22px 20px; }
.fact b { display: block; font-family: "EB Garamond", Georgia, serif; font-size: 2.1rem;
          font-weight: 600; line-height: 1; color: var(--green); font-variant-numeric: tabular-nums; }
.fact span { display: block; font-size: .85rem; color: var(--muted); margin-top: 7px; }

/* ---------- passi del metodo ---------- */
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px;
         background: var(--line); border: 1px solid var(--line); margin-top: 34px; }
.step { background: var(--surface); padding: 26px 26px 28px; }
.step-n { font-family: "EB Garamond", Georgia, serif; font-size: 1rem; font-weight: 600;
          color: var(--green); letter-spacing: .06em; display: block; margin-bottom: 8px; }
.step h3 { margin-bottom: .45rem; }
.step p { font-size: .96rem; color: var(--ink-soft); margin: 0; }

/* ---------- libri ---------- */
.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
         gap: 26px; margin-top: 34px; }
.book { background: var(--surface); border: 1px solid var(--line); padding: 24px 22px 26px;
        display: flex; flex-direction: column; gap: 10px; }
.book .tag { font-size: .68rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
             color: var(--brass); }
.book h3 { font-size: 1.22rem; }
.book p { font-size: .93rem; color: var(--ink-soft); margin: 0; flex: 1; }
.book .book-link { font-size: .9rem; font-weight: 600; text-decoration: none; color: var(--green); }
.book .book-link:hover { text-decoration: underline; }
.book .cover { margin: -24px -22px 18px; background: var(--surface-2); }
.book .cover { aspect-ratio: 562 / 900; }
.book .cover img { display: block; width: 100%; height: 100%; max-width: 100%;
                   object-fit: cover; }
/* Segnaposto per un libro la cui copertina non c'e' ancora. */
.book .cover-attesa { display: grid; place-items: center; aspect-ratio: 562 / 900;
  background: linear-gradient(170deg, var(--surface-2), var(--paper));
  border-bottom: 1px solid var(--line); }
.book .cover-attesa span { font-family: "EB Garamond", Georgia, serif; font-size: 1.32rem;
  line-height: 1.22; color: var(--muted); text-align: center; padding: 0 16%;
  text-wrap: balance; }

/* ---------- elenchi ---------- */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; max-width: 62ch; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink-soft); }
.ticks li::before {
  content: ""; position: absolute; left: 6px; top: .38em; width: 7px; height: 12px;
  border: 2px solid var(--green); border-top: 0; border-left: 0;
  transform: rotate(40deg);
}

/* Un elemento con l'attributo hidden resta nascosto anche se una classe
   gli dà un display (es. .form { display:grid }). Serve allo sblocco dei bonus. */
[hidden] { display: none !important; }

/* ---------- modulo ---------- */
.form { display: grid; gap: 15px; max-width: 480px; margin-top: 26px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  font: inherit; font-size: .97rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 2px; padding: .72em .85em; width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--green-lit); outline-offset: 1px; border-color: var(--green);
}
.consent { display: flex; gap: 11px; align-items: flex-start; font-size: .84rem; color: var(--muted); }
.consent input { margin-top: .25em; accent-color: var(--green); flex: none; }
.consent a { color: var(--green); }
.form-note { font-size: .84rem; color: var(--muted); margin: 0; }
.form-ok { display: none; border: 1px solid var(--green); background: var(--surface);
           padding: 16px 18px; font-size: .94rem; color: var(--ink); }
.form-ok.on { display: block; }
.field .hint { font-size: .78rem; line-height: 1.45; color: var(--muted); }
.field label .opt { font-weight: 400; color: var(--muted); }

/* Il blocco che compare dopo l'invio: la pagina si sblocca da sola. */
.vault { border: 1px solid var(--green); border-left-width: 4px; background: var(--surface);
         padding: 24px 26px; max-width: 480px; }
.vault .eyebrow { margin-bottom: 8px; }
.vault h3 { font-family: var(--serif, "EB Garamond", Georgia, serif);
            font-size: 1.45rem; font-weight: 600; margin: 0 0 12px; color: var(--ink); }
.vault p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.vault .btn { margin-top: 2px; }
.vault ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.vault ul a { display: flex; gap: 10px; align-items: baseline; text-decoration: none;
              color: var(--green); font-weight: 600; font-size: .94rem;
              border: 1px solid var(--line); border-radius: 2px; padding: .7em .85em; }
.vault ul a:hover { border-color: var(--green); }

/* ---------- contatti ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); }
.clist { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.clist dt, .clist .k { font-size: .73rem; font-weight: 700; letter-spacing: .14em;
                       text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.clist .v { font-size: 1.05rem; color: var(--ink); word-break: break-word; }
.clist .v a { color: var(--green); text-decoration: none; }
.clist .v a:hover { text-decoration: underline; }

/* ---------- piede ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 34px 44px;
             font-size: .85rem; color: var(--muted); }
.site-foot .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: baseline; }
.site-foot a { color: var(--muted); }
.site-foot .sep { margin-left: auto; }

/* ---------- pagine bonus ---------- */
.bonus-head { padding-block: clamp(46px, 7vw, 78px) 0; }
.badge-book { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .14em;
              text-transform: uppercase; color: var(--brass); border: 1px solid var(--brass);
              padding: .4em .8em; margin-bottom: 1.1rem; }

@media (max-width: 860px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .books { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .steps { grid-template-columns: 1fr; }
  .brand span { display: none; }
  .brand { font-size: 1.1rem; }
  .site-nav { gap: 15px; }
  .site-head .wrap { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- tabella dei risultati ---------- */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px;
           overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table.results { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .95rem; }
table.results th, table.results td { text-align: left; padding: 13px 18px;
                                     border-bottom: 1px solid var(--line); }
table.results thead th { font-size: .72rem; font-weight: 700; letter-spacing: .13em;
                         text-transform: uppercase; color: var(--muted);
                         background: var(--surface-2); border-bottom: 1px solid var(--line); }
table.results tbody tr:last-child td { border-bottom: 0; }
table.results td:nth-child(3), table.results td:nth-child(4) { font-variant-numeric: tabular-nums; }
table.results td:nth-child(4) { color: var(--green); font-weight: 600; }
table.results td:nth-child(1) { font-weight: 500; }

/* ---------- testimonianze ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 34px; }
.quote { margin: 0; background: var(--surface); border: 1px solid var(--line);
         padding: 24px 24px 20px; display: flex; flex-direction: column; gap: 14px; }
.quote blockquote { margin: 0; font-family: "EB Garamond", Georgia, serif; font-size: 1.12rem;
                    line-height: 1.42; color: var(--ink); flex: 1; }
.quote blockquote::before { content: "\201C"; color: var(--green); font-size: 1.6em;
                            line-height: 0; vertical-align: -.28em; margin-right: .06em; }
.quote figcaption { font-size: .78rem; font-weight: 700; letter-spacing: .12em;
                    text-transform: uppercase; color: var(--muted); }
@media (max-width: 860px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- fotografie ---------- */
.hero-side { display: grid; gap: 22px; }
.portrait { width: 100%; height: auto; border: 1px solid var(--line);
            filter: saturate(.94) contrast(1.02); }
.shot { margin: 38px 0 0; }
.shot img { width: 100%; height: auto; border: 1px solid var(--line); }
.shot figcaption { font-size: .85rem; color: var(--muted); margin-top: 10px;
                   max-width: 60ch; }
.shot.side { margin: 0; }
.bio-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(28px, 5vw, 56px);
            align-items: start; margin-top: 22px; }
.bio-grid p { max-width: 58ch; }

/* ---------- video ---------- */
.videos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 32px;
          align-items: start; }
.video-card {
  font: inherit; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 9px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 22px 20px 24px; color: var(--ink);
  transition: border-color .15s ease, transform .15s ease;
}
.video-card:hover { border-color: var(--green); transform: translateY(-2px); }
.video-card:focus-visible { outline: 2px solid var(--green-lit); outline-offset: 2px; }
.video-card .play {
  width: 40px; height: 40px; border-radius: 50%; background: var(--green);
  position: relative; flex: none; margin-bottom: 4px;
}
.video-card .play::after {
  content: ""; position: absolute; left: 16px; top: 12px;
  border-left: 13px solid var(--surface);
  border-top: 8px solid transparent; border-bottom: 8px solid transparent;
}
.video-card:hover .play { background: var(--green-deep); }
.video-card .k { font-size: .68rem; font-weight: 700; letter-spacing: .13em;
                 text-transform: uppercase; color: var(--green); }
.video-card h3 { font-size: 1.1rem; }
.video-card p { font-size: .88rem; color: var(--ink-soft); margin: 0; }
.video-live { width: 100%; background: #000; border: 1px solid var(--line); }
.video-live iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 1000px) { .videos { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .bio-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .videos { grid-template-columns: 1fr; } }
