/* =============================================================
   Pietro Petrilli - Psicologo | Sito statico tema anime
   Design: carta calda + accento Uzumaki arancio. Un solo accento.
   Theme lock: chiaro su tutta la pagina.
   ============================================================= */

:root {
  --paper: #faf6f0;
  --paper-2: #f3ece2;
  --paper-3: #eee5d8;
  --ink: #2b2622;
  --ink-2: #5f574e;
  --ink-3: #8a8076;
  --accent: #d96f2b;
  --accent-strong: #8c3e0d;
  --accent-btn: #a64e14;
  --accent-deep: #98430f;
  --accent-soft: #f6e2d1;
  --line: #e5dccf;
  --white: #ffffff;
  --radius: 16px;
  --container: 1200px;
  --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography helpers ---------- */
.kana {
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  color: var(--accent);
  line-height: 1;
}

.orange { color: var(--accent); }

section { scroll-margin-top: var(--nav-h); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 650; font-size: 16px; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer;
  white-space: nowrap; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--accent-btn); color: var(--white); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: 0 8px 24px rgba(150,70,15,.30); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent-deep); color: var(--accent-deep); transform: translateY(-2px); }

/* ---------- Section heading ---------- */
.section-title { font-size: clamp(30px, 4.5vw, 46px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; max-width: 20ch; }
.section-lead { color: var(--ink-2); margin-top: 16px; max-width: 56ch; }
.section-head { padding: 24px 0 8px; }
.section-pad { padding: 72px 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(250,246,240,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; font-size: 17px; }
.brand .spiral { width: 30px; height: 30px; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-2); letter-spacing: 0; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 8px 12px; border-radius: 10px; font-weight: 550; font-size: 15px; color: var(--ink); transition: background .15s ease; }
.nav-links a:hover { background: var(--paper-2); color: var(--accent-deep); }
.nav-cta { margin-left: 8px; padding: 10px 18px; font-size: 14.5px; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 48px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-deep); padding: 6px 12px; border: 1px solid #eccdb4;
  border-radius: 999px; background: var(--accent-soft);
}
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; margin: 22px 0 20px; }
.hero h1 em { font-style: italic; color: var(--accent-btn); }
.hero-sub { color: var(--ink-2); font-size: 18px; max-width: 46ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-art { position: relative; display: flex; align-items: center; justify-content: center; min-height: 340px; }
.hero-art .spiral-lg { width: min(360px, 80%); filter: drop-shadow(0 20px 40px rgba(217,111,43,.22)); }
.hero-art .kana { position: absolute; font-size: 40px; opacity: .16; }
.hero-art .kana.k1 { top: 8%; left: 8%; }
.hero-art .kana.k2 { bottom: 10%; right: 12%; }

/* ---------- Ticker strip (temas) ---------- */
.ticker { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink); color: var(--paper); padding: 16px 0; }
.ticker-track { display: flex; gap: 48px; width: max-content; animation: ticker 26s linear infinite; }
.ticker-track span { font-size: 15px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.ticker-track .dot { color: var(--accent); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Bento themes ---------- */
.bento-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 200px; gap: 18px; margin-top: 24px; }
.bento-cell { border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.bento-cell:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(43,38,34,.12); }
.bento-cell .cell-kana { position: absolute; top: 12px; right: 16px; font-size: 34px; opacity: .18; }
.bento-cell h3 { font-size: 24px; letter-spacing: -0.02em; font-weight: 800; line-height: 1.15; }
.bento-cell p { margin-top: 8px; font-size: 14.5px; opacity: .85; max-width: 34ch; }
.b-spread { background: var(--accent-btn); color: var(--white); }
.b-spread h3 { color: #fff; }
.b-paper1 { background: var(--white); border: 1px solid var(--line); }
.b-paper2 { background: var(--paper-2); }
.b-ink { background: var(--ink); color: var(--paper-3); }
.b-ink h3 { color: #fff; }
.b-cell-1 { grid-column: span 3; }
.b-cell-2 { grid-column: span 3; }
.b-cell-3 { grid-column: span 2; }
.b-cell-4 { grid-column: span 2; }
.b-cell-5 { grid-column: span 4; }

/* ---------- Book ---------- */
.book-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.book-cover {
  position: relative; border-radius: 8px 20px 20px 8px; aspect-ratio: 3/4;
  background: linear-gradient(160deg, #3a332c, #221d18 70%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 60px rgba(43,38,34,.3);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 26px; color: var(--paper);
  overflow: hidden;
}
.book-cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(217,111,43,.3), transparent 55%); }
.book-cover .spiral-sm { width: 64px; margin-bottom: 14px; position: relative; z-index: 1; }
.book-cover .cover-senz { position: absolute; top: 20px; right: 22px; font-size: 26px; color: rgba(217,111,43,.85); z-index: 1; }
.book-cover .cover-title { font-size: 26px; letter-spacing: -0.02em; font-weight: 800; line-height: 1.12; position: relative; z-index: 1; }
.book-cover .cover-sub { font-size: 13px; opacity: .8; margin-top: 10px; position: relative; z-index: 1; }
.book-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.book-fact { font-size: 14px; color: var(--ink-2); border: 1px solid var(--line); background: var(--white); padding: 8px 14px; border-radius: 999px; }

/* ---------- Carousel ---------- */
.carousel { position: relative; margin-top: 28px; }
.carousel-viewport { overflow: hidden; -webkit-mask-image: linear-gradient(90deg,#000 92%,transparent); mask-image: linear-gradient(90deg,#000 92%,transparent); }
.carousel-track { display: flex; gap: 18px; width: max-content; animation: carousel 40s linear infinite; }
.carousel:hover .carousel-track { animation-play-state: paused; }
.ig-card {
  width: 300px; border-radius: var(--radius); overflow: hidden;
  background: var(--white); border: 1px solid var(--line); flex-shrink: 0;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ig-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(43,38,34,.12); }
.ig-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.ig-card .ig-body { padding: 14px 16px 16px; }
.ig-card .ig-date { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: .02em; }
.ig-card .ig-cap { margin-top: 6px; font-size: 14.5px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes carousel { to { transform: translateX(-50%); } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step .step-kana { font-size: 30px; }
.step h3 { font-size: 20px; letter-spacing: -0.02em; font-weight: 800; margin: 12px 0 8px; }
.step p { color: var(--ink-2); font-size: 15px; }

/* ---------- Why anime (quote) ---------- */
.anime-quote { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: clamp(36px,6vw,72px); overflow: hidden; }
.anime-quote blockquote { font-size: clamp(22px, 3.4vw, 34px); font-weight: 750; letter-spacing: -0.02em; line-height: 1.25; max-width: 26ch; }
.anime-quote blockquote em { color: var(--accent); font-style: italic; }
.anime-quote figcaption { margin-top: 20px; color: var(--paper-3); }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 24px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; padding: 20px 0; font-size: 17px; font-weight: 700; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-q .chev { transition: transform .25s ease; color: var(--accent); font-size: 20px; }
.faq-item.open .chev { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 0 20px; color: var(--ink-2); max-width: 60ch; }

/* ---------- Media ---------- */
.media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.media-card { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); padding: 22px; transition: transform .2s ease, box-shadow .2s ease; }
.media-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(43,38,34,.1); }
.media-card span { display: inline-block; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 800; font-size: 15px; display:flex; align-items:center; justify-content:center; }
.media-card h3 { margin-top: 14px; font-size: 18px; letter-spacing: -0.01em; font-weight: 800; }
.media-card p { margin-top: 4px; color: var(--ink-2); font-size: 14px; }
.media-card .go { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 700; font-size: 14px; }

/* ---------- Contact ---------- */
.contact { background: var(--paper-2); }
.contact-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.contact .section-title { max-width: 18ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Footer ---------- */
.footer { background: var(--paper-3); padding: 48px 0 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; }
.footer h4 { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: var(--ink); font-weight: 550; font-size: 15px; }
.footer ul a:hover { color: var(--accent); }
.footer .disclaim { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; max-width: 80ch; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }

/* ---------- Mobile collapse ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { min-height: 240px; order: -1; }
  .hero-art .spiral-lg { width: 220px; }
  .book-grid { grid-template-columns: 1fr; gap: 40px; }
  .bento-grid { grid-template-columns: 1fr 1fr 1fr; }
  .bento-cell { grid-column: span 3 !important; grid-auto-rows: auto; }
  .steps { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .media-grid { grid-template-columns: 1fr; }
  .section-pad { padding: 56px 0; }
  .hero { padding: 40px 0 56px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track, .carousel-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .bento-cell, .ig-card, .media-card { transition: none; }
}

/* ---------- Quiz ---------- */
.quiz-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px,4vw,40px); max-width: 640px; }
.quiz-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.quiz-count { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.quiz-dots { display: flex; gap: 6px; }
.quiz-dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: background .2s ease, transform .2s ease; }
.quiz-dots i.on { background: var(--accent); transform: scale(1.25); }
.quiz-q { font-size: clamp(20px,3vw,26px); letter-spacing: -0.02em; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  text-align: left; background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  padding: 16px 18px; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: transform .12s ease, border-color .15s ease, background .15s ease; -webkit-tap-highlight-color: transparent;
}
.quiz-opt:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.quiz-opt:active { transform: scale(.99); }
.quiz-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.quiz-result { text-align: left; animation: quizin .5s cubic-bezier(.16,1,.3,1); }
@keyframes quizin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.quiz-result .res-above { display: flex; align-items: center; gap: 14px; }
.quiz-result .res-kana { font-size: 44px; line-height: 1; color: var(--accent-btn); }
.quiz-result .res-tag { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); }
.quiz-result h3 { font-size: 26px; letter-spacing: -0.02em; font-weight: 800; margin: 4px 0 8px; }
.quiz-result .res-blurb { color: var(--ink-2); font-size: 16px; }
.quiz-closing { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; align-items: center; }
.quiz-reset { background: none; border: 0; color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.quiz-reset:hover { color: var(--accent-deep); }
.quiz-result .res-anime { margin-top: 18px; padding: 16px 18px; border-radius: 12px; background: var(--paper-2); border-left: 3px solid var(--accent); }
.res-anime .res-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 6px; }
.res-anime strong { font-size: 18px; letter-spacing: -0.01em; display: block; }
.res-anime p { margin-top: 4px; color: var(--ink-2); font-size: 14.5px; }
.quiz-result .res-help { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.res-help strong { font-size: 17px; display: block; }
.res-help p { margin-top: 4px; color: var(--ink-2); font-size: 15px; }
.res-help a { color: var(--accent-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.res-help a:hover { color: var(--accent-btn); }
.res-anime-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 18px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink);
  text-decoration: none; border-bottom: 2px solid var(--accent-soft); padding-bottom: 2px;
}
.res-anime-link::after { content: "↗"; font-size: 14px; color: var(--accent-btn); font-weight: 700; }
.res-anime-link:hover { color: var(--accent-btn); border-color: var(--accent); }
.res-anime-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Copertina cliccabile -> acquisto */
.book-cover:has(.cover-buy) { cursor: pointer; }
.book-cover .cover-buy { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.book-cover:has(.cover-buy):hover { border-color: rgba(255,255,255,.4); transform: translateY(-3px); transition: transform .2s ease, border-color .2s ease; }
.book-cover .cover-buy-chip { position: absolute; top: 16px; left: 18px; z-index: 4; background: var(--accent-btn); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 6px 11px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
@media (prefers-reduced-motion: reduce) { .book-cover:has(.cover-buy):hover { transform: none; } }
