/* styles.css - Timeless Watercolor Journal Aesthetic */

/* =====================
   CSS Custom Properties
   ===================== */
:root {
    /* Color Palette - Timeless Watercolor Journal */
    /* Base Tones (The Paper) */
    --color-paper-cream: #F5E6D3;
    --color-paper-sepia: #E8D5C4;
    --color-paper-beige: #D4C4B0;
    --color-paper-soft-brown: #C4B5A0;
    
    /* Rich Accents (The Celebrations) */
    --color-ruby: #8B1538;
    --color-ruby-light: #A8495E;
    --color-ruby-dark: #6E0F2A;
    --color-ruby-muted: #7b1f3b;
    --color-emerald: #2D5016;
    --color-royal-blue: #1A3A5F;
    --color-sapphire: #1E4A6B;
    --color-amethyst: #6B4C7A;
    
    /* Soft Neutrals (The Elegance) */
    --color-blush: #F4D1D1;
    --color-champagne: #F5E6AA;
    --color-charcoal: #3A3A3A;
    --color-soft-black: #2A2A2A;
    
    /* Text Colors - Consolidated */
    --color-text-main: #3a332c; /* Body text */
    --color-text-heading: #2a241f; /* Headings */
    --color-text-muted: #6c5c50; /* Small meta / event notes */
    
    /* Metallics (The Glamour) */
    --color-gold: #B8860B;
    --color-gold-light: #D4AF37;
    --color-silver: #C0C0C0;
    --color-bronze: #CD7F32;
    
    /* Borders */
    --color-border-soft: #e0d2c0;
    --color-border-muted: #e4d6c5;
    
    /* Semantic Colors */
    --color-primary: var(--color-ruby);
    --color-primary-light: var(--color-ruby-light);
    --color-primary-dark: var(--color-ruby-dark);
    --color-accent: var(--color-gold);
    --color-accent-light: var(--color-gold-light);
    
    --color-bg: var(--color-paper-cream);
    --color-bg-alt: var(--color-paper-sepia);
    --color-bg-card: rgba(255, 255, 255, 0.85);
    --color-bg-body: var(--color-paper-beige);
    
    --color-text: var(--color-charcoal);
    --color-text-light: var(--color-text-muted); /* Light text uses muted */
    
    --color-border: rgba(196, 181, 160, 0.4);
    --color-error: #C44536;
    --color-error-bg: rgba(196, 69, 54, 0.1);
    --color-success: #5A7A6A;
    --color-success-bg: rgba(90, 122, 106, 0.15);
    
    /* Typography - Watercolor Journal */
    --font-heading: 'IM Fell English SC', serif;
    --font-serif: 'Cormorant Garamond', 'Georgia', serif;
    --font-script: cursive; /* Generic cursive fallback */
    --font-sans: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    
    /* 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: 5rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-organic: 15px 8px 20px 10px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-watercolor: 0 4px 20px rgba(139, 21, 56, 0.15), 0 2px 8px rgba(139, 21, 56, 0.1);
    
    /* Transitions */
    --transition-fast: 200ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Layout */
    --max-width: 1100px;
    --max-width-narrow: 700px;
    --max-width-content: 42rem; /* 672px - consistent content width */
    --hero-height: 500px;
    --nav-width: 180px;
    
    /* Safe content area inside the paper edges */
    --page-safe-inline: clamp(2rem, 8vw, 5rem); /* side padding INSIDE paper */
    --page-safe-max: 1000px; /* max width of content column */
}

/* =====================
   Utility Classes
   ===================== */
.hidden {
    display: none !important;
}

/* Transparent card pattern - used throughout for journal aesthetic */
.text-on-paper {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

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

html, body {
    overscroll-behavior: none;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =====================
   Typography
   ===================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-text-heading);
    letter-spacing: 0.02em;
}

h1 { 
    font-size: 3.5rem;
    letter-spacing: 0.01em;
    color: var(--color-text-heading);
}

h2 { 
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-heading);
}

h3 { 
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-heading);
}

h4 { 
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

p {
    margin-bottom: var(--spacing-md);
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--color-text-main);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--color-primary-dark);
    border-bottom-color: var(--color-primary);
}

strong {
    font-weight: 600;
    color: var(--color-text);
}

.script-text {
    font-family: var(--font-script);
    font-size: 1.3em;
    color: var(--color-primary);
}

/* =====================
   Brushstroke Underline Pattern
   ===================== */
.brushstroke-underline {
    position: relative;
}

.brushstroke-underline::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.15rem;
    width: 70%;
    height: 6px;
    background: linear-gradient(
        90deg,
        rgba(184, 134, 11, 0.6) 0%,
        rgba(184, 134, 11, 0.8) 50%,
        rgba(184, 134, 11, 0.6) 100%
    );
    border-radius: 3px;
    opacity: 0.9;
    transform: skewX(-10deg);
    transition: width var(--transition-normal), opacity var(--transition-normal);
}

.brushstroke-underline:hover::after {
    width: 85%;
    opacity: 1;
}

.brushstroke-underline-soft::after {
    width: 100%;
    height: 5px;
    background: linear-gradient(
        90deg,
        rgba(123, 31, 59, 0.3) 0%,
        rgba(123, 31, 59, 0.5) 30%,
        rgba(123, 31, 59, 0.6) 50%,
        rgba(123, 31, 59, 0.5) 70%,
        rgba(123, 31, 59, 0.3) 100%
    );
    opacity: 0.7;
    transform: skewX(-5deg);
}

.brushstroke-underline-soft:hover::after {
    opacity: 1;
    height: 6px;
}

/* =====================
   Intro Overlay
   ===================== */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-bg);
    background-image: url('./intro-desktop.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1000;
    opacity: 1;
}

@media (max-width: 768px) {
    .intro-overlay {
        background-image: url('./intro-mobile.webp');
    }
}

.intro-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease-out;
}

.intro-overlay.hidden {
    display: none;
}

/* =====================
   Navigation
   ===================== */
.site-nav {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    padding: var(--spacing-lg);
}

.nav-toggle {
    display: none;
}

.nav-menu {
    background: var(--color-bg-card);
    border: 2px solid var(--color-border);
    border-left: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.nav-link {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    border-radius: 50%;
    transition: width var(--transition-normal);
    opacity: 0.6;
}

.nav-link:hover {
    color: var(--color-primary);
    text-decoration: none;
    background: rgba(139, 21, 56, 0.05);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: var(--color-primary);
    font-weight: 600;
}

.nav-link.active::after {
    width: 90%;
    opacity: 0.8;
}

/* Mobile Navigation */
@media (max-width: 1024px) {
    .site-nav {
        position: fixed;
        left: auto;
        right: 0;
        top: 0;
        transform: none;
        padding: var(--spacing-md);
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        background: var(--color-bg-card);
        border: 2px solid var(--color-border);
        border-radius: var(--radius-md);
        cursor: pointer;
        box-shadow: var(--shadow-sm);
        z-index: 102;
        position: relative;
    }

    .hamburger {
        width: 22px;
        height: 2px;
        background: var(--color-primary);
        position: relative;
        transition: background var(--transition-fast);
        border-radius: 2px;
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        left: 0;
        width: 22px;
        height: 2px;
        background: var(--color-primary);
        transition: transform var(--transition-normal);
        border-radius: 2px;
    }

    .hamburger::before {
        top: -7px;
    }

    .hamburger::after {
        top: 7px;
    }

    .nav-toggle.nav-open .hamburger {
        background: transparent;
    }

    .nav-toggle.nav-open .hamburger::before {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.nav-open .hamburger::after {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        max-width: 80vw;
        background: var(--color-bg-card);
        border: none;
        border-left: 2px solid var(--color-border);
        border-radius: 0;
        padding: calc(var(--spacing-3xl) + 48px) var(--spacing-xl) var(--spacing-xl);
        box-shadow: var(--shadow-lg);
        transform: translateX(100%);
        transition: transform var(--transition-normal);
        z-index: 101;
        backdrop-filter: blur(10px);
    }

    .nav-menu.nav-open {
        transform: translateX(0);
    }

    .nav-list {
        gap: var(--spacing-xs);
    }

    .nav-link {
        font-size: 1.1rem;
        padding: var(--spacing-md);
    }

    body.nav-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.2);
        z-index: 100;
        backdrop-filter: blur(2px);
    }
}

/* =====================
   Layout
   ===================== */
main {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px; /* Paper width - wider than content */
    /* TODO: variable for the 100px? */
    margin: calc(var(--hero-height) - var(--spacing-lg) + 100px) auto 0;
    /* add extra top padding so content doesn't sit under the torn edge */
    padding: calc(var(--spacing-2xl) + 80px) 0;
    background-image: url('./paper-middle.webp');
    background-size: 100% auto;
    background-repeat: repeat-y;
    background-position: top center;
    background-blend-mode: normal;
    filter: drop-shadow(0 -4px 16px rgba(0,0,0,0.1));
    overflow: visible; /* make sure the torn edge can hang above */
}

/* Torn parchment top overlay */
main::before {
    content: "";
    position: absolute;
    /* hang the torn edge slightly above the main box */
    /* top: -100px;               tweak this until it kisses the hero nicely */
    top: calc(-100px * min(100vw, 1400px)/1400px);
    left: 50%;
    transform: translateX(-50%);
    
    width: 100%;
    max-width: 1400px;        /* same as main */
    height: 250px;            /* approx height of parchment_top.png */

    background-image: url('./parchment_top.png');
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: top center;

    pointer-events: none;     /* don't block clicks */
    z-index: 2;               /* above the paper, above hero (hero is z-index:0) */
}

@media (max-width: 768px) {
    main {
        max-width: 100%;
        padding: calc(var(--spacing-xl) + 80px) var(--spacing-xl); /* Adequate padding on mobile */
        background-size: 100% auto;
    }
}

section {
    margin-bottom: var(--spacing-lg); /* Reduced from xl for continuous narrative */
    scroll-margin-top: var(--spacing-xl);
    position: relative;
    max-width: 100%;
    overflow-x: hidden; /* Prevent horizontal overflow */
    
    /* Keep content away from inner frame */
    padding-left: var(--page-safe-inline);
    padding-right: var(--page-safe-inline);
}

section[id] {
    scroll-margin-top: var(--spacing-xl);
}

section:last-child {
    margin-bottom: 0;
}

/* Section separator - using separator.png image */
section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -2rem; /* Adjusted for section padding */
    left: 50%;
    transform: translateX(-50%);
    width: 200px; /* Adjust width as needed */
    max-width: 60%;
    height: auto;
    aspect-ratio: auto;
    background-image: url('./separator.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.6;
    pointer-events: none;
}

/* =====================
   Global Content Width Constraint
   ===================== */
/* Keep main content blocks within safe area */
.section,
.schedule,
.schedule-date-group,
.ceremony-list,
.faq-list,
.guest-section,
.dress-code-item,
.venue-cards {
    max-width: var(--page-safe-max);
    margin-left: auto;
    margin-right: auto;
}

/* =====================
   Hero / Header
   ===================== */
.hero {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--hero-height);
    z-index: 0;
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
    text-align: center;
    padding: var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    position: relative;
}

.hero-logo {
    width: 180px;
    height: auto;
    margin-bottom: var(--spacing-lg);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.hero-pretext {
    font-size: 0.95rem;
    font-family: var(--font-script);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.05em;
}

.couple-names {
    font-family: var(--font-script);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 400;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(139, 21, 56, 0.2);
}

.wedding-date {
    font-family: var(--font-script);
    font-size: 1.4rem;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
    font-weight: 400;
}

.wedding-location {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* =====================
   General Sections
   ===================== */
.section h2 {
    text-align: center;
    position: relative;
    padding-bottom: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-md); /* Reduced from lg for tighter spacing */
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    border-radius: 50%;
    opacity: 0.6;
}

.section h3 {
    color: var(--color-primary);
    margin-top: var(--spacing-md); /* Reduced from xl for continuous narrative */
    margin-bottom: var(--spacing-sm);
}

.section h3:first-of-type {
    margin-top: var(--spacing-lg);
}

.section p, .section ul {
    text-align: left;
    max-width: var(--max-width-content);
    margin-left: auto;
    margin-right: auto;
    color: var(--color-text-main);
}

.intro-text,
.section-intro {
    text-align: left;
    max-width: var(--max-width-content);
    margin: 0.2rem auto var(--spacing-sm); /* Reduced from md for tighter spacing */
    font-size: 1.05rem;
    color: var(--color-text-main);
    line-height: 1.75;
    font-style: normal;
}

/* =====================
   Welcome Section
   ===================== */
#welcome p {
    font-size: 1.05rem;
    max-width: var(--max-width-content);
    margin: 0.4rem auto;
    color: var(--color-text-main);
    text-align: left;
}

#welcome h2,
#welcome h1 {
    margin-bottom: 0.6rem;
}

#welcome .intro-text {
    margin-bottom: var(--spacing-md);
}

/* =====================
   Venue Section
   ===================== */
.venue-map {
    margin-bottom: var(--spacing-xl);
    text-align: center;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.1));
    max-width: 100%;
    overflow: hidden; /* Prevent image from breaking out */
}

.venue-map img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    display: block; /* Remove inline spacing */
}

.venue-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-lg);
}

.venue-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: var(--spacing-xl);
}

.venue-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-ruby-muted);
    font-weight: 600;
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--color-border-soft);
    margin-bottom: var(--spacing-md);
    margin-top: 0;
}

.venue-card p {
    font-size: 0.95rem;
    color: var(--color-text-main);
    text-align: left;
}

.venue-card a {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--color-ruby-muted);
    position: relative;
    display: inline-block;
}

.venue-card a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.15rem;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-normal);
    opacity: 0.6;
}

.venue-card a:hover {
    color: var(--color-primary-dark);
}

.venue-card a:hover::after {
    width: 100%;
    opacity: 0.8;
}

/* =====================
   Ceremonies Section
   ===================== */
.ceremony-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.ceremony {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: var(--spacing-lg) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    position: relative;
}

.ceremony:nth-child(odd) {
    flex-direction: row;
}

.ceremony:nth-child(even) {
    flex-direction: row-reverse;
}

.ceremony-image {
    flex: 0 0 260px;
    position: relative;
}

/* Washi-tape effect */
.ceremony-image::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    width: 60%;
    height: 14px;
    background: rgba(245, 230, 211, 0.9);
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    opacity: 0.8;
    z-index: 1;
}

.ceremony-image img {
    max-width: 260px;
    height: auto;
    border-radius: 3px; /* tiny, not pill-y */
    filter: none; /* remove digital shadow */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10); /* subtle paper shadow, not UI */
    mix-blend-mode: normal;
    transition: transform var(--transition-normal);
    position: relative;
    z-index: 0;
}

.watercolor-edge img {
    mask-image: radial-gradient(circle, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
}

.watercolor-boost img {
    filter: saturate(1.25) contrast(1.05);
}

.ceremony:hover .ceremony-image img {
    transform: rotate(-1deg) scale(1.02);
}

.ceremony-content {
    flex: 1;
}

.ceremony h3 {
    color: var(--color-primary);
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
    font-size: 1.3rem;
}

.ceremony p {
    color: var(--color-text-main);
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .ceremony {
        flex-direction: column !important;
        gap: var(--spacing-md);
    }

    .ceremony-image {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }

    .ceremony-image img {
        max-width: 100%;
    }
}

/* =====================
   FAQ Section
   ===================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.faq-item {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: var(--spacing-lg) 0;
}

.faq-item h3 {
    color: var(--color-primary);
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
    font-size: 1.2rem;
}

.faq-item p {
    color: var(--color-text-main);
}

/* =====================
   Guest Section
   ===================== */
.guest-section {
    background: transparent; /* Text on paper */
    border: none;
    border-radius: 0;
    padding: var(--spacing-lg) 0; /* Reduced padding */
    text-align: center;
    box-shadow: none;
}

.guest-section h2 {
    margin-bottom: var(--spacing-lg);
}

.guest-greeting {
    padding: var(--spacing-lg) 0; /* Reduced padding */
    background: transparent; /* Text on paper */
    border: none;
    border-radius: 0;
    margin-bottom: var(--spacing-lg);
    box-shadow: none;
}

.greeting-text {
    font-size: 1.15rem;
    color: var(--color-success);
    margin-bottom: var(--spacing-md);
}

.greeting-text strong {
    color: var(--color-text);
}

.code-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-description {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
    font-size: 1.05rem;
}

.form-group {
    display: flex;
    gap: var(--spacing-sm);
}

.form-group input {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
    font-family: var(--font-serif);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    transition: all var(--transition-fast);
    color: var(--color-text);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(139, 21, 56, 0.1);
}

.form-group input::placeholder {
    color: var(--color-text-muted);
    font-style: italic;
}

/* =====================
   Buttons
   ===================== */
.btn-primary,
.btn-secondary {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-heading);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-normal);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-muted);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
    border-color: var(--color-border);
}

.btn-secondary:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: rgba(139, 21, 56, 0.05);
}

.error-message {
    color: var(--color-error);
    background: var(--color-error-bg);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-top: var(--spacing-md);
    font-size: 0.95rem;
    border: 1px solid var(--color-error);
}

/* =====================
   Schedule Section
   ===================== */
.schedule-section h2 {
    text-align: center;
}

.schedule-intro {
    text-align: left;
    color: var(--color-text-main);
    max-width: var(--max-width-content);
    margin: 0.2rem auto var(--spacing-md);
    font-size: 1.05rem;
}

.schedule-date-group {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    margin-bottom: var(--spacing-lg);
}

.schedule-date-header {
    text-align: center;
    background-size: 200% 100%, 200% 100%, 100% 100%;
    background-position: -10% 0, 110% 0, center;
    background-repeat: no-repeat;
    background-color: transparent;
    border-radius: 0;
    padding: 0.8rem 1.2rem;
    font-family: var(--font-heading);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    filter: blur(0.5px);
}

.schedule-date-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5%;
    right: -5%;
    bottom: 0;
    background: inherit;
    filter: blur(3px);
    opacity: 0.5;
    z-index: -1;
}

.schedule-events {
    padding: var(--spacing-sm) 0;
    background: transparent;
}

.event-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--spacing-md) var(--spacing-lg);
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0.6rem 0;
    margin-bottom: var(--spacing-sm);
}

.event-card + .event-card {
    padding-top: 0.6rem;
    margin-top: var(--spacing-sm);
}

.event-time {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-ruby-muted);
    font-weight: 600;
    min-width: 70px;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.event-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-text-main);
    font-weight: 600;
}

.event-title .ceremony-link {
    color: var(--color-text-main);
    text-decoration: none;
    position: relative;
    transition: color var(--transition-fast);
}

.event-title .ceremony-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.15rem;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-normal);
    opacity: 0.6;
}

.event-title .ceremony-link:hover {
    color: var(--color-primary);
}

.event-title .ceremony-link:hover::after {
    width: 100%;
    opacity: 0.8;
}

.event-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.event-location {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.event-description {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: var(--spacing-xs);
}

.event-dress {
    font-size: 0.85rem;
    color: var(--color-ruby-muted);
    font-style: italic;
    margin-top: var(--spacing-xs);
}

.btn-calendar,
.add-to-cal {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    color: var(--color-ruby-muted);
    position: relative;
    display: inline-block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}

.btn-calendar::after,
.add-to-cal::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.15rem;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-normal);
    opacity: 0.6;
}

.btn-calendar:hover,
.add-to-cal:hover {
    color: var(--color-primary-dark);
}

.btn-calendar:hover::after,
.add-to-cal:hover::after {
    width: 100%;
    opacity: 0.8;
}

/* =====================
   What to Wear Section
   ===================== */
.dress-code-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.dress-code-item:last-child {
    margin-bottom: 0;
}

.dress-code-item h3 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    font-size: 1.3rem;
    text-align: center;
}

.dress-code-content {
    text-align: center;
    max-width: var(--page-safe-max);
    margin-top: var(--spacing-md);
}

.dress-code-image {
    position: relative;
    margin: var(--spacing-md) 0;
    text-align: center;
}

/* Washi-tape effect */
.dress-code-image::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    width: 60%;
    height: 14px;
    background: rgba(245, 230, 211, 0.9);
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    opacity: 0.8;
    z-index: 1;
}

.dress-code-image img {
    max-width: 360px;
    width: 100%;
    height: auto;
    border-radius: 3px; /* tiny, not pill-y */
    filter: none; /* remove digital shadow */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10); /* subtle paper shadow, not UI */
    mix-blend-mode: normal;
    transition: transform var(--transition-normal);
    position: relative;
    z-index: 0;
}

.dress-code-item:hover .dress-code-image img {
    transform: rotate(1deg) scale(1.02);
}

@media (max-width: 768px) {
    .dress-code-image img {
        max-width: 280px;
    }
}

/* =====================
   Footer
   ===================== */
footer {
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
    border-top: 1px solid var(--color-border);
    text-align: center;
    padding: var(--spacing-2xl);
    margin-top: var(--spacing-lg);
}

.footer-logo {
    width: 70px;
    height: auto;
    margin-bottom: var(--spacing-md);
    opacity: 0.7;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.footer-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.footer-note {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* =====================
   Responsive Design
   ===================== */
@media (max-width: 768px) {
    .hero {
        padding: var(--spacing-2xl) var(--spacing-lg);
    }

    .couple-names {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    .form-group {
        flex-direction: column;
    }

    .form-group input,
    .btn-primary {
        width: 100%;
    }

    .event-card {
        grid-template-columns: 1fr;
        gap: var(--spacing-xs);
    }

    .event-time {
        font-size: 1rem;
    }

    .guest-section {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    .couple-names {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .schedule-date-header {
        font-size: 1.1rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* =====================
   Print Styles
   ===================== */
@media print {
    .code-form,
    .btn-secondary,
    footer {
        display: none;
    }

    body {
        background: white;
        background-image: none;
    }

    main {
        background: white;
        background-image: none;
        box-shadow: none;
    }

    .hero {
        background: white;
        background-image: none;
        border: none;
    }

    .schedule-date-group {
        break-inside: avoid;
    }
}
