/* ==========================================================================
   Atelier - workshop / training: the agenda as a course syllabus
   Signature: notebook-grid paper, a sticky note on the hero photo, numbered
   course modules along a progress rail that fills as you scroll (script.js),
   highlighter-marked titles.
   Palette: --inv-primary (single accent), --inv-accent (highlighter / sticky note), --inv-bg, --inv-text
   ========================================================================== */

.atelier {
    --at-grid: color-mix(in srgb, var(--inv-primary) 9%, transparent);
    --at-line: color-mix(in srgb, var(--inv-text) 14%, transparent);
    --at-muted: color-mix(in srgb, var(--inv-text) 62%, var(--inv-bg));
    --at-panel: color-mix(in srgb, var(--inv-text) 3%, var(--inv-bg));
    --kit-radius: 10px;
    font-family: var(--inv-font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--inv-text);
    background:
        linear-gradient(var(--at-grid) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, var(--at-grid) 1px, transparent 1px) 0 0 / 28px 28px,
        var(--inv-bg);
    overflow-x: clip;
}
.atelier h1, .atelier h2, .atelier h3 { font-family: var(--inv-font-heading); font-weight: 700; line-height: 1.12; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.atelier) :is(h1, h2, h3) { margin: 0; }
.at-kicker { margin: 0 0 10px; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-primary); }
.at-key { margin: 0 0 4px; color: var(--inv-primary); font-weight: 700; }
.at-muted, .at-comment { color: var(--at-muted); margin: 4px 0 0; }

/* Highlighter titles */
.at-title-block { margin-bottom: 30px; }
.at-title-block h2 { font-size: clamp(2rem, 4.8vw, 3rem); }
.at-title-block h2 span { background: linear-gradient(transparent 58%, color-mix(in srgb, var(--inv-accent) 85%, transparent) 58% 92%, transparent 92%) no-repeat 0 0 / 0% 100%; transition: background-size 1s ease .2s; padding: 0 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.at-title-block.is-visible h2 span, html:not(.kit-js) .at-title-block h2 span { background-size: 100% 100%; }

/* ---------- Navigation ---------- */
.at-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; padding: 16px clamp(16px, 4vw, 44px); display: flex; justify-content: flex-end; }
.at-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 20px; }
.at-nav a { text-decoration: none; font-size: .92rem; font-weight: 700; color: var(--at-muted); padding: 6px 0; }
.at-nav a:hover, .at-nav a.is-current { color: var(--inv-primary); }
.at-nav .kit-nav-brand { font-family: var(--inv-font-heading); font-size: 1.15rem; color: var(--inv-text); margin-right: auto; }
.at-nav.is-stuck { align-items: center; padding: 8px clamp(16px, 4vw, 44px); background: color-mix(in srgb, var(--inv-bg) 94%, transparent); box-shadow: 0 1px 0 var(--at-line); }
.atelier .kit-to-top { background: var(--inv-primary); color: #fff; }
@media (max-width: 899px) {
    .at-nav { padding: 10px 12px; }
    .at-nav .kit-nav-toggle { color: var(--inv-text); font-size: 1.5rem; margin-left: auto; }
    .at-nav .kit-nav-links { display: none; }
    .at-nav.is-open .kit-nav-links { display: flex; flex-direction: column; gap: 12px; position: absolute; top: 58px; left: 12px; right: 12px; padding: 20px; background: var(--inv-bg); border: 2px solid var(--inv-text); border-radius: 12px; }
}

/* ---------- Hero ---------- */
.at-hero { min-height: 100svh; display: grid; align-items: center; padding: 100px clamp(20px, 5vw, 64px) 70px; }
.at-hero-grid { width: min(1140px, 100%); margin: 0 auto; display: grid; gap: 56px; align-items: center; }
@media (min-width: 900px) { .at-hero-grid { grid-template-columns: 1.1fr .9fr; } }
.at-tag { display: inline-block; margin: 0 0 16px; padding: 5px 12px; border: 2px solid var(--inv-text); border-radius: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; background: var(--inv-bg); }
.at-title { font-size: clamp(2.8rem, 7vw, 5.2rem); }
.at-subtitle { max-width: 540px; margin: 20px 0 0; font-size: 1.15rem; color: var(--at-muted); }
.at-facts { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0; }
.at-facts div { padding: 12px 16px; border: 2px solid var(--inv-text); border-radius: 10px; background: var(--inv-bg); box-shadow: 4px 4px 0 var(--inv-text); }
.at-facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--inv-primary); }
.at-facts dd { margin: 2px 0 0; font-weight: 700; }
.at-button { display: inline-block; padding: 14px 26px; border-radius: 10px; background: var(--inv-primary); color: #fff; font-weight: 700; text-decoration: none; border: 2px solid var(--inv-text); box-shadow: 4px 4px 0 var(--inv-text); transition: translate .15s, box-shadow .15s; }
.at-button:hover { translate: 2px 2px; box-shadow: 2px 2px 0 var(--inv-text); }
.at-hero-photo { position: relative; margin: 0 auto; width: min(480px, 90vw); border: 2px solid var(--inv-text); border-radius: 14px; box-shadow: 8px 8px 0 var(--inv-text); }
.at-hero-photo img { display: block; width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: 12px; }
.at-sticky-note { position: absolute; left: -26px; bottom: -34px; width: 180px; padding: 18px 16px 22px; background: var(--inv-accent); color: #2A2412; font-family: var(--inv-font-heading); font-weight: 700; font-size: 1.05rem; line-height: 1.3; rotate: -5deg; box-shadow: 0 12px 20px -10px rgba(0, 0, 0, .35); }
.at-sticky-note::before { content: ""; position: absolute; top: -10px; left: 50%; width: 70px; height: 20px; translate: -50% 0; rotate: 3deg; background: rgba(255, 255, 255, .6); }
@media (max-width: 899px) { .at-sticky-note { left: 8px; bottom: -30px; width: 160px; font-size: .95rem; } .at-hero-photo { margin-bottom: 30px; } }

/* ---------- Sections ---------- */
.at-section { max-width: 1060px; margin: 0 auto; padding: clamp(70px, 10vw, 110px) 22px; }
.at-prose { max-width: 720px; font-size: 1.14rem; }
.at-prose p { margin: 0 0 1em; }
.at-card { padding: 24px 26px; border-radius: 14px; background: var(--inv-bg); border: 2px solid var(--inv-text); }
.at-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.at-card p { margin: 0 0 .5em; }
.at-organizer { display: grid; gap: 24px; align-items: center; }
@media (min-width: 760px) { .at-organizer { grid-template-columns: 240px 1fr; } }
.at-logo { width: 100%; max-width: 240px; padding: 12px; border-radius: 10px; background: #fff; }

/* Course modules on a progress rail */
.at-course { position: relative; padding-left: 64px; }
.at-rail { position: absolute; left: 22px; top: 10px; bottom: 10px; width: 6px; border-radius: 3px; background: var(--at-line); }
.at-rail-fill { display: block; height: 100%; border-radius: 3px; background: var(--inv-primary); transform-origin: top; transform: scaleY(0); }
.at-modules { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.at-module { position: relative; }
.at-module-num { position: absolute; left: -64px; top: 14px; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--inv-bg); border: 2px solid var(--inv-text); font-family: var(--inv-font-heading); font-weight: 700; z-index: 1; }
.at-module-card { padding: 20px 24px; border: 2px solid var(--inv-text); border-radius: 14px; background: var(--inv-bg); box-shadow: 5px 5px 0 var(--inv-text); }
.at-module-meta { display: flex; justify-content: space-between; margin: 0 0 6px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--inv-primary); }
.at-module-card h3 { font-size: 1.35rem; }
.at-module-who { margin: 4px 0 0; font-weight: 700; }
.at-module.is-visible .at-module-num { background: var(--inv-primary); color: #fff; border-color: var(--inv-primary); transition: background .4s .3s, color .4s .3s; }
@media (max-width: 560px) { .at-course { padding-left: 48px; } .at-rail { left: 16px; } .at-module-num { left: -48px; width: 38px; height: 38px; font-size: .9rem; } }

/* Trainers */
.at-speakers { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.at-speaker { display: grid; gap: 12px; padding: 0 0 20px; overflow: hidden; box-shadow: 5px 5px 0 var(--inv-text); }
.at-avatar { aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: center; border-bottom: 2px solid var(--inv-text); font-family: var(--inv-font-heading); font-size: 3rem; color: var(--inv-primary); }
.at-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30% !important; font-size: 0; color: transparent; }
.at-speaker > div:last-child { padding: 0 20px; }
.at-speaker h3 { font-size: 1.2rem; }
.at-speaker-role { margin: 4px 0 8px; color: var(--at-muted); }
.at-speaker-role .at-key { display: inline; }
.at-speaker-bio { color: var(--at-muted); font-size: .95rem; margin: 0; }

/* Venue */
.at-venues { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.at-venue { box-shadow: 5px 5px 0 var(--inv-text); }
.at-venue-time { font-family: var(--inv-font-heading); font-size: 2.4rem; color: var(--inv-primary); margin: 0 0 6px !important; }
.at-venue-place { font-weight: 700; margin-top: 10px !important; }
.atelier .kit-event-actions { justify-content: flex-start; margin-top: 16px; }
.atelier .kit-button { border-radius: 8px; border: 2px solid var(--inv-text); color: var(--inv-text); background: var(--inv-bg); font-weight: 700; }
.atelier .kit-button:hover { background: var(--inv-accent); }

/* Countdown */
.at-countdown { text-align: center; }
.at-countdown .kit-countdown { gap: clamp(8px, 2vw, 16px); margin-top: 12px; }
.at-countdown .kit-countdown-unit { flex: 1; max-width: 170px; min-width: 0; padding: 20px 8px; border-radius: 12px; background: var(--inv-bg); border: 2px solid var(--inv-text); box-shadow: 4px 4px 0 var(--inv-text); }
.at-countdown .kit-countdown-value { font-size: clamp(2rem, 7vw, 3.4rem); color: var(--inv-primary); }

/* Gallery */
.at-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 760px) { .at-gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.at-gallery-grid a { border-radius: 12px; border: 2px solid var(--inv-text); }

/* RSVP */
.at-rsvp-card { max-width: 700px; margin: 0 auto; padding: clamp(28px, 5vw, 50px); border-radius: 16px; background: var(--inv-bg); border: 2px solid var(--inv-text); box-shadow: 8px 8px 0 var(--inv-text); }
.atelier .inv-rsvp__submit { border-radius: 10px; font-weight: 700; border: 2px solid var(--inv-text); }

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

/* Footer */
.at-footer { padding: 70px 22px; text-align: center; border-top: 2px solid var(--inv-text); background: var(--inv-bg); }
.at-footer-title { font-family: var(--inv-font-heading); font-weight: 700; font-size: clamp(1.8rem, 5vw, 3rem); margin: 0 0 10px; }
.at-footer p { margin: 0 0 6px; }
