/* ==========================================================================
   EDITORIAL WEDDING — PREMIUM REDESIGN
   ========================================================================== */

:root {
    --bg: #e8e2d8;
    --bg-warm: #f3efe8;
    --text-dark: #1a1a1a;
    --text-body: #3d3d3d;
    --text-muted: #7a7368;
    --accent: #8b7d5e;
    --accent-gold: #b8a06a;
    --white: #faf8f4;

    --font-serif: 'Cormorant Garamond', serif;
    --font-display: 'Cinzel', serif;
    --font-sans: 'Jost', sans-serif;

    --step-xs: clamp(0.7rem, 0.68rem + 0.1vw, 0.8rem);
    --step-sm: clamp(0.9rem, 0.87rem + 0.15vw, 1rem);
    --step-base: clamp(1.1rem, 1.05rem + 0.25vw, 1.25rem);
    --step-lg: clamp(1.4rem, 1.3rem + 0.5vw, 1.75rem);
    --step-xl: clamp(1.8rem, 1.6rem + 1vw, 2.5rem);
    --step-2xl: clamp(2.2rem, 1.8rem + 2vw, 3.5rem);
    --step-hero: clamp(4rem, 3rem + 5vw, 9rem);
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; }

html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: hidden; }

body {
    background: var(--bg);
    color: var(--text-dark);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Paper texture noise */
.noise-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4vw;
}

/* ==========================================================================
   CURSOR
   ========================================================================== */
.cursor {
    position: fixed;
    width: 8px; height: 8px;
    background: var(--text-dark);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.cursor-follower {
    position: fixed;
    width: 40px; height: 40px;
    border: 1px solid rgba(26, 26, 26, 0.2);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s, background 0.3s;
}

body.hovering .cursor { width: 0; height: 0; }
body.hovering .cursor-follower {
    width: 70px; height: 70px;
    background: rgba(139, 125, 94, 0.08);
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .cursor, .cursor-follower { display: none; }
    * { cursor: auto; }
}

/* ==========================================================================
   PRELOADER
   ========================================================================== */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preloader-inner {
    text-align: center;
}

.ornament-svg {
    width: 160px;
    height: 50px;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.ornament-path, .ornament-path-2 {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
}

.preloader-text {
    font-family: var(--font-serif);
    font-size: var(--step-2xl);
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    overflow: hidden;
}

.preloader-letter, .preloader-amp {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
}

.preloader-amp {
    font-style: italic;
    font-weight: 300;
    color: var(--accent);
}

.preloader-date {
    font-family: var(--font-sans);
    font-size: var(--step-xs);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 1rem;
    opacity: 0;
}

.preloader-progress {
    width: 120px;
    height: 1px;
    background: rgba(0,0,0,0.1);
    margin: 1.5rem auto 0;
    overflow: hidden;
}

.preloader-bar {
    width: 0%;
    height: 100%;
    background: var(--accent);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
}

.hero-left {
    display: flex;
    align-items: center;
    padding: 8vw 6vw;
    position: relative;
    z-index: 2;
}

.overline {
    font-family: var(--font-sans);
    font-size: var(--step-xs);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: var(--step-hero);
    line-height: 0.85;
    font-weight: 300;
    margin-bottom: 2rem;
}

.title-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.1em;
}

.reveal-text {
    display: block;
    transform: translateY(105%);
}

.title-amp {
    font-style: italic;
    color: var(--accent);
    padding-left: 15%;
    font-size: 0.7em;
}

.subtitle {
    font-family: var(--font-serif);
    font-size: var(--step-lg);
    color: var(--text-muted);
    font-weight: 300;
    font-style: italic;
}

.subtitle em {
    color: var(--accent);
    font-weight: 500;
}

.scroll-indicator {
    position: absolute;
    bottom: 4vw;
    left: 6vw;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.scroll-label {
    font-size: var(--step-xs);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.scroll-line-wrapper {
    width: 60px;
    height: 1px;
    position: relative;
}

.scroll-line-track {
    position: absolute;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.1);
}

.scroll-line-fill {
    position: absolute;
    width: 100%; height: 100%;
    background: var(--accent);
    transform-origin: left;
    animation: lineSlide 2.5s ease-in-out infinite;
}

@keyframes lineSlide {
    0% { transform: scaleX(0); transform-origin: left; }
    50% { transform: scaleX(1); transform-origin: left; }
    50.1% { transform: scaleX(1); transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}

.hero-right {
    position: relative;
    overflow: hidden;
}

@media (max-width: 900px) {
    .hero-right { height: 50vh; }
}

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

.hero-image-mask {
    width: 100%; height: 100%;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.hero-img {
    width: 100%;
    height: 120%;
    object-fit: cover;
    transform-origin: center;
}

.hero-image-border {
    position: absolute;
    inset: 20px;
    border: 1px solid rgba(139, 125, 94, 0.3);
    pointer-events: none;
    z-index: 2;
}

/* ==========================================================================
   STATEMENT
   ========================================================================== */
.statement {
    padding: 15vw 0;
    text-align: center;
    background: var(--bg);
}

.statement-ornament {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 3rem;
    opacity: 0.6;
}

.statement-text {
    font-family: var(--font-serif);
    font-size: var(--step-2xl);
    font-weight: 300;
    line-height: 1.3;
    max-width: 800px;
    margin: 0 auto;
}

.st-line {
    display: block;
    overflow: hidden;
}

.st-reveal {
    display: block;
    transform: translateY(100%);
    opacity: 0;
}

/* ==========================================================================
   COUNTDOWN
   ========================================================================== */
.countdown {
    padding: 5vw 0 10vw 0;
}

.countdown-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3vw;
}

.cd-block { text-align: center; }

.cd-num {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1;
    letter-spacing: 2px;
}

.cd-label {
    display: block;
    font-size: var(--step-xs);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.cd-sep {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--accent);
    opacity: 0.4;
    padding-bottom: 1.5rem;
}

/* ==========================================================================
   EVENTS TIMELINE
   ========================================================================== */
.events {
    padding: 10vw 0;
    background: var(--white);
}

.events-header {
    text-align: center;
    margin-bottom: 8vw;
}

.section-tag {
    font-family: var(--font-sans);
    font-size: var(--step-xs);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    font-weight: 500;
    display: block;
    margin-bottom: 1rem;
}

.events-title {
    font-family: var(--font-serif);
    font-size: var(--step-2xl);
    font-weight: 300;
}

.event-row {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    gap: 2vw;
    margin-bottom: 10vw;
    align-items: center;
}

.event-row.reverse .event-media { order: 3; }
.event-row.reverse .event-info { order: 1; text-align: right; }
.event-row.reverse .event-timeline-col { order: 2; }

@media (max-width: 900px) {
    .event-row, .event-row.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .event-row .event-timeline-col { display: none; }
    .event-row.reverse .event-media,
    .event-row.reverse .event-info { order: unset; text-align: left; }
}

.event-media { position: relative; overflow: hidden; }

.img-reveal-mask {
    width: 100%;
    height: 55vh;
    overflow: hidden;
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
}

@media (max-width: 900px) {
    .img-reveal-mask { height: 40vh; }
}

.event-img {
    width: 100%;
    height: 120%;
    object-fit: cover;
}

.event-timeline-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    height: 100%;
    min-height: 300px;
}

.timeline-line {
    position: absolute;
    top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
}

.timeline-dot {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 12px; height: 12px;
    border: 2px solid var(--accent);
    background: var(--white);
    border-radius: 50%;
    z-index: 2;
}

.event-number {
    font-family: var(--font-sans);
    font-size: var(--step-sm);
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: block;
}

.event-name {
    font-family: var(--font-serif);
    font-size: var(--step-xl);
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.event-time {
    font-family: var(--font-sans);
    font-size: var(--step-base);
    color: var(--accent);
}

.event-divider {
    width: 40px;
    height: 1px;
    background: var(--text-dark);
    margin: 2rem 0;
}

.event-row.reverse .event-divider { margin-left: auto; }

.event-desc {
    font-size: var(--step-base);
    color: var(--text-muted);
    max-width: 420px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.event-row.reverse .event-desc { margin-left: auto; }

.event-btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border: 1px solid var(--text-dark);
    border-radius: 50px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: var(--step-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background 0.3s, color 0.3s;
}

.event-btn:hover {
    background: var(--text-dark);
    color: var(--white);
}

/* ==========================================================================
   DRESS CODE
   ========================================================================== */
.dress-code {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dress-bg-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.dress-bg {
    width: 100%;
    height: 130%;
    object-fit: cover;
}

.dress-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.dress-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}

.dress-tag {
    font-family: var(--font-sans);
    font-size: var(--step-xs);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    opacity: 0.7;
    display: block;
    margin-bottom: 1rem;
}

.dress-title {
    font-family: var(--font-serif);
    font-size: var(--step-2xl);
    font-weight: 300;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.dress-subtitle {
    font-family: var(--font-sans);
    font-size: var(--step-lg);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
    font-weight: 300;
}

.dress-line {
    width: 40px;
    height: 1px;
    background: rgba(255,255,255,0.4);
    margin: 0 auto 2rem;
}

.dress-desc {
    font-family: var(--font-serif);
    font-size: var(--step-base);
    max-width: 500px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.7;
    opacity: 0.9;
}

/* ==========================================================================
   RSVP
   ========================================================================== */
.rsvp {
    padding: 15vw 0;
    background: var(--bg);
}

.rsvp-wrapper {
    max-width: 700px;
}

.rsvp-header {
    text-align: center;
    margin-bottom: 5vw;
}

.rsvp-title {
    font-family: var(--font-serif);
    font-size: var(--step-2xl);
    font-weight: 300;
    letter-spacing: 0.1em;
}

.rsvp-sub {
    font-family: var(--font-serif);
    font-size: var(--step-base);
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.field {
    position: relative;
}

.field input, .field select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.15);
    padding: 1rem 0;
    font-family: var(--font-sans);
    font-size: var(--step-lg);
    color: var(--text-dark);
    outline: none;
    border-radius: 0;
    appearance: none;
    transition: border-color 0.3s;
}

.field input:focus, .field select:focus {
    border-color: var(--accent);
}

.field label {
    position: absolute;
    top: 1rem;
    left: 0;
    font-size: var(--step-lg);
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s ease;
    font-weight: 300;
}

.field input:focus ~ label,
.field input:not(:placeholder-shown) ~ label {
    top: -1.5rem;
    font-size: var(--step-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
}

.field input::placeholder { color: transparent; }

.field-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s ease;
}

.field input:focus ~ .field-line,
.field select:focus ~ .field-line {
    width: 100%;
}

.submit-wrapper {
    text-align: center;
    margin-top: 2rem;
}

.submit-btn {
    background: transparent;
    border: none;
    font-family: var(--font-serif);
    font-size: var(--step-xl);
    font-style: italic;
    color: var(--text-dark);
    padding: 1rem 2rem;
    position: relative;
    display: inline-block;
    transition: color 0.3s;
}

.submit-btn::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.submit-btn:hover { color: var(--accent); }
.submit-btn:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Success State */
.rsvp-success {
    text-align: center;
    padding: 4rem 0;
}

.success-icon {
    width: 60px; height: 60px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: var(--accent);
}

.rsvp-success h3 {
    font-family: var(--font-serif);
    font-size: var(--step-xl);
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.rsvp-success p {
    color: var(--text-muted);
    font-family: var(--font-serif);
    font-style: italic;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.wedding-footer {
    padding: 10vw 0 5vw 0;
    text-align: center;
    background: var(--bg);
}

.footer-names {
    font-family: var(--font-serif);
    font-size: var(--step-2xl);
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.footer-amp {
    font-style: italic;
    color: var(--accent);
}

.footer-date {
    font-size: var(--step-sm);
    letter-spacing: 0.3em;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.footer-divider {
    width: 40px;
    height: 1px;
    background: rgba(0,0,0,0.15);
    margin: 0 auto 2rem;
}

.footer-back {
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--step-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s;
    position: relative;
}

.footer-back:hover { color: var(--accent); }

/* ==========================================================================
   GALLERY
   ========================================================================== */

.gallery {
    padding: 10vw 0;
    background: var(--bg-warm);
}

.gallery-header {
    text-align: center;
    margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.gallery-title {
    font-family: var(--font-serif);
    font-size: var(--step-2xl);
    font-weight: 400;
    font-style: normal;
    color: var(--text-dark);
    line-height: 1.15;
    margin-top: 0.75rem;
}

.gallery-title em {
    font-style: italic;
    color: var(--accent);
}

.gallery-grid {
    columns: 3;
    column-gap: clamp(0.75rem, 1.5vw, 1.5rem);
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: clamp(0.75rem, 1.5vw, 1.5rem);
}

.gallery-img-wrap {
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.gallery-img {
    width: 100%;
    display: block;
    filter: saturate(0.85) brightness(0.98);
    transition: transform 0.8s ease, filter 0.6s ease;
}

.gallery-img-wrap:hover .gallery-img {
    transform: scale(1.04);
    filter: saturate(1) brightness(1);
}

@media (max-width: 900px) {
    .gallery-grid { columns: 2; }
}

@media (max-width: 560px) {
    .gallery-grid { columns: 1; }
}
