/* CSS Variable System */
:root {
    /* Core brand colors */
    --pink-primary: #ffafc7;
    --pink-light: #ffd4e0;
    --pink-dark: #ff8aa8;
    --pink-subtle: #fff5f8;

    --green-primary: #caff8a;
    --green-light: #e0ffb8;
    --green-dark: #b3e86f;
    --green-accent: #5b6b4e;
    --green-accent-dark: #3d4a37;

    /* Neutral palette for balance */
    --cream: #fffef9;
    --warm-gray: #f5f4f0;
    --text-primary: #2a2a2a;
    --text-secondary: #555555;

    /* Shadow system */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-glow-pink: 0 4px 20px rgba(255, 175, 199, 0.3);
    --shadow-glow-green: 0 4px 20px rgba(202, 255, 138, 0.3);
}

/* General Styling */
html {
    overflow-y: scroll;
    scroll-behavior: smooth;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    line-height: 1.8;
    letter-spacing: 0.01em;
    background: linear-gradient(to bottom, var(--pink-primary), var(--pink-light));
    background-attachment: fixed;
}

header {
    background: linear-gradient(135deg, var(--pink-primary) 0%, var(--pink-light) 100%);
    color: var(--text-primary);
    padding: 1rem;
    text-align: center;
    margin-bottom: 0;   /* Removes the gap below the names */
    line-height: 1.1;   /* Tightens the space if the names wrap to two lines */
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 175, 199, 0.1) 0%,
        transparent 40%,
        transparent 60%,
        rgba(202, 255, 138, 0.15) 100%);
    pointer-events: none;
}

header p {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.75rem; /* Increased spacing between the names and the date */
    margin-bottom: 0.1px;
    font-style: normal;
}

/* Link Styling */
a {
    color: var(--green-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

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

/* External links with gradient underline on hover */
main a {
    border-bottom: none;
    background-image: linear-gradient(to right, #aaa, #aaa);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 100% 1px;
    padding: 0px 4px;
    border-radius: 3px;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

main a:hover {
    background-color: rgba(255, 255, 255, 0.5);
    background-image: linear-gradient(to right, var(--pink-primary), var(--green-primary));
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 100% 2px;
    transform: translateY(-2px);
}

/* Focus states for accessibility */
a:focus,
button:focus,
/* summary:focus, */
input:focus {
    outline: 3px solid var(--pink-primary);
    outline-offset: 0px;
    border-radius: 4px;
}

/* summary:focus {
    outline: 3px solid var(--pink-primary);
    outline-offset: 0px;
    border-radius: 10px;
} */


/* Header image container for caption positioning */
.header-image-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 900px;
}

header img {
    align-items: center;
    width: 100%;
    max-width: 900px;
    height: 440px;

    /* Crop to fill banner space */
    object-fit: cover;
    object-position: center center;

    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    position: relative;
}

header img:hover {
    transform: scale(1.02);
}

/* Image caption in top right corner */
.image-caption {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(66, 65, 64, 0.3);
    backdrop-filter: blur(3px);
    color: var(--cream);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 500;
    font-style: italic;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    pointer-events: none;
    z-index: 10;
}

/* Navigation Flexbox */
nav {
    background: linear-gradient(to right, var(--green-light), var(--green-primary), var(--green-light));
    border: none;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allows wrapping on mobile */
    padding: 1rem;
    position: sticky;
    z-index: 10000;
    top: 0;
    backdrop-filter: blur(10px);
    background-clip: padding-box;
}

/* Hamburger menu checkbox (hidden) */
#nav-toggle {
    display: none;
}

/* Hamburger menu button (hidden by default, shown on mobile) */
.nav-toggle-label {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    user-select: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-toggle-label:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

#nav-toggle:checked ~ .nav-toggle-label::before {
    content: '✕';
}

nav a {
    text-decoration: none;
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    border-bottom: 3px solid transparent;
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover {
    color: var(--green-accent-dark);
    border-bottom: 3px solid;
    border-image: linear-gradient(to right, var(--pink-primary), var(--green-primary)) 1;
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Active page indicator */
nav a.active {
    border-bottom: 3px solid;
    border-image: linear-gradient(to right, var(--pink-primary), var(--green-primary)) 1;
    background: rgba(255, 255, 255, 0.7);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* Content Layout */
main {
    max-width: 700px;
    margin: 2.2rem auto;
    padding: 0rem; /* Extra padding so text doesn't touch the teeth */
    padding-bottom: 2.2rem; /* Extra padding so text doesn't touch the teeth */
    background: linear-gradient(to bottom, var(--green-light), var(--green-primary));
    text-align: center;
    position: relative;

    /* The Zig-Zag Scissors */
    --size: 15px; /* Adjust this for bigger or smaller teeth */

    clip-path: polygon(
        /* Top edge with teeth */
        0% 0%, 5% var(--size), 10% 0%, 15% var(--size), 20% 0%, 25% var(--size), 30% 0%, 35% var(--size), 40% 0%, 45% var(--size), 50% 0%, 55% var(--size), 60% 0%, 65% var(--size), 70% 0%, 75% var(--size), 80% 0%, 85% var(--size), 90% 0%, 95% var(--size), 100% 0%,
        /* Right edge - straight */
        100% 0%, 100% 100%,
        /* Bottom edge with teeth */
        100% 100%, 95% calc(100% - var(--size)), 90% 100%, 85% calc(100% - var(--size)), 80% 100%, 75% calc(100% - var(--size)), 70% 100%, 65% calc(100% - var(--size)), 60% 100%, 55% calc(100% - var(--size)), 50% 100%, 45% calc(100% - var(--size)), 40% 100%, 35% calc(100% - var(--size)), 30% 100%, 25% calc(100% - var(--size)), 20% 100%, 15% calc(100% - var(--size)), 10% 100%, 5% calc(100% - var(--size)), 0% 100%,
        /* Left edge - straight */
        0% 100%, 0% 0%
    );

    /* Add soft drop shadow for depth */
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

/* Add subtle inner glow effect */
main::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border-radius: 8px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

main img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin: 1.5rem auto;
    display: block;
}

/* Header image container for caption positioning */
.labelled-image-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 900px;
}

.image-caption-main {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(66, 65, 64, 0.3);
    backdrop-filter: blur(3px);
    color: var(--cream);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.75rem;
    font-weight: 500;
    font-style: italic;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    pointer-events: none;
    z-index: 10;
}

section {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Heading hierarchy with Playfair Display */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
}

h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    position: relative;
    display: block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(to right, var(--pink-primary), var(--green-primary));
    border-radius: 2px;
    box-shadow:
        /* 0 0 8px 8px var(--cream), */
        0 0 16px 1px rgba(255, 254, 249, 0.6);
}

h2 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}

h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
}

h4 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Better paragraph spacing */
p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

hr {
    border: none;
    height: 2px;
    /* background: linear-gradient(
        to right,
        transparent,
        var(--pink-primary) 20%,
        var(--pink-dark) 40%,
        var(--green-primary) 60%,
        var(--green-dark) 80%,
        transparent
    ); */
    background: linear-gradient(
        to right,
        transparent,
        var(--pink-primary) 20%,
        var(--pink-dark) 40%,
        var(--pink-dark) 60%,
        var(--pink-primary) 80%,
        transparent
    );
    margin: 3rem auto;
    max-width: 80%;
    position: relative;
    overflow: visible;
}

hr::before {
    content: '❖';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    background: transparent;
    padding: 0 16px;
    color: var(--pink-dark);
    font-size: 1.5rem;
    text-shadow:
        0 0 6px var(--cream),
        0 0 16px var(--cream),
        0 0 22px rgba(255, 175, 199, 0.0);
    transition: transform 0.3s ease;
}

/* Optional: Add subtle rotation on hover for playfulness */
hr:hover::before {
    transform: translate(-50%, -50%) rotate(90deg);
}

i {
    font-style: italic;
}

footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: #000000;
}

/* Details/Summary Styling (FAQ Page) */
details {
    background: var(--cream);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0;
    margin: 1rem 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

details:hover {
    border-color: var(--pink-light);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

details[open] {
    background: linear-gradient(135deg, var(--cream), var(--warm-gray));
    border: 2px solid transparent;
    background-image:
        linear-gradient(135deg, var(--cream), var(--warm-gray)),
        linear-gradient(to right, var(--pink-primary), var(--green-primary));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: var(--shadow-glow-pink);
}

summary {
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 600;
    font-style: normal;
    color: var(--text-primary);
    padding: 1.25rem 3.5rem 1.25rem 3.5rem;
    list-style: none;
    position: relative;
    transition: color 0.3s ease;
}

/* Custom arrow indicator */
summary::before {
    content: '▸';
    position: absolute;
    left: 1.5rem;
    color: var(--pink-primary);
    font-size: 1.3rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

details[open] summary::before {
    transform: rotate(90deg);
    color: var(--pink-dark);
}

summary:hover {
    color: var(--green-accent);
}

/* Remove default marker */
summary::-webkit-details-marker {
    display: none;
}

/* FAQ answer styling */
details p {
    margin-top: 0;
    padding: 0 3.5rem 1.25rem 3.5rem;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet Responsive Adjustments */
@media (max-width: 900px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    header img {
        height: 400px;
    }

    main {
        margin: 1.5rem auto;
        --size: 13px;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 600px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Show hamburger menu button */
    .nav-toggle-label {
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Hide navigation links by default */
    nav a {
        display: none;
        width: 100%;
        text-align: center;
        padding: 1rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(91, 107, 78, 0.2);
        border-radius: 0;
    }

    nav a:hover {
        background: rgba(255, 255, 255, 0.8);
        transform: translateX(4px);
    }

    /* Show navigation when checkbox is checked */
    #nav-toggle:checked ~ a {
        display: block;
        animation: slideDown 0.3s ease;
    }

    nav {
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    header img {
        height: 350px;
    }

    .image-caption {
        font-size: 0.75rem;
        padding: 0.35rem 0.65rem;
        top: 10px;
        right: 10px;
    }

    main {
        margin: 1rem;
        --size: 10px;
    }

    section {
        padding: 1.5rem;
    }

    hr {
        margin: 2rem auto;
    }

    /* Fix registry buttons on mobile */
    .give-item {
        min-width: 100%;
        max-width: 100%;
    }

    .give-item a {
        font-size: 0.9rem;
        padding: 8px 12px;
        word-wrap: break-word;
    }

    /* Make Google Forms iframe responsive */
    iframe {
        width: 100% !important;
        max-width: 100%;
    }

    /* Museum gallery single column on mobile */
    .museum-item {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Reduce FAQ padding on mobile */
    summary {
        padding: 1rem 1.5rem 1rem 2.25rem;
        font-size: 1.05rem;
    }

    summary::before {
        left: 0.75rem;
    }

    details p {
        padding: 0 1.5rem 1rem 2.25rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Small Mobile Responsive Adjustments */
@media (max-width: 400px) {
    h1 {
        font-size: 1.5rem;
    }

    header img {
        height: 300px;
    }

    main {
        --size: 8px;
    }

    section {
        padding: 1rem;
    }

    /* Further reduce FAQ padding on small mobile */
    summary {
        padding: 0.75rem 1rem 0.75rem 2rem;
        font-size: 1rem;
    }

    summary::before {
        left: 0.5rem;
    }

    details p {
        padding: 0 1rem 0.75rem 2rem;
    }

    details {
        margin: 0.75rem 0;
    }
}

/* Museum Gallery with CSS Grid and Card Styling */
.museum-gallery {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    padding: 0 1rem;
}

.museum-item {
    background: var(--cream);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Hover lift effect */
.museum-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Subtle gradient overlay on card */
.museum-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--pink-primary), var(--green-primary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.museum-item:hover::before {
    opacity: 1;
}

.museum-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s ease;
}

.museum-item:hover img {
    transform: scale(1.05);
}

.museum-item h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    line-height: 1.4;
    margin: 1rem 0 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.museum-item h4 a {
    color: var(--green-accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.museum-item h4 a:hover {
    border-bottom-color: var(--pink-primary);
}

.museum-item p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}

/* This targets the single italicized word */
.museum-item h4 i {
    font-family: 'Playfair Display', serif !important;
    font-size: inherit !important;
    font-style: italic !important;
    line-height: inherit !important;
}

/* Responsive grid for mobile */
@media (max-width: 600px) {
    .museum-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Gift Registry Cards */
.giving-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 1.5rem;
}

.give-item {
    flex: 1;
    min-width: 120px;
    max-width: 220px;
    padding: 1.5rem 1.25rem;
    border: none;
    background: linear-gradient(135deg, var(--pink-light), var(--pink-primary));
    border-radius: 12px;
    text-align: center;
    line-height: 1.3;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.give-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow-pink);
}

.give-item h3 {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-size: 2rem; /* Emoji size */
}

.give-item p {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.give-item a {
    display: inline-block;
    text-decoration: none;
    color: var(--cream);
    background: linear-gradient(135deg, var(--pink-primary), var(--green-primary));
    font-weight: 700;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.give-item a:hover {
    background: linear-gradient(135deg, var(--pink-dark), var(--green-accent));
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Skip to content link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--green-accent);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    z-index: 100000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Reduced motion for users who prefer it */
@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;
    }
}
