/* ── Homepage-specific styles ─────────────────────
   Scoped to .home-page so they don't affect app pages.
   Uses theme vars from themes.css for light/dark support.
*/

.home-page {
    --home-accent: var(--accent-color);
    --home-accent-hover: var(--accent-hover);
    --home-accent-dim: var(--focus-ring);
    --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
}

/* ── Hero ────────────────────────────────────────── */

.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content > * {
    order: 0;
}

.hero-eyebrow {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--home-accent);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero h1 .accent {
    color: var(--home-accent);
}

.hero h1 .subtitle {
    font-size: 0.45em;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 0.5rem;
    line-height: 1.7;
}

.hero-sub:last-of-type {
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero-meta-item {
    text-align: center;
}

.hero-meta-item .label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.hero-meta-item .value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hero-presented {
    order: 10;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    row-gap: 0.75rem;
    column-gap: var(--presenter-gap, 0.75rem);
    flex-wrap: wrap;
}

.presented-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    width: 100%;
    text-align: center;
    margin-bottom: 0.75rem;
}

.sponsor-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.sponsor-logo {
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

.sponsor-sep {
    color: var(--border-color);
}

/* Homepage buttons (avoid colliding with app .btn-primary) */

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--home-accent);
    color: var(--hero-btn-text, #000);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
}

.btn-hero-primary:hover {
    background: var(--home-accent-hover);
    color: var(--hero-btn-text, #000);
    transform: translateY(-1px);
}

.btn-hero-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    text-decoration: none;
}

.btn-hero-outline:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* ── Sections ────────────────────────────────────── */

.home-page .section {
    padding: 5rem 1.5rem;
    max-width: 1120px;
    margin: 0 auto;
}

.home-page .section-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    max-width: 1120px;
    margin: 0 auto;
}

.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--home-accent);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.section-heading {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-sub {
    color: var(--text-secondary);
    max-width: 560px;
    margin-bottom: 3rem;
    font-size: 1.05rem;
}

/* ── Feature Grid ────────────────────────────────── */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: border-color 0.2s;
}

.feature-card:hover {
    border-color: var(--home-accent);
}

.feature-icon {
    font-size: 1.5rem;
    color: var(--home-accent);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Steps ───────────────────────────────────────── */

.steps-list {
    display: flex;
    flex-direction: column;
}

.step-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.step-item .step-num {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--home-accent);
    flex-shrink: 0;
    width: 2rem;
    padding-top: 0.2rem;
}

.step-content h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.step-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Audience Cards ──────────────────────────────── */

.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.audience-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    transition: border-color 0.2s;
}

.audience-card:hover {
    border-color: var(--home-accent);
}

.audience-card .card-icon {
    font-size: 1.5rem;
    color: var(--home-accent);
    margin-bottom: 1rem;
}

.audience-card h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.audience-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Attending Companies ─────────────────────────── */

.companies-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    justify-content: center;
}

.company-pill {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.5rem 1.125rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: border-color 0.2s, background 0.2s;
}

.company-pill:hover {
    border-color: var(--home-accent);
}

.companies-list-3col {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 960px;
    column-count: 3;
    column-gap: 2.5rem;
}

.companies-list-3col li {
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    break-inside: avoid;
}

@media (max-width: 720px) {
    .companies-list-3col {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .companies-list-3col {
        column-count: 1;
    }
}

.companies-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.company-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.125rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

.company-card:hover {
    border-color: var(--home-accent);
    transform: translateY(-1px);
}

.speaker-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.125rem;
}

.speaker-company {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ── Agenda / Topics ─────────────────────────────── */

.agenda-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.agenda-header-text {
    min-width: 0;
}

.agenda-header-text > :last-child {
    margin-bottom: 0;
}

/* Summary / Detailed segmented slider */

.agenda-view-toggle {
    --agenda-seg-w: 6.25rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
}

.agenda-view-thumb {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    width: var(--agenda-seg-w);
    height: calc(100% - 0.5rem);
    border-radius: 999px;
    background: var(--home-accent);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.agenda-view-thumb.is-right {
    transform: translateX(100%);
}

.agenda-view-btn {
    position: relative;
    z-index: 1;
    width: var(--agenda-seg-w);
    padding: 0.4rem 0.5rem;
    border: none;
    background: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.agenda-view-btn:hover {
    color: var(--text-primary);
}

.agenda-view-btn.is-active {
    color: var(--hero-btn-text, #fff);
}

.agenda-view-btn:focus-visible {
    outline: 2px solid var(--home-accent);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .agenda-view-toggle {
        --agenda-seg-w: 5.5rem;
    }
}

.agenda-days {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.agenda-day-header {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--home-accent);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--home-accent);
}

.topics-list {
    display: flex;
    flex-direction: column;
}

.topic-item {
    position: relative;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.topic-item .topic-num {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--home-accent);
    flex-shrink: 0;
    width: 10rem;
    text-align: right;
    white-space: nowrap;
}

.topic-item .topic-text {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Session-type pill (optional -- landing.agenda_show_types).
   Shape only: the family colours come from .stype-* in console.css. */

.home-page {
    --stype-neutral-bg: color-mix(in srgb, var(--text-primary) 9%, transparent);
    --stype-neutral-fg: var(--text-secondary);
}

.agenda-type-pill {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Expanded description (Detailed view) */

.topic-desc {
    display: block;
    margin-top: 0.5rem;
    padding-left: 0.875rem;
    border-left: 2px solid var(--border-color);
    max-width: 46rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0;
    color: var(--text-secondary);
}

/* "Details" hover button + tooltip (Summary view) */

.topic-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
}

.topic-info-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.55rem 0.15rem 0.45rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.topic-info-btn .bi {
    width: 0.8125rem;
    height: 0.8125rem;
    flex-shrink: 0;
}

.topic-info:hover .topic-info-btn,
.topic-info-btn:focus-visible,
.topic-info-btn.is-open {
    color: var(--home-accent);
    border-color: var(--home-accent);
    /* Tint follows whatever accent the conference picked; --home-accent-dim
       is the fallback for browsers without color-mix(). */
    background: var(--home-accent-dim);
    background: color-mix(in srgb, var(--home-accent) 12%, transparent);
    outline: none;
}

.topic-tip {
    --tip-x: -50%;
    position: absolute;
    bottom: calc(100% + 0.6rem);
    left: 50%;
    transform: translate(var(--tip-x), 0.25rem);
    width: max-content;
    max-width: min(24rem, 70vw);
    padding: 0.75rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-secondary);
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    pointer-events: none;
    z-index: 30;
}

.topic-tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -6px 0 0 -5px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transform: rotate(45deg);
}

.topic-info:hover .topic-tip,
.topic-info:focus-within .topic-tip,
.topic-tip.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(var(--tip-x), 0);
}

.topic-tip.is-open {
    pointer-events: auto;
}

@media (max-width: 640px) {
    /* Stack time above title so the row (and the Details pill) fits the viewport */
    .topic-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }

    .topic-item .topic-num {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        width: auto;
        text-align: left;
    }

    /* Tooltip spans the row and drops below it -- no room to point at the pill */
    .topic-info {
        position: static;
    }

    .topic-tip {
        --tip-x: 0;
        left: 0;
        right: 0;
        top: calc(100% - 0.5rem);
        bottom: auto;
        width: auto;
        max-width: none;
    }

    .topic-tip::after {
        display: none;
    }
}

/* ── Details Grid ────────────────────────────────── */

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.detail-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.detail-block h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.detail-block p {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.7;
    color: var(--text-primary);
}

.detail-block .accent-line {
    color: var(--home-accent);
}

/* ── Venue ───────────────────────────────────────── */

.venue-card {
    background: var(--card-bg, var(--surface-1));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.venue-card .venue-text {
    font-size: 1.05rem;
    color: var(--text-primary);
    line-height: 1.7;
}

.venue-card .venue-text a {
    color: var(--accent-color, var(--text-primary));
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent-color, currentColor) 40%, transparent);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease;
}

.venue-card .venue-text a:hover {
    text-decoration-color: var(--accent-color, currentColor);
}

.venue-card .venue-subtext {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 0.75rem;
}

/* ── CTA ─────────────────────────────────────────── */

.cta-section {
    text-align: center;
    padding: 6rem 1.5rem;
    max-width: 1120px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* ── Footer (homepage inherits from base.css) ────── */

.home-page + .site-footer {
    border-top: 1px solid var(--border-color);
}

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 640px) {
    .hero {
        min-height: auto;
        padding: 7rem 1.25rem 3rem;
    }

    .home-page .section {
        padding: 3rem 1.25rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .step-item {
        gap: 1rem;
    }

    .hero-meta {
        gap: 1.5rem;
    }

    .hero-presented {
        margin-top: 2rem;
        column-gap: calc(var(--presenter-gap, 24px) * 0.6);
    }
}
