/* === BASE === */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #faf5ff;
    --bg-card: #ffffff;
    --purple: #7c3aed;
    --purple-light: #a78bfa;
    --purple-dark: #5b21b6;
    --lavender: #ede9fe;
    --lavender-deep: #ddd6fe;
    --pink: #ec4899;
    --pink-light: #fbcfe8;
    --text: #374151;
    --text-light: #6b7280;
    --text-dark: #1f2937;
    --border: #e5e7eb;
    --shadow: 0 2px 12px rgba(124, 58, 237, 0.08);
    --shadow-lg: 0 8px 30px rgba(124, 58, 237, 0.12);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; color: var(--purple-dark); }

section {
    max-width: 620px;
    margin: 0 auto;
    padding: 3rem 1.25rem;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-intro {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* === STICKY NAV === */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(250, 245, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--lavender-deep);
    z-index: 100;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    padding: 0.6rem 1rem;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
}

.sticky-nav.visible { transform: translateY(0); }

.sticky-nav a {
    color: var(--purple);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.sticky-nav a:hover { border-bottom-color: var(--purple); }

/* === HERO === */
#hero {
    position: relative;
    text-align: center;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    max-width: none;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(250, 245, 255, 0) 0%,
        rgba(250, 245, 255, 0.3) 40%,
        rgba(250, 245, 255, 0.85) 70%,
        rgba(250, 245, 255, 1) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem 1.25rem 1.5rem;
}

.hero-label {
    color: var(--purple);
    font-size: 0.85rem;
    letter-spacing: 0.35em;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

#hero h1 {
    font-size: 4.5rem;
    color: var(--purple-dark);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.15rem;
}

.hero-sub {
    color: var(--purple-light);
    font-size: 1rem;
    font-weight: 400;
}

.hero-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--pink), var(--purple-light));
    margin: 1.25rem auto;
    border-radius: 2px;
}

.hero-details {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
}

.hero-details .venue {
    font-weight: 500;
    color: var(--purple-dark);
}

.hero-cta {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.hero-counter {
    font-size: 0.85rem;
    color: var(--purple-light);
    font-weight: 400;
}

.section-nav {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem 2rem;
    flex-wrap: wrap;
}

.section-nav a {
    color: var(--purple);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.section-nav a:hover { border-bottom-color: var(--purple); }

/* === THEN & NOW === */
#then-now {
    background: var(--lavender);
    max-width: none;
    padding: 3rem 1.25rem;
}

#then-now .inner {
    max-width: 620px;
    margin: 0 auto;
}

.then-now-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.then-now-photo {
    width: 45%;
    max-width: 220px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid white;
}

.then-now-photo img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

.then-now-photo .label {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    color: var(--purple);
    font-weight: 500;
    background: white;
}

.then-now-arrow {
    font-size: 1.5rem;
    color: var(--purple-light);
}

/* === MAPS === */
.map-container {
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
    margin: 1.25rem 0;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.map-hint {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
}

/* === VENUE / DIRECTIONS === */
.venue-info {
    text-align: center;
    margin-bottom: 1rem;
}

.venue-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--purple-dark);
    margin-bottom: 0.15rem;
}

.directions {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1rem 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.directions h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.directions ul {
    list-style: none;
    padding: 0;
}

.directions li {
    padding: 0.25rem 0 0.25rem 1.25rem;
    position: relative;
    font-size: 0.9rem;
}

.directions li::before {
    content: '\2022';
    color: var(--pink);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.event-notes {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1rem;
    color: var(--purple-dark);
    font-weight: 500;
}

.event-notes .subtle {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: 0.25rem;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    color: white;
    border: none;
    padding: 0.7rem 1.75rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.btn:active { transform: translateY(0); }

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--lavender);
    color: var(--purple);
    box-shadow: none;
    transform: none;
}

.btn-directions {
    display: block;
    margin-top: 1rem;
    text-align: center;
}

.btn-pink {
    background: linear-gradient(135deg, var(--pink), #f472b6);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* === FORMS === */
.card-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.card-form input[type="text"],
.card-form textarea,
.card-form select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card-form input:focus,
.card-form textarea:focus,
.card-form select:focus {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.card-form textarea { resize: vertical; min-height: 80px; }

::placeholder { color: var(--text-light); }

/* === VISIBILITY TOGGLE === */
.visibility-toggle {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.visibility-toggle label {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: var(--text-light);
    background: var(--bg);
}

.visibility-toggle input { display: none; }

.visibility-toggle input:checked + label {
    background: var(--purple);
    color: white;
}

.visibility-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    margin-top: -0.25rem;
}

/* === RELATIONSHIP TAG === */
.tag-select {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag-select button {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.tag-select button.active {
    background: var(--lavender);
    border-color: var(--purple-light);
    color: var(--purple);
}

.tag-select button:hover {
    border-color: var(--purple-light);
}

/* === GUESTBOOK ENTRIES === */
.entry {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.entry-message {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.entry-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entry-name {
    color: var(--purple);
    font-size: 0.8rem;
    font-weight: 500;
}

.entry-from {
    color: var(--text-light);
    font-size: 0.75rem;
}

.entry-tag {
    display: inline-block;
    background: var(--lavender);
    color: var(--purple);
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    margin-left: 0.5rem;
}

/* === SUCCESS TOAST === */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--purple);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
    z-index: 200;
    transition: transform 0.3s ease;
    text-align: center;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* === FILE UPLOAD === */
.file-upload {
    background: var(--bg);
    border: 2px dashed var(--lavender-deep);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s;
}

.file-upload:hover { border-color: var(--purple-light); }

.file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload p { color: var(--text-light); font-size: 0.9rem; }

/* === PHOTO GALLERY === */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.photo-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.photo-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.photo-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.photo-caption {
    padding: 0.5rem 0.65rem 0.15rem;
    font-size: 0.8rem;
    color: var(--text-dark);
}

.photo-by {
    padding: 0.15rem 0.65rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* === MUSIC & LINKS SECTION === */
.media-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.media-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: box-shadow 0.2s, transform 0.15s;
    box-shadow: var(--shadow);
}

.media-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.media-link .icon {
    font-size: 1.5rem;
    width: 2.5rem;
    text-align: center;
}

.media-link .label {
    font-size: 0.9rem;
    font-weight: 500;
}

.media-link .sublabel {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* === LIGHTBOX === */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

/* === FOOTER === */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
    font-size: 0.8rem;
    background: var(--lavender);
}

/* === MOBILE === */
@media (max-width: 480px) {
    #hero h1 { font-size: 3.5rem; }
    section { padding: 2.5rem 1rem; }
    .map-container { height: 260px; }
    .gallery { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .then-now-grid { gap: 0.5rem; }
    .then-now-photo { width: 42%; }
    .sticky-nav { gap: 0.75rem; }
    .sticky-nav a { font-size: 0.75rem; }
}

/* === FADE IN ANIMATION === */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
