:root {
    --bg-color: #f6efe4;
    --text-color: #2b1d10;
    --text-light: rgba(43, 29, 16, 0.7);
    --frame-color: #eaddc9;
    --accent-color: #2b1d10;
    --white: #ffffff;
    --error-color: #b03a2e;
    
    --font-serif: 'Fraunces', serif;
    --font-sans: 'Inter', sans-serif;
    --font-cursive: 'Caveat', cursive;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Utilities */
.hidden {
    display: none !important;
}

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

.mt-4 {
    margin-top: 1.5rem;
}

/* Header */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.wordmark {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.date-line {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Main Content Wrapper */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 120px; /* Space for sticky bar */
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 8rem 4vw 4rem;
    gap: 4rem;
}

.hero-left {
    flex: 1.2;
}

.hero-title {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(4rem, 8vw, 7.5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0;
}

.hero-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-card {
    background: var(--white);
    padding: 1.5rem;
    padding-bottom: 4rem; /* Polaroid style */
    box-shadow: 0 20px 40px rgba(43, 29, 16, 0.08);
    transform: rotate(3deg);
    transition: transform 0.4s ease;
    max-width: 100%;
    width: 400px;
}

.hero-image-card:hover {
    transform: rotate(1deg) scale(1.02);
}

.hero-image-card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 3/4;
    object-fit: cover;
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 4vw;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
}

.gallery-card {
    background: var(--frame-color);
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(43, 29, 16, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(43, 29, 16, 0.08);
}

.gallery-img-wrap {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--bg-color);
}

.gallery-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img-wrap img {
    transform: scale(1.05);
}

.gallery-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
}

.gallery-caption {
    font-family: var(--font-cursive);
    font-size: 1.5rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.vote-btn:hover {
    opacity: 0.7;
}

.vote-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: fill 0.3s, stroke 0.3s, transform 0.2s;
}

.vote-btn.voted svg {
    fill: var(--text-color);
    transform: scale(1.1);
}

.vote-btn.voted {
    opacity: 0.5;
    cursor: default;
}

.load-more-container {
    text-align: center;
    margin-top: 4rem;
}

/* Buttons */
.cta-btn {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 1rem 2.5rem;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    background: #4a331c;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(43, 29, 16, 0.2);
}

.cta-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.cta-btn.full-width {
    width: 100%;
}

.outline-btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--text-color);
    padding: 0.8rem 2rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.outline-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.outline-btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Sticky Bottom Bar */
.sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(246, 239, 228, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(43, 29, 16, 0.1);
    padding: 1.2rem;
    z-index: 40;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.sticky-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#user-status-msg {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(43, 29, 16, 0.4);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--bg-color);
    width: 100%;
    max-width: 500px;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    z-index: 51;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-color);
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--white);
    border: 1px solid rgba(43, 29, 16, 0.2);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(43, 29, 16, 0.1);
}

/* Custom File Input */
.hidden-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    background: var(--white);
    border: 1px dashed rgba(43, 29, 16, 0.4);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 400;
    color: var(--text-light);
    transition: background 0.2s, border-color 0.2s;
    margin-bottom: 0;
}

.file-label:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--accent-color);
}

.file-btn {
    background: var(--frame-color);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-color);
    font-weight: 500;
}

.error-message {
    color: var(--error-color);
    background: rgba(176, 58, 46, 0.1);
    padding: 0.8rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
}

.share-panel {
    background: var(--frame-color);
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 1.5rem;
}

.share-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

/* Powered By */
#wbx-powered-by-slot {
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        padding-top: 6rem;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: clamp(3rem, 10vw, 5rem);
    }
    
    .hero-image-card {
        width: 80%;
        max-width: 350px;
    }
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
    }
}