/* ============================================================
   Art Alive theme — tabbed-section magazine layout for recurring
   "what's on view right now" roundup articles (galleries, museums,
   exhibitions). Scoped entirely under #art-alive so it can't leak
   into the rest of the site chrome (header/nav/footer stay
   untouched) — this is a full standalone page, not loaded inside
   the main site layout.
   ============================================================ */

#art-alive .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;
}

#art-alive,
#art-alive *,
#art-alive *::before,
#art-alive *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#art-alive {
    --aa-accent: #e07c24;
    --aa-accent-dark: #c4681a;
    --aa-text: #1a1a1a;
    --aa-muted: #777;
    --aa-rule: #e8e8e8;
    --aa-bg: #fff;
    --aa-tag-bg: #f0f0f0;
    --aa-nav-h: 52px;
    --aa-tab-h: 68px;
    --aa-card-radius: 10px;
    --aa-max-w: 860px;
    --aa-grid-max-w: 1200px;

    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--aa-bg);
    background-image:
        linear-gradient(rgba(26, 26, 26, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 26, 26, 0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--aa-text);
}

/* ── Masthead ── */
#art-alive .aa-masthead {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 200;
}
#art-alive .aa-masthead-inner {
    height: var(--aa-nav-h);
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 12px 32px;
    flex-wrap: wrap;
}
#art-alive .aa-masthead-name {
    font-weight: 900;
    font-size: 20px;
    color: var(--aa-text);
    letter-spacing: -0.4px;
}
#art-alive .aa-masthead-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--aa-accent);
}
#art-alive .aa-back-link {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--aa-muted);
    text-decoration: none;
}
#art-alive .aa-back-link:hover { color: var(--aa-text); }
#art-alive .aa-masthead-spine { height: 5px; width: 100%; }

/* ── Hero ── */
#art-alive .aa-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: #111;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 32px 32px;
    color: #fff;
    padding: 64px 32px 60px;
}
#art-alive .aa-hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--aa-max-w);
    margin: 0 auto;
    padding-left: 56px;
}
#art-alive .aa-hero-kicker {
    margin-bottom: 12px;
    color: #f5b041;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
#art-alive .aa-hero h1 {
    max-width: 780px;
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0;
    margin-bottom: 18px;
    color: #fff;
}
#art-alive .aa-hero-intro {
    font-size: 16px;
    line-height: 1.72;
    color: #aaa;
    max-width: 640px;
}
#art-alive .aa-hero-shape {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}
#art-alive .aa-hero-shape--square {
    top: 34px;
    left: max(24px, calc(50% - 430px));
    width: 96px;
    height: 96px;
    background: #e07c24;
    transform: rotate(12deg);
}
#art-alive .aa-hero-shape--circle {
    right: max(36px, calc(50% - 480px));
    bottom: -64px;
    width: 220px;
    height: 220px;
    border: 34px solid #2e86ab;
    border-radius: 50%;
}

/* ── Section navigation ── */
#art-alive .aa-tabs-bar {
    background: #fff;
    position: sticky;
    top: var(--aa-nav-h);
    z-index: 150;
    overflow-x: auto;
    scrollbar-width: none;
}
#art-alive .aa-tabs-bar::-webkit-scrollbar { display: none; }
#art-alive .aa-tabs-inner {
    display: flex;
    max-width: var(--aa-grid-max-w);
    margin: 0 auto;
    padding: 0 24px;
}
#art-alive .aa-tab-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 26px;
    height: var(--aa-tab-h);
    font-size: 16px;
    font-weight: 800;
    color: var(--aa-muted);
    cursor: pointer;
    border: 0;
    white-space: nowrap;
    transition: color 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    user-select: none;
    background: none;
    text-decoration: none;
}
#art-alive .aa-tab-btn:hover { color: var(--aa-text); }
#art-alive .aa-tab-btn.is-active {
    color: var(--aa-tab-accent, var(--aa-accent));
    box-shadow: inset 0 -4px 0 var(--aa-tab-accent, var(--aa-accent));
}
#art-alive .aa-tab-icon { font-size: 20px; }
#art-alive .aa-tab-count {
    font-size: 11px;
    font-weight: 700;
    background: var(--aa-tag-bg);
    color: var(--aa-muted);
    padding: 3px 8px;
    border-radius: 10px;
}
#art-alive .aa-tab-btn.is-active .aa-tab-count {
    background: color-mix(in srgb, var(--aa-tab-accent, var(--aa-accent)) 16%, #fff);
    color: var(--aa-tab-accent, var(--aa-accent));
}

#art-alive .aa-masonry-tile.aa-tile-wide.is-expanded .aa-tile-media {
    border-bottom: none;
    border-right: 2px solid var(--aa-rule);
}
#art-alive .aa-masonry-tile.is-expanded .aa-tile-content {
    position: relative;
    inset: auto;
    flex: 1;
    justify-content: flex-start;
    padding: 20px 22px;
    overflow-y: auto;
    color: var(--aa-text);
    background: linear-gradient(180deg, color-mix(in srgb, var(--aa-tile-accent, var(--aa-accent)) 10%, #fff) 0%, #fff 40%);
}
#art-alive .aa-masonry-tile.is-expanded .aa-tile-title,
#art-alive .aa-masonry-tile.is-expanded .aa-tile-meta {
    color: var(--aa-text);
    text-shadow: none;
}
#art-alive .aa-masonry-tile.is-expanded .aa-tile-excerpt {
    color: #333;
    opacity: 1;
    -webkit-line-clamp: unset;
}
#art-alive .aa-masonry-tile.is-expanded .aa-tile-btn {
    color: var(--aa-tile-accent, var(--aa-accent));
}

/* ── Popover backdrop ── */
#art-alive .aa-popover-backdrop {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* ── Popover close button ── */
#art-alive .aa-tile-close {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #333;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
#art-alive .aa-masonry-tile.is-expanded .aa-tile-close {
    display: flex;
}
#art-alive .aa-popover-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}
#art-alive .aa-tile-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
#art-alive .aa-tile-icon-circle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--aa-tile-accent, var(--aa-accent));
    font-size: 13px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}
#art-alive .aa-tile-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
#art-alive .aa-tile-reveal {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}
#art-alive .aa-masonry-tile.is-expanded .aa-tile-reveal {
    max-height: 260px;
    opacity: 1;
    margin-top: 10px;
}
#art-alive .aa-tile-meta {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    opacity: 0.9;
}
#art-alive .aa-tile-excerpt {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.55;
    opacity: 0.92;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#art-alive .aa-tile-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
#art-alive .aa-tile-btn-arrow { font-style: normal; }

/* ── Sectioned entry lists ── */
#art-alive .aa-sections {
    max-width: var(--aa-max-w);
    margin: 0 auto;
    padding: 8px 32px 0;
}
#art-alive .aa-section {
    scroll-margin-top: calc(var(--aa-nav-h) + var(--aa-tab-h) + 20px);
    padding: 42px 0 10px;
}
#art-alive .aa-section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
#art-alive .aa-section-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--aa-section-accent) 16%, #fff);
    font-size: 21px;
}
#art-alive .aa-section h2 {
    color: var(--aa-text);
    font-size: 27px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 0;
}
#art-alive .aa-section-heading p {
    margin-top: 3px;
    color: var(--aa-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
#art-alive .aa-section-heading {
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
#art-alive .aa-section:target .aa-section-heading {
    margin-left: -14px;
    margin-right: -14px;
    padding: 10px 14px;
    border-left: 4px solid var(--aa-section-accent);
    background: color-mix(in srgb, var(--aa-section-accent) 12%, #fff);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--aa-section-accent) 22%, #fff);
}
#art-alive .aa-section:target .aa-section-icon {
    background: var(--aa-section-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--aa-section-accent) 18%, #fff);
}
#art-alive .aa-section:target h2 { color: var(--aa-section-accent); }
#art-alive .aa-entry-list { border-top: 3px solid var(--aa-section-accent); }
#art-alive .aa-entry {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    padding: 22px 0;
    border-bottom: 1px solid var(--aa-rule);
}
#art-alive .aa-entry.aa-entry--text {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 14px 0;
    padding: 22px 24px;
    border-bottom: 0;
    border-left: 5px solid var(--aa-section-accent);
    background: color-mix(in srgb, var(--aa-section-accent) 8%, #fff);
}
#art-alive .aa-entry-content { min-width: 0; }
#art-alive .aa-entry-media {
    align-self: start;
    aspect-ratio: 4 / 3;
    position: relative;
    overflow: hidden;
    background: var(--aa-section-accent);
    box-shadow: 10px 10px 0 color-mix(in srgb, var(--aa-section-accent) 35%, #fff);
}
#art-alive .aa-entry-media::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    border-top: 3px solid #fff;
    border-left: 3px solid #fff;
    opacity: 0.9;
}
#art-alive .aa-entry-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92) contrast(1.04);
    transition: transform 0.35s ease;
}
#art-alive .aa-entry:hover .aa-entry-media img { transform: scale(1.04); }
#art-alive .aa-entry h3 {
    font-size: 21px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0;
}
#art-alive .aa-entry h3 a {
    color: inherit;
    text-decoration-color: var(--aa-section-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
#art-alive .aa-entry h3 a:hover { color: var(--aa-section-accent); }
#art-alive .aa-entry-meta {
    margin-top: 7px;
    color: var(--aa-section-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
#art-alive .aa-entry-description,
#art-alive .aa-entry-body {
    margin-top: 9px;
    color: #444;
    font-size: 15px;
    line-height: 1.6;
}
#art-alive .aa-entry-body > * + * { margin-top: 9px; }
#art-alive .aa-entry-body a { color: inherit; text-decoration-color: var(--aa-section-accent); }
#art-alive .aa-entry-link {
    display: inline-block;
    margin-top: 11px;
    color: var(--aa-section-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}
#art-alive .aa-entry-link:hover { text-decoration: underline; }

/* ── Subscribe / calendar / share CTA ── */
#art-alive .aa-cta-bar {
    background: var(--aa-accent);
    width: 100%;
    margin-top: 40px;
}
#art-alive .aa-cta-inner {
    max-width: var(--aa-max-w);
    margin: 0 auto;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
#art-alive .aa-cta-bar h5 {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}
#art-alive .aa-cta-bar p {
    font-size: 15px;
    color: rgba(255,255,255,0.78);
    margin-top: 3px;
}
#art-alive .aa-cta-title-accent { color: #000; }
#art-alive .aa-cta-form { display: flex; gap: 8px; flex-wrap: wrap; }
#art-alive .aa-cta-input {
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    background: rgba(255,255,255,0.25);
    color: #fff;
    min-width: 200px;
}
#art-alive .aa-cta-input::placeholder { color: rgba(255,255,255,0.75); }
#art-alive .aa-cta-btn {
    padding: 10px 20px;
    background: #fff;
    color: var(--aa-accent-dark);
    font-weight: 800;
    font-size: 13px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
}
#art-alive .aa-cta-btn:hover:not(:disabled) { background: #f6f6f6; }
#art-alive .aa-cta-btn:disabled { opacity: .65; cursor: not-allowed; }
#art-alive .aa-cta-error {
    font-size: .8rem;
    color: #3a0d00;
    background: rgba(255,255,255,.85);
    padding: .3rem .6rem;
    border-radius: 4px;
    margin-top: .5rem;
    width: 100%;
}
#art-alive .aa-cta-success {
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
}
#art-alive .aa-cta-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
#art-alive .aa-cta-calendar {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}
#art-alive .aa-cta-calendar:hover { text-decoration: underline; }
#art-alive .aa-cta-share {
    display: flex;
    align-items: center;
    gap: 12px;
}
#art-alive .aa-cta-share a {
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    opacity: .85;
}
#art-alive .aa-cta-share a:hover { opacity: 1; }

/* ── Page footer ── */
#art-alive .aa-page-footer {
    background: #111;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
}
#art-alive .aa-page-footer-id { font-size: 12px; color: #666; }
#art-alive .aa-page-footer-links a {
    font-size: 12px;
    color: #666;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}
#art-alive .aa-page-footer-links a:hover { color: #aaa; }

/* ── Responsive ── */
@media (max-width: 700px) {
    #art-alive { --aa-nav-h: 57px; }
    #art-alive .aa-masthead-inner { align-items: center; padding: 0 16px; }
    #art-alive .aa-masthead-name { font-size: 17px; }
    #art-alive .aa-masthead-label { display: none; }
    #art-alive .aa-back-link { margin-left: auto; }
    #art-alive .aa-hero { padding: 46px 20px 42px; }
    #art-alive .aa-hero-content { padding-left: 28px; }
    #art-alive .aa-hero h1 { font-size: clamp(30px, 9vw, 42px); }
    #art-alive .aa-hero-intro { font-size: 15px; line-height: 1.6; }
    #art-alive .aa-hero-shape--square { top: 20px; left: 12px; width: 54px; height: 54px; }
    #art-alive .aa-hero-shape--circle { right: -62px; bottom: -58px; width: 112px; height: 112px; border-width: 18px; }
    #art-alive .aa-sections { padding: 0 20px; }
    #art-alive .aa-section { padding-top: 32px; }
    #art-alive .aa-section h2 { font-size: 23px; }
    #art-alive .aa-entry { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 18px 0; }
    #art-alive .aa-entry h3 { font-size: 18px; }
    #art-alive .aa-entry-description { font-size: 14px; line-height: 1.5; }
    #art-alive .aa-tabs-bar { scroll-padding-inline: 8px; }
    #art-alive .aa-tabs-inner { padding: 0 8px; }
    #art-alive .aa-tab-btn { padding: 0 16px; font-size: 13px; height: 56px; }
    #art-alive .aa-tab-icon { font-size: 17px; }
    #art-alive .aa-tab-count { display: none; }
    #art-alive .aa-cta-inner { padding: 24px 20px; }
}

@media (max-width: 520px) {
    #art-alive .aa-section-heading { align-items: flex-start; }
    #art-alive .aa-section-icon { width: 38px; height: 38px; flex-basis: 38px; font-size: 18px; }
    #art-alive .aa-section h2 { font-size: 22px; }
    #art-alive .aa-entry { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    #art-alive .aa-entry-media { width: 100%; aspect-ratio: 16 / 9; }
    #art-alive .aa-entry.aa-entry--text { margin: 10px 0; padding: 18px; }
    #art-alive .aa-entry h3 { font-size: 20px; }
    #art-alive .aa-entry-description,
    #art-alive .aa-entry-body { font-size: 15px; }
    #art-alive .aa-cta-inner { gap: 22px; }
    #art-alive .aa-cta-form { width: 100%; flex-wrap: nowrap; }
    #art-alive .aa-cta-input { min-width: 0; flex: 1 1 auto; }
    #art-alive .aa-cta-btn { flex: 0 0 auto; }
    #art-alive .aa-cta-links { width: 100%; justify-content: space-between; }
    #art-alive .aa-page-footer { padding: 20px; }
}
