/* Aura & Air - Premium Wedding Invitation Design System */

:root {
    /* Colors */
    --primary: #182519; /* Deep Sage */
    --on-primary: #ffffff;
    --secondary: #735c00; /* Metallic Gold */
    --on-secondary: #ffffff;
    --tertiary: #ebe1d4; /* Champagne */
    --background: #fbf9f4; /* Parchment */
    --on-background: #1b1c19;
    --surface: #ffffff;
    --on-surface: #1b1c19;
    --on-surface-variant: #444842;
    --outline: #747872;
    --outline-variant: #c4c8c0;

    /* Spacing */
    --edge-margin: 24px;
    --section-gap: 120px;
    --stack-sm: 8px;
    --stack-md: 16px;
    --stack-lg: 32px;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--on-background);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
}

/* Typography Utilities */
.display-lg {
    font-size: 48px; /* Increased from 36px */
    line-height: 1.2;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .display-lg {
        font-size: 64px; /* Increased from 48px */
    }
}

.headline-md {
    font-size: 32px;
    line-height: 1.3;
}

.headline-sm {
    font-size: 24px;
    line-height: 1.4;
    font-weight: 500;
}

.label-caps {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    line-height: 1;
}

.body-lg {
    font-size: 18px;
    line-height: 1.7;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--edge-margin);
}

section {
    padding: var(--section-gap) 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Components */
.btn-primary {
    background-color: var(--primary);
    color: var(--on-primary);
    border: none;
    padding: 16px 32px;
    border-radius: 4px;
    font-family: 'DM Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: #253626;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--outline-variant);
    color: var(--on-surface-variant);
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Hero Section */
.hero {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4; /* Decreased opacity to darken background */
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(251, 249, 244, 0.4), transparent 30%, transparent 70%, var(--background));
    z-index: 0;
}

.hero-content {
    z-index: 1;
    padding: 0 var(--edge-margin);
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5); /* Subtle light shadow for readability on bright backgrounds */
}

/* Arch Image Frame */
.arch-frame {
    width: 240px;
    height: 320px;
    border-radius: 120px 120px 8px 8px;
    overflow: hidden;
    border: 0.5px solid var(--outline-variant);
}

.arch-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Event Cards */
.event-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 48px;
}

@media (min-width: 768px) {
    .event-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.event-card {
    background-color: var(--surface);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--outline-variant);
    text-align: center;
    position: relative;
}

.event-card::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 0.5px solid rgba(115, 92, 0, 0.2); /* Gold accent */
    border-radius: 8px;
    pointer-events: none;
}

/* RSVP Form */
.rsvp-form {
    background-color: var(--surface);
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 40px rgba(0,0,0,0.03);
    border: 1px solid var(--outline-variant);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--outline-variant);
    background: transparent;
    padding: 12px 0;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Floating Navigation */
.mobile-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 999px;
    display: flex;
    gap: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    z-index: 100;
}

.mobile-nav a {
    color: var(--outline);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 20px;
    transition: color 0.3s;
}

.mobile-nav a.active {
    color: var(--secondary);
}

/* Countdown Timer */
.countdown {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 40px 0;
}

.countdown-item {
    text-align: center;
}

.countdown-number {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    display: block;
    color: var(--primary);
}

.countdown-label {
    font-size: 10px;
}

/* Floating Music FAB */
.music-fab {
    position: fixed;
    bottom: 120px;
    right: 24px;
    width: 48px;
    height: 48px;
    background-color: var(--secondary);
    color: var(--on-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(115, 92, 0, 0.3);
    cursor: pointer;
    z-index: 100;
    border: none;
    transition: transform 0.3s ease;
}

.music-fab:active {
    transform: scale(0.9);
}

.music-fab.playing {
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 1.5s ease-in;
}

.slide-up {
    animation: slideUp 1s ease-out forwards;
}

/* ============================
   Ucapan / Wishes Wall
   ============================ */

/* Wishes Grid */
.wishes-wall {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* Wish Card */
.wish-card {
    background-color: var(--surface);
    border: 1px solid var(--outline-variant);
    border-radius: 16px;
    padding: 24px;
    opacity: 0;
    transform: translateY(16px);
    animation: wishCardIn 0.5s ease-out forwards;
}

.wish-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.wish-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 600;
}

.wish-meta {
    flex: 1;
    min-width: 0;
}

.wish-name {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--on-surface);
    line-height: 1.3;
}

.wish-time {
    font-size: 11px;
    color: var(--outline);
    margin-top: 2px;
}

.attendance-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1;
}

.attendance-badge.attending {
    background-color: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
}

.attendance-badge.not-attending {
    background-color: rgba(198, 40, 40, 0.08);
    color: #c62828;
}

.wish-message {
    font-size: 15px;
    line-height: 1.7;
    color: var(--on-surface-variant);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Stagger animation for cards */
@keyframes wishCardIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* New card highlight (just submitted) */
.wish-card.new-card {
    border-color: var(--secondary);
    box-shadow: 0 4px 24px rgba(115, 92, 0, 0.12);
}

/* Character Counter */
.char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--outline);
    margin-top: 6px;
    transition: color 0.3s;
}

.char-counter.near-limit {
    color: #e65100;
}

.char-counter.at-limit {
    color: #c62828;
    font-weight: 600;
}

/* Skeleton Loading */
.skeleton-card {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

.skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, var(--outline-variant) 25%, rgba(196, 200, 192, 0.4) 50%, var(--outline-variant) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-line.w60 { width: 60%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w100 { width: 100%; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(24px);
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 90vw;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast.success {
    background-color: var(--primary);
    color: var(--on-primary);
}

.toast.error {
    background-color: #c62828;
    color: #ffffff;
}

/* Submit Button States */
.btn-primary.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.btn-primary.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

