/* ============================================
   McCode-Wadsworth Homepage
   AWS Console Dark Mode professional design.
   Mobile-first layout with liquid glass FAB navigation.
   ============================================ */

/* ----------------------------------------
   CSS Custom Properties (Design Tokens)
   AWS Console Dark Mode palette.
   Shared with module-1-administrator-page.css.
   ---------------------------------------- */
:root {
    /* Colors — AWS Console Dark Mode */
    --color-bg-primary: #0f1b2d;
    --color-bg-surface: #192534;
    --color-bg-alt: #0a1929;
    --color-bg-elevated: #243040;
    --color-bg-dark: #000716;

    /* Text Colors */
    --color-text-primary: #d1d5db;
    --color-text-secondary: #8d9baa;
    --color-text-tertiary: #5f6b7a;
    --color-text-inverse: #000716;

    /* Accent — Amazon Gold & Blue */
    --color-gold: #ff9900;
    --color-gold-hover: #e88b00;
    --color-gold-light: rgba(255, 153, 0, 0.12);
    --color-crimson: #d91515;
    --color-crimson-light: rgba(217, 21, 21, 0.1);

    /* AWS Blue (links & focus) */
    --color-aws-blue: #539fe5;
    --color-aws-blue-hover: #89bceb;
    --color-aws-blue-light: rgba(83, 159, 229, 0.12);

    /* Semantic Colors */
    --color-success: #3fb950;
    --color-success-bg: rgba(46, 160, 67, 0.15);
    --color-success-border: rgba(46, 160, 67, 0.3);
    --color-error: #d91515;
    --color-error-bg: rgba(217, 21, 21, 0.1);
    --color-error-border: rgba(217, 21, 21, 0.2);

    /* Borders */
    --color-border: #414d5c;
    --color-border-hover: #5f6b7a;
    --color-border-gold: rgba(255, 153, 0, 0.4);

    /* Backdrop */
    --color-backdrop: rgba(0, 7, 22, 0.85);
    --color-backdrop-light: rgba(0, 7, 22, 0.7);

    /* Typography */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.75rem;

    /* Font Weights */
    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;
    --spacing-5xl: 8rem;

    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Shadows — deeper for dark surfaces */
    --shadow-sm: 0 1px 4px rgba(0, 7, 22, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 7, 22, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 7, 22, 0.5);
    --shadow-glass:
        0 8px 40px rgba(0, 7, 22, 0.3),
        0 2px 12px rgba(0, 7, 22, 0.15),
        0 0 0 0.5px rgba(255, 255, 255, 0.15) inset,
        0 1px 0 0 rgba(255, 255, 255, 0.08) inset;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-Index */
    --z-base: 1;
    --z-fab: 100;

    /* Container */
    --container-max: 1200px;
    --container-padding: 1.5rem;
}

/* ----------------------------------------
   Reset & Base
   ---------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: var(--fw-regular);
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    overflow-x: hidden;
    overscroll-behavior-y: none;
    min-height: 100vh;
}

/* Gold Accent Bar — Fixed top edge */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-gold);
    z-index: 9999;
    pointer-events: none;
}

a {
    color: var(--color-aws-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-aws-blue-hover);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Touch & Mobile Interaction */
a,
button,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

a,
button {
    touch-action: manipulation;
}

*:focus-visible {
    outline: 2px solid var(--color-aws-blue);
    outline-offset: 2px;
}

/* ----------------------------------------
   Utilities
   ---------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ----------------------------------------
   Shared Section Styles
   ---------------------------------------- */
.section {
    padding: var(--spacing-5xl) 0;
}

.section-label {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--spacing-md);
    color: var(--color-gold);
}

.section-heading {
    font-family: var(--font-heading);
    font-size: var(--font-size-3xl);
    font-weight: var(--fw-medium);
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-lg);
}

.section-intro {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    line-height: 1.7;
    max-width: 680px;
    margin-bottom: var(--spacing-3xl);
}

/* ----------------------------------------
   Footer — Minimal wrapper for admin login
   ---------------------------------------- */
.footer {
    padding: var(--spacing-lg) 0;
    text-align: center;
}

/* ============================================
   APPLE-STYLE SCROLL ANIMATIONS
   Reveal-on-scroll with staggered delays
   and cinematic transitions.
   All driven by IntersectionObserver via JS.
   ============================================ */

/* ── Base hidden state for all reveal elements ── */
[data-reveal] {
    opacity: 0;
    will-change: opacity, transform;
    transition:
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Delay tiers — set by data-delay or data-stagger */
[data-reveal][data-delay="1"],
[data-reveal][data-stagger="1"] { transition-delay: 0.1s; }
[data-reveal][data-delay="2"],
[data-reveal][data-stagger="2"] { transition-delay: 0.2s; }
[data-reveal][data-delay="3"],
[data-reveal][data-stagger="3"] { transition-delay: 0.3s; }
[data-reveal][data-delay="4"],
[data-reveal][data-stagger="4"] { transition-delay: 0.4s; }
[data-reveal][data-delay="5"],
[data-reveal][data-stagger="5"] { transition-delay: 0.5s; }

/* ── Fade Up — default reveal: slide up 40px ── */
[data-reveal="fade-up"] {
    transform: translateY(40px);
}

/* ── Fade — opacity only ── */
[data-reveal="fade"] {
    transform: none;
}

/* ── Scale — divider / decorative elements ── */
[data-reveal="scale"] {
    transform: scaleX(0);
}

/* ── Visible state — applied by JS ── */
[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0) scaleX(1);
}

/* ----------------------------------------
   Mobile Responsive (max-width: 768px)
   ---------------------------------------- */
@media (max-width: 768px) {
    .section-heading {
        font-size: var(--font-size-2xl);
    }
}

/* ----------------------------------------
   Small Mobile (max-width: 480px)
   ---------------------------------------- */
@media (max-width: 480px) {
    :root {
        --container-padding: 1.25rem;
    }

    .section {
        padding: var(--spacing-4xl) 0;
    }
}

/* ----------------------------------------
   Safe Area Insets (Notched Phones)
   ---------------------------------------- */
@supports (padding: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(var(--spacing-lg) + env(safe-area-inset-bottom));
    }
}

/* ----------------------------------------
   Reduced Motion
   ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    /* Disable scroll reveal animations — show everything immediately */
    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
