/**
 * Atlasia Site Kit — Frontend styles
 *
 * Sticky header uses position:fixed rather than sticky. Sticky is prettier
 * in theory but constantly breaks in real WordPress themes because a parent
 * has overflow: hidden / overflow-x: hidden / a transform ancestor.
 * Fixed always works. A JS-measured spacer preserves document flow.
 *
 * Footer is rebuilt mobile-first with real breathing room, larger tap
 * targets, and stacked social icons that don't feel cramped.
 */

/* ==========================================================================
   Sticky header — visual states only
   Positioning (position:fixed, top, z-index, width) is applied by JS via
   inline !important styles because that's the only way to beat both
   Blocksy's stylesheets AND any containing-block traps on #main-container.
   ========================================================================== */

/* Scrolled state — subtle shadow + slight compression */
body.atk-sticky-shrink header.ct-header.atk-scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
}

body.atk-sticky-shrink header.ct-header.atk-scrolled [data-row] {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* Neutralize Blocksy's own position rules that might interfere before JS runs */
body.atk-sticky header.ct-header {
    background: var(--atk-header-bg, #ffffff);
}

/* ==========================================================================
   Footer — rebuilt mobile-first
   ========================================================================== */

.atk-footer {
    background: var(--atk-footer-bg, #712B13);
    color: var(--atk-footer-text, #FAECE7);
    padding: 48px 20px 24px;
    margin-top: 48px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.7;
}

.atk-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Mobile-first: single column with proper vertical rhythm */
.atk-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.atk-footer-col {
    display: flex;
    flex-direction: column;
}

/* Brand column: center-aligned on mobile so logo has real presence */
.atk-footer-brand {
    text-align: center;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
}

.atk-footer a {
    color: var(--atk-footer-text, #FAECE7);
    text-decoration: none;
    transition: opacity 0.2s ease;
    /* Bigger tap target on mobile */
    display: inline-block;
    padding: 2px 0;
}

.atk-footer a:hover,
.atk-footer a:focus-visible {
    opacity: 0.75;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.atk-footer-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--atk-footer-text, #FAECE7);
    letter-spacing: 0.01em;
    /* Subtle underline for hierarchy */
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.atk-footer-logo img {
    max-width: 160px;
    height: auto;
    margin-bottom: 12px;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.atk-footer-wordmark {
    font-family: 'Lora', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.atk-footer-tagline {
    font-style: italic;
    margin: 0 0 16px;
    opacity: 0.85;
    font-size: 14px;
    max-width: 30ch;
}

.atk-footer-about {
    margin: 0 0 20px;
    opacity: 0.85;
    max-width: 42ch;
    font-size: 14px;
}

.atk-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.atk-footer-menu li {
    margin: 0 0 4px;
}

.atk-footer-menu a {
    opacity: 0.9;
    padding: 8px 0; /* generous tap target on mobile */
    display: block;
    font-size: 15px;
    line-height: 1.4;
    min-height: 32px;
}

/* Social icons — larger and center-aligned on mobile */
.atk-footer-social {
    display: flex;
    justify-content: center;
    gap: 14px;
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    flex-wrap: wrap;
}

.atk-footer-social li { margin: 0; }

.atk-footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--atk-footer-text, #FAECE7);
    transition: background 0.2s ease, transform 0.2s ease;
}

.atk-footer-social a:hover,
.atk-footer-social a:focus-visible {
    background: var(--atk-primary, #D85A30);
    transform: translateY(-2px);
    opacity: 1;
    text-decoration: none;
}

.atk-footer-social svg { width: 18px; height: 18px; }

/* Bottom bar */
.atk-footer-bottom {
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13px;
    opacity: 0.75;
    text-align: center;
}

.atk-footer-bottom p { margin: 0; }

.atk-disclosure {
    max-width: 60ch;
    margin: 0 auto;
    font-size: 12px;
    line-height: 1.6;
}

/* ==========================================================================
   Footer — TABLET (600px+): brand full width, other columns side by side
   ========================================================================== */

@media (min-width: 600px) {
    .atk-footer { padding: 56px 24px 24px; }

    .atk-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .atk-footer-brand {
        grid-column: 1 / -1;
        text-align: left;
        align-items: flex-start;
        border-bottom: none;
        padding-bottom: 0;
    }

    .atk-footer-social {
        justify-content: flex-start;
    }
}

/* ==========================================================================
   Footer — DESKTOP (900px+): three columns, brand takes lead
   ========================================================================== */

@media (min-width: 900px) {
    .atk-footer { padding: 64px 24px 24px; margin-top: 64px; }

    .atk-footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
        gap: 48px;
    }

    .atk-footer-brand {
        grid-column: auto;
    }

    .atk-footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 24px;
        text-align: left;
    }

    .atk-disclosure {
        text-align: right;
        margin: 0;
    }
}

/* ==========================================================================
   Mobile — chip layout for Explore + Legal menus
   Stacked list of 8+ links each takes forever to scroll past on a phone.
   Chip layout wraps horizontally and uses 60-70% less vertical space.
   ========================================================================== */

@media (max-width: 599px) {
    .atk-footer {
        padding: 36px 18px 20px;
    }

    .atk-footer-grid {
        gap: 28px;
        padding-bottom: 24px;
    }

    /* Tighter, quieter section titles on mobile */
    .atk-footer-explore .atk-footer-title,
    .atk-footer-legal .atk-footer-title {
        font-family: 'DM Sans', system-ui, sans-serif;
        font-size: 11px;
        font-weight: 500;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        opacity: 0.65;
        margin: 0 0 12px;
        padding: 0;
        border: none;
    }

    /* Chip menu: flex wrap, subtle pill background */
    .atk-footer-explore .atk-footer-menu,
    .atk-footer-legal .atk-footer-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .atk-footer-explore .atk-footer-menu li,
    .atk-footer-legal .atk-footer-menu li {
        margin: 0;
    }

    .atk-footer-explore .atk-footer-menu a,
    .atk-footer-legal .atk-footer-menu a {
        display: inline-block;
        padding: 7px 12px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 999px;
        font-size: 13px;
        line-height: 1.2;
        min-height: 0;
        opacity: 1;
        transition: background 0.2s ease, border-color 0.2s ease;
        white-space: nowrap;
    }

    .atk-footer-explore .atk-footer-menu a:hover,
    .atk-footer-explore .atk-footer-menu a:focus-visible,
    .atk-footer-legal .atk-footer-menu a:hover,
    .atk-footer-legal .atk-footer-menu a:focus-visible {
        background: rgba(255, 255, 255, 0.16);
        border-color: rgba(255, 255, 255, 0.2);
        text-decoration: none;
        opacity: 1;
    }

    /* Brand section: keep it airy, but shrink to fit */
    .atk-footer-brand {
        padding-bottom: 4px;
        margin-bottom: 0;
        gap: 8px;
    }

    .atk-footer-logo img {
        max-width: 140px;
        margin-bottom: 8px;
    }

    .atk-footer-tagline {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .atk-footer-about {
        display: none; /* redundant with the tagline on mobile */
    }

    .atk-footer-social a {
        width: 40px;
        height: 40px;
    }

    /* Compact bottom bar */
    .atk-footer-bottom {
        padding-top: 20px;
        gap: 10px;
        font-size: 12px;
    }

    .atk-disclosure {
        font-size: 11px;
        line-height: 1.5;
    }
}

.atk-contact-details {
    list-style: none;
    margin: 0 0 24px;
    padding: 20px;
    background: var(--atk-primary-light, #FAECE7);
    border-left: 4px solid var(--atk-primary, #D85A30);
    border-radius: 4px;
}

.atk-contact-details li {
    margin: 0 0 8px;
}

.atk-contact-details li:last-child {
    margin: 0;
}
