/* ==========================================================================
   Forum - institutional event: official letterhead, protocol, partner wall
   Signature: the page opens like an official invitation (emblem, issuer,
   registration number, double rule); the programme is a numbered protocol
   ("Art. 1"); partners are grouped by tier on a wall whose logos turn from grey
   to colour in a wave when their row comes into view (script.js).
   Palette: --inv-primary (institutional colour), --inv-accent (seal gold), --inv-bg, --inv-text
   ========================================================================== */

.forum {
    --fo-muted: color-mix(in srgb, var(--inv-text) 64%, var(--inv-bg));
    --fo-line: color-mix(in srgb, var(--inv-text) 14%, transparent);
    --fo-panel: color-mix(in srgb, var(--inv-primary) 5%, var(--inv-bg));
    --kit-radius: 2px;
    font-family: var(--inv-font-body);
    font-size: 1.04rem;
    line-height: 1.7;
    color: var(--inv-text);
    background: var(--inv-bg);
    overflow-x: clip;
    counter-reset: chapter;
}
.forum h1, .forum h2, .forum h3 { font-family: var(--inv-font-heading); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.forum) :is(h1, h2, h3) { margin: 0; }
.fo-kicker { margin: 0 0 8px; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-primary); }
.fo-key { margin: 0 0 4px; color: var(--inv-primary); font-weight: 600; }
.fo-muted, .fo-comment { color: var(--fo-muted); margin: 4px 0 0; }
.fo-title-block { display: flex; align-items: baseline; gap: 14px; margin-bottom: 30px; padding-bottom: 12px; border-bottom: 2px solid var(--inv-primary); counter-increment: chapter; }
.fo-chapter::before { content: counter(chapter, upper-roman) "."; font-weight: 800; color: var(--inv-primary); font-size: 1.4rem; }
.fo-title-block h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }

/* ---------- Navigation ---------- */
.fo-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 6; padding: 10px clamp(16px, 4vw, 44px); display: flex; justify-content: flex-end; background: transparent; transform: translateY(-100%); transition: transform .3s; }
.fo-nav.is-stuck { transform: none; align-items: center; background: color-mix(in srgb, var(--inv-bg) 96%, transparent); box-shadow: 0 2px 0 var(--inv-primary); }
.fo-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 18px; }
.fo-nav a { text-decoration: none; font-size: .88rem; font-weight: 600; color: var(--fo-muted); padding: 6px 0; }
.fo-nav a:hover, .fo-nav a.is-current { color: var(--inv-primary); }
.fo-nav .kit-nav-brand { font-weight: 800; font-size: 1rem; color: var(--inv-text); margin-right: auto; }
.forum .kit-to-top { background: var(--inv-primary); color: #fff; border-radius: 2px; }
@media (max-width: 899px) {
    .fo-nav { padding: 10px 12px; }
    .fo-nav .kit-nav-toggle { color: var(--inv-text); font-size: 1.5rem; margin-left: auto; }
    .fo-nav .kit-nav-links { display: none; }
    .fo-nav.is-open .kit-nav-links { display: flex; flex-direction: column; gap: 12px; position: absolute; top: 56px; left: 12px; right: 12px; padding: 20px; background: var(--inv-bg); border: 1px solid var(--fo-line); }
}

/* ---------- Letterhead hero ---------- */
.fo-hero { min-height: 100svh; display: flex; flex-direction: column; padding: 28px clamp(20px, 6vw, 80px) 60px; }
.fo-letterhead { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--inv-text); box-shadow: 0 4px 0 -2px var(--inv-bg), 0 5px 0 -1px var(--inv-text); }
.fo-issuer { display: flex; align-items: center; gap: 14px; }
.fo-issuer p { margin: 0; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .9rem; max-width: 260px; line-height: 1.3; }
.fo-emblem { width: 58px; height: 58px; flex: none; }
.fo-emblem-ring { fill: none; stroke: var(--inv-primary); stroke-width: 2; }
.fo-emblem-leaf { fill: var(--inv-accent); }
.fo-emblem-star { fill: var(--inv-primary); }
.fo-ref { margin: 0; font-size: .82rem; color: var(--fo-muted); text-align: right; }
.fo-hero-grid { flex: 1; display: grid; gap: 50px; align-items: center; width: min(1180px, 100%); margin: 0 auto; padding-top: 40px; }
@media (min-width: 900px) { .fo-hero-grid { grid-template-columns: 1.2fr .8fr; } }
.fo-announce { margin: 0 0 14px; font-size: .82rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--inv-primary); }
.fo-title { font-size: clamp(2.4rem, 5.6vw, 4.4rem); color: var(--inv-text); }
.fo-subtitle { max-width: 600px; margin: 20px 0 0; font-size: 1.12rem; color: var(--fo-muted); }
.fo-facts { display: flex; flex-wrap: wrap; gap: 12px 44px; margin: 30px 0; padding: 14px 0; border-top: 1px solid var(--fo-line); border-bottom: 1px solid var(--fo-line); }
.fo-facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--fo-muted); }
.fo-facts dd { margin: 4px 0 0; font-weight: 700; }
.fo-button { display: inline-block; padding: 14px 30px; background: var(--inv-primary); color: #fff; font-weight: 700; text-decoration: none; letter-spacing: .06em; }
.fo-button:hover { background: color-mix(in srgb, var(--inv-primary) 85%, #000); }
.fo-hero-photo { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--fo-line); padding: 10px; background: var(--fo-panel); }
.fo-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 899px) { .fo-letterhead { flex-direction: column; align-items: flex-start; } .fo-ref { text-align: left; } .fo-hero-photo { aspect-ratio: 16 / 10; } }

/* ---------- Sections ---------- */
.fo-section { max-width: 1080px; margin: 0 auto; padding: clamp(60px, 9vw, 100px) 22px; }
.fo-prose { max-width: 760px; font-size: 1.1rem; }
.fo-prose p { margin: 0 0 1em; }
.fo-card { padding: 24px 26px; background: var(--fo-panel); border-left: 4px solid var(--inv-primary); }
.fo-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.fo-card p { margin: 0 0 .5em; }
.fo-organizer { display: grid; gap: 24px; align-items: center; }
@media (min-width: 760px) { .fo-organizer { grid-template-columns: 260px 1fr; } }
.fo-logo { width: 100%; max-width: 260px; padding: 12px; background: #fff; }

/* Agenda as protocol */
.fo-log { list-style: none; margin: 0; padding: 0; }
.fo-log-line { display: grid; grid-template-columns: 70px 80px auto 1fr; gap: 6px 18px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--fo-line); }
.fo-log-line:not(:has(.fo-log-track)) { grid-template-columns: 70px 80px 1fr; }
.fo-art { font-weight: 800; color: var(--inv-primary); }
.fo-log-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.fo-log-track { font-size: .72rem; font-weight: 700; padding: 2px 8px; border: 1px solid var(--fo-line); letter-spacing: .04em; }
.fo-log-body h3 { font-size: 1.1rem; font-weight: 700; }
.fo-log-who { margin: 4px 0 0; color: var(--inv-primary); font-weight: 600; }
@media (max-width: 600px) { .fo-log-line, .fo-log-line:not(:has(.fo-log-track)) { grid-template-columns: 56px 1fr; } .fo-log-track, .fo-log-body { grid-column: 2; } }

/* Speakers */
.fo-speakers { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.fo-speaker { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start; }
.fo-avatar { width: 96px; aspect-ratio: 3 / 4; overflow: hidden; display: grid; place-items: center; background: var(--fo-panel); font-weight: 800; font-size: 2rem; color: var(--inv-primary); }
.fo-avatar img { width: 100%; height: 100%; object-fit: cover; font-size: 0; color: transparent; }
.fo-speaker h3 { font-size: 1.1rem; }
.fo-speaker-role { margin: 4px 0 8px; color: var(--fo-muted); font-size: .92rem; }
.fo-speaker-role .fo-key { display: inline; }
.fo-speaker-bio { margin: 0; color: var(--fo-muted); font-size: .92rem; }

/* Venue */
.fo-venues { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.fo-venue-time { font-weight: 800; font-size: 2.2rem; color: var(--inv-primary); margin: 0 0 6px !important; }
.fo-venue-place { font-weight: 700; margin-top: 10px !important; }
.forum .kit-event-actions { justify-content: flex-start; margin-top: 16px; }
.forum .kit-button { border-radius: 2px; border: 1px solid var(--inv-primary); color: var(--inv-primary); background: transparent; font-weight: 700; }
.forum .kit-button:hover { background: var(--inv-primary); color: #fff; }

/* Countdown */
.fo-countdown { text-align: center; }
.fo-countdown .kit-countdown { gap: 0; margin: 12px auto 0; max-width: 720px; border: 1px solid var(--fo-line); }
.fo-countdown .kit-countdown-unit { flex: 1; min-width: 0; padding: 18px 4px; }
.fo-countdown .kit-countdown-unit + .kit-countdown-unit { border-left: 1px solid var(--fo-line); }
.fo-countdown .kit-countdown-value { font-weight: 800; font-size: clamp(2rem, 6vw, 3.2rem); color: var(--inv-primary); }

/* Gallery */
.fo-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .fo-gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.fo-gallery-grid a { border-radius: 0; }

/* ---------- Partner wall ---------- */
.fo-tier { margin-bottom: 34px; }
.fo-tier-name { margin: 0 0 14px; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--fo-muted); }
.fo-logos { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.fo-logos--main { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.fo-logo { display: grid; place-items: center; min-height: 110px; padding: 20px; background: var(--inv-bg); outline: 1px solid var(--fo-line); outline-offset: -.5px; }
.fo-logos--main .fo-logo { min-height: 140px; }
.fo-logo a { display: grid; place-items: center; width: 100%; height: 100%; }
.fo-logo img { max-width: 100%; max-height: 54px; filter: grayscale(1) opacity(.55); transition: filter .6s ease; transition-delay: calc(var(--i) * 120ms); }
.fo-logos.is-lit .fo-logo img { filter: none; }
.fo-logo a:hover img { filter: none; }
.fo-logo span { font-weight: 700; text-align: center; color: var(--fo-muted); }
html:not(.kit-js) .fo-logo img { filter: none; }

/* RSVP */
.fo-rsvp-card { max-width: 700px; margin: 0 auto; padding: clamp(28px, 5vw, 50px); background: var(--fo-panel); border-top: 4px solid var(--inv-primary); }
.forum .inv-rsvp__submit { border-radius: 2px; font-weight: 700; }

/* Info & contact */
.fo-info-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.fo-faq { margin-top: 44px; max-width: 760px; }
.fo-faq details { border-top: 1px solid var(--fo-line); padding: 16px 0; }
.fo-faq summary { cursor: pointer; font-weight: 700; list-style: none; }
.fo-faq summary::-webkit-details-marker { display: none; }
.fo-faq summary::after { content: "+"; float: right; color: var(--inv-primary); }
.fo-faq details[open] summary::after { content: "-"; }
.fo-faq details p { margin: 8px 0 0; color: var(--fo-muted); }
.fo-contacts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.fo-contact-name { font-weight: 800; font-size: 1.2rem; margin: 0 0 6px; }
.fo-contacts a { color: var(--inv-primary); font-weight: 700; text-decoration: none; }

/* Footer */
.fo-footer { padding: 50px 22px; text-align: center; border-top: 4px double var(--inv-text); }
.fo-footer-title { font-weight: 800; font-size: clamp(1.4rem, 4vw, 2rem); margin: 0 0 10px; }
.fo-footer p { margin: 0 0 6px; }
