/* ============================================
   Claire & Sohaib — Save the Date
   European Old Money Aesthetic
   ============================================ */

/* --- Design Tokens --- */
:root {
    --champagne: #F7E7CE;
    --white: #FDFBF7;
    --beige: #E8DCC4;
    --olive: #8B956D;
    --olive-dark: #6B7553;
    --text-dark: #2C2C2C;
    --text-medium: #5A5A5A;
    --text-light: #8A8A7A;
    --font-serif: 'Cormorant Garamond', 'Georgia', serif;
    --font-sans: 'Montserrat', 'Helvetica Neue', sans-serif;
}

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

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

body {
    font-family: var(--font-sans);
    font-weight: 300;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 100;
    background-color: var(--text-dark);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    letter-spacing: 0.03em;
}

.skip-link:focus-visible {
    top: 1rem;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--champagne);
    outline-offset: 4px;
}

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

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Site Header / Monogram --- */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 1.75rem 0;
    text-align: center;
}

.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(253, 251, 247, 0.35), transparent);
    z-index: -1;
    pointer-events: none;
}

.monogram {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 1.3rem;
    letter-spacing: 0.2em;
    color: var(--text-dark);
    text-shadow: 0 1px 8px rgba(253, 251, 247, 0.55);
}

.monogram-amp {
    font-style: italic;
    font-weight: 300;
    margin: 0 0.05em;
    opacity: 0.7;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    height: 100dvh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-image-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    will-change: transform;
    transition: transform 0.1s linear;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(44, 44, 44, 0.20) 0%,
        rgba(44, 44, 44, 0.38) 40%,
        rgba(44, 44, 44, 0.55) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 2rem;
}

.hero-names {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(2.8rem, 8vw, 6.5rem);
    line-height: 1.1;
    letter-spacing: 0.02em;
    margin-bottom: 1.25rem;
}

.hero-names .ampersand {
    display: inline-block;
    font-style: italic;
    font-weight: 300;
    margin: 0 0.15em;
    opacity: 0.85;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0.85;
}

/* Ornamental divider */
.hero-divider,
.section-divider,
.footer-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.divider-line {
    display: block;
    width: 60px;
    height: 1px;
    background-color: currentColor;
    opacity: 0.4;
}

.divider-ornament {
    display: block;
    width: 6px;
    height: 6px;
    border: 1px solid currentColor;
    opacity: 0.5;
    transform: rotate(45deg);
}

.hero-date {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    letter-spacing: 0.12em;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-text {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.scroll-arrow {
    display: block;
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, rgba(253,251,247,0.8), transparent);
    position: relative;
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.3); }
}

/* --- Fade In Animations (Hero) --- */
.fade-in {
    opacity: 0;
    transform: translateY(25px);
    animation: fadeInUp 1s ease forwards;
}

.fade-delay-1 { animation-delay: 0.3s; }
.fade-delay-2 { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Sections --- */
.section {
    padding: 7rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--olive);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--text-dark);
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
}

.section-divider .divider-line {
    background-color: var(--beige);
    opacity: 1;
}

.section-divider .divider-ornament {
    border-color: var(--olive);
    opacity: 0.5;
}

/* --- Story Section --- */
.story {
    background-color: var(--white);
}

.story .section-header {
    margin-bottom: 3rem;
}

.story .section-title {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    margin-bottom: 1.1rem;
}

.story .section-label {
    margin-bottom: 0.65rem;
}

.story-content {
    max-width: 680px;
    margin: 0 auto;
}

.story-block {
    margin-bottom: 3rem;
    text-align: center;
}

.story-block:last-child {
    margin-bottom: 0;
}

.story-chapter {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 1.4rem;
    font-style: italic;
    color: var(--olive-dark);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.story-text {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-medium);
}

/* --- Details Section --- */
.details {
    background-color: var(--champagne);
}

.details-single {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    background: rgba(253, 251, 247, 0.55);
    border: 1px solid rgba(139, 149, 109, 0.2);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    box-shadow: 0 12px 36px rgba(44, 44, 44, 0.08);
}

.detail-info {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.95rem;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.detail-note {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 1rem;
    font-style: italic;
    color: var(--olive);
    margin-top: 1.25rem;
}

/* --- Footer --- */
.footer {
    background-color: var(--white);
    padding: 4rem 0 3rem;
    text-align: center;
}

.footer-ornament {
    margin-bottom: 2rem;
}

.footer-ornament .divider-line {
    background-color: var(--beige);
    opacity: 1;
}

.footer-ornament .divider-ornament {
    border-color: var(--olive);
    opacity: 0.4;
}

.footer-names {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 1.8rem;
    color: var(--olive);
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.footer-copy {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-light);
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger children within same parent */
.story-block.reveal:nth-child(2) { transition-delay: 0.15s; }
.story-block.reveal:nth-child(3) { transition-delay: 0.3s; }

/* --- Responsive Design --- */

/* Mobile */
@media (max-width: 768px) {
    .hero-image img {
        object-position: 70% center;
    }

    .site-header {
        padding: 1.25rem 0;
    }

    .monogram {
        font-size: 1.1rem;
    }

    .hero-names {
        font-size: clamp(2.4rem, 10vw, 3.5rem);
    }

    .hero-content {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .section {
        padding: 5rem 0;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .story .section-header {
        margin-bottom: 2rem;
    }

    .story-block {
        margin-bottom: 2.5rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    .divider-line {
        width: 40px;
    }
}

/* Smaller phones */
@media (max-width: 400px) {
    .hero-image img {
        object-position: 72% center;
    }

    .hero-names {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 0.75rem;
        letter-spacing: 0.3em;
    }

    .section {
        padding: 4rem 0;
    }

    .hero-content {
        margin-top: 1.5rem;
    }
}

/* Large desktop */
@media (min-width: 1200px) {
    .hero-image img {
        object-position: center;
    }

    .container {
        max-width: 1060px;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .fade-in {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .reveal {
        transition: none;
        opacity: 1;
        transform: none;
    }

    .scroll-arrow {
        animation: none;
    }

    .hero-image img {
        object-position: center;
        will-change: auto;
        transition: none;
    }
}
