/* ============================================================
   Latin America Fall 2026, "institutions already registered"
   Shared by /new/latam-2026/in-person/ and /new/latam-2026/online/
   Brand tokens mirror public/new/shared/creative-design.css
   ============================================================ */

:root {
    --ink:    #141933;
    --slate:  #3D4F6F;
    --steel:  #6A7B9A;
    --silver: #94A3B8;
    --pearl:  #F1F4FB;
    --mist:   #F8FAFD;
    --ivory:  #FFFFFF;
    --border: #E2E8F0;
    --accent: #0E5BE0;
    --accent-dark:  #0A4AB8;
    --accent-light: #E8F0FE;
    --coral:  #FF6B6B;
    --teal:   #2DD4BF;
    --teal-deep: #00695C;
    --teal-tint: #E0F2F1;
    --amber:  #F59E0B;
    --mint:   #10B981;

    --shadow-sm: 0 1px 4px rgba(20,25,51,0.08);
    --shadow-md: 0 6px 20px rgba(20,25,51,0.10);
    --shadow-lg: 0 14px 40px rgba(20,25,51,0.12);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    overflow-x: hidden;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--ivory);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.shell { width: min(1180px, calc(100% - 3rem)); margin: 0 auto; }

/* ─── Hero ─── */
.lx-hero {
    position: relative;
    overflow: hidden;
    padding: 150px 0 84px;
    color: #fff;
    background: var(--ink);
}
.lx-hero-bg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; }
.lx-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.lx-hero-bg::after {
    content: '';
    position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(135deg, rgba(20,25,51,0.90) 0%, rgba(14,91,224,0.72) 100%);
}
.lx-hero .shell { position: relative; z-index: 1; }
.lx-eyebrow {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--teal); color: var(--ink);
    padding: 0.45rem 1.1rem; border-radius: 50px;
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.lx-hero h1 {
    font-size: clamp(2.1rem, 4.4vw, 3.5rem);
    font-weight: 700; line-height: 1.12; letter-spacing: -0.01em;
    max-width: 860px; margin-bottom: 1.1rem;
}
.lx-hero h1 .gradient {
    background: linear-gradient(90deg, var(--teal), var(--amber));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.lx-hero-lead {
    font-size: 1.15rem; font-weight: 300; line-height: 1.65;
    max-width: 700px; opacity: 0.92; margin-bottom: 2.2rem;
}
.lx-hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 3rem; }
.lx-btn {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.85rem 1.5rem; border-radius: 50px;
    font-weight: 600; font-size: 0.95rem; text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    border: 2px solid transparent;
}
.lx-btn svg { width: 18px; height: 18px; }
.lx-btn-primary { background: var(--teal); color: var(--ink); }
.lx-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(45,212,191,0.35); }
.lx-btn-ghost { border-color: rgba(255,255,255,0.45); color: #fff; }
.lx-btn-ghost:hover { background: rgba(255,255,255,0.12); }
.lx-btn-accent { background: var(--accent); color: #fff; }
.lx-btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.lx-btn-outline { border-color: var(--accent); color: var(--accent); }
.lx-btn-outline:hover { background: var(--accent-light); }

.lx-stats {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
    max-width: 900px;
}
.lx-stat {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    backdrop-filter: blur(6px);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
}
.lx-stat-value { font-size: 2.1rem; font-weight: 700; line-height: 1.1; color: var(--teal); min-height: 2.3rem; }
.lx-stat-label { font-size: 0.82rem; opacity: 0.85; margin-top: 0.25rem; font-weight: 500; }

/* ─── Sections ─── */
.lx-section { padding: 4.5rem 0; }
.lx-section.alt { background: var(--mist); }
.lx-section-head { max-width: 760px; margin-bottom: 2.25rem; }
.lx-label {
    display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--teal-deep);
    background: var(--teal-tint); padding: 0.3rem 0.8rem; border-radius: 50px; margin-bottom: 0.9rem;
}
.lx-section h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.2; margin-bottom: 0.6rem; }
.lx-section h2 span { color: var(--accent); }
.lx-section-head p { color: var(--slate); font-size: 1.05rem; }

/* Event / city cards */
.lx-events { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.lx-event {
    background: var(--ivory); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 1.35rem 1.4rem; box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; gap: 0.35rem; position: relative; overflow: hidden;
}
.lx-event::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
    background: linear-gradient(180deg, var(--teal), var(--accent));
}
.lx-event-date { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); }
.lx-event-title { font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.lx-event-sub { color: var(--steel); font-size: 0.9rem; }
.lx-event-count {
    margin-top: 0.6rem; font-size: 0.85rem; font-weight: 600; color: var(--teal-deep);
    display: inline-flex; align-items: center; gap: 0.4rem;
}
.lx-event-count::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }

/* Toolbar */
.lx-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem;
    margin-bottom: 2rem; position: sticky; top: 84px; z-index: 5;
    background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
    padding: 0.85rem 0; border-bottom: 1px solid var(--border);
}
.lx-search { position: relative; flex: 1 1 260px; max-width: 420px; }
.lx-search svg { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--silver); }
.lx-search input {
    width: 100%; padding: 0.7rem 1rem 0.7rem 2.6rem;
    border: 1px solid var(--border); border-radius: 50px; font: inherit; font-size: 0.95rem;
    background: var(--ivory); color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s;
}
.lx-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,91,224,0.12); }
.lx-select {
    padding: 0.7rem 2.4rem 0.7rem 1rem; border: 1px solid var(--border); border-radius: 50px;
    font: inherit; font-size: 0.95rem; background: var(--ivory) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236A7B9A' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 0.9rem center / 16px;
    appearance: none; color: var(--ink); cursor: pointer;
}
.lx-count { color: var(--steel); font-size: 0.9rem; margin-left: auto; }

/* Country groups + institution cards */
.lx-group { margin-bottom: 2.4rem; }
.lx-group-head {
    display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 1rem;
    padding-bottom: 0.5rem; border-bottom: 2px solid var(--pearl);
}
.lx-group-head h3 { font-size: 1.15rem; font-weight: 700; }
.lx-group-head .flag { font-size: 1.35rem; line-height: 1; }
.lx-group-head .n { color: var(--steel); font-size: 0.9rem; font-weight: 500; }

.lx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 0.9rem; }
.lx-card {
    display: flex; align-items: center; gap: 0.95rem;
    background: var(--ivory); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 0.9rem 1rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.lx-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: transparent; }
.lx-logo {
    flex: 0 0 56px; width: 56px; height: 56px; border-radius: var(--radius-sm);
    background: var(--mist); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.lx-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; }
.lx-logo .initials { font-weight: 700; font-size: 1rem; color: var(--accent); letter-spacing: 0.02em; }
.lx-card-body { min-width: 0; }
.lx-card-name { font-weight: 600; font-size: 0.97rem; line-height: 1.3; }
.lx-card-meta { color: var(--steel); font-size: 0.8rem; margin-top: 0.15rem; }
.lx-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.lx-tag {
    font-size: 0.7rem; font-weight: 600; color: var(--teal-deep); background: var(--teal-tint);
    padding: 0.15rem 0.55rem; border-radius: 50px; white-space: nowrap;
}

.lx-empty {
    text-align: center; color: var(--steel); padding: 3rem 1rem;
    border: 1px dashed var(--border); border-radius: var(--radius-lg);
}
.lx-error {
    background: #FFF4F4; border: 1px solid #FFD0D0; color: #8A1F1F;
    padding: 1rem 1.25rem; border-radius: var(--radius-md); font-size: 0.95rem;
}

/* Skeleton loaders */
.skel {
    background: linear-gradient(90deg, var(--pearl) 25%, #E6EAF3 37%, var(--pearl) 63%);
    background-size: 400% 100%; animation: skel 1.4s ease infinite; border-radius: var(--radius-sm);
}
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.lx-hero .skel { background: linear-gradient(90deg, rgba(255,255,255,0.12) 25%, rgba(255,255,255,0.28) 37%, rgba(255,255,255,0.12) 63%); background-size: 400% 100%; }
.skel-card { height: 78px; border-radius: var(--radius-md); }
.skel-event { height: 150px; border-radius: var(--radius-lg); }

/* CTA band */
.lx-cta {
    background: linear-gradient(135deg, var(--ink) 0%, #1E2A5A 55%, var(--accent-dark) 100%);
    color: #fff; padding: 4.5rem 0; text-align: center;
}
.lx-cta h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; margin-bottom: 0.75rem; }
.lx-cta p { max-width: 640px; margin: 0 auto 1.9rem; opacity: 0.9; font-size: 1.05rem; font-weight: 300; }
.lx-cta .lx-hero-actions { justify-content: center; margin-bottom: 0; }
.lx-cta-note { margin-top: 1.6rem; font-size: 0.85rem; opacity: 0.7; }

/* Cross link strip */
.lx-crosslink {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--accent-light); border: 1px solid #CFE0FC; border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem; margin-top: 3rem;
}
.lx-crosslink strong { display: block; font-size: 1.05rem; }
.lx-crosslink span { color: var(--slate); font-size: 0.92rem; }

/* Reveal on scroll: only hidden when the script is running (html.js), so content
   always shows if JavaScript fails or is blocked */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .lx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lx-toolbar { top: 72px; }
}
@media (max-width: 600px) {
    .lx-hero { padding: 120px 0 56px; }
    .lx-section { padding: 3.25rem 0; }
    .lx-stat-value { font-size: 1.7rem; }
    .lx-count { margin-left: 0; width: 100%; }
    .lx-grid { grid-template-columns: 1fr; }
    .lx-toolbar { position: static; }
}

/* ─── Print ─── */
@media print {
    .site-header, #header-placeholder, #footer-placeholder, .lx-toolbar, .lx-hero-actions, .lx-cta, .lx-crosslink, #floatingCta, #fpp-promo-bar { display: none !important; }
    .lx-hero { padding: 1.5rem 0; background: #fff; color: var(--ink); }
    .lx-hero-bg { display: none; }
    .lx-hero h1 .gradient { -webkit-text-fill-color: var(--accent); }
    .lx-stat { border-color: var(--border); background: var(--mist); }
    .lx-stat-value { color: var(--accent); }
    .lx-section { padding: 1.5rem 0; }
    .lx-card { break-inside: avoid; box-shadow: none; }
    .reveal { opacity: 1; transform: none; }
}

/* v2 pages: three stat tiles */
.lx-stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 700px; }
@media (max-width: 900px) { .lx-stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .lx-stats.three { grid-template-columns: 1fr 1fr; } }
