/* webcatechesi.it — static rebuild */
:root {
  --notte: #121A33;      /* night sky, hero + footer */
  --ink: #1B2340;
  --muted: #59627A;
  --marian: #2B4C9B;     /* Marian blue, single accent */
  --marian-dark: #1E3878;
  --stone: #F1F3F7;
  --paper: #FFFFFF;
  --rule: #DCE1EA;

  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--marian); text-underline-offset: 3px; }
a:hover { color: var(--marian-dark); }
:focus-visible { outline: 3px solid #8FB0FF; outline-offset: 3px; border-radius: 2px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; color: var(--ink); padding: 8px 14px; }

/* Header */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px var(--gutter); }
.site-header.solid { position: relative; background: var(--notte); }
.brand img { width: 150px; }
.nav { display: flex; gap: clamp(16px, 2.4vw, 32px); align-items: center; }
.nav a { color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: #fff; color: #fff; }
.nav a.nav-dona { border: 1.5px solid rgba(255,255,255,.7); border-radius: 999px; padding: 6px 16px; }
.nav a.nav-dona:hover { background: #fff; color: var(--notte); }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .brand img { width: 118px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(18,26,51,.5); border: 1px solid rgba(255,255,255,.35); color: #fff; cursor: pointer; }
  .nav { position: fixed; inset: 0; z-index: 30; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; padding: 0 32px; background: var(--notte); transform: translateX(100%); transition: transform .3s ease; }
  .nav.open { transform: none; }
  .nav a { font-family: var(--serif); font-weight: 500; font-size: 2.6rem; line-height: 1.2; }
  .nav a.nav-dona { font-size: 2.6rem; border: 0; padding: 0; }
  .nav-close { position: absolute; top: 18px; right: var(--gutter); }
}
@media (min-width: 761px) { .nav-close { display: none; } }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; color: #fff; background: var(--notte); overflow: hidden; }
.hero video, .hero .hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 30% 60%, rgba(18,26,51,.35) 0%, rgba(18,26,51,.78) 70%); }
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 6.4vw, 5.6rem); line-height: 1.02; margin: 0 0 20px; max-width: 14ch; letter-spacing: -.01em; }
.hero p { font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 40ch; margin: 0 0 32px; opacity: .92; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.video-toggle { position: absolute; right: var(--gutter); bottom: 24px; z-index: 3; background: rgba(18,26,51,.55); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 8px 16px; font: 600 .85rem var(--sans); cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font: 700 1rem var(--sans); padding: 14px 24px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; background: var(--marian); color: #fff; }
.btn:hover { background: var(--marian-dark); color: #fff; }
.btn.light { background: #fff; color: var(--notte); }
.btn.light:hover { background: #E4EAF7; color: var(--notte); }
.btn.ghost { background: transparent; color: #fff; padding-left: 0; padding-right: 0; }
.btn.ghost:hover { color: #fff; text-decoration: underline; }
.play-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--marian); display: grid; place-items: center; }
.btn.light .play-dot svg { fill: #fff; }
.play-dot svg { width: 10px; height: 10px; margin-left: 2px; fill: #fff; }

/* Sections */
section { padding: clamp(64px, 9vw, 120px) 0; }
.h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.05; margin: 0 0 14px; }
.section-lede { color: var(--muted); max-width: 60ch; margin: 0 0 44px; }

/* Catechesi grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 40px 28px; list-style: none; margin: 0; padding: 0; }
.card a { display: block; text-decoration: none; color: var(--ink); }
.card .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--stone); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card a:hover .thumb img { transform: scale(1.04); }
.card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; line-height: 1.15; margin: 14px 0 2px; }
.card a:hover h3 { color: var(--marian); }
.card time { color: var(--muted); font-size: .9rem; }
@media (max-width: 600px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; } .card h3 { font-size: 1.2rem; margin-top: 10px; } .card time { font-size: .8rem; } }

/* Chi siamo */
.about { background: var(--stone); }
.about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.about p { margin: 0 0 1.1em; max-width: 62ch; font-size: 1.1rem; }
.about .sign { font-family: var(--serif); font-style: italic; font-size: 1.5rem; }
.panel { background: #fff; border-radius: 10px; padding: 28px; border: 1px solid var(--rule); }
.panel + .panel { margin-top: 18px; }
.panel h3 { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; margin: 0 0 8px; line-height: 1.1; }
.panel p { font-size: 1rem; margin: 0 0 18px; }
.follow { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; flex-wrap: wrap; }
.follow a { display: inline-block; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--marian); text-decoration: none; font-weight: 700; }
.follow a:hover { background: var(--marian); color: #fff; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--notte); color: #B8C1D6; padding: 44px 0; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; align-items: center; }
.site-footer a { color: #fff; }
.site-footer img { width: 120px; }

/* Episode page */
.ep-head { background: var(--notte); color: #fff; padding: clamp(28px, 5vw, 56px) 0 clamp(120px, 16vw, 200px); }
.ep-head .back { color: #C9D3EA; font-weight: 700; text-decoration: none; font-size: .95rem; }
.ep-head .back:hover { color: #fff; text-decoration: underline; }
.ep-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1; margin: 18px 0 8px; }
.ep-head time { color: #C9D3EA; }
.ep-video { margin-top: calc(-1 * clamp(96px, 13vw, 170px)); }
.embed { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; box-shadow: 0 20px 50px rgba(18,26,51,.25); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed .yt-facade { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: #000; }
.embed .yt-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.embed .yt-facade span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%; background: rgba(43,76,155,.95); display: grid; place-items: center; }
.embed .yt-facade span svg { width: 26px; height: 26px; margin-left: 5px; fill: #fff; }
.embed .yt-facade:hover span { background: var(--marian-dark); }
.ep-body { max-width: 68ch; margin: 48px auto 0; }
.ep-body p { font-size: 1.15rem; line-height: 1.75; margin: 0 0 1.2em; }
.ep-body h2, .ep-body h3 { font-family: var(--serif); font-weight: 500; }
.ep-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--rule); }
.ep-nav a { text-decoration: none; color: var(--ink); display: block; }
.ep-nav small { display: block; color: var(--muted); font-size: .85rem; }
.ep-nav span { font-family: var(--serif); font-size: 1.4rem; line-height: 1.15; }
.ep-nav a:hover span { color: var(--marian); }
.ep-nav .next { text-align: right; }
.ep-body { padding-bottom: clamp(56px, 8vw, 96px); }
.ep-cta { margin-top: 56px; }

/* Forms */
.form { display: grid; gap: 18px; max-width: 620px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: .95rem; }
.form input, .form textarea { font: inherit; font-weight: 400; padding: 13px 15px; border: 1px solid #B7C0D1; border-radius: 6px; background: #fff; color: var(--ink); width: 100%; }
.form textarea { min-height: 160px; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--marian); outline: 2px solid rgba(43,76,155,.2); outline-offset: 0; }
.hidden { display: none; }

/* Simple page head */
.page-head { background: var(--notte); color: #fff; padding: clamp(40px, 7vw, 88px) 0; }
.page-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1; margin: 0; }
.page-head p { max-width: 50ch; margin: 16px 0 0; color: #D5DCEC; font-size: 1.1rem; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; width: min(1100px, 94vw); max-width: none; overflow: visible; }
.lightbox::backdrop { background: rgba(10, 14, 30, .92); }
.lightbox .embed { box-shadow: none; }
.lightbox-close { position: absolute; top: -52px; right: 0; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); font-size: 1.4rem; cursor: pointer; }
.lightbox-close:hover { background: #fff; color: var(--notte); }
