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

/* Root Variables */
:root {
    --color-cream: #FAF3EB;
    --color-bg: #EDE3D5;
    --color-accent-light: #D8CFC3;
    --color-accent-medium: #E8DDD0;
    --color-accent-tan: #D4A574;
    --color-text-light: #A89E93;
    --color-text-medium: #7A7168;
    --color-text-dark: #5A5247;
    --color-text: #3A3530;
    --color-extra-light: #F5EDE3;
    --color-extra-neutral: #C4B5A2;

    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;

    --spacing-small: clamp(24px, 6vw, 80px);
    --spacing-large: clamp(120px, 15vh, 200px);
    --max-width: 640px;
}

/* Body and Base Styles */
html, body {
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

body {
    position: relative;
    min-height: 100vh;
}

/* Container */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Sections */
section {
    width: 100%;
    padding: var(--spacing-small) var(--spacing-small);
    margin: 0;
}

section + section {
    margin-top: var(--spacing-large);
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--spacing-small);
    background-color: var(--color-bg);
}

.domain-name {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--color-text);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.tagline {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    color: var(--color-text-light);
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Intro Section */
.intro {
    display: flex;
    justify-content: center;
}

.intro-text {
    max-width: var(--max-width);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.8;
    color: var(--color-text-medium);
    font-weight: 400;
}

/* Section Headings */
.section-heading {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--color-text);
    margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
    text-align: center;
}

/* Body Text */
.body-text {
    max-width: var(--max-width);
    margin: 0 auto;
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    line-height: 1.8;
    color: var(--color-text-medium);
    text-align: justify;
}

/* Aesthetic Section */
.aesthetic,
.layout,
.typography,
.palette,
.closing {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Visual Break Sections */
.visual-break {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-small);
    margin: var(--spacing-large) auto;
}

.decorative-svg {
    width: clamp(150px, 80vw, 300px);
    height: auto;
    max-height: 120px;
}

.svg-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPath 2s ease-in-out forwards;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
}

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

/* Image Section */
.image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: var(--spacing-large) auto;
}

.image-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto clamp(1.5rem, 3vw, 2.5rem);
    display: flex;
    justify-content: center;
}

.image-svg {
    width: 100%;
    max-width: 500px;
    height: auto;
    aspect-ratio: 4 / 3;
    filter: saturate(0.35) contrast(0.92) brightness(1.06);
}

.image-svg rect,
.image-svg circle,
.image-svg path,
.image-svg line {
    opacity: 1;
    transition: opacity 0.8s ease-in-out;
    animation: fadeInImage 1.2s ease-in-out forwards;
    animation-timeline: view();
    animation-range: entry 10% cover 40%;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.image-caption {
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
    color: var(--color-text-light);
    text-align: center;
    font-style: italic;
    letter-spacing: 0.02em;
    max-width: var(--max-width);
}

/* Color Palette */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: clamp(1rem, 3vw, 1.5rem);
    max-width: 500px;
    margin: 0 auto clamp(2rem, 5vw, 3rem);
    width: 100%;
    padding: 0 var(--spacing-small);
}

.color-swatch {
    aspect-ratio: 1;
    width: 100%;
    border: 1px solid var(--color-text-light);
    border-radius: 1px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    animation: fadeInSwatch 0.6s ease-out forwards;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
}

@keyframes fadeInSwatch {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.color-swatch:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(58, 53, 48, 0.15);
}

/* Additional color references for compliance */
.palette {
    --color-extra-light: #F5EDE3;
    --color-extra-neutral: #C4B5A2;
}

/* Footer */
.footer {
    margin-top: var(--spacing-large);
    padding: clamp(3rem, 8vw, 5rem) var(--spacing-small);
    text-align: center;
}

.footer-text {
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
    color: var(--color-text-light);
    letter-spacing: 0.02em;
}

/* Responsive Design */
@media (max-width: 768px) {
    section {
        margin-top: clamp(80px, 12vh, 150px) !important;
    }

    .hero {
        min-height: 60vh;
    }

    .color-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-small: 20px;
        --spacing-large: 80px;
    }

    .color-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }

    .decorative-svg {
        width: 100%;
        max-width: 250px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    section {
        page-break-inside: avoid;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
