/* ============================================================
   JOD WEDDINGS — DESIGN SYSTEM
   Obsidian + Champagne Luxury Identity
   ============================================================ */

/* ─── GOOGLE FONTS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Alegreya:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600&display=swap');

/* ─── ROOT PALETTE ─────────────────────────────────────────── */
:root {
    /* Brand Colors */
    --obsidian:   #11100F;
    --champagne:  #F5EFE4;
    --gold:       #C9A96E;
    --mocha:      #8C6A55;
    --ivory:      #FFFFFF;

    /* Gold variants */
    --gold-light: #DFC08A;
    --gold-dark:  #A8834A;
    --gold-muted: rgba(201, 169, 110, 0.15);
    --gold-border: rgba(201, 169, 110, 0.3);

    /* User Requested Custom Light Palette */
    --warm-ivory:     #F7F1EB; /* Warm Ivory (BG) */
    --rose-blend:     #D8B7B0; /* Rose (blend with Bg like shapes) */
    --dusty-rose:     #A77B73; /* Dusty Rose */
    --muted-gold:     #B79B63; /* Muted Gold */

    /* ─── LIGHT MODE TOKENS ─────────────────────────────────── */
    --bg-primary:     var(--warm-ivory);
    --bg-secondary:   #EFE7DE;
    --bg-card:        #FFFFFF;
    --bg-card-hover:  #FCFAF8;
    --bg-overlay:     rgba(247, 241, 235, 0.94);
    --bg-glass:       rgba(255, 255, 255, 0.85);

    --text-primary:   #2D2321;
    --text-secondary: #5C4A46;
    --text-muted:     #8A726E;
    --text-inverse:   #FFFFFF;

    --accent:         var(--muted-gold);
    --accent-hover:   #9F834D;
    --border:         rgba(216, 183, 176, 0.45);
    --border-strong:  rgba(167, 123, 115, 0.5);

    --nav-bg:         transparent;
    --nav-bg-scroll:  rgba(247, 241, 235, 0.95);
    --nav-text:       var(--ivory);
    --nav-text-scroll: #2D2321;
    --nav-shadow:     0 4px 32px rgba(167, 123, 115, 0.12);

    --shadow-sm:   0 2px 8px rgba(167, 123, 115, 0.08);
    --shadow-md:   0 8px 32px rgba(167, 123, 115, 0.12);
    --shadow-lg:   0 16px 64px rgba(167, 123, 115, 0.16);
    --shadow-gold: 0 4px 24px rgba(183, 155, 99, 0.25);

    --modal-bg:    rgba(45, 35, 33, 0.7);
    --input-bg:    #FAF6F2;
    --input-border: rgba(167, 123, 115, 0.35);

    /* ─── TYPOGRAPHY ─────────────────────────────────────────── */
    --font-serif:  'Cormorant Garamond', Georgia, serif;
    --font-body:   'Cormorant Garamond', Georgia, serif;
    --font-script: 'Cormorant Garamond', Georgia, serif;
    --font-name:   'Alegreya', Georgia, serif;

    /* Type Scale — 16px root; body copy is 1rem = 16px */
    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-md:   1.125rem;
    --text-lg:   1.25rem;
    --text-xl:   1.5rem;
    --text-2xl:  1.875rem;
    --text-3xl:  2.25rem;
    --text-4xl:  3rem;
    --text-5xl:  3.75rem;
    --text-6xl:  4.75rem;

    /* ─── SPACING ────────────────────────────────────────────── */
    --space-1:   0.25rem;
    --space-2:   0.5rem;
    --space-3:   0.75rem;
    --space-4:   1rem;
    --space-5:   1.25rem;
    --space-6:   1.5rem;
    --space-8:   2rem;
    --space-10:  2.5rem;
    --space-12:  3rem;
    --space-16:  4rem;
    --space-20:  5rem;
    --space-24:  6rem;
    --space-32:  8rem;

    /* ─── LAYOUT ─────────────────────────────────────────────── */
    --container-xs:   540px;
    --container-sm:   720px;
    --container-md:   960px;
    --container-lg:   1200px;
    --container-xl:   1440px;
    --container-pad:  clamp(1.5rem, 5vw, 4rem);

    /* ─── RADII ──────────────────────────────────────────────── */
    --radius-sm:   0.25rem;
    --radius-md:   0.5rem;
    --radius-lg:   1rem;
    --radius-xl:   1.5rem;
    --radius-full: 9999px;

    /* ─── TRANSITIONS ────────────────────────────────────────── */
    --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base:   250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-reveal: 700ms cubic-bezier(0.16, 1, 0.3, 1);

    /* ─── Z-INDEX ─────────────────────────────────────────────── */
    --z-below:     -1;
    --z-base:       0;
    --z-raised:    10;
    --z-dropdown:  100;
    --z-sticky:    200;
    --z-overlay:   300;
    --z-modal:     400;
    --z-concierge: 500;
    --z-max:       9999;
}

/* ─── DARK MODE TOKENS ────────────────────────────────────── */
[data-theme="dark"] {
    --bg-primary:     #0E0D0C;
    --bg-secondary:   #16140F;
    --bg-card:        #1C1A16;
    --bg-card-hover:  #231F18;
    --bg-overlay:     rgba(14, 13, 12, 0.92);
    --bg-glass:       rgba(28, 26, 22, 0.8);

    --text-primary:   var(--ivory);
    --text-secondary: var(--champagne);
    --text-muted:     #A89880;
    --text-inverse:   var(--obsidian);

    --accent:         var(--gold);
    --accent-hover:   var(--gold-light);
    --border:         rgba(201, 169, 110, 0.2);
    --border-strong:  rgba(201, 169, 110, 0.4);

    --nav-bg:         transparent;
    --nav-bg-scroll:  rgba(14, 13, 12, 0.95);
    --nav-text:       var(--ivory);
    --nav-text-scroll: var(--ivory);
    --nav-shadow:     0 4px 32px rgba(0, 0, 0, 0.4);

    --shadow-sm:   0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md:   0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg:   0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 4px 24px rgba(201, 169, 110, 0.2);

    --modal-bg:    rgba(0, 0, 0, 0.85);
    --input-bg:    #1C1A16;
    --input-border: rgba(201, 169, 110, 0.25);
}

/* ─── RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: normal;
    word-spacing: normal;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

button, input, select, textarea {
    font-family: var(--font-body);
}

/* ─── TYPOGRAPHY RESET ────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

h1 { font-size: clamp(var(--text-3xl), 6vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 3vw, var(--text-2xl)); }
h4 { font-size: clamp(var(--text-lg), 2vw, var(--text-xl)); }

p {
    max-width: 68ch;
    color: var(--text-secondary);
    line-height: 1.7;
    text-align: left;
    letter-spacing: normal;
    word-spacing: normal;
}

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

a:hover { color: var(--accent-hover); }

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

button {
    cursor: pointer;
    font-family: var(--font-body);
    border: none;
    background: none;
}

input, textarea, select {
    font-family: var(--font-body);
    font-size: var(--text-base);
}

ul, ol { list-style: none; }

/* ─── GLOBAL LAYOUT ───────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container-lg);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

.container--sm  { max-width: var(--container-sm); }
.container--md  { max-width: var(--container-md); }
.container--xl  { max-width: var(--container-xl); }

.section {
    padding-block: clamp(var(--space-16), 10vw, var(--space-32));
}

.section--sm {
    padding-block: clamp(var(--space-10), 6vw, var(--space-20));
}

/* ─── TYPOGRAPHY UTILITIES ───────────────────────────────── */
.label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
}

.section-label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: var(--space-4);
}

.section-heading {
    font-family: var(--font-serif);
    font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: var(--space-6);
}

.section-heading em {
    font-style: italic;
    color: var(--accent);
}

.section-subheading {
    font-size: var(--text-md);
    color: var(--text-secondary);
    max-width: 52ch;
    line-height: 1.75;
}

.script {
    font-family: var(--font-script);
    font-style: italic;
    font-size: 1.5em;
    color: var(--accent);
    font-weight: 400;
}

.text-center { text-align: center; }
.text-center p { margin-inline: auto; }

/* ─── DIVIDER ─────────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-block: var(--space-6);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider-ornament {
    color: var(--accent);
    font-size: var(--text-lg);
    line-height: 1;
}

/* ─── SCROLL REVEAL ANIMATIONS ────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* ─── REDUCED MOTION ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal, .reveal-left, .reveal-right {
        opacity: 1;
        transform: none;
    }
    html { scroll-behavior: auto; }
}

/* ─── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--gold-border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── SELECTION ───────────────────────────────────────────── */
::selection {
    background: rgba(201, 169, 110, 0.2);
    color: var(--text-primary);
}

/* ─── FOCUS STYLES ────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ─── LOADING STATE ───────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-wave 1.5s ease infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-wave {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

.visually-hidden { composes: sr-only; }

.no-scroll { overflow: hidden; }

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

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
