/* ============================================================================
   Home page — /
   ============================================================================
   Migrated out of a 307-line inline <style> block in Pages/Index.cshtml, whose
   own opening comment read "kept local; move to app.css when ready". Ready.

   Unlike Give / Connect / Prayer, this page had no private hue token block — it
   had something messier: colour written directly into 64 hex literals and 41
   inline style attributes, including nine differently-coloured quick-action
   tiles. Those tiles are now the shared .ac-tile component; see the note there
   for why one hue plus nine distinct glyphs beats a nine-hue rainbow.

   Facebook's palette had also leaked in: the RSVP buttons were #1877f2 (Facebook
   blue) and #e4e6eb / #050505 (Facebook's grey and near-black), presumably copied
   along with the interaction pattern. They are brand and neutral tokens now.

   ACCESSIBILITY FIXES MADE HERE
   -----------------------------
     #1877f2 "Going" button with white text     3.07:1  ->  6.29:1
     #65676b RSVP counts on white               4.44:1  ->  5.50:1
     #e5e7eb card and chip borders              1.24:1  ->  handled per role
     nine tile label hues, several of which were indistinguishable from each
       other for red-green colour deficiency, now one token
   ============================================================================ */

/* ============================================================================
   Hero band
   ============================================================================ */

/* Was `linear-gradient(to right, #fff 0%, #f0f0f0 100%)` — a left-to-right wash
   no theme could reach, and invisible on most displays anyway. */
.hero {
    background: var(--ac-surface-sunken);
    border-bottom: var(--ac-border-width) solid var(--ac-border);
}

.hero .title {
    font-weight: 800;
    letter-spacing: 0.2px;
    color: var(--ac-text);
}


/* ============================================================================
   Key image hero (full-bleed photo with caption)
   ============================================================================ */

.key-hero {
    position: relative;
    min-height: 72vh;
    border-radius: var(--ac-radius-lg);
    overflow: hidden;
    border: var(--ac-border-width) solid var(--ac-border);
    box-shadow: var(--ac-shadow-md);
    margin: var(--ac-gap) 0 var(--ac-section-gap);
}

/* Full-bleed variant: edge to edge under the navbar. */
.key-hero-bleed {
    position: relative;
    min-height: 78vh;
    margin-left: calc(-1 * var(--bs-gutter-x, 0.75rem));
    margin-right: calc(-1 * var(--bs-gutter-x, 0.75rem));
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.key-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1.02);
}

/* The scrim is a token, not a literal, but it is deliberately NOT theme-tinted —
   the photo underneath is arbitrary, so only a dark wash guarantees the caption
   stays readable. See --ac-scrim in theme-tokens.css. */
.key-hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--ac-scrim);
}

.key-hero-content {
    position: relative;
    z-index: 1;
    color: var(--ac-text-on-scrim);
    display: flex;
    align-items: flex-end;
    min-height: inherit;
    height: 100%;
    padding: clamp(1rem, 4vw, 3rem);
}

.key-hero-title {
    font-weight: 900;
    line-height: 1.02;
    font-size: clamp(2.2rem, 7vw, 5rem);
    margin: 0 0 0.5rem;
    text-wrap: balance;
    color: var(--ac-text-on-scrim);
}

.key-hero-sub {
    font-size: clamp(1rem, 2.2vw, 1.4rem);
    margin: 0;
    opacity: 0.95;
    color: var(--ac-text-on-scrim);
}


/* ============================================================================
   Section headings and small bits
   ============================================================================ */

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    color: var(--ac-text-muted);
    font-weight: var(--ac-weight-heading);
    font-size: var(--ac-text-xs);
}

.section-title {
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: var(--ac-text);
}

.section-sub { color: var(--ac-text-muted); }

.chip {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border: var(--ac-border-width) solid var(--ac-border);
    border-radius: var(--ac-radius-pill);
    background: var(--ac-surface);
    color: var(--ac-text);
}

.date-badge {
    font-weight: var(--ac-weight-heading);
    border-radius: var(--ac-radius-sm);
    border: var(--ac-border-width) solid var(--ac-border);
    background: var(--ac-surface);
    color: var(--ac-text);
    padding: 0.35rem 0.6rem;
}


/* ============================================================================
   Cards
   ============================================================================ */

.card.hov {
    transition: var(--ac-transition);
}

.card.hov:hover {
    transform: translateY(-2px);
    box-shadow: var(--ac-shadow-md);
}

/* Hover hint pinned over an event photo. */
.event-hover-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--ac-scrim-solid);
    color: var(--ac-text-on-scrim);
    padding: 0.5rem 0.75rem;
    border-radius: var(--ac-radius-sm);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: var(--ac-text-sm);
    font-weight: var(--ac-weight-semibold);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
    pointer-events: none;
}

.event-card-hover:hover .event-hover-overlay { opacity: 1; }

.event-hover-overlay i { font-size: 1.1rem; }


/* ============================================================================
   RSVP controls in the event modal
   ============================================================================
   "Going" is the primary action, so it is the brand. It was #1877f2 — Facebook
   blue, at 3.07:1 with its white label. "Interested" is the secondary choice and
   is now a neutral surface rather than Facebook's #e4e6eb.
   ============================================================================ */

.modal-rsvp-section {
    border-top: var(--ac-border-width) solid var(--ac-border);
    border-bottom: var(--ac-border-width) solid var(--ac-border);
    padding: var(--ac-gap) 0;
    margin: var(--ac-gap) 0;
}

.modal-rsvp-btn {
    border-radius: var(--ac-radius-sm);
    padding: 0.5rem 1rem;
    font-weight: var(--ac-weight-medium);
    font-size: var(--ac-text-sm);
    border: var(--ac-border-width) solid transparent;
    transition: var(--ac-transition-fast);
}

.modal-rsvp-btn.active { transform: scale(1.02); }

.modal-rsvp-btn:focus-visible {
    outline: none;
    box-shadow: var(--ac-focus-ring);
}

.modal-rsvp-btn-going {
    background: var(--ac-brand);
    border-color: var(--ac-brand);
    color: var(--ac-brand-contrast);
}

.modal-rsvp-btn-going:hover,
.modal-rsvp-btn-going.active {
    background: var(--ac-brand-hover);
    border-color: var(--ac-brand-hover);
    color: var(--ac-brand-contrast);
}

.modal-rsvp-btn-going.active {
    box-shadow: 0 0 0 3px rgba(var(--ac-brand-rgb), 0.3);
}

.modal-rsvp-btn-interested {
    background: var(--ac-surface-sunken);
    border-color: var(--ac-border-strong);
    color: var(--ac-text);
}

.modal-rsvp-btn-interested:hover,
.modal-rsvp-btn-interested.active {
    background: var(--ac-neutral-soft);
    border-color: var(--ac-neutral);
    color: var(--ac-text);
}

.modal-rsvp-btn-interested.active {
    box-shadow: 0 0 0 3px rgba(var(--ac-neutral-rgb), 0.25);
}

.modal-rsvp-counts {
    display: flex;
    gap: var(--ac-gap);
    color: var(--ac-text-muted);
    font-size: var(--ac-text-sm);
}

.modal-rsvp-count-item {
    display: flex;
    align-items: center;
    gap: 0.3125rem;
}

.modal-attendee-avatars {
    display: flex;
    margin-left: 0.375rem;
}

.modal-attendee-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--ac-surface);
    margin-left: -0.375rem;
    background: var(--ac-surface-sunken);
    color: var(--ac-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: var(--ac-weight-semibold);
}

.modal-attendee-avatar:first-child { margin-left: 0; }


/* ============================================================================
   Live state — genuine status, so it stays red in every theme
   ============================================================================
   The .live-badge / .watch-card-live rules moved to .ac-tile__flag and
   .ac-tile--alert in components.css, since the Watch tile is now an .ac-tile.
   Kept here as aliases for any markup still using the old names.
   ============================================================================ */

.live-badge {
    position: absolute;
    top: -0.375rem;
    right: -0.375rem;
    background: var(--ac-danger);
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: var(--ac-weight-heading);
    padding: 0.125rem 0.3125rem;
    border-radius: var(--ac-radius-xs);
    animation: ac-pulse 1.5s ease-in-out infinite;
}

.watch-card-live {
    border-color: var(--ac-danger) !important;
    box-shadow: 0 0 0 2px rgba(var(--ac-danger-rgb), 0.2) !important;
}


/* ============================================================================
   Print
   ============================================================================ */

@media print {
    .key-hero,
    .key-hero-bleed,
    .ac-tile-strip { display: none !important; }

    .card.hov { box-shadow: none; }
}
