/* ==========================================================================
   CSS Variables & Theme Setup
   ========================================================================== */
:root {
    --clr-background: #F5EFE6; 
    --clr-navy: #2B3245;       
    --clr-navy-light: #3A435E;
    --clr-peach: #F4A261;      
    --clr-duck-blue: #8DB4E2;  
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Nunito', sans-serif;
    --font-handwriting: 'Caveat', cursive; 
    
    --transition-smooth: all 0.3s ease-in-out;
}

/* ==========================================================================
   Base Resets & Typography
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--clr-background);
    color: var(--clr-navy);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--clr-navy);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem;
}

.image-button {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
}

.image-button:active {
    transform: scale(0.98); 
}

.image-button img {
    max-width: 100%;
    height: auto;
    width: 600px; 
    filter: drop-shadow(0 10px 15px rgba(43, 50, 69, 0.1));
}

.hero-title {
    margin-top: 3rem;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: 1px;
}

.ocean-text {
    display: block;
    margin-top: 1rem;
    font-family: var(--font-handwriting);
    font-size: 1.8rem;
    color: var(--clr-duck-blue);
    opacity: 0.9;
    animation: waveText 4s ease-in-out infinite;
}

@keyframes waveText {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.7; }
    50% { transform: translateY(-5px) rotate(-2deg); opacity: 1; color: var(--clr-navy); }
}

/* ==========================================================================
   PO Box Section
   ========================================================================== */
.interactive-section {
    padding: 2rem 0 6rem 0;
    text-align: center;
}

.po-box-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.stylized-address {
    padding: 2rem;
    border: 2px dashed var(--clr-duck-blue);
    display: inline-block;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.stylized-address span {
    display: block;
}

/* ==========================================================================
   Swipe Journey Modal
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(43, 50, 69, 0.9); 
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.journey-modal-content {
    background: var(--clr-background);
    padding: 2rem;
    border-radius: 12px;
    width: 95%;
    max-width: 600px;
    position: relative;
    transform: translateY(20px);
    transition: var(--transition-smooth);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    overflow: hidden; 
}

.modal-overlay.active .journey-modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--clr-navy);
    cursor: pointer;
    z-index: 10;
}

.slider-viewport {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
}

.slider-track {
    display: flex;
    width: 300%; 
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide {
    width: 33.333%;
    flex-shrink: 0;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-inner {
    width: 100%;
}

.slide-artwork {
    width: 120px;
    height: auto;
    margin: 0 auto 1.5rem auto; 
    display: block;
    animation: gentleFloat 6s ease-in-out infinite;
}

.book-synopsis {
    text-align: left; 
}

.synopsis-text p {
    font-size: 1.1rem;
    margin-bottom: 1.2rem; 
    line-height: 1.7;
    color: var(--clr-navy);
}

.whimsical-quote {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--clr-peach);
    font-style: italic;
    text-align: center; 
    margin: 2rem 0;
    line-height: 1.4;
}

.author-slide, .newsletter-slide {
    text-align: center;
}

.author-slide p {
    margin-bottom: 1rem;
    text-align: left; 
}

.text-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--clr-peach);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.text-link:hover {
    border-bottom-color: var(--clr-peach);
}

.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--clr-navy-light);
    border-radius: 6px;
    background: transparent;
    font-family: var(--font-body);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group label {
    font-size: 0.85rem;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--clr-navy);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 1rem;
}

.submit-btn:hover {
    background: var(--clr-duck-blue);
}

.fine-print {
    font-size: 0.75rem;
    color: var(--clr-navy-light);
    margin-top: 1rem;
    text-align: center;
}

.slider-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 0 1rem;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--clr-peach);
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.dots-container {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--clr-navy-light);
    opacity: 0.3;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.dot.active {
    opacity: 1;
    background: var(--clr-peach);
}

.floating-artwork {
    animation: gentleFloat 6s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
}
/* --- Bulletproof Mobile Fixes for the Modal --- */
@media (max-width: 768px) {
    .modal {
        align-items: flex-start !important; /* Forces the box to the top instead of the center */
        padding-top: 10dvh !important; /* Gives it breathing room below the iPhone notch */
    }
    
    .modal-content {
        max-height: 70dvh !important; /* 70% of the dynamic screen height, dodging Safari's bottom bar */
        overflow-y: auto !important; /* Allows scrolling inside the box if needed */
        margin-top: 0 !important; 
        padding-bottom: 2rem !important; /* Space for the bottom buttons */
    }
}@media (max-width: 768px) {
    .modal-content {
        max-height: 85vh; /* Prevents the box from being taller than the screen */
        overflow-y: auto; /* Adds a scrollbar if the content is still too tall */
        margin-top: 5vh;
        padding-bottom: 2rem; /* Gives the bottom buttons breathing room */
    }
}