/* Ca' Edimar — foglio di stile del sito */

@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/InterDisplay-ExtraBold.woff") format("woff"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --accent: #F5B800;
  --ink: #231E1A;
  --ink-2: #3B342E;
  --muted: #5E554D;
  --red: #A8261F;
  --red-dark: #7A1A15;
  --cream: #FBF6EC;
  --soft: #F6F3EE;
  --line: #ECE6DE;
  --radius: 20px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Inter Display", "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--ink); background: #fff; }
img { max-width: 100%; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; letter-spacing: -0.015em; line-height: 1.12; margin: 0; }
p { margin: 0; }
.icon { flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- topbar + header ---------- */
.topbar { background: var(--ink); color: #F3EEE8; font-size: 14px; }
.topbar-in { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.topbar-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.topbar a { color: #F3EEE8; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar .icon { width: 16px; height: 16px; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand img { width: 64px; height: 64px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 23px; }
.brand-tag { font-size: 14px; color: var(--muted); }
.brand:hover { color: var(--ink); }

.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; font-weight: 600; font-size: 15px; }
.nav-link { color: var(--ink); text-decoration: none; padding: 10px 0; border-bottom: 3px solid transparent; }
.nav-link:hover { color: var(--red); }
.nav-link.is-active { color: var(--red); border-bottom-color: var(--accent); }
.nav-btn { background: var(--accent); color: var(--ink); text-decoration: none; padding: 11px 20px; border-radius: 999px; font-weight: 700; }
.nav-btn:hover { color: var(--ink); filter: brightness(0.95); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin: -10px; color: var(--ink); cursor: pointer; }
.nav-toggle .icon { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 4px; }
  .main-nav.open { display: flex; }
  .nav-link { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-link.is-active { border-bottom-color: var(--line); }
  .nav-btn { margin-top: 12px; text-align: center; }
  .brand img { width: 52px; height: 52px; }
  .brand-name { font-size: 20px; }
}

/* ---------- elementi comuni ---------- */
.section { padding: 80px 0; }
.section-soft { background: var(--soft); }
.section-accent { background: var(--accent); }
.section-head { margin-bottom: 36px; display: flex; flex-direction: column; gap: 8px; }
.kicker { font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }
.h2 { font-size: clamp(28px, 3.4vw, 40px); }
.lead { font-size: 19px; color: var(--ink-2); }
.muted { color: var(--muted); font-size: 16px; }
.badge { align-self: flex-start; background: var(--accent); color: var(--ink); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; padding: 14px 26px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.prose > * + * { margin-top: 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose h3 { font-size: 24px; margin-top: 1.4em; }
.prose h4 { font-size: 19px; margin-top: 1.2em; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 20px 24px; background: var(--cream); border-radius: 14px; font-size: 1.08em; font-style: italic; color: var(--ink-2); }
.prose-lg { font-size: 19px; color: var(--ink-2); }

/* ---------- home ---------- */
.hero { background: var(--cream); }
.hero-in { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 80px; }
.hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: clamp(40px, 5.2vw, 60px); line-height: 1.04; }
.hero-lead { font-size: 21px; color: #4A423B; }
.hero-text .btn-row { padding-top: 8px; }
.hero-media { flex: 1 1 500px; min-width: 0; position: relative; }
.hero-media img { position: relative; width: 100%; height: 400px; object-fit: cover; border-radius: 24px; }
.hero-deco { position: absolute; right: -16px; bottom: -16px; width: 70%; height: 70%; background: var(--accent); border-radius: 24px; }

.split { display: flex; flex-wrap: wrap; gap: 24px 64px; }
.split-title { flex: 1 1 300px; font-size: clamp(28px, 3vw, 36px); }
.split-body { flex: 2 1 480px; min-width: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(35,30,26,.08); transition: transform .2s, box-shadow .2s; }
.card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(35,30,26,.12); }
.card img { width: 100%; height: 190px; object-fit: cover; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.card-title { font-family: var(--font-head); font-weight: 800; font-size: 20px; line-height: 1.25; }
.card-text { font-size: 16px; color: var(--muted); flex-grow: 1; }
.card-more { font-weight: 700; font-size: 15px; color: var(--red); display: inline-flex; align-items: center; gap: 6px; }
.card-more .icon { width: 18px; height: 18px; transition: transform .2s; }
.card:hover .card-more .icon { transform: translateX(4px); }

.event { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.event-img { flex: 1 1 360px; min-width: 0; max-width: 520px; }
.event-img img { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 12px 32px rgba(35,30,26,.14); }
.event-text { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--ink-2); }
.meta li { display: flex; align-items: center; gap: 8px; }
.meta .icon { color: var(--red); }

.contact { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.contact-text { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-text .lead { color: var(--ink); }
.contact-mail { color: var(--ink); font-weight: 800; font-size: 21px; word-break: break-word; }
.contact-mail:hover { color: var(--ink); }

.form { flex: 1 1 500px; min-width: 0; background: #fff; border-radius: var(--radius); padding: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.field-wide, .notice { grid-column: 1 / -1; }
.field input, .field select, .field textarea { font: inherit; font-weight: 400; font-size: 16px; padding: 12px 14px; border: 1px solid #BFB5AA; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.field textarea { resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; font-weight: 600; }
.notice-ok { background: #E7F4EA; color: #1F5A2E; }
.notice-err { background: #FBE9E7; color: #8A1F14; }
@media (max-width: 560px) { .form { grid-template-columns: minmax(0, 1fr); padding: 22px; } }

/* ---------- pagine interne ---------- */
.page-hero { position: relative; background: var(--ink); color: #fff; min-height: 380px; display: flex; align-items: flex-end; overflow: hidden; }
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.page-hero-text { position: relative; width: 100%; padding: 48px 0; background: linear-gradient(to top, rgba(0,0,0,.45), transparent); }
.page-hero h1 { font-size: clamp(34px, 4.6vw, 54px); max-width: 820px; }
.page-hero-plain { min-height: 0; background: var(--cream); color: var(--ink); }
.page-hero-plain .page-hero-text { background: none; }
.page-hero-plain .crumbs a { color: var(--ink); }
.crumbs { font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.crumbs a { color: #fff; }

.page-body { display: flex; flex-wrap: wrap; gap: 48px 56px; align-items: flex-start; }
.page-main { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.page-lead { font-family: var(--font-head); font-weight: 800; font-size: clamp(21px, 2.2vw, 26px); line-height: 1.35; letter-spacing: -0.01em; }
.page-main .prose { font-size: 18px; color: var(--ink-2); }
.facts { flex: 1 1 300px; min-width: 0; background: var(--cream); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 120px; }
.facts-title { font-size: 22px; }
.facts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; }
.facts .icon { color: var(--red); margin-top: 3px; }
@media (max-width: 900px) { .facts { position: static; } }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gallery img { width: 100%; height: 280px; object-fit: cover; border-radius: 16px; transition: opacity .2s; }
.gallery a:hover img { opacity: .9; }
.gallery figcaption { font-size: 15px; color: var(--muted); }

.cta { padding: 56px 0; }
.cta-in { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.cta-in > div:first-child { flex: 1 1 420px; display: flex; flex-direction: column; gap: 8px; }
.cta .lead { color: var(--ink); }

/* pagina con foto accanto al titolo */
.page-side .hero-in { padding-top: 56px; }
.side-media { flex: 1 1 340px; min-width: 0; max-width: 440px; margin: 0; position: relative; display: flex; flex-direction: column; gap: 10px; }
.side-media img { position: relative; width: 100%; height: 520px; object-fit: cover; border-radius: 24px; }
.side-media figcaption { position: relative; font-size: 14px; color: var(--muted); }
.side-deco { position: absolute; left: -16px; top: -16px; width: 70%; height: 60%; background: var(--accent); border-radius: 24px; }
.page-side .hero-text { flex: 1 1 480px; }
.page-side .crumbs, .page-side .crumbs a { color: var(--muted); margin-bottom: 0; }
.kicker-light { color: var(--accent); }
.section-tight { padding-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.step { background: var(--soft); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.step-label { font-family: var(--font-head); font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.step p { color: var(--ink-2); }
.page-body-narrow { max-width: 808px; }
@media (max-width: 700px) { .side-media img { height: 380px; } .side-deco { left: -8px; top: -8px; } }

.mini-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.mini-card { display: flex; gap: 16px; align-items: center; background: var(--cream); border-radius: 16px; padding: 14px; text-decoration: none; color: var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 18px; line-height: 1.3; }
.mini-card:hover { color: var(--red); }
.mini-card img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }

.notfound { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; background: rgba(20,16,13,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; z-index: 200; }
.lb img { max-width: 100%; max-height: calc(100vh - 120px); border-radius: 8px; }
.lb p { color: #fff; }
.lb button { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; padding: 8px; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #E6DFD6; font-size: 15px; }
.site-footer .wrap { padding-top: 64px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 800; font-size: 20px; color: #fff; }
.footer-brand img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
.footer-title { font-family: var(--font); font-weight: 700; font-size: 15px; color: #fff; letter-spacing: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: #E6DFD6; }
.site-footer a:hover { color: #fff; }
.footer-links a { text-decoration: none; }
.ente-img { width: 220px; border-radius: 10px; }
.footer-bottom { border-top: 1px solid #4A423B; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 14px; color: #B9AFA4; }
.footer-bottom a { color: #B9AFA4; }

@media (max-width: 700px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .hero-in { padding-top: 40px; padding-bottom: 56px; gap: 36px; }
  .hero-media img { height: 260px; }
  .hero-deco { right: -8px; bottom: -8px; }
  .page-hero { min-height: 280px; }
  .gallery img { height: 220px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card, .card-more .icon { transition: none; } }
