/* =============================================================
   COMPASS — style.css
   A clean, modern, accessible design system for a vanilla
   HTML / CSS / JS educational nonprofit website (V1 beta).

   This file is intentionally organized into numbered sections
   so future contributors (even non-experts) can find things fast.

   TABLE OF CONTENTS
   1.  Reset & base
   2.  Design tokens (CSS variables — the whole visual system)
   3.  Typography
   4.  Layout utilities
   5.  Buttons
   6.  Focus states (accessibility)
   7.  Header & navigation
   8.  Hero section + signature compass mark
   9.  Feature cards (Home / Stories / About)
   10. Card grid (Learn / Resources)
   11. Page header (Learn / Resources / Stories / About)
   12. Stories page
   13. Footer
   14. Toast notification
   15. Scroll fade-in animation
   16. Responsive adjustments
   17. Accessibility helpers & reduced motion
   ============================================================= */


/* ---------------------------------------------------------
   1. RESET & BASE
   --------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* keeps the footer pinned to the bottom on short pages */
    font-family: var(--font-body);
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1 0 auto;
}

img,
svg {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

button {
    font-family: inherit;
}


/* ---------------------------------------------------------
   2. DESIGN TOKENS
   Change a value here and it updates across the whole site.
   "Harbor" palette: calm water + clear direction + warm welcome.
   --------------------------------------------------------- */
:root {
    /* Colors */
    --color-bg: #F7F8F7;
    --color-surface: #FFFFFF;
    --color-text-primary: #1E2A2E;
    --color-text-secondary: #56666B;

    --color-primary: #144C57;
    /* buttons, links, active states — WCAG AA+ */
    --color-primary-hover: #0E3941;
    --color-primary-soft: #1F7A8C;
    /* decorative accents, the hero watermark */
    --color-primary-tint: #E6F1F2;
    /* tinted section backgrounds */

    --color-accent: #E9A23B;
    /* warm CTA accent */
    --color-accent-hover: #C97F1F;

    --color-border: #DCE3E2;

    /* Typography */
    --font-heading: 'Sora', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* Rounded corners */
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --radius-full: 999px;

    /* Soft shadows */
    --shadow-sm: 0 1px 3px rgba(30, 42, 46, 0.06);
    --shadow-md: 0 8px 20px rgba(30, 42, 46, 0.08);
    --shadow-lg: 0 16px 40px rgba(30, 42, 46, 0.10);

    /* Motion */
    --transition-fast: 150ms ease;
    --transition-base: 280ms ease;

    /* Layout */
    --header-height: 76px;
}


/* ---------------------------------------------------------
   3. TYPOGRAPHY
   --------------------------------------------------------- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 var(--space-sm);
    color: var(--color-text-primary);
}

h1 {
    font-size: clamp(2.25rem, 4vw + 1rem, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

h2 {
    font-size: clamp(1.75rem, 2.5vw + 1rem, 2.25rem);
}

h3 {
    font-size: 1.25rem;
}

p {
    margin: 0 0 var(--space-sm);
    color: var(--color-text-secondary);
}

.text-accent {
    color: var(--color-primary);
}


/* ---------------------------------------------------------
   4. LAYOUT UTILITIES
   --------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Narrower column for comfortable long-form reading (About page) */
.container.narrow {
    max-width: 720px;
}

.section {
    padding: var(--space-2xl) 0;
}

/* Soft brand-tinted section background, used sparingly to
   spotlight the 3-4 item "highlight" grids (not the 6-item ones) */
.section-tint {
    background-color: var(--color-primary-tint);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-xs);
}

.section-subtitle {
    text-align: center;
    max-width: 560px;
    margin: 0 auto var(--space-xl);
}


/* ---------------------------------------------------------
   5. BUTTONS
   --------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast),
        background-color var(--transition-fast);
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
}

.btn-accent {
    background-color: var(--color-accent);
    color: var(--color-text-primary);
}

.btn-accent:hover {
    background-color: var(--color-accent-hover);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-border);
    color: var(--color-text-secondary);
}

.btn-lg {
    padding: 1.1rem 2.25rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}


/* ---------------------------------------------------------
   6. FOCUS STATES (accessibility)
   One rule, applies everywhere — always keep a visible
   keyboard focus indicator.
   --------------------------------------------------------- */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--color-primary-soft);
    outline-offset: 2px;
    border-radius: 4px;
}


/* ---------------------------------------------------------
   7. HEADER & NAVIGATION
   --------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(247, 248, 247, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    padding: 0 var(--space-md);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--color-text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-mark {
    flex-shrink: 0;
}

/* The icon is deliberately simple, so the letter-spaced
   wordmark text is what carries the brand */
.logo span,
.footer-logo span {
    letter-spacing: 0.03em;
}

/* Mobile menu button (hamburger <-> X) */
.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.menu-toggle:hover {
    background-color: var(--color-primary-tint);
}

.menu-icon {
    position: relative;
    width: 22px;
    height: 2px;
    background-color: var(--color-text-primary);
    transition: background-color var(--transition-fast);
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background-color: var(--color-text-primary);
    transition: transform var(--transition-base), top var(--transition-base);
}

.menu-icon::before {
    top: -7px;
}

.menu-icon::after {
    top: 7px;
}

.menu-toggle[aria-expanded="true"] .menu-icon {
    background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Mobile nav panel (slides in from the right) */
.primary-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    height: calc(100vh - var(--header-height));
    width: min(80vw, 320px);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-lg);
    padding: var(--space-lg) var(--space-md);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    z-index: 99;
    overflow-y: auto;
}

.primary-nav.is-open {
    transform: translateX(0);
}

.primary-nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.primary-nav a {
    display: block;
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 0;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border);
}

.primary-nav a.active {
    color: var(--color-primary);
    font-weight: 600;
}

/* Prevent background scroll while the mobile menu is open */
body.nav-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }

    .primary-nav {
        position: static;
        height: auto;
        width: auto;
        background: none;
        box-shadow: none;
        padding: 0;
        transform: none;
        overflow: visible;
    }

    .primary-nav ul {
        flex-direction: row;
        gap: var(--space-lg);
    }

    .primary-nav a {
        border-bottom: none;
        padding: 0.25rem 0;
        position: relative;
    }

    .primary-nav a::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -4px;
        height: 2px;
        width: 0;
        background-color: var(--color-primary);
        transition: width var(--transition-base);
    }

    .primary-nav a:hover::after,
    .primary-nav a.active::after {
        width: 100%;
    }
}


/* ---------------------------------------------------------
   8. HERO SECTION + SIGNATURE BRAND MARK
   --------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: var(--space-2xl) 0;
}

/* The signature graphic: a single, minimal geometric "V"
   line-mark. On the homepage hero it renders large, faint,
   and bleeding off the edge as background texture — fully
   static, so the typography stays the focus of the brand. */
.hero-brand-mark {
    position: absolute;
    top: -60px;
    right: -80px;
    width: 380px;
    height: 380px;
    color: var(--color-primary-soft);
    opacity: 0.1;
    pointer-events: none;
}

.hero-brand-mark svg {
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    text-align: center;
    margin: 0 auto;
}

/* The hero heading is two stacked lines: the VERITAS wordmark,
   then the "Truth. Hope. Opportunity." tagline underneath in
   the accent color. Sizing the tagline in "em" keeps it
   scaling proportionally with the h1's responsive clamp(). */
.hero-wordmark {
    display: block;
    letter-spacing: 0.03em;
}

.hero-tagline {
    display: block;
    font-size: 0.42em;
    font-weight: 600;
    margin-top: 0.35em;
    letter-spacing: 0.02em;
}

.hero-subtitle {
    font-size: 1.15rem;
    max-width: 600px;
    margin: var(--space-md) auto var(--space-lg);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}


/* ---------------------------------------------------------
   9. FEATURE CARDS (Home / Stories / About)
   Compact icon + heading + short blurb, used for 3-4 item
   "highlight" grids. See section 10 for the denser 6-item
   content grid used on Learn/Resources.
   --------------------------------------------------------- */
.feature-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* centers a lone last card when the row wraps, e.g. 3 cards -> 2 + 1 */
    gap: var(--space-md);
}

.feature-card {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    flex: 1 1 240px;
    max-width: 360px;
    /* keeps a lone wrapped card from stretching full-width */
}

/* The About page's 4-item values grid uses a slightly smaller
   card width so more fit per row before wrapping */
.values-grid .feature-card {
    flex-basis: 200px;
    max-width: 280px;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2.25rem;
    margin-bottom: var(--space-sm);
}

.feature-card h3 {
    margin-bottom: var(--space-xs);
}

.feature-card p {
    margin-bottom: var(--space-sm);
}

.card-link {
    display: inline-block;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.card-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}


/* ---------------------------------------------------------
   10. CARD GRID (Learn / Resources)
   --------------------------------------------------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.card {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-lg) var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.card-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.card-title {
    font-size: 1.15rem;
    margin-bottom: var(--space-xs);
}

.card-text {
    flex-grow: 1;
    /* pushes the CTA to a consistent bottom position */
    margin-bottom: var(--space-md);
}


/* ---------------------------------------------------------
   10b. FLIP CARDS (Learn page)
   A click/tap flips the card from a short question to a short
   answer + action button. Built with a real <button> as the
   front face (keyboard + screen-reader friendly) and the
   "inert" attribute to keep whichever face is hidden out of
   the tab order and accessibility tree. Sits inside the same
   .card-grid used elsewhere, so layout/spacing match exactly.
   --------------------------------------------------------- */
.flip-card {
    perspective: 1200px;
}

.flip-card-inner {
    position: relative;
    height: 100%;
    display: grid;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    grid-area: 1 / 1;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-lg) var(--space-md);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    transition: box-shadow var(--transition-base);
}

.flip-card:hover .flip-card-front,
.flip-card:hover .flip-card-back {
    box-shadow: var(--shadow-md);
}

.flip-card-front {
    width: 100%;
    border: none;
    font: inherit;
    text-align: left;
    color: inherit;
    cursor: pointer;
}

.flip-card-back {
    transform: rotateY(180deg);
}

.flip-hint {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.flip-card-back-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    width: 100%;
    margin-top: var(--space-sm);
}

.flip-back-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.flip-back-btn:hover {
    background-color: var(--color-primary-tint);
    color: var(--color-primary);
}


/* ---------------------------------------------------------
   11. PAGE HEADER (Learn / Resources / Stories / About)
   --------------------------------------------------------- */
.page-header {
    padding: var(--space-xl) 0 var(--space-md);
    text-align: center;
}

.page-intro {
    max-width: 640px;
    margin: 0 auto;
    font-size: 1.05rem;
}


/* ---------------------------------------------------------
   11b. ARTICLE PAGES (Learn topic detail pages)
   A short, tinted "quick summary" box up top for anyone in a
   rush, then the detailed content broken into short flashcard-
   style Q&A blocks rather than long paragraphs.
   --------------------------------------------------------- */
.article-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-xs);
}

.article-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    margin-bottom: var(--space-md);
}

.article-back-link:hover {
    color: var(--color-primary);
}

.article-summary {
    background-color: var(--color-primary-tint);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-md) 0 var(--space-xl);
}

.article-summary p {
    margin: 0;
    color: var(--color-text-primary);
}

.article-summary-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.article-qa {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.qa-block {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-md) var(--space-lg);
}

.qa-block h2 {
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
}

.qa-block p {
    margin: 0;
}

.article-sources {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.article-footer-nav {
    margin-top: var(--space-lg);
}


/* ---------------------------------------------------------
   11c. NOTICE BANNER
   A short, tinted callout for important context — currently
   used for the "not legal advice" note on the Resources page.
   Reusable anywhere else a brief heads-up is needed.
   --------------------------------------------------------- */
.notice-banner {
    max-width: 640px;
    margin: 0 auto var(--space-xl);
    padding: var(--space-sm) var(--space-lg);
    background-color: var(--color-primary-tint);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--color-text-primary);
    text-align: center;
}

.notice-banner strong {
    color: var(--color-primary);
}


/* ---------------------------------------------------------
   12. STORIES PAGE
   --------------------------------------------------------- */
.announcement-card {
    background: linear-gradient(135deg, var(--color-primary-tint), var(--color-surface));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    max-width: 760px;
    margin: 0 auto var(--space-2xl);
}

.announcement-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

.stories-preview {
    margin-top: var(--space-lg);
}


/* ---------------------------------------------------------
   13. FOOTER
   --------------------------------------------------------- */
.site-footer {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-2xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    padding: var(--space-xl) var(--space-md);
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-text-primary);
    margin-bottom: var(--space-xs);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-tagline {
    max-width: 280px;
}

.footer-links h3,
.footer-social h3 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer-links a {
    text-decoration: none;
    color: var(--color-text-primary);
    transition: color var(--transition-fast);
}

.footer-links a:hover,
.footer-links a.active {
    color: var(--color-primary);
}

.social-links {
    display: flex;
    gap: var(--space-sm);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--color-primary-tint);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 1.1rem;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--color-primary-soft);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding: var(--space-md);
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom p+p {
    margin-top: var(--space-xs);
}

.footer-bottom a {
    color: var(--color-primary);
    text-decoration: underline;
}

.footer-bottom a:hover {
    color: var(--color-primary-hover);
}

/* Subtle, much smaller than the rest of the footer, as requested */
.footer-credit {
    font-size: 0.7rem;
    opacity: 0.65;
}


/* ---------------------------------------------------------
   13b. 404 / ERROR PAGE
   --------------------------------------------------------- */
.error-page {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.error-code {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 700;
    color: var(--color-border);
    line-height: 1;
    margin-bottom: 0;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
    margin-top: var(--space-lg);
}


/* ---------------------------------------------------------
   14. TOAST NOTIFICATION
   Used for the placeholder links (real resource URLs and
   social links aren't live yet) so a click gives friendly
   feedback instead of doing nothing.
   --------------------------------------------------------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: var(--space-lg);
    transform: translate(-50%, 20px);
    background-color: var(--color-text-primary);
    color: #fff;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base), transform var(--transition-base);
    z-index: 200;
}

.toast.toast-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}


/* ---------------------------------------------------------
   15. SCROLL FADE-IN ANIMATION
   The ".js" class is added by a tiny inline script at the
   top of <body> — so if JavaScript is off, content is never
   stuck invisible; it just skips the fade-in.
   --------------------------------------------------------- */
.js .fade-in {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ---------------------------------------------------------
   16. RESPONSIVE ADJUSTMENTS
   --------------------------------------------------------- */
@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
    }
}


/* ---------------------------------------------------------
   17. ACCESSIBILITY HELPERS & REDUCED MOTION
   --------------------------------------------------------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background-color: var(--color-primary-hover);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 var(--radius-sm) 0;
    z-index: 1000;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}