/* ==========================================================================
   Event CMS — Design System
   ========================================================================== */

:root {
    --color-primary: #53308A;
    --color-primary-dark: #3E2468;
    --color-primary-light: #8B5CF6;
    --color-primary-pale: #F3EEFC;
    --color-accent: #C9B4D2;

    --color-background: #FFFFFF;
    --color-surface: #F5F5F5;
    --color-text: #1F1533;
    --color-muted: #6B6480;
    --color-border: #E5DEF7;
    --color-danger: #DC2626;
    --color-success: #16A34A;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    --container-width: 1180px;
    --spacing-section: clamp(48px, 6vw, 96px);

    --shadow-sm: 0 1px 3px rgba(31, 21, 51, 0.08);
    --shadow-md: 0 8px 24px rgba(31, 21, 51, 0.10);
    --shadow-lg: 0 20px 48px rgba(31, 21, 51, 0.16);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --header-height: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-background);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-primary);
    color: #fff;
    padding: 10px 16px;
    z-index: 2000;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
    outline: 3px solid var(--color-primary-light);
    outline-offset: 2px;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 3.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); }
p { margin: 0 0 1em; }

/* ---------------- Buttons ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
    min-height: 46px;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #fff; color: var(--color-primary); }
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-solid { background: var(--color-primary); color: #fff; }
.btn-solid:hover { background: var(--color-primary-dark); }
.btn-ghost { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.btn-ghost:hover { background: var(--color-primary-pale); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; min-height: 36px; font-size: .85rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-link {
    background: none; border: none; padding: 0; color: var(--color-primary);
    font-weight: 600; cursor: pointer; text-decoration: underline;
}

/* ---------------- Header / Nav ---------------- */

.site-header {
    position: sticky; top: 0; z-index: 900;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; height: var(--header-height);
}
.brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--color-primary);
    flex-shrink: 0;
}
.brand img { height: 40px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
    text-decoration: none; color: var(--color-text); font-weight: 600; font-size: .95rem;
    padding: 6px 2px; border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: var(--color-primary); border-color: var(--color-primary); }
.nav-links .has-children { position: relative; }
.submenu {
    list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0;
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
    box-shadow: var(--shadow-md); min-width: 200px; display: none; z-index: 50;
}
.nav-links .has-children:hover .submenu,
.nav-links .has-children:focus-within .submenu { display: block; }
.submenu li a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); border: none; }
.submenu li a:hover { background: var(--color-primary-pale); }

.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.cta-group { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cta-group .btn { padding: 10px 22px; min-height: 42px; background: var(--color-primary); color: #fff; }
.cta-group .btn:hover { background: var(--color-primary-dark); }
.already-link { font-size: .8rem; color: var(--color-muted); text-decoration: none; }
.already-link:hover { color: var(--color-primary); text-decoration: underline; }

.lang-select {
    border: 1px solid var(--color-border); border-radius: var(--radius-pill);
    padding: 8px 14px; background: #fff; font-weight: 600; font-size: .85rem; color: var(--color-text);
    cursor: pointer;
}

.hamburger {
    display: none; background: none; border: none; cursor: pointer;
    width: 44px; height: 44px; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--color-text); position: relative; }
.hamburger span::before, .hamburger span::after {
    content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--color-text); transition: transform .2s ease;
}
.hamburger span::before { top: -7px; }
.hamburger span::after { top: 7px; }
.hamburger[aria-expanded="true"] span { background: transparent; }
.hamburger[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

.mobile-panel {
    display: none; position: fixed; inset: var(--header-height) 0 0 0; background: #fff; z-index: 850;
    overflow-y: auto; padding: 24px 20px 40px;
}
.mobile-panel.open { display: block; }
.mobile-panel .nav-links { flex-direction: column; align-items: stretch; gap: 4px; }
.mobile-panel .nav-links a { display: block; width: 100%; padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--color-border); box-sizing: border-box; }
.mobile-panel .submenu { position: static; display: block; box-shadow: none; border: none; padding-left: 14px; }
.mobile-cta { margin-top: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mobile-cta .btn { width: 100%; }
.mobile-lang { margin-top: 24px; }

@media (max-width: 900px) {
    .main-nav .nav-links { display: none; }
    .header-actions .cta-group,
    .header-actions .lang-select { display: none; }
    .hamburger { display: flex; }
}

body.nav-open { overflow: hidden; }

/* ---------------- Event info band (on every page) ---------------- */

.event-band {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding: 40px 0;
}
.event-band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.event-band h1 { margin: 0 0 6px; }
.event-band .subtitle { margin: 0; color: rgba(255,255,255,.88); font-size: 1.05rem; max-width: 640px; }
.event-meta { display: flex; flex-wrap: wrap; gap: 20px; }
.event-meta-item { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.event-meta-item .icon {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.16);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.event-meta-item .icon img { width: 20px; height: 20px; }
.event-meta-item .lines { line-height: 1.3; font-size: .92rem; }
.event-meta-item .lines strong { display: block; font-size: 1rem; }

/* Bigger variant used on the homepage hero */
.hero-full { padding: 64px 0 56px; }
.hero-full h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.hero-full .hero-actions { margin-top: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hero-full .hero-actions .already-link { color: rgba(255,255,255,.85); }
.hero-full .hero-actions .already-link:hover { color: #fff; }

/* ---------------- Page sections ---------------- */

.section { padding: var(--spacing-section) 0; }
.section-alt { background: var(--color-surface); }
.section-head { max-width: 760px; margin: 0 0 40px; }
.section-head p { color: var(--color-muted); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------------- Benefit cards ---------------- */

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.benefit-card {
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-sm);
}
.benefit-card-image { aspect-ratio: 4 / 3; background: var(--color-primary-pale); overflow: hidden; }
.benefit-card-image img { width: 100%; height: 100%; object-fit: cover; }
.benefit-card-body { padding: 22px 24px 26px; }
.benefit-card h3 { margin-bottom: 8px; }
.benefit-card p { color: var(--color-muted); margin: 0; }

/* ---------------- About event ---------------- */

.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 24px; }
.about-stat {
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 20px;
    text-align: center;
}
.about-stat .value { font-size: 1.6rem; font-weight: 800; color: var(--color-primary); }
.about-stat .label { color: var(--color-muted); font-size: .9rem; margin-top: 4px; }

/* ---------------- Speakers ---------------- */

.speaker-search { max-width: 420px; margin: 0 auto 36px; position: relative; }
.speaker-search input {
    width: 100%; padding: 14px 44px 14px 18px; border-radius: var(--radius-pill);
    border: 1px solid var(--color-border); font-size: 1rem; background: #fff;
}
.speaker-search input:focus { border-color: var(--color-primary); }
.speaker-search .search-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--color-muted); pointer-events: none; }

.speakers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.speaker-card {
    background: var(--color-primary); border-radius: var(--radius-lg);
    overflow: hidden; text-align: center; box-shadow: var(--shadow-sm); transition: box-shadow .15s ease, transform .15s ease;
    padding: 28px 24px 32px;
}
.speaker-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.speaker-photo {
    aspect-ratio: 1 / 1; width: 65%; margin: 0 auto; background: rgba(255,255,255,.12);
    border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.speaker-photo img { width: 100%; height: 100%; object-fit: cover; }
.speaker-photo .initials { font-size: 2.4rem; font-weight: 800; color: #fff; }
.speaker-body { padding: 20px 0 0; }
.speaker-body h3 { margin-bottom: 2px; color: #fff; }
.speaker-title { color: rgba(255,255,255,.78); font-size: .88rem; margin-bottom: 18px; min-height: 1.2em; }
.speaker-view-profile { background: var(--color-accent); color: var(--color-primary-dark); border-color: transparent; }
.speaker-view-profile:hover { background: #fff; }
.speaker-empty { text-align: center; color: var(--color-muted); padding: 40px 20px; grid-column: 1 / -1; }

/* ---------------- Modal ---------------- */

.modal-overlay {
    position: fixed; inset: 0; background: rgba(31, 21, 51, .55); z-index: 1000;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
    background: #fff; border-radius: var(--radius-lg); max-width: 620px; width: 100%;
    max-height: 88vh; overflow-y: auto; position: relative; box-shadow: var(--shadow-lg);
    transform: translateY(16px); opacity: 0; transition: transform .2s ease, opacity .2s ease;
}
.modal-overlay.open .modal-box { transform: translateY(0); opacity: 1; }
.modal-close {
    position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
    border: none; background: var(--color-surface); cursor: pointer; font-size: 1.2rem; z-index: 2;
}
.modal-close:hover { background: var(--color-border); }
.modal-photo { width: 128px; height: 128px; border-radius: 50%; margin: 0 auto 16px; overflow: hidden; background: var(--color-primary-pale); display: flex; align-items: center; justify-content: center; }
.modal-photo img { width: 100%; height: 100%; object-fit: cover; }
.modal-photo .initials { font-size: 2.2rem; font-weight: 800; color: var(--color-primary); }
.modal-body { padding: 40px 32px 32px; text-align: center; }
.modal-body .bio { text-align: left; margin-top: 18px; }
.modal-body .bio ul { padding-left: 20px; }
.modal-body .bio li { margin-bottom: 6px; }
.modal-social { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.modal-social a {
    width: 36px; height: 36px; border-radius: 50%; background: var(--color-primary-pale);
    display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--color-primary);
}

@media (max-width: 600px) {
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal-box { max-width: 100%; max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; width: 100%; }
}

/* ---------------- Countdown ---------------- */

.countdown-section { text-align: center; }
.countdown-title { margin-bottom: 28px; }
.countdown {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 16px;
    max-width: 640px; margin: 0 auto;
}
.countdown-unit {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    min-width: 90px; flex: 1 1 90px;
}
.countdown-unit .ring {
    width: clamp(76px, 12vw, 112px) !important; height: clamp(76px, 12vw, 112px) !important;
    aspect-ratio: 1 / 1; border-radius: 50%; flex-shrink: 0;
    background: conic-gradient(var(--color-accent) calc(var(--pct, 70) * 1%), transparent 0);
    display: flex; align-items: center; justify-content: center; padding: 6px;
}
.countdown-unit .circle {
    width: 100%; height: 100%; border-radius: 50%; background: var(--color-primary);
    display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
.countdown-unit .num { font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.countdown-unit .label { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--color-primary); font-weight: 600; }
.countdown-ended { font-size: 1.1rem; font-weight: 700; color: var(--color-primary); }
@media (max-width: 560px) {
    .countdown {
        display: grid; grid-template-columns: repeat(2, 1fr); justify-items: center; align-items: start;
        gap: 28px 20px; max-width: 300px;
    }
    .countdown-unit { min-width: 0; flex: none; width: 100%; align-items: center; }
    .countdown-unit .ring { width: clamp(88px, 30vw, 128px) !important; height: clamp(88px, 30vw, 128px) !important; }
}

/* ---------------- Agenda ---------------- */

.agenda-toolbar { max-width: 420px; margin: 0 auto 32px; }
.agenda-toolbar input {
    width: 100%; padding: 12px 16px; border-radius: var(--radius-pill); border: 1px solid var(--color-border); font-size: 1rem;
}
.agenda-list { display: flex; flex-direction: column; gap: 16px; max-width: 820px; margin: 0 auto; }
.agenda-item { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 22px 24px; }
.agenda-item-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.agenda-time { min-width: 120px; font-weight: 700; color: var(--color-primary); flex-shrink: 0; }
.agenda-time .tz { font-weight: 500; color: var(--color-muted); font-size: .78rem; }
.agenda-main { flex: 1; min-width: 200px; }
.agenda-speaker { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .9rem; color: var(--color-muted); }
.agenda-speaker img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.agenda-more { margin-top: 14px; max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.agenda-item.expanded .agenda-more { max-height: 800px; }
.agenda-toggle { margin-top: 12px; }
.agenda-empty { text-align: center; color: var(--color-muted); padding: 40px 20px; }

/* ---------------- Forms ---------------- */

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-weight: 600; font-size: .9rem; }
.form-group .req { color: var(--color-danger); }
.form-group input[type=text], .form-group input[type=email], .form-group input[type=tel],
.form-group select, .form-group textarea {
    padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--color-border);
    font-size: .96rem; font-family: inherit; background: #fff; width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--color-primary); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: .8rem; color: var(--color-muted); }
.form-error { font-size: .82rem; color: var(--color-danger); }
.radio-group, .checkbox-group { display: flex; flex-direction: column; gap: 8px; }
.radio-group label, .checkbox-group label { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.honeypot-field { position: absolute; left: -9999px; top: -9999px; }
.alert { padding: 14px 18px; border-radius: var(--radius-md); margin-bottom: 24px; font-size: .92rem; }
.alert-success { background: #ECFDF3; color: #166534; border: 1px solid #BBF7D0; }
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info { background: var(--color-primary-pale); color: var(--color-primary-dark); border: 1px solid var(--color-accent); }

@media (max-width: 700px) {
    .form-grid { grid-template-columns: 1fr; }
}

.confirmation-box {
    max-width: 560px; margin: 0 auto; text-align: center; background: #fff; border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); padding: 44px 32px; box-shadow: var(--shadow-sm);
}
.confirmation-box .ref-number {
    display: inline-block; margin: 18px 0; padding: 10px 20px; background: var(--color-primary-pale);
    border-radius: var(--radius-pill); font-weight: 700; color: var(--color-primary); letter-spacing: .03em;
}

/* ---------------- CTA banners ---------------- */

.cta-banner {
    background: var(--color-primary); color: #fff; border-radius: var(--radius-lg);
    padding: 40px; text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,.88); }
.cta-banner .btn-primary { margin-top: 10px; }

/* ---------------- Footer ---------------- */

.site-footer { background: #fff; border-top: 1px solid var(--color-border); padding-top: 40px; margin-top: 40px; }
.footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.footer-follow-heading { margin: 0; font-size: 1.4rem; font-weight: 700; color: var(--color-primary); }
.footer-authorized-logo { height: 34px; width: auto; }

.footer-social-bar { background: var(--color-primary); padding: 22px 0; }
.footer-social { display: flex; gap: 22px; justify-content: center; }
.footer-social a { color: #fff; text-decoration: none; display: flex; align-items: center; justify-content: center; opacity: .9; }
.footer-social a:hover { opacity: 1; }

.footer-poweredby { text-align: center; padding: 24px 20px; }
.footer-poweredby img { height: 28px; width: auto; display: inline-block; }

.footer-bottom { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 18px 0; border-top: 1px solid var(--color-border); color: var(--color-muted); font-size: .84rem; }

/* ---------------- CMS page content ---------------- */

.page-content { max-width: 780px; margin: 0 auto; }
.prose { max-width: 760px; }
.prose p:last-child { margin-bottom: 0; }

.why-attend-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.why-attend-actions { margin-top: 26px; display: flex; align-items: flex-start; flex-direction: column; gap: 6px; }
.why-attend-image img { width: 100%; height: 100%; max-height: 480px; object-fit: cover; border-radius: var(--radius-lg); }
@media (max-width: 900px) {
    .why-attend-grid { grid-template-columns: 1fr; gap: 28px; }
    .why-attend-image { order: -1; }
    .why-attend-image img { max-height: 320px; }
}
.page-content h2 { margin-top: 1.4em; }
.page-content ul, .page-content ol { padding-left: 22px; }
.page-content img { border-radius: var(--radius-md); margin: 16px 0; }
.page-content a { color: var(--color-primary); }
.page-content .content-btn {
    display: inline-block; margin: 10px 0; padding: 12px 24px; border-radius: var(--radius-pill);
    background: var(--color-primary); color: #fff; text-decoration: none; font-weight: 600;
}

/* ---------------- 404 ---------------- */

.error-page { text-align: center; padding: 100px 20px; }
.error-page .code { font-size: 5rem; font-weight: 800; color: var(--color-primary-pale); }

/* ---------------- Utility ---------------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--color-muted); }