/* ===== CSS RESET & VARIABLES ===== */
:root {
    --honey: #d97706;
    --honey-hover: #b45309;
    --cream: #fef3c7;
    --oat: #f3f4f6;
    --forest: #166534;
    --forest-dark: #14532d;
    --chalkboard: #2a2e2b;
    --text-main: #374151;
    --text-light: #6b7280;
    
    --font-hand: 'Caveat', cursive;
    --font-serif: 'Lora', serif;
}

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

body {
    font-family: var(--font-serif);
    color: var(--text-main);
    background-color: var(--cream);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Paper Texture Overlay */
.texture-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
    /* Subtle noise texture via SVG data URI */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
}

.hidden {
    display: none !important;
}

.text-forest { color: var(--forest); }
.text-honey { color: var(--honey); }
.handwritten-heading { font-family: var(--font-hand); font-size: 2.5rem; line-height: 1.1; }

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== HERO SECTION ===== */
.chalkboard-hero {
    position: relative;
    width: 100%;
    padding: 6rem 2rem 4rem;
    text-align: center;
    color: #fff;
    background-color: var(--chalkboard);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 10;
}

.chalkboard-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://offertabs.s3.amazonaws.com/offer/2endtm/site/media/69f0ffa8a82c71.68295545.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.85; /* Blend with background color */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    /* Chalk powder effect */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5), 0 0 10px rgba(255,255,255,0.2);
}

.pre-title {
    font-family: var(--font-hand);
    font-size: 1.8rem;
    color: #e5e7eb;
    margin-bottom: 0.5rem;
    transform: rotate(-2deg);
}

.main-title {
    font-family: var(--font-hand);
    font-size: 5.5rem;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    color: #ffffff;
}

.chalk-divider {
    height: 4px;
    width: 150px;
    background-color: #fff;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    opacity: 0.6;
    box-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.subtitle {
    font-family: var(--font-hand);
    font-size: 2.2rem;
    color: var(--honey);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Campaign Status / Countdown */
#campaign-status-banner {
    position: relative; z-index: 2;
    margin-top: 2rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    padding: 0.75rem 2rem;
    border-radius: 99px;
    border: 1px dashed rgba(255,255,255,0.3);
    font-family: var(--font-hand);
    font-size: 1.5rem;
}

.countdown {
    position: relative; z-index: 2;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-label {
    font-family: var(--font-hand);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: rgba(255,255,255,0.8);
}

.timer-digits {
    display: flex;
    gap: 1.5rem;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-block span {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 2rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    min-width: 70px;
    text-align: center;
}

.time-block small {
    font-family: var(--font-hand);
    font-size: 1.2rem;
    margin-top: 0.25rem;
    color: rgba(255,255,255,0.7);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
    width: 100%;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Instructions Stack */
.section-heading {
    font-family: var(--font-hand);
    font-size: 3rem;
    color: var(--forest);
    margin-bottom: 2rem;
    transform: rotate(-1deg);
}

.steps-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-card {
    background: var(--oat);
    border: 2px dashed #d1d5db;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.step-card:hover {
    transform: translateY(-3px) rotate(1deg);
    border-color: var(--honey);
    background: #fff;
}

.step-num {
    background: var(--honey);
    color: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
}

.step-text {
    font-size: 1.1rem;
    color: var(--text-main);
}

/* Order Ticket Form */
.order-ticket-container {
    position: relative;
    perspective: 1000px;
    transform: rotate(2deg);
}

.ticket-shadow {
    position: absolute;
    top: 10px; left: 10px; right: -10px; bottom: -10px;
    background: rgba(0,0,0,0.1);
    filter: blur(8px);
    z-index: 1;
    border-radius: 4px;
}

.order-ticket {
    position: relative;
    z-index: 2;
    background: #fff;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    /* Zig-zag torn paper edges */
    background-image: 
        radial-gradient(circle at top, transparent 8px, #fff 9px),
        radial-gradient(circle at bottom, transparent 8px, #fff 9px);
    background-size: 20px 100%;
    background-position: left top, left bottom;
    background-repeat: repeat-x;
    /* Notebook lines */
    background: linear-gradient(transparent 95%, #e2e8f0 95%);
    background-size: 100% 2.5rem;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-top: none; border-bottom: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Torn edges fallback/overlay */
.order-ticket::before, .order-ticket::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 10px;
    background-size: 20px 10px;
    z-index: 3;
}
.order-ticket::before {
    top: 0;
    background-image: radial-gradient(circle at 10px 0, transparent 11px, #fff 12px);
}
.order-ticket::after {
    bottom: 0;
    background-image: radial-gradient(circle at 10px 10px, transparent 11px, #fff 12px);
}


.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--forest);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    font-family: monospace;
    color: var(--forest);
    font-weight: bold;
    font-size: 1.1rem;
}

.table-num {
    background: var(--forest);
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.ticket-meta {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.form-row {
    margin-bottom: 1.5rem;
}

.form-row label {
    display: block;
    font-family: var(--font-hand);
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.form-row input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px dashed #cbd5e1;
    padding: 0.5rem 0;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--forest-dark);
    transition: border-color 0.3s;
}

.form-row input:focus {
    outline: none;
    border-bottom-color: var(--honey);
}

.form-row input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.error-message {
    background: #fee2e2;
    color: #b91c1c;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border-left: 4px solid #ef4444;
}

.submit-row {
    margin-top: 2.5rem;
    text-align: center;
}

/* Vintage Diner Button */
.diner-btn {
    background-color: var(--honey);
    color: #fff;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 2rem;
    border: 3px solid var(--honey-hover);
    border-radius: 99px;
    cursor: pointer;
    box-shadow: 0 6px 0 var(--honey-hover), 0 10px 15px rgba(0,0,0,0.1);
    transition: all 0.1s ease;
    width: 100%;
}

.diner-btn:hover {
    filter: brightness(1.05);
}

.diner-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--honey-hover), 0 5px 10px rgba(0,0,0,0.1);
}

.diner-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--honey-hover);
}

/* Success Ticket Container */
.success-ticket {
    background: #fff;
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 8px solid var(--forest);
}

.success-ticket p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin: 1rem 0 2rem;
}

.divider-line {
    height: 1px;
    background: #e5e7eb;
    margin: 2rem 0;
    width: 100%;
}

.share-box {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.share-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1rem;
    background: #f9fafb;
    color: var(--text-main);
}

.small-btn {
    padding: 0.75rem 1.5rem;
    width: auto;
    font-size: 0.95rem;
}

/* ===== PHOTO GRID ===== */
.photo-grid-section {
    margin-top: 6rem;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.photo-card {
    background: #fff;
    padding: 1rem 1rem 3rem 1rem;
    border-radius: 4px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transform: rotate(random);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.photo-card:nth-child(1) { transform: rotate(-3deg); }
.photo-card:nth-child(2) { transform: rotate(1deg) translateY(10px); }
.photo-card:nth-child(3) { transform: rotate(4deg); }

.photo-card:hover {
    transform: translateY(-10px) rotate(0);
    z-index: 10;
    box-shadow: 0 20px 30px rgba(0,0,0,0.15);
}

.photo-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border: 1px solid #f3f4f6;
}

/* ===== FOOTER ===== */
.site-footer {
    text-align: center;
    padding: 4rem 2rem 2rem;
    margin-top: auto;
}

.footer-logo {
    font-family: var(--font-hand);
    font-size: 2.5rem;
    color: var(--forest);
    margin-bottom: 0.5rem;
}

.site-footer p {
    color: var(--text-light);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
}

#wbx-powered-by-slot {
    margin: 0 auto;
    width: 100%;
    max-width: 600px;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .order-ticket-container {
        transform: none;
    }
    
    .photo-grid {
        gap: 1rem;
    }
    .photo-card {
        padding: 0.75rem 0.75rem 2rem 0.75rem;
    }
    .photo-card img {
        height: 200px;
    }
}

@media (max-width: 600px) {
    .main-title {
        font-size: 3.5rem;
    }
    .subtitle {
        font-size: 1.5rem;
    }
    .chalkboard-hero {
        padding: 4rem 1rem 3rem;
    }
    .photo-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin: 0 auto;
    }
    .photo-card:nth-child(n) {
        transform: none;
        margin-bottom: 1rem;
    }
    .share-box {
        flex-direction: column;
    }
    .share-box input, .small-btn {
        width: 100%;
    }
}
