/* Master Class — styles implemented from Figma "RB" (nodes 13:2952 Login Page MC, 13:1587 Activity MC) */
:root {
    --teal: #58848c;
    --teal-bg: #63898d;
    --teal-soft: #b0cbd0;
    --cream: #fce5ca;
    --cream-text: #fbe3c9;
    --brown: #5d4f48;
    --ink: #414042;
    --muted: #707070;
    --font-sans: 'Montserrat', system-ui, sans-serif;
    --font-serif: 'Libre Baskerville', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font-sans); color: var(--ink); background: #000; -webkit-font-smoothing: antialiased; }
img { display: block; }
p, h1, h2, h3 { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------------
   Login page (Figma 13:2952) — full-screen & responsive.
   --u = one Figma pixel, scaled so the 1512×982 design always fits the screen.
   ------------------------------------------------------------------ */
.login-body { background: #000; }

.login {
    --u: min(calc(100vw / 1512), calc(100vh / 982));
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    background: var(--teal-bg);
}
@supports (height: 100dvh) {
    .login { --u: min(calc(100vw / 1512), calc(100dvh / 982)); min-height: 100dvh; }
}

.login__bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.login__wallpaper {
    position: absolute;
    left: -19.49%; top: -10.31%;
    width: 157.92%; height: 157.92%;
    max-width: none;
    object-fit: cover;
    transform: scaleX(-1);
}
.login__overlay-diagonal {
    position: absolute;
    left: -67.42%; top: -0.05%;
    width: 283.66%; height: 118.25%;
    container-type: size;
}
.login__overlay-diagonal img {
    position: absolute;
    left: 50%; top: 50%;
    width: 100cqh; height: 100cqw;
    max-width: none;
    transform: translate(-50%, -50%) rotate(-90deg);
}
.login__overlay-bottom {
    position: absolute;
    left: -61.86%; top: 4.15%;
    width: 223.32%; height: 95.85%;
    max-width: none;
    transform: scaleX(-1);
}

.login__content {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: calc(50.7 * var(--u)) calc(80.6 * var(--u)) calc(46.3 * var(--u)) calc(82.9 * var(--u));
}
.login__spacer--top { flex: 80.5 1 0; min-height: calc(40 * var(--u)); }
.login__spacer--bottom { flex: 213.3 1 0; min-height: calc(60 * var(--u)); }

/* Groups of Figma vector pieces, children positioned in % of the group */
.group { position: relative; flex: none; }
.group img, .group__link { position: absolute; max-width: none; }
.group__link img { position: absolute; }
.group--cerg { width: calc(154.2 * var(--u)); height: calc(79 * var(--u)); }
.group--venue { width: calc(300 * var(--u)); height: calc(90.4 * var(--u)); }
.group--erma { width: calc(302.4 * var(--u)); height: calc(55 * var(--u)); margin-bottom: calc(-4.1 * var(--u)); }

.hero { display: flex; flex-direction: column; align-items: flex-start; }
.hero img { max-width: none; }
.hero__title { width: calc(626.6 * var(--u)); height: calc(123.2 * var(--u)); }
.hero__sub1 { width: calc(448 * var(--u)); height: calc(45.1 * var(--u)); margin: calc(22.6 * var(--u)) 0 0 calc(1.6 * var(--u)); }
.hero__sub2 { width: calc(446.8 * var(--u)); height: calc(22.8 * var(--u)); margin: calc(8.6 * var(--u)) 0 0 calc(3.6 * var(--u)); }
.hero__enter {
    display: block;
    width: calc(229.2 * var(--u)); height: calc(68.2 * var(--u));
    margin: calc(49.9 * var(--u)) 0 0 calc(1.6 * var(--u));
    transition: transform .2s ease, filter .2s ease;
}
.hero__enter img { width: 100%; height: 100%; }
.hero__enter:hover { transform: translateY(-2px); filter: brightness(1.08); }
.hero__enter:focus-visible { outline: 2px solid var(--cream); outline-offset: 4px; border-radius: 12px; }

.login__bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: calc(24 * var(--u));
}

.login__footer {
    position: relative;
    flex: none;
    min-height: calc(62 * var(--u));
    padding: calc(15 * var(--u)) calc(35 * var(--u));
    background: #000;
    color: #fff;
    font-family: 'Gilroy', var(--font-sans);
    line-height: normal;
}
.login__footer-copy { font-size: max(10px, calc(12 * var(--u))); }
.login__footer-copy strong { font-weight: 700; }
.login__footer-note { margin-top: calc(5 * var(--u)); font-size: max(8px, calc(10 * var(--u))); }

/* Phones / tall portrait screens: bigger scale, content stacked */
@media (max-aspect-ratio: 4/5), (max-width: 600px) {
    .login { --u: calc(100vw / 740); }
    @supports (height: 100dvh) { .login { --u: calc(100vw / 740); } }
    .login__content { padding: 32px 24px 28px; }
    .login__spacer--top { flex: 1 1 0; min-height: 40px; }
    .login__spacer--bottom { flex: 1.4 1 0; min-height: 48px; }
    .group--cerg { width: calc(154.2 * var(--u) * 1.3); height: calc(79 * var(--u) * 1.3); }
    .hero__enter { width: calc(229.2 * var(--u) * 1.25); height: calc(68.2 * var(--u) * 1.25); }
    .group--venue { width: calc(300 * var(--u) * 1.3); height: calc(90.4 * var(--u) * 1.3); }
    .group--erma { width: calc(302.4 * var(--u) * 1.2); height: calc(55 * var(--u) * 1.2); margin-bottom: 0; }
    .login__bottom { flex-direction: column; align-items: flex-start; gap: 28px; }
    .login__footer { padding: 12px 24px 16px; }
    .login__footer-note { margin-top: 4px; }
    .login__wallpaper { left: -60%; width: 200%; }
    .hero { width: 100%; }
    .hero img { max-width: 100%; height: auto; }
    .hero__enter { max-width: 60%; height: auto; aspect-ratio: 229.2 / 68.2; }
}

/* ------------------------------------------------------------------
   Activity page (Figma 13:1587) — fills the screen; only the session
   panel scrolls (via the custom scrollbar), the page itself does not.
   ------------------------------------------------------------------ */
.activity-body {
    position: relative;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--teal-bg) url('../images/mc/wallpaper.png') center bottom / cover no-repeat;
}
/* Teal gradient overlay (Figma 13:1589), solid at top fading towards the bottom */
.activity-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/mc/activity-curve.svg') center / 100% 100% no-repeat;
    transform: rotate(180deg);
    pointer-events: none;
}

.activity {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 1512px;
    margin: 0 auto;
    padding: clamp(20px, 4.2vh, 41.3px) 24px clamp(20px, 4.2vh, 41.3px) 101.3px;
}

.activity__header { flex: none; padding-left: 6.3px; }

.cerg-logo { position: relative; display: block; width: 154.25px; height: 78.95px; }
.cerg-logo img { position: absolute; max-width: none; }

.activity__title {
    margin-top: clamp(16px, 3.5vh, 34.6px);
    margin-left: -0.9px;
    font: 900 30px/30px var(--font-sans);
    color: #fff;
}
.activity__subtitle {
    margin-top: 5.3px;
    margin-left: -2.6px;
    font: 400 18px/30px var(--font-sans);
    color: #fff;
}

.activity__body {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: stretch;
    gap: 36.2px;
    margin-top: clamp(16px, 3.5vh, 34.6px);
}

.session-panel {
    flex: 0 1 1250.8px;
    min-width: 0;
    max-height: 1246.1px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 25px 34.3px;
    background: var(--teal-soft);
    border-radius: 23px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    scrollbar-width: none;
}
.session-panel::-webkit-scrollbar { display: none; }
.session-panel__empty { padding: 40px; text-align: center; color: var(--teal); font-weight: 600; }

/* Custom scrollbar (Figma 13:1591 track / 13:1592 thumb) */
.scrollbar {
    position: relative;
    flex: none;
    width: 23.87px;
    max-height: 1094.6px;
    margin: 51.7px 0;
    cursor: pointer;
    touch-action: none;
}
.scrollbar.is-hidden { visibility: hidden; }
.scrollbar__track { position: absolute; left: 8.8px; top: 0; width: 6.28px; height: 100%; max-width: none; }
.scrollbar__thumb { position: absolute; left: 0; top: 0; width: 23.87px; height: 45.91px; max-width: none; }

/* Session card */
.session-card {
    flex: none;
    display: grid;
    grid-template-columns: 155.5px minmax(0, 1fr);
    padding: 21px 24px 28px 0;
    background: #fff;
    border: 1.57px solid var(--teal);
    border-radius: 16.7px / 9.6px;
}

.session-card__meta { padding-left: 23px; }
.session-card__label {
    padding-left: 3.6px;
    margin-top: 3px;
    font: 700 14px/14px var(--font-serif);
    color: var(--teal);
}
.session-card__time {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 105.16px;
    height: 34.03px;
    margin-top: 13.5px;
    background: var(--teal-soft);
    border-radius: 10.15px;
    font: 500 12.5px/1 var(--font-sans);
    color: var(--brown);
}

.session-card__main { padding-left: 3px; }
.session-card__title { font: 700 28px/1 var(--font-sans); color: var(--teal); }
.session-card__subtitle { margin-top: 8px; font: 600 14px/1 var(--font-sans); color: var(--teal); }
.session-card__desc { max-width: 849.3px; margin-top: 19px; font: 500 12px/16px var(--font-sans); color: var(--brown); }

.session-card__grid {
    display: grid;
    grid-template-columns: 208.32px 475.82px;
    column-gap: 15.1px;
    margin-top: 23px;
    margin-left: -3px;
}
.session-card__grid { row-gap: 16.7px; }
/* A speaker + their file occupy one row of the two-column grid */
.speaker-row { display: contents; }

.pill {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32.19px;
    border: 1px solid var(--teal);
    border-radius: 100px;
}
.pill--speaker { background: var(--cream); }
.pill--speaker img { width: 56.36px; height: 14.54px; }
.pill--materials { background: var(--teal); font: 700 14px/14px var(--font-serif); color: #fff; }

/* Speaker (avatar ring 13:1782, photo mask 13:1780) */
.speaker { display: flex; align-items: flex-start; gap: 5.3px; padding-left: 10.4px; min-height: 89.53px; }
.speaker__avatar { position: relative; flex: none; width: 83.82px; height: 89.53px; }
.speaker__ring { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.speaker__photo {
    position: absolute;
    left: 1.05px; top: 1.05px;
    width: 81.72px; height: 87.42px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--teal-soft);
}
.speaker__photo img {
    position: absolute;
    left: -1.73px; top: -6.77px;
    width: 107.53px; height: 107.53px;
    max-width: none;
    object-fit: cover;
}
.speaker__info { min-width: 0; padding-top: 13px; overflow-wrap: anywhere; }
.speaker__name { font: 400 14px/18px var(--font-serif); color: var(--ink); }
.speaker__role { font: 400 8.5px/11.4px var(--font-sans); color: var(--muted); }
.speaker__name + .speaker__role { margin-top: 3px; }
.speaker__country { margin-top: 2px; font: 700 9.5px/12px var(--font-sans); color: var(--teal); }

/* Material row (PDF 13:1757, title 13:1754, download 13:1769) */
.material {
    display: grid;
    grid-template-columns: 44.13px minmax(0, 1fr) 119.36px;
    align-content: center;
    align-items: center;
    transition: opacity .2s ease;
    column-gap: 23.4px;
    min-height: 89.53px;
    padding-left: 0.8px;
}
.material__icon { position: relative; width: 44.13px; height: 52.11px; margin-top: -6.6px; }
.material__file { width: 44.13px; height: 52.11px; }
.material__badge { position: absolute; left: 6.5px; top: 33.7px; width: 18.25px; height: 5.98px; }
.material--empty { display: flex; align-items: center; padding-left: 0.8px; font: 500 12px/16px var(--font-sans); color: var(--muted); font-style: italic; }
.material__title { max-width: 280px; font: 500 12px/16px var(--font-sans); color: var(--teal); }

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 119.36px;
    height: 37.12px;
    background: var(--teal);
    border-radius: 100px;
    font: 600 12px/16px var(--font-sans);
    color: var(--cream-text);
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}
.btn-download img { width: 14px; height: 14px; }
.btn-download:hover { background: #46707a; transform: translateY(-1px); }
.btn-download:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* Locked state (Figma 13:2796 / 13:2795): faded button + red note under the file */
.material__note {
    grid-column: 1 / -1;
    margin-top: 6px;
    font: 500 10px/16px var(--font-sans);
    color: red;
}
.material__note[hidden] { display: none; }
.material.is-locked .material__icon { margin-top: 0; }
.material__title.is-pending { color: var(--muted); font-style: italic; }
.material.is-locked .btn-download {
    background: rgba(88, 132, 140, .5);
    color: rgba(251, 227, 201, .5);
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}
.material.is-locked .btn-download img { opacity: .5; }

/* ------------------------------------------------------------------
   Smaller screens (design is desktop 1512px)
   ------------------------------------------------------------------ */
@media (max-width: 1200px) {
    .activity { padding-left: 32px; padding-right: 16px; }
    .activity__body { gap: 16px; }
    .session-card__grid { grid-template-columns: 1fr; row-gap: 12px; }
    .pill--materials { display: none; }
    .speaker-row { display: grid; row-gap: 10px; padding-top: 12px; border-top: 1px solid var(--teal-soft); }
    .pill--speaker + .pill--materials + .speaker-row { border-top: 0; padding-top: 4px; }
    .material { min-height: 0; }
    .material--empty { min-height: 0; }
}
@media (max-width: 760px) {
    .activity { padding: 24px 16px 48px; }
    .activity__title { font-size: 24px; }
    .activity__subtitle { font-size: 15px; line-height: 22px; }
    .activity-body { height: auto; min-height: 100vh; overflow: visible; }
    .activity { height: auto; }
    .activity__body { display: block; }
    .scrollbar { display: none; }
    .session-panel { height: auto; max-height: none; overflow: visible; padding: 16px; border-radius: 16px; }
    .session-card { grid-template-columns: 1fr; padding: 18px 16px 22px; row-gap: 14px; }
    .session-card__meta { padding-left: 0; display: flex; align-items: center; gap: 12px; }
    .session-card__time { margin-top: 0; }
    .session-card__main { padding-left: 0; }
    .session-card__title { font-size: 22px; }
    .session-card__grid { margin-left: 0; }
    .material { grid-template-columns: 44px 1fr; row-gap: 10px; }
    .btn-download { grid-column: 2; }
}
