/* ============================================
   Ly & Colin — Wedding Homepage
   Soft, airy champagne-and-ivory design.
   Mobile-first layout with liquid glass FAB navigation.
   ============================================ */

/* ----------------------------------------
   CSS Custom Properties (Design Tokens)
   Wedding palette: warm ivory, champagne gold, sage.
   Shared with m0-administrator-dashboard.css.
   ---------------------------------------- */
:root {
    /* Colors — warm ivory surfaces */
    --color-bg-primary: #fbf6ee;
    --color-bg-surface: #ffffff;
    --color-bg-alt: #f6eee0;
    --color-bg-elevated: #ffffff;
    --color-bg-dark: #3a332a;

    /* Text Colors — warm espresso on ivory */
    --color-text-primary: #3a332a;
    --color-text-secondary: #6e6353;
    --color-text-tertiary: #9b8e79;
    --color-text-inverse: #3a332a;

    /* Accent — Champagne Gold */
    --color-gold: #c2a35a;
    --color-gold-hover: #ab8c45;
    --color-gold-light: rgba(194, 163, 90, 0.15);
    --color-gold-rgb: 194, 163, 90;
    --color-crimson: #b0524a;
    --color-crimson-light: rgba(176, 82, 74, 0.1);
    --color-crimson-rgb: 176, 82, 74;

    /* Sage (links & focus) */
    --color-aws-blue: #6e8068;
    --color-aws-blue-hover: #586a53;
    --color-aws-blue-light: rgba(110, 128, 104, 0.14);

    /* Accent Blue — utility / app-launcher actions (Open Suite, Contact Developer).
       Refined azure, deepened so it sits on warm ivory without vibrating. */
    --color-accent-blue: #2c6fa6;
    --color-accent-blue-hover: #245d8c;
    --color-accent-blue-light: rgba(44, 111, 166, 0.14);
    --color-accent-blue-rgb: 44, 111, 166;

    /* Semantic Colors */
    --color-success: #6e8c5a;
    --color-success-bg: rgba(110, 140, 90, 0.15);
    --color-success-border: rgba(110, 140, 90, 0.3);
    --color-success-rgb: 110, 140, 90;
    --color-error: #b0524a;
    --color-error-bg: rgba(176, 82, 74, 0.1);
    --color-error-border: rgba(176, 82, 74, 0.25);

    /* Borders */
    --color-border: #e6dcc9;
    --color-border-hover: #d8c9ae;
    --color-border-gold: rgba(194, 163, 90, 0.5);

    /* Backdrop */
    --color-backdrop: rgba(46, 42, 36, 0.6);
    --color-backdrop-light: rgba(46, 42, 36, 0.45);

    /* Typography */
    --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-script: 'Great Vibes', 'Snell Roundhand', cursive;
    --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 — soft and warm for light surfaces */
    --shadow-sm: 0 1px 4px rgba(58, 51, 42, 0.08);
    --shadow-md: 0 6px 18px rgba(58, 51, 42, 0.10);
    --shadow-lg: 0 12px 36px rgba(58, 51, 42, 0.14);
    --shadow-glass:
        0 10px 40px rgba(58, 51, 42, 0.18),
        0 2px 12px rgba(58, 51, 42, 0.10),
        0 0 0 0.5px rgba(255, 255, 255, 0.35) inset,
        0 1px 0 0 rgba(255, 255, 255, 0.22) 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;
}

/* Headings use the display serif (--font-heading). Set globally on the
   heading tags so every module's headings inherit the elegant face —
   no per-component font-family needed. Per-element weight/size still win. */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

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);
}

/* ============================================
   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;
    }
}

/* ----------------------------------------
   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;
    }
}
