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

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Lora', serif;
    color: #3A5A6A;
    background: #F5EDE0;
    overflow-x: hidden;
}

body {
    scroll-behavior: smooth;
}

/* Paper texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="12" cy="18" r="0.5" fill="%23C8B498" opacity="0.04"/><circle cx="34" cy="41" r="0.5" fill="%23C8B498" opacity="0.04"/><circle cx="56" cy="27" r="0.5" fill="%23C8B498" opacity="0.04"/><circle cx="78" cy="63" r="0.5" fill="%23C8B498" opacity="0.04"/><circle cx="22" cy="78" r="0.5" fill="%23C8B498" opacity="0.04"/><circle cx="89" cy="12" r="0.5" fill="%23C8B498" opacity="0.04"/><circle cx="45" cy="55" r="0.5" fill="%23C8B498" opacity="0.04"/><circle cx="12" cy="89" r="0.5" fill="%23C8B498" opacity="0.04"/></svg>');
    pointer-events: none;
    z-index: 1;
}

/* Section Base Styles */
section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.section-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.watercolor-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(180deg, #D4E8F0 0%, #D4E8F0 55%, #F5EDE0 100%);
}

.hero-section .content-wrapper {
    z-index: 10;
    text-align: center;
    max-width: 38rem;
    padding: 2rem;
    transform: translateX(-3%);
    animation: sway-left 4s ease-in-out infinite;
}

/* Content Wrapper */
.content-wrapper {
    position: relative;
    z-index: 10;
    max-width: 38rem;
    padding: 3rem 2rem;
    text-align: left;
}

/* Odd sections sway left, even sections sway right */
#section-2 .content-wrapper,
#section-4 .content-wrapper {
    transform: translateX(3%);
}

#section-3 .content-wrapper {
    transform: translateX(-3%);
}

/* Typography */
h1.domain-name {
    font-family: 'Abril Fatface', serif;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 400;
    color: #2C4A5A;
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: lowercase;
}

h2 {
    font-family: 'Stint Ultra Expanded', cursive;
    font-size: clamp(1rem, 2.2vw, 1.4rem);
    font-weight: 400;
    color: #5A7A8A;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.horizon-sentence {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    font-weight: 400;
    color: #3A5A6A;
    font-style: italic;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

p {
    font-family: 'Lora', serif;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #3A5A6A;
}

.closing-statement {
    font-size: 1.1rem;
    font-weight: 500;
    font-style: italic;
    color: #2C4A5A;
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid #C8B498;
    position: relative;
    overflow: hidden;
}

/* Border drawing animation */
.closing-statement::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid #C8B498;
    pointer-events: none;
    opacity: 0;
    animation: border-draw 2s ease-out forwards;
}

@keyframes border-draw {
    0% {
        opacity: 1;
        clip-path: polygon(0 0, 100% 0, 100% 0, 100% 100%, 0 100%, 0 0);
    }
    100% {
        opacity: 0;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%, 0 100%, 0 100%);
    }
}

/* Hero Illustration */
.hero-illustration {
    width: 200px;
    height: 240px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

/* Illustration Blocks */
.illustration-block {
    width: 100%;
    max-width: 100%;
    height: 250px;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #C8B498;
    border-radius: 2px;
    padding: 1rem;
    background: rgba(168, 200, 216, 0.05);
}

.illustration-block svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(90, 122, 138, 0.15));
}

/* Section Alternation for Background */
#section-2 {
    background-color: #EDF2F0;
}

#section-3 {
    background-color: #F5EDE0;
}

#section-4 {
    background-color: #EDF2F0;
}

/* Watercolor Edge Dividers between sections */
section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 8px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10"><path d="M0,5 Q2,2,4,5 T8,5 T12,2 T16,5 T20,2 T24,5 T28,2 T32,5 T36,2 T40,5 T44,2 T48,5 T52,2 T56,5 T60,2 T64,5 T68,2 T72,5 T76,2 T80,5 T84,2 T88,5 T92,2 T96,5 T100,5 L100,10 L0,10 Z" fill="white" opacity="0.3"/></svg>') repeat-x;
    background-size: 100px 8px;
    z-index: 5;
}

#section-1::after {
    background-color: transparent;
}

/* Animations */
@keyframes sway-left {
    0%, 100% { transform: translateX(-3%); }
    50% { transform: translateX(-3.5%); }
}

@keyframes sway-right {
    0%, 100% { transform: translateX(3%); }
    50% { transform: translateX(3.5%); }
}

#section-2 .content-wrapper,
#section-4 .content-wrapper {
    animation: sway-right 4s ease-in-out infinite;
}

#section-3 .content-wrapper {
    animation: sway-left 4s ease-in-out infinite;
}

/* Fade in on scroll */
section {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

section.visible {
    opacity: 1;
}

/* Responsive Design */
/* Accent color elements */
.illustration-block {
    border-color: #D4A88C;
}

.illustration-block svg circle,
.illustration-block svg ellipse {
    mix-blend-mode: screen;
}

/* Secondary text annotations */
.annotation {
    font-family: 'Lora', serif;
    font-size: 0.8rem;
    font-style: italic;
    color: rgba(90, 122, 138, 0.6);
    margin-top: 0.5rem;
}

/* Watercolor accent bar */
#section-3 .content-wrapper {
    border-left: 3px solid #A8C8D8;
    padding-left: 1.5rem;
}

@media (max-width: 768px) {
    h1.domain-name {
        font-size: clamp(2rem, 5vw, 3.5rem);
    }

    h2 {
        font-size: clamp(0.9rem, 2vw, 1.2rem);
    }

    .horizon-sentence {
        font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    }

    p {
        font-size: 0.95rem;
    }

    .content-wrapper {
        padding: 2rem 1.5rem;
    }

    #section-2 .content-wrapper,
    #section-4 .content-wrapper {
        transform: translateX(0);
    }

    #section-3 .content-wrapper {
        transform: translateX(0);
        border-left: 3px solid #A8C8D8;
    }

    #section-2 .content-wrapper,
    #section-3 .content-wrapper,
    #section-4 .content-wrapper {
        animation: none;
    }

    .hero-section .content-wrapper {
        transform: translateX(0);
        animation: none;
    }
}

@media (max-width: 480px) {
    h1.domain-name {
        font-size: 2rem;
    }

    h2 {
        font-size: 1rem;
    }

    p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .content-wrapper {
        padding: 1.5rem 1rem;
    }

    .illustration-block {
        height: 200px;
    }

    .hero-illustration {
        width: 150px;
        height: 180px;
    }
}
