/* =========================================================================
   Chiesa di Pandino — Design system
   Tradotto dal progetto Claude Design "Redesign chiesa Pandino"
   Font: Bricolage Grotesque (titoli) · Public Sans (testo)
   ========================================================================= */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-2);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---- Design tokens ---------------------------------------------------- */
:root {
  --font-head: 'Bricolage Grotesque', 'Public Sans', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Superfici / testo */
  --bg: #FBFAF7;
  --surface: #ffffff;
  --ink: #1f2933;       /* titoli */
  --ink-2: #26303a;     /* testo base */
  --text: #3f4b56;
  --muted: #5c6873;
  --muted-2: #8593a0;
  --line: rgba(38, 48, 58, 0.08);

  /* Scuro (topbar / footer) */
  --dark: #1f2933;
  --dark-text: #9fb0bd;

  /* Blu — Parrocchia */
  --primary: #2f5d86;
  --primary-dark: #23475f;
  --primary-tint: #eef3f8;
  --primary-line: rgba(47, 93, 134, 0.16);

  /* Arancio — Oratorio */
  --accent: #b5641f;
  --accent-soft: #ffe6cd;
  --accent-bullet: #ffd9b8;
  --accent-tint: #f6ede2;

  /* Forma */
  --r-card: 14px;
  --r-sm: 10px;
  --r-xs: 8px;
  --r-pill: 999px;

  --container: 1200px;
  --pad: 32px;

  --shadow-card: 0 8px 30px rgba(31, 41, 51, 0.05);
  --shadow-accent: 0 8px 30px rgba(181, 100, 31, 0.18);
}

/* ---- Layout ----------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.section { padding-top: 56px; padding-bottom: 56px; }
.section--tight { padding-top: 48px; padding-bottom: 8px; }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0;
}
.eyebrow--accent { color: var(--accent); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.section-head h2 { font-size: clamp(26px, 4vw, 34px); }

.link-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.link-more:hover { text-decoration: underline; }
.link-more--accent { color: var(--accent); font-weight: 700; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-xs);
  font-weight: 600;
  z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }

.btn--on-dark { background: #fff; color: var(--primary); font-weight: 700; }
.btn--on-dark:hover { background: #f1f5f9; }

.btn--sm { padding: 11px 20px; font-size: 14px; }

/* ---- Pills / badges --------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pill--blue { background: var(--primary-tint); color: var(--primary); }
.pill--accent { background: rgba(255, 255, 255, 0.18); color: var(--accent-soft); }
.pill--glass {
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff;
  letter-spacing: 0.14em;
}

.tag {
  display: inline-block;
  color: #fff;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.tag--blue { background: var(--primary); }
.tag--accent { background: var(--accent); }

/* =========================================================================
   Top bar
   ========================================================================= */
.topbar {
  background: var(--dark);
  color: var(--dark-text);
  font-size: 13px;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.topbar__contacts {
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
}
.topbar__contacts a { text-decoration: none; color: inherit; }
.topbar__contacts a:hover { color: #fff; }
.topbar__contacts strong { color: #fff; font-weight: 600; }
.topbar__sep { opacity: 0.4; }

.topbar__social { display: flex; gap: 8px; }
.social-dot {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(159, 176, 189, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--dark-text);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.social-dot:hover { background: #fff; color: var(--dark); border-color: #fff; }
.social-dot svg { width: 13px; height: 13px; display: block; }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand__mark { flex-shrink: 0; height: 42px; width: auto; display: block; }
.brand__name {
  display: block;
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.brand__sub {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 4px;
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  background-color: var(--dark);
  background-image: url('../img/bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 30, 40, 0.12) 0%, rgba(20, 30, 40, 0.74) 100%);
}
.hero__inner {
  position: relative;
  width: 100%;
  padding-bottom: 60px;
  padding-top: 60px;
}
.hero h1 {
  font-size: clamp(34px, 6.2vw, 60px);
  font-weight: 800;
  line-height: 1.04;
  color: #fff;
  letter-spacing: -0.02em;
  max-width: 760px;
  margin: 20px 0 18px;
}
.hero p {
  font-size: clamp(16px, 2.2vw, 18px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  max-width: 560px;
  margin: 0;
}

/* =========================================================================
   Cards generiche
   ========================================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 32px 34px;
}
.card--blueline { border-color: var(--primary-line); }

/* Griglie */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--14-1 { grid-template-columns: 1.4fr 1fr; }

/* ---- Quick access: orari messe --------------------------------------- */
.quick-mass {
  background: var(--primary-tint);
  border: 1px solid var(--primary-line);
  border-radius: var(--r-card);
  padding: 32px 34px;
}
.quick-head { margin-bottom: 20px; }
.quick-head h3 { font-size: 26px; margin-top: 6px; }

.mass-list { display: flex; flex-direction: column; gap: 10px; }
.mass-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 13px 18px;
}
.mass-row__label { font-weight: 700; font-size: 15px; color: var(--ink); }
.mass-times { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mass-time {
  background: var(--primary-tint);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: var(--r-xs);
  font-size: 13.5px;
  font-weight: 700;
}
.quick-foot { margin-top: 18px; }
.quick-foot a { font-weight: 700; color: var(--primary); font-size: 14.5px; text-decoration: none; }
.quick-foot a:hover { text-decoration: underline; }

/* ---- Quick access: fotografie ---------------------------------------- */
.photo-card { background: var(--surface); }
/* Card affiancate di pari altezza: le sottocard (griglia foto e lista orari)
   devono partire alla stessa riga. Stesso margine di .quick-head (20px) e
   niente spinta verticale dall'allineamento a baseline del link. */
.photo-card .section-head { margin-bottom: 20px; align-items: flex-start; }
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  height: 218px;
}
.photo {
  border-radius: var(--r-sm);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  position: relative;
}
.photo--ph {
  background:
    repeating-linear-gradient(45deg, rgba(31,41,51,.05) 0 9px, rgba(31,41,51,.08) 9px 18px),
    #cdd8e2;
}
.photo--ph-accent {
  background:
    repeating-linear-gradient(45deg, rgba(181,100,31,.07) 0 9px, rgba(181,100,31,.12) 9px 18px),
    #ecd9c4;
}
.photo--tall { grid-row: span 2; }
.photo__more {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  text-decoration: none;
}

/* ---- Dual cards (Parrocchia / Oratorio) ------------------------------ */
.feature {
  border-radius: var(--r-card);
  padding: 38px 36px;
}
.feature h3 { font-size: 30px; margin: 18px 0 12px; }
.feature p { font-size: 15.5px; line-height: 1.6; margin: 0 0 22px; }
.feature__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}
.feature__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
}
.feature__list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.feature__link { font-weight: 700; font-size: 15px; text-decoration: none; }
.feature__link:hover { text-decoration: underline; }

.feature--parrocchia {
  background: var(--surface);
  border: 1px solid var(--primary-line);
  border-top: 4px solid var(--primary);
  box-shadow: var(--shadow-card);
}
.feature--parrocchia h3 { color: var(--ink); }
.feature--parrocchia p { color: var(--muted); }
.feature--parrocchia .feature__list { color: var(--primary); }
.feature--parrocchia .feature__list li { color: var(--text); }
.feature--parrocchia .feature__list li::before { background: var(--primary); }
.feature--parrocchia .feature__link { color: var(--primary); }

.feature--oratorio {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.feature--oratorio h3 { color: #fff; }
.feature--oratorio p { color: rgba(255, 255, 255, 0.85); }
.feature--oratorio .feature__list li::before { background: var(--accent-bullet); }
.feature--oratorio .feature__link { color: var(--accent-soft); }

/* ---- Eventi ----------------------------------------------------------- */
.event {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.event:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.event__media {
  height: 130px;
  background:
    repeating-linear-gradient(45deg, rgba(31,41,51,.05) 0 10px, rgba(31,41,51,.08) 10px 20px),
    #cdd8e2;
  background-size: cover;
  background-position: center;
}
.event__body { padding: 20px 22px; }
.event__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.event__time { font-size: 12px; color: var(--muted-2); font-weight: 600; }
.event__title { font-family: var(--font-head); font-size: 19px; font-weight: 700; color: var(--ink); }
.event__desc { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }

/* ---- Avvisi ----------------------------------------------------------- */
.notices { padding: 34px 36px; }
.notices h2 { font-size: 26px; margin-bottom: 22px; }
.notices > div { display: flex; flex-direction: column; gap: 12px; }
/* Ogni avviso è una sottocard ben visibile (bordo + ombra morbida),
   coerente con le righe-orario della card "Orari delle Messe". */
.notice {
  display: flex;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: 0 2px 8px rgba(31, 41, 51, 0.07), 0 8px 30px rgba(31, 41, 51, 0.04);
}
.notice__date {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  padding-top: 2px;
}
.notice__title { font-weight: 600; font-size: 15.5px; color: var(--ink); }
.notice__text { font-size: 13.5px; color: var(--muted); margin-top: 3px; }

/* ---- Donazioni -------------------------------------------------------- */
.donate {
  background: linear-gradient(155deg, var(--primary), var(--primary-dark));
  border-radius: var(--r-card);
  padding: 38px 34px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.donate .eyebrow { color: rgba(255, 255, 255, 0.75); letter-spacing: 0.14em; }
.donate h2 { color: #fff; font-size: 30px; margin: 14px 0 12px; }
.donate p { font-size: 14.5px; line-height: 1.6; color: rgba(255, 255, 255, 0.88); margin: 0 0 24px; }
.donate .btn { align-self: flex-start; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background: var(--dark);
  color: var(--dark-text);
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-top: 46px;
  padding-bottom: 46px;
  font-size: 14px;
  line-height: 1.8;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer__brand {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.footer__title { color: #fff; font-weight: 600; margin-bottom: 8px; }
.footer__col p { margin: 0; }
.footer__col p + p { margin-top: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(159, 176, 189, 0.15);
}
.footer-bottom a { color: var(--dark-text); text-decoration: none; }
.footer-bottom a:hover { color: #fff; text-decoration: underline; }
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 18px;
  font-size: 12.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1023px) {
  :root { --pad: 24px; }
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .grid--14-1 { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  /* Header → menu mobile */
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(31, 41, 51, 0.08);
    padding: 8px 0 16px;
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    pointer-events: none;
    transition: clip-path 0.25s ease, opacity 0.2s ease;
  }
  .nav.is-open { clip-path: inset(0 0 0 0); opacity: 1; pointer-events: auto; }
  .nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .nav__links li { width: 100%; }
  .nav__links a {
    display: block;
    padding: 14px var(--pad);
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav .btn {
    margin: 14px var(--pad) 0;
    justify-content: center;
  }
  .site-header .container { position: relative; }
}

@media (max-width: 760px) {
  .grid--2 { grid-template-columns: 1fr; }
  .topbar__contacts { gap: 8px 18px; font-size: 12px; }
}

@media (max-width: 620px) {
  :root { --pad: 18px; }
  .section { padding-top: 40px; padding-bottom: 40px; }
  .section--tight { padding-top: 36px; }
  .card, .quick-mass, .feature, .notices, .donate { padding: 26px 22px; }
  .grid--3 { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr; gap: 28px; }
  .hero { min-height: 460px; }
  .hero__inner { padding-bottom: 40px; }
  .topbar__sep { display: none; }
  .mass-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .mass-times { justify-content: flex-start; }
}
