/* Enrico Tiberia - site styles. Fonts are self-hosted (no third-party requests). */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/sourceserif4-latin-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/sourceserif4-latin-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --bg-2: #111110;
  --line: rgba(242, 238, 230, 0.12);
  --line-gold: rgba(212, 179, 127, 0.45);
  --text: #f2eee6;
  --muted: #b3ada3;
  --gold: #d4b37f;
  --gold-hi: #e2c696;
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 5vw, 64px);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--gold); color: #111; padding: 10px 16px; text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.container { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 22px;
}
.eyebrow--rule::before { content: ""; width: 34px; height: 1px; background: var(--gold); opacity: 0.8; }
.serif-title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.12; letter-spacing: -0.01em; color: var(--text);
}
.lead { color: var(--muted); font-size: 1.06rem; line-height: 1.85; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 18px;
  min-height: 52px; padding: 14px 28px;
  font-family: var(--sans); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--gold); border-radius: 0; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
/* Inline SVG icons (Lucide, MIT; WhatsApp glyph from Simple Icons, CC0) */
.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; display: inline-block; vertical-align: -0.2em; }
.btn .icon { width: 1.25rem; height: 1.25rem; vertical-align: 0; }
.text-link .icon, .card .more .icon { width: 1.35em; height: 1.35em; margin-left: 0.35em; vertical-align: -0.32em; }
.nav__cta .icon { width: 1.05em; height: 1.05em; margin-left: 0.25em; }
.btn--gold { background: var(--gold); color: #141210; }
.btn--gold:hover { background: var(--gold-hi); border-color: var(--gold-hi); }
.btn--outline { background: transparent; color: var(--text); border-color: var(--line-gold); }
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }
.text-link {
  display: inline-flex; align-items: center;
  color: var(--gold); text-decoration: none; font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
}
.text-link:hover { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 10, 0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { width: 214px; height: auto; }
.nav { display: flex; align-items: center; gap: 36px; }
.nav__list { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav__list a {
  font-size: 0.88rem; color: var(--text); text-decoration: none; opacity: 0.9;
}
.nav__list a:hover { color: var(--gold); opacity: 1; }
.nav__cta { display: inline-flex; align-items: center; color: var(--gold); text-decoration: none; font-size: 0.88rem; white-space: nowrap; }
.nav__cta:hover { color: var(--gold-hi); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-gold); color: var(--text);
  width: 46px; height: 46px; padding: 0; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; content: "";
  transition: transform .2s ease;
}
.nav-toggle__bars::before { position: absolute; top: -6px; left: 0; }
.nav-toggle__bars::after { position: absolute; top: 6px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: clamp(640px, calc(100vh - var(--header-h)), 880px);
  display: flex; align-items: center;
}
.hero__media {
  position: absolute; top: 0; bottom: 0;
  right: max(0px, calc((100vw - var(--wrap) - 2 * var(--gutter)) / 2));
  width: min(56%, 780px);
  pointer-events: none;
}
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 34%, #000 82%, transparent 100%),
                      linear-gradient(to bottom, transparent 0%, #000 14%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 34%, #000 82%, transparent 100%),
              linear-gradient(to bottom, transparent 0%, #000 14%, #000 78%, transparent 100%);
  mask-composite: intersect;
}
.hero__inner { position: relative; z-index: 2; padding-top: 56px; padding-bottom: 80px; }
.hero__content { max-width: 640px; }
.hero__title {
  font-family: var(--sans); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.4rem, 4.9vw, 4.6rem); line-height: 1; letter-spacing: -0.025em;
  margin: 0 0 32px;
}
.hero__title .gold { color: var(--gold); }
.hero__title .line { display: block; white-space: nowrap; }
.hero__sub {
  font-family: var(--serif); font-size: clamp(1.35rem, 2.1vw, 1.75rem); line-height: 1.32;
  max-width: 500px; margin: 0 0 26px; color: var(--text);
}
.hero__body { color: var(--muted); font-size: 0.98rem; line-height: 1.75; max-width: 470px; }
.hero__body strong { color: var(--text); font-weight: 500; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 34px; }
.hero__tagline { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.08rem; margin: 0; }
.hero__caption {
  position: absolute; z-index: 3; bottom: 28px;
  right: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  margin: 0; text-align: left;
  font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; line-height: 2;
}
.hero__caption span { display: block; }
.hero__caption .name { color: var(--gold); }
.hero__caption .role { color: var(--text); opacity: 0.8; }

/* ---------- Strip ---------- */
.strip__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  border-top: 1px solid var(--line); padding-top: 30px; padding-bottom: 30px;
}
.strip__claim {
  margin: 0; font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section--alt { background: var(--bg-2); border-top: 1px solid var(--line); }
.narrow { max-width: 1060px; margin: 0 auto; }

.gold { color: var(--gold); }

/* ---------- Section head ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; margin-bottom: 48px; }
.section-head > p { color: var(--muted); max-width: 440px; margin: 0; }

/* ---------- Cosa offro ---------- */
.offer { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.offer__item { border: 1px solid var(--line); background: var(--bg); padding: 32px 28px 30px; }
.offer__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  border: 1px solid var(--line-gold); color: var(--gold); margin-bottom: 26px;
}
.offer__icon .icon { width: 26px; height: 26px; }
.offer__item h3 { font-family: var(--serif); font-size: 1.32rem; line-height: 1.3; margin-bottom: 12px; }
.offer__item p { color: var(--muted); font-size: 0.95rem; line-height: 1.75; margin: 0; }

/* ---------- Citazione ---------- */
.quote-band { padding: clamp(80px, 10vw, 140px) 0; border-top: 1px solid var(--line); }
.quote { position: relative; max-width: 900px; margin: 0 auto; }
.quote__mark { display: block; color: var(--gold); opacity: 0.85; margin-bottom: 22px; }
.quote__mark .icon { width: 40px; height: 40px; stroke-width: 1.25; }
.quote blockquote { margin: 0; }
.quote blockquote p {
  font-family: var(--serif); font-size: clamp(1.55rem, 2.9vw, 2.45rem); line-height: 1.32;
  letter-spacing: -0.005em; color: var(--text); margin: 0;
}
.quote figcaption {
  margin-top: 30px; font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold);
}
.quote figcaption::before { content: ""; display: inline-block; width: 34px; height: 1px; background: var(--gold); vertical-align: middle; margin-right: 14px; }

/* ---------- Sul campo ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 17vw, 236px); gap: 12px;
}
.gallery__item { margin: 0; overflow: hidden; background: #151513; }
.gallery__item--lg { grid-column: span 2; grid-row: span 2; }
.gallery__item picture { display: block; width: 100%; height: 100%; }
.gallery__item img { width: 100%; height: 100%; }
.gallery__item img { object-fit: cover; transition: transform .6s ease; }
.gallery__item:hover img { transform: scale(1.03); }
.gallery__item:nth-child(2) img { object-position: 35% 30%; }
.gallery__item:nth-child(3) img { object-position: 45% 30%; }
.gallery__item:nth-child(5) img { object-position: 55% 30%; }

/* ---------- Blog cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column; border: 1px solid var(--line); padding: 34px 30px 30px;
  text-decoration: none; background: var(--bg); transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--line-gold); }
.card time { font-size: 0.7rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); }
.card h3, .card .card__title { font-family: var(--serif); font-size: 1.42rem; line-height: 1.28; margin: 16px 0 14px; color: var(--text); }
.card p { color: var(--muted); font-size: 0.95rem; line-height: 1.7; margin: 0 0 24px; flex: 1; }
.card .more { display: inline-flex; align-items: center; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text); }
.card:hover .more { color: var(--gold); }
.cards-foot { margin-top: 40px; }

/* ---------- Appuntamento ---------- */
.booking { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 100px); align-items: start; }
.booking__panel { border: 1px solid var(--line); padding: clamp(24px, 3.5vw, 40px); background: var(--bg); }
.booking__panel p { color: var(--muted); }
.booking__panel .booking__lead { display: flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--serif); font-size: 1.22rem; line-height: 1.4; }
.booking__lead .icon { width: 24px; height: 24px; color: var(--gold); }
.consent-note {
  font-size: 0.88rem; line-height: 1.7; border-left: 2px solid var(--gold); padding: 4px 0 4px 16px; margin: 0 0 26px;
}
.consent-note a { color: var(--gold); }
.booking__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.calendly-host { margin-top: 28px; }
.calendly-host[hidden] { display: none; }
.calendly-host .calendly-frame { min-width: 280px; height: 1000px; }
.calendly-status { font-size: 0.9rem; color: var(--muted); margin: 14px 0 0; min-height: 1.4em; }

/* ---------- Contatti ---------- */
.contact { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 100px); align-items: start; }
.contact__wa p:not(.eyebrow) { color: var(--muted); }
.contact__number { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--text); font-size: 1rem; letter-spacing: 0.04em; text-decoration: none; }
.contact__number:hover { color: var(--gold); }
.btn--wa .icon { width: 20px; height: 20px; }
.contact__number .icon { width: 18px; height: 18px; color: var(--gold); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text); }
.field .opt { color: var(--muted); font-weight: 400; letter-spacing: 0.06em; text-transform: none; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: #121211; border: 1px solid rgba(242, 238, 230, 0.22); border-radius: 0;
  padding: 13px 14px; transition: border-color .2s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.field [aria-invalid="true"] { border-color: #e08a7a; }
.error { color: #f0a090; font-size: 0.85rem; min-height: 0; margin: 0; }
.check { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--gold); flex-shrink: 0; }
.check label { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.check label a { color: var(--gold); }
.form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form__status { color: var(--muted); font-size: 0.92rem; margin: 0; }
.form__status.is-error { color: #f0a090; }
.form__status.is-ok { color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { padding: 0 0 40px; background: var(--bg-2); }
.site-footer__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  border-top: 1px solid var(--line); padding-top: 34px; font-size: 0.86rem; color: var(--muted);
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

/* ---------- Floating WhatsApp (mobile only) ---------- */
.wa-float {
  display: none; position: fixed; right: 14px; bottom: 14px; z-index: 60;
  width: 50px; height: 50px; border-radius: 50%;
  background: #25d366; color: #fff; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}
.wa-float .icon { width: 26px; height: 26px; }
.wa-float { transition: opacity .25s ease, transform .25s ease; }
.wa-float.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; visibility: hidden; }

/* ---------- Article / inner pages ---------- */
.page-hero { padding: clamp(64px, 9vw, 120px) 0 clamp(36px, 5vw, 56px); }
.page-hero .serif-title { max-width: 820px; }
.page-hero .lead { max-width: 640px; margin-top: 18px; }
.article { padding-bottom: clamp(80px, 10vw, 130px); }
.article__body { max-width: 680px; }
.article__body p, .article__body li { color: #d6d1c8; font-family: var(--serif); font-size: 1.16rem; line-height: 1.85; }
.article__body h2 { font-family: var(--serif); font-size: 1.6rem; line-height: 1.25; margin: 1.6em 0 0.6em; color: var(--text); }
.measure { max-width: 680px; margin-left: auto; margin-right: auto; }
.article__body, .article__end { margin-left: auto; margin-right: auto; }
.article__body ul, .article__body ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.article__body li { margin-bottom: 0.5em; }
.article__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; color: var(--muted); font-size: 0.82rem; letter-spacing: 0.08em; }
.article__end { max-width: 680px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.legal .article__body p, .legal .article__body li { font-family: var(--sans); font-size: 1rem; color: var(--muted); }
.legal .article__body h2 { font-size: 1.35rem; }
.todo { color: var(--gold); font-style: italic; }
.breadcrumb { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 26px; }
.breadcrumb a { color: var(--gold); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.post-list { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav__list { gap: 22px; }
  .nav { gap: 24px; }
}
@media (max-width: 920px) {
  :root { --header-h: 68px; }
  .brand img { width: 184px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 0;
    background: #0d0d0c; border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 22px;
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a, .nav__cta { display: block; padding: 14px 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .nav__cta { border-bottom: 0; }

  .hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero__media {
    position: relative; inset: auto; width: 100%; max-width: 620px; margin: 0 auto;
    height: min(100vw, 600px);
  }
  .hero__media img {
    object-position: 50% 0%;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 88%),
                        linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 88%),
                linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
  }
  .hero__inner { margin-top: calc(-1 * min(14vw, 84px)); padding-top: 0; padding-bottom: 28px; }
  .hero__caption { position: static; padding: 0 var(--gutter) 40px; max-width: calc(var(--wrap) + 2 * var(--gutter)); width: 100%; margin: 0 auto; }

  .booking, .contact { grid-template-columns: 1fr; }
  .cards, .post-list { grid-template-columns: 1fr; }
  .offer { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: clamp(140px, 36vw, 300px); }

  .wa-float { display: inline-flex; }
  .site-footer { padding-bottom: 96px; }
}
@media (max-width: 560px) {
  .hero__title { font-size: clamp(2rem, 10vw, 3.2rem); }
  .eyebrow { letter-spacing: 0.24em; }
  .eyebrow--rule::before { width: 22px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .form { grid-template-columns: 1fr; }
  .strip__bar { flex-direction: column; align-items: flex-start; }
  .site-footer__bar { flex-direction: column; align-items: flex-start; }
  .booking__actions .btn { width: 100%; }
  .offer { grid-template-columns: 1fr; }
  .gallery { gap: 8px; }
}
.contact__wa .serif-title { margin-bottom: 22px; }

/* Social links: rendered by site.js from SOCIAL (empty for now) */
.social { display: flex; gap: 18px; }
@media (prefers-reduced-motion: reduce) { .gallery__item img { transition: none; } }
.text-link .icon--arrow-left { margin: 0 0.45em 0 0; }

/* ---------- La mia storia: five scroll-told chapters + optional narration ----------
   Default (no JS / reduced motion): chapters stack, every line visible, motifs static.
   .is-cinematic (added by site.js): sticky stage per chapter, lines reveal on scroll.
   Only transform and opacity animate (blur-in only on desktop pointers). */
.saga {
  position: relative; background: #070809; padding-top: clamp(64px, 9vw, 120px);
  --stage-h: calc(100vh - var(--header-h)); --step: 42vh;
}
@supports (height: 100svh) { .saga { --stage-h: calc(100svh - var(--header-h)); --step: 42svh; } }
.saga__intro { padding-bottom: clamp(48px, 7vw, 96px); }
.saga__intro .serif-title { max-width: 760px; }
.saga__lead { max-width: 680px; margin: 26px 0 30px; color: var(--muted); font-size: 1.06rem; line-height: 1.85; }
.saga__hint {
  display: inline-flex; align-items: center; gap: 0.7em; margin: 0;
  color: var(--gold); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
}
.saga__hint .icon { width: 1.3em; height: 1.3em; }
.saga__chapters { position: relative; }
.saga__outro {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px;
  padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(80px, 10vw, 130px);
}

/* Progress rail (whole story) */
.saga__rail { position: sticky; top: var(--header-h); height: 0; z-index: 4; }
.saga__progress {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gold);
  transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 12px rgba(212, 179, 127, 0.55);
}
.saga:not(.is-cinematic) .saga__rail { display: none; }

/* Speaker */
.saga__player { position: sticky; top: calc(100vh - 112px); height: 0; z-index: 5; }
@supports (height: 100svh) { .saga__player { top: calc(100svh - 112px); } }
.saga__player-inner {
  position: absolute; top: 0; right: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.saga__speaker {
  display: inline-flex; flex-direction: row-reverse; align-items: center; gap: 14px;
  padding: 0; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer;
}
.saga__disc {
  position: relative; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  background: rgba(10, 10, 10, 0.78); border: 1px solid var(--line-gold); color: var(--gold);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.saga__disc .icon { width: 24px; height: 24px; vertical-align: 0; }
.saga__disc::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 1px solid var(--gold); opacity: 0; pointer-events: none;
}
.saga__ico--off { display: none; }
.saga__label {
  padding: 8px 12px; background: rgba(10, 10, 10, 0.78);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
}
.saga__speaker:hover .saga__disc { border-color: var(--gold); }
.saga__speaker:focus-visible { outline: none; }
.saga__speaker:focus-visible .saga__disc { outline: 2px solid var(--gold); outline-offset: 3px; }
.saga__speaker[aria-pressed="true"] .saga__disc { background: var(--gold); border-color: var(--gold); color: #141210; }
.saga__speaker[aria-pressed="true"] .saga__ico--on { display: none; }
.saga__speaker[aria-pressed="true"] .saga__ico--off { display: block; }
.saga__speaker[aria-pressed="true"] .saga__disc::after { animation: saga-ring 1.9s ease-out infinite; }
.saga__speaker[aria-busy="true"] .saga__disc { opacity: 0.7; }
.saga__note {
  margin: 0; padding: 2px 8px; background: rgba(10, 10, 10, 0.7);
  font-size: 0.68rem; letter-spacing: 0.04em; color: var(--muted);
}
@keyframes saga-ring { from { transform: scale(1); opacity: 0.75; } to { transform: scale(1.65); opacity: 0; } }

/* Chapters */
.chapter { position: relative; --p: 0.55; }
.chapter--c2 { --p: 0; }
.chapter__stage { position: relative; overflow: hidden; padding: clamp(80px, 11vw, 150px) 0; }
.chapter__light { position: absolute; inset: 0; z-index: 0; background: #08090b; }
.chapter__stage::before { /* vignette */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.72) 100%);
}
.chapter__stage::after { /* film grain */
  content: ""; position: absolute; inset: -50%; z-index: 2; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.chapter__inner {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 110px); align-items: center;
}
.chapter__head { position: relative; }
.chapter__num {
  position: absolute; left: -0.04em; top: -0.8em; z-index: -1; pointer-events: none;
  font-family: var(--serif); font-size: clamp(6rem, 12vw, 11rem); line-height: 1; color: rgba(242, 238, 230, 0.05);
}
.chapter__eyebrow {
  margin: 0 0 18px; color: var(--gold);
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase;
}
.chapter__title {
  font-family: var(--serif); font-size: clamp(2.4rem, 4.6vw, 4.4rem); line-height: 1.04;
  letter-spacing: -0.015em; color: #e6e9ee;
}
.chapter__motif { position: relative; width: clamp(110px, 11vw, 160px); margin-top: clamp(30px, 4vw, 52px); color: #8f99a8; }
.motif { display: block; width: 100%; height: auto; overflow: visible; }
.motif * { transform-box: view-box; }
.chapter__clock {
  margin: 14px 0 0; color: var(--gold); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.24em; font-variant-numeric: tabular-nums;
}
.chapter__lines { display: flex; flex-direction: column; gap: clamp(14px, 1.6vw, 24px); }
.chapter__line {
  margin: 0; max-width: 680px;
  font-family: var(--serif); font-size: clamp(1.3rem, 2.1vw, 2rem); line-height: 1.32; color: #f6f7f9;
}
.chapter__line.is-spoken { color: var(--gold-hi); }

/* Light tells the arc: cold c1-c3, one warm point in c4, full warm gold in c5 */
.chapter--c1 .chapter__light { background: radial-gradient(ellipse 60% 55% at 22% 34%, rgba(132, 150, 178, 0.13), transparent 70%), linear-gradient(180deg, #0c0e12, #08090b); }
.chapter--c2 .chapter__light { background: radial-gradient(ellipse 55% 50% at 74% 42%, rgba(120, 138, 165, 0.10), transparent 70%), linear-gradient(180deg, #090b0e, #07080a); }
.chapter--c3 .chapter__light { background: radial-gradient(ellipse 50% 45% at 50% 56%, rgba(110, 124, 148, 0.07), transparent 70%), #060708; }
.chapter--c4 .chapter__light { background: radial-gradient(ellipse 60% 50% at 25% 50%, rgba(226, 169, 90, 0.05), transparent 70%), #060606; }
.chapter--c5 .chapter__light { background: radial-gradient(ellipse 70% 60% at 30% 60%, rgba(212, 179, 127, 0.28), transparent 70%), linear-gradient(180deg, #120d07, #0b0805); }
.chapter--c4 .chapter__title, .chapter--c5 .chapter__title { color: #f3ead9; }
.chapter--c5 .chapter__title { color: var(--gold-hi); }
.chapter--c5 .chapter__line { color: #fbf4e8; }
.chapter--c5 .chapter__line.is-spoken { color: var(--gold-hi); }

/* Motifs (Lucide-style strokes; --p = scroll progress through the chapter, 0..1) */
.m-mesh { opacity: 0.45; stroke-dasharray: 1 2.2; }
.m-ink { fill: var(--gold); stroke: none; opacity: 0.32; transform-origin: 32px 15.6px; transform: scaleY(var(--p)); }
.m-squeegee { color: #c5ccd6; transform: translateY(calc(var(--p) * 26px)); }
.m-drop { stroke: var(--gold); fill: rgba(212, 179, 127, 0.25); }
.m-ticks { opacity: 0.7; }
.m-hand { stroke: var(--gold); stroke-width: 1.6; transform-origin: 32px 32px; }
.m-hour { transform: rotate(calc(210deg + var(--p) * 360deg)); }
.m-minute { stroke-width: 1.1; transform: rotate(calc(var(--p) * 4320deg)); }
.m-pin { fill: var(--gold); stroke: none; }
.m-sand-top, .m-sand-bot { fill: var(--gold); stroke: none; opacity: 0.55; }
.m-sand-top { transform-origin: 32px 28.5px; transform: scaleY(calc(1 - var(--p))); }
.m-sand-bot { transform-origin: 32px 57.5px; transform: scaleY(var(--p)); }
.m-stream { stroke: var(--gold); stroke-dasharray: 1.5 2.5; opacity: 0.6; }
.chapter__motif--c4 { color: var(--gold); }
.chapter__motif--c4::before { /* the single warm point of light */
  content: ""; position: absolute; left: 50%; top: 50%; width: 460px; height: 460px; margin: -230px 0 0 -230px; z-index: -1;
  background: radial-gradient(circle, rgba(255, 200, 128, 0.42) 0, rgba(226, 169, 90, 0.17) 14%, rgba(226, 169, 90, 0.05) 34%, transparent 62%);
  pointer-events: none;
}
.m-ring { opacity: 0; stroke: var(--gold); transform-origin: 32px 32px; }

/* c5: his real stage photos, slow Ken Burns */
.chapter__photos {
  position: absolute; top: 0; bottom: 0; right: 0; left: 30%; z-index: 1; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 48%); mask-image: linear-gradient(90deg, transparent 0%, #000 48%);
}
.chapter__photo { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.chapter__photo.is-on { opacity: 1; }
.chapter__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 35%; transform: scale(1.06); }
.chapter__photos::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 8, 5, 0.8) 0%, rgba(11, 8, 5, 0.4) 45%, rgba(11, 8, 5, 0.12) 100%),
    linear-gradient(180deg, rgba(11, 8, 5, 0.5) 0%, transparent 25%, transparent 75%, rgba(11, 8, 5, 0.6) 100%);
}
.chapter--c5 .chapter__inner { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(26px, 3vw, 40px); }
.chapter--c5 .chapter__lines { max-width: 560px; }

/* Cinematic mode */
.saga.is-cinematic .chapter { height: calc(var(--stage-h) + var(--n) * var(--step)); }
.saga.is-cinematic .chapter__stage {
  position: sticky; top: var(--header-h); height: var(--stage-h); padding: 0;
  display: flex; align-items: center;
}
.saga.is-cinematic .chapter__inner { width: 100%; }
.saga.is-cinematic .chapter__line {
  opacity: 0; transform: translate3d(0, 22px, 0);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
}
.saga.is-cinematic .chapter__line.is-shown { opacity: 0.34; transform: none; }
.saga.is-cinematic .chapter__line.is-current,
.saga.is-cinematic .chapter__line.is-shown.is-spoken { opacity: 1; }
.saga.is-cinematic .chapter.is-live .m-ring { animation: saga-call 2.6s ease-out infinite; }
.saga.is-cinematic .chapter.is-live .m-ring--2 { animation-delay: 1.3s; }
.saga.is-cinematic .chapter.is-live .m-wave { animation: saga-wave 1.3s ease-in-out infinite alternate; }
.saga.is-cinematic .chapter.is-live .m-wave--2 { animation-delay: .35s; }
.saga.is-cinematic .chapter.is-live .chapter__motif--c4::before { animation: saga-glow 3.2s ease-in-out infinite alternate; }
.saga.is-cinematic .chapter--c5.is-live .chapter__photo img { animation: saga-kb 22s ease-in-out infinite alternate; }
.saga.is-cinematic .chapter--c5.is-live .chapter__photo[data-photo="1"] img { animation-name: saga-kb2; }
@keyframes saga-call { 0% { transform: scale(0.72); opacity: 0.6; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes saga-wave { from { opacity: 0.25; } to { opacity: 1; } }
@keyframes saga-glow { from { opacity: 0.7; transform: scale(0.94); } to { opacity: 1; transform: scale(1.06); } }
@keyframes saga-kb { from { transform: scale(1.06) translate3d(0, 0, 0); } to { transform: scale(1.18) translate3d(-2.5%, -1.5%, 0); } }
@keyframes saga-kb2 { from { transform: scale(1.18) translate3d(-2%, 0, 0); } to { transform: scale(1.06) translate3d(1.5%, -1%, 0); } }
@keyframes saga-grain { 0% { transform: translate3d(0, 0, 0); } 25% { transform: translate3d(-4%, 3%, 0); } 50% { transform: translate3d(3%, -5%, 0); } 75% { transform: translate3d(-2%, -3%, 0); } 100% { transform: translate3d(4%, 2%, 0); } }
@media (hover: hover) and (pointer: fine) and (min-width: 921px) {
  .saga.is-cinematic .chapter__line {
    filter: blur(8px);
    transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1), filter .8s ease;
  }
  .saga.is-cinematic .chapter__line.is-shown { filter: blur(0); }
  .saga.is-cinematic .chapter.is-live .chapter__stage::after { animation: saga-grain 1s steps(5) infinite; }
}

@media (max-width: 920px) {
  .saga { --step: 36vh; }
  @supports (height: 100svh) { .saga { --step: 36svh; } }
  .chapter__inner { grid-template-columns: 1fr; gap: 26px; }
  .chapter__head { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; align-items: end; }
  .chapter__eyebrow, .chapter__title { grid-column: 1; }
  .chapter__eyebrow { margin-bottom: 12px; letter-spacing: 0.26em; }
  .chapter__motif { grid-column: 2; grid-row: 1 / span 2; width: 74px; margin: 0; align-self: end; }
  .chapter__clock { grid-column: 2; margin-top: 8px; text-align: center; font-size: 0.68rem; letter-spacing: 0.16em; }
  .chapter__motif--c4::before { width: 300px; height: 300px; margin: -150px 0 0 -150px; }
  .chapter__num { font-size: 6.5rem; top: -0.5em; }
  .chapter__title { font-size: clamp(2.1rem, 9vw, 2.9rem); }
  .chapter__line { font-size: clamp(1.18rem, 5vw, 1.45rem); line-height: 1.36; }
  .chapter__lines { gap: 14px; }
  .saga.is-cinematic .chapter__stage { padding: 24px 0 112px; }
  .chapter__photos {
    left: 0; bottom: 48%;
    -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%); mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
  }
  .saga.is-cinematic .chapter--c5 .chapter__stage { align-items: flex-end; }
  .chapter__photo img { object-position: 62% 30%; }
  .chapter__photos::after {
    background:
      linear-gradient(180deg, rgba(11, 8, 5, 0.25) 0%, rgba(11, 8, 5, 0.15) 50%, rgba(11, 8, 5, 0.6) 100%);
  }
  .saga__player-inner { right: auto; left: var(--gutter); align-items: flex-start; }
  .saga__speaker { flex-direction: row; }
  .saga__disc { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .saga__disc, .chapter__photo { transition: none; }
  .saga__speaker[aria-pressed="true"] .saga__disc::after { animation: none; }
}
