@tailwind base;
@tailwind components;
@tailwind utilities;

/* Color variables for GSAP animation */
:root {
    --color-cream: #E0DBD7;
    --color-sand: #D0BCB3;
    --color-taupe: #A9978A;
    --color-blush: #F5C8BF;
    --color-espresso: #775E50;
    /* Wedding Palette */
    --primary: #4a4036;
    /* Warm Charcoal */
    --accent: #d4af37;
    /* Gold */
    --soft: #f9f7f2;
    /* Ivory */
    --gold-light: #f3e5ab;
}

/* GSAP-ready utility classes */
.gsap-fade {
    opacity: 0;
    transform: translateY(20px);
}

.gsap-slide-left {
    opacity: 0;
    transform: translateX(40px);
}

.gsap-slide-right {
    opacity: 0;
    transform: translateX(-40px);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--soft);
    color: var(--primary);
    overflow-x: hidden;
    margin: 0;
}

h1,
h2,
h3,
.futuristic-font {
    font-family: 'Space Grotesk', sans-serif;
}

/* 3D Canvas Background */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    opacity: 0.8;
    pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b8962e;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism */
.glass-panel {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(74, 64, 54, 0.05);
}

/* Form Styles */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-field {
    width: 100%;
    padding: 1rem 1rem 1rem 0;
    border: none;
    border-bottom: 2px solid #e2e8f0;
    background: transparent;
    font-size: 1rem;
    color: var(--primary);
    transition: border-color 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent);
}

.input-label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-field:focus~.input-label,
.input-field:not(:placeholder-shown)~.input-label {
    top: -0.5rem;
    font-size: 0.75rem;
    color: var(--accent);
}

/* Textarea for Dietary */
.dietary-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f9f7f2;
    color: var(--primary);
    font-family: inherit;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    display: none;
    /* Hidden by default */
}

.dietary-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Toast Notification */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 50;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.5s, bottom 0.5s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

#toast.success {
    background-color: #059669;
}

#toast.error {
    background-color: #dc2626;
}

/* Loader */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

.hidden {
    display: none !important;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Envelope Container */
.envelope-container {
    position: relative;
    width: 300px;
    height: 200px;
    margin: 0 auto;
    perspective: 1000px;
}

/* 1. Bottom Layer: Envelope Body */
.envelope-body {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #fbcfe8;
    /* pink-200 */
    border-radius: 8px;
    z-index: 1;
    /* Lowest layer */
    box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.3);
}

/* 2. The Letter (Inside the body) */
.card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 160px;
    background-color: #ffffff;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translate(-50%, -50%) translateY(20px);
    /* Start slightly inside */
    opacity: 0;
    z-index: 2;
    /* Inside the body */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid #fce7f3;
}

.card-line {
    width: 100%;
    height: 1px;
    background-color: #fbcfe8;
    margin: 8px 0;
}

/* 3. Cover Layer: The Back Flap (Lid) */
.envelope-lid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fbcfe8;
    /* pink-200 */
    z-index: 3;
    /* On top of body, below flap */
    border-radius: 8px;
}

/* 4. Top Layer: The Front Flap */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f9a8d4;
    /* pink-300 */
    clip-path: polygon(0 0, 50% 50%, 100% 0);
    z-index: 4;
    /* Highest layer */
    transform-origin: top;
}

/* Scroll Indicator Animation */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.hero {
    height: 100vh;
    width: 100%;
    background-size: cover;
    background-position: 56% 50%;
    /* 56% x-axis, 50% y-axis */
    margin: 0;
    padding: 0;
}

/* src/styles/navigation.css */

/* Hamburger Button Styling */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: 0.3s;
}

/* Media Query for Mobile (< 600px) */
@media (max-width: 600px) {
    .hamburger {
        display: flex;
        z-index: 50;
    }

    .nav-links {
        position: absolute;
        right: 0px;
        height: calc(100vh - var(--nav-height));
        /* Fill remaining screen */
        top: var(--nav-height);
        /* Start below nav */
        background-color: #f4f4f4;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(105%);
        transition: transform 0.5s ease-in;
    }

    .nav-links a {
        margin: 0.5vh 0;
        font-size: 140%;
        padding: 10px;
        width: 100%;
        text-align: center;
    }
}

/* Class added by JavaScript to open the menu */
.nav-active {
    transform: translateX(0%);
}

/* Animation for links appearing */
@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0px);
    }
}