/* Jardin (Floral) Template Styles */

/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,700&family=Great+Vibes&family=Lora:wght@400&display=swap');

:root {
    /* Colors - Warm Parchment Palette */
    --color-bg: #FAF7F2;
    --color-bg-section: #F3EDE3;
    --color-bg-accent: #EDE3D5;

    /* Text */
    --color-text-primary: #2C1A0E;
    --color-text-muted: #7A5C44;
    --color-text-light: #B09880;

    /* Accents */
    --color-rose: #C4846A;
    --color-sage: #7D9B76;
    --color-blush: #E8C4B8;

    /* Borders */
    --color-border: #D9C9B8;

    /* Fonts */
    --font-display: 'Libre Baskerville', serif;
    --font-script: 'Great Vibes', cursive;
    --font-body: 'Lora', serif;
}

/* Base Settings */
body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Texture Overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* Typography Classes */
.font-display {
    font-family: var(--font-display);
}

.font-script {
    font-family: var(--font-script);
}

.font-body {
    font-family: var(--font-body);
}

/* Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* Scale Animation for images */
.reveal-scale {
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 1.2s ease-out, transform 1.4s ease-out;
}

.reveal-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Polaroid Gallery Grid */
.polaroid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding: 20px;
}

.polaroid-card {
    background: white;
    padding: 12px 12px 40px 12px;
    box-shadow: 0 4px 20px rgba(44, 26, 14, 0.12);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.polaroid-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    object-fit: cover;
    filter: sepia(0.15) contrast(0.95) brightness(1.02);
    /* Vintage warmth */
}

/* Random Rotations via nth-child */
.polaroid-card:nth-child(odd) {
    transform: rotate(-1.5deg);
}

.polaroid-card:nth-child(even) {
    transform: rotate(1deg);
}

.polaroid-card:nth-child(3n) {
    transform: rotate(2deg);
}

.polaroid-card:nth-child(4n) {
    transform: rotate(-2deg);
}

.polaroid-card:hover {
    transform: rotate(0deg) scale(1.05) translateY(-6px);
    z-index: 10;
    box-shadow: 0 12px 30px rgba(44, 26, 14, 0.2);
}

.polaroid-card:focus-visible {
    outline: 2px solid var(--color-rose);
    outline-offset: 4px;
}

/* Envelope Event Card */
.envelope-card {
    background: var(--color-bg-accent);
    border: 1px solid var(--color-border);
    padding: 48px 40px;
    position: relative;
    margin-bottom: 32px;
}

.envelope-card::before {
    content: '';
    position: absolute;
    top: -1px;
    /* Align with border */
    left: 0;
    right: 0;
    height: 24px;
    background: var(--color-bg);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    z-index: 1;
}

/* Footer Botanical Divider */
.footer-botanical {
    color: var(--color-sage);
    margin: 24px auto;
    width: 40px;
    height: 40px;
    opacity: 0.8;
}

/* Map Sepia */
.map-sepia {
    filter: sepia(0.4) contrast(0.9) grayscale(0.2);
    transition: filter 0.5s ease;
}

.map-sepia:hover {
    filter: none;
}

/* Button Refinement */
.btn {
    padding: 16px 40px;
    background: var(--color-blush);
    border: 1px solid var(--color-rose);
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: var(--color-rose);
    color: white;
}

/* Botanical SVG Placement Helper */
.botanical-decoration {
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
    mix-blend-mode: multiply;
}

/* Lightbox overrides */
#lightbox {
    background-color: rgba(250, 247, 242, 0.95);
    /* Warm overlay */
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 1s ease-out 2s forwards;
    z-index: 20;
}

.scroll-hint__line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-text-primary), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0% {
        transform: scaleY(0);
        transform-origin: top;
        opacity: 0;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
        opacity: 1;
    }

    100% {
        transform: scaleY(1);
        transform-origin: bottom;
        opacity: 0;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .polaroid-grid {
        gap: 20px;
        padding: 10px;
    }

    .envelope-card {
        padding: 32px 24px;
    }
}

/* Hero Arch Redesign */
.hero-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-wrapper {
        grid-template-columns: 1fr auto 1fr;
        gap: 2rem;
    }
}

.hero-arch {
    width: 280px;
    height: 380px;
    border-radius: 200px 200px 0 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(44, 26, 14, 0.15);
    border: 8px solid white;
    z-index: 10;
}

@media (min-width: 768px) {
    .hero-arch {
        width: 340px;
        height: 480px;
    }
}

.hero-arch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.2) contrast(0.95);
    transition: transform 1.5s ease;
}

.hero-arch:hover img {
    transform: scale(1.05);
}

.hero-name {
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1;
    white-space: nowrap;
    z-index: 20;
    text-shadow: 0 4px 12px rgba(250, 247, 242, 0.8);
}

.hero-name.left {
    text-align: right;
    margin-bottom: 1rem;
}

.hero-name.right {
    text-align: left;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .hero-name.left {
        margin-bottom: 0;
        margin-right: -40px;
    }

    .hero-name.right {
        margin-top: 0;
        margin-left: -40px;
    }
}

.hero-ampersand {
    font-family: var(--font-script);
    font-size: 3rem;
    color: var(--color-rose);
    display: block;
    margin: 0.5rem 0;
}

@media (min-width: 768px) {
    .hero-ampersand {
        display: none;
        /* Hidden on desktop, layout implies 'and' */
    }
}

/* Premium refinement layer */
body {
    background-image:
        radial-gradient(circle at 8% 12%, rgba(196, 132, 106, 0.16), transparent 30%),
        radial-gradient(circle at 90% 14%, rgba(125, 155, 118, 0.12), transparent 34%);
}

.floral-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(250, 247, 242, 0.2), rgba(250, 247, 242, 0.9)),
        radial-gradient(circle at 20% 20%, rgba(196, 132, 106, 0.08), transparent 45%);
    pointer-events: none;
    z-index: 1;
}

.botanical-decoration {
    opacity: 0.22;
    filter: blur(0.2px);
}

.petal-card {
    border-radius: 20px;
    box-shadow: 0 14px 36px rgba(44, 26, 14, 0.11);
    border-color: rgba(122, 92, 68, 0.26);
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.88), rgba(237, 227, 213, 0.88));
}

.envelope-card {
    border-radius: 16px;
    box-shadow: 0 20px 42px rgba(44, 26, 14, 0.1);
    overflow: hidden;
}

.envelope-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(196, 132, 106, 0.22);
    pointer-events: none;
}

.map-paper {
    border-radius: 12px;
    border: 1px solid rgba(122, 92, 68, 0.22);
    box-shadow: 0 18px 48px rgba(44, 26, 14, 0.16);
    overflow: hidden;
}

.btn {
    box-shadow: 0 10px 22px rgba(196, 132, 106, 0.2);
    border-radius: 999px;
    letter-spacing: 0.04em;
}

.btn::after {
    content: '→';
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.btn:hover::after {
    transform: translateX(4px);
}

.polaroid-card {
    border-radius: 4px;
    box-shadow: 0 10px 28px rgba(44, 26, 14, 0.14);
}

.polaroid-card::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    width: 74px;
    height: 18px;
    transform: translateX(-50%) rotate(-2deg);
    background: rgba(255, 240, 212, 0.6);
    border: 1px solid rgba(122, 92, 68, 0.08);
    backdrop-filter: blur(1px);
}

.floral-card {
    border: 1px solid rgba(122, 92, 68, 0.18);
    border-radius: 14px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), rgba(255, 251, 245, 0.95));
    box-shadow: 0 12px 30px rgba(44, 26, 14, 0.08);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease, border-color 0.45s ease;
}

.floral-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 42px rgba(44, 26, 14, 0.14);
    border-color: rgba(196, 132, 106, 0.4);
}

.note-card {
    border: 1px solid rgba(122, 92, 68, 0.16);
    border-radius: 16px;
    box-shadow: 0 14px 32px rgba(44, 26, 14, 0.09);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 237, 0.92));
}

.rsvp-paper {
    border: 1px solid rgba(122, 92, 68, 0.2);
    border-radius: 16px;
    box-shadow: 0 26px 54px rgba(44, 26, 14, 0.14);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.99), rgba(255, 246, 238, 0.95));
}

.lcv-shell {
    border: 1px solid rgba(122, 92, 68, 0.2);
    border-radius: 14px;
    padding: clamp(14px, 2.4vw, 22px);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 242, 0.96));
}

.lcv-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.lcv-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    border: 1px solid rgba(122, 92, 68, 0.26);
    background: rgba(255, 255, 255, 0.8);
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.lcv-note {
    margin: 0 0 10px;
    color: var(--color-text-muted);
    font-size: 14px;
    font-family: var(--font-body);
}

.lcv-status {
    margin: 0 0 14px;
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.lcv-status[data-state="ready"] {
    color: var(--color-sage);
}

.lcv-status[data-state="error"] {
    color: #8d4b4b;
}

.lcv-embed {
    width: 100%;
    display: block;
    min-height: 640px;
    border: 1px solid rgba(122, 92, 68, 0.16);
    border-radius: 12px;
    background: #fff;
    opacity: 1;
    transition: opacity 0.35s ease, filter 0.35s ease;
}

.lcv-shell.is-loading .lcv-embed {
    opacity: 0.45;
    filter: saturate(0.9) blur(1px);
}

.lcv-shell.is-ready .lcv-embed {
    opacity: 1;
    filter: none;
}

.lcv-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.lcv-actions a {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-sage);
    border-bottom: 1px solid rgba(125, 155, 118, 0.38);
    padding-bottom: 2px;
}

.lcv-actions a:hover {
    color: var(--color-text-primary);
    border-bottom-color: var(--color-text-primary);
}

.floral-footer {
    background: linear-gradient(to top, rgba(237, 227, 213, 0.58), rgba(250, 247, 242, 0));
}

@media (max-width: 768px) {
    .petal-card {
        border-radius: 14px;
    }

    .note-card {
        transform: rotate(0deg) !important;
    }

    .lcv-embed {
        min-height: 560px;
    }

    .lcv-actions {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-scale,
    .polaroid-card,
    .floral-card,
    .btn {
        transition: none !important;
        animation: none !important;
    }
}
