/* ===========================
   CSS Reset & Base Styles
   =========================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #F0EDE8;
    color: #1A1A2E;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===========================
   Typography
   =========================== */

h1, h2, h3 {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    letter-spacing: 0.01em;
}

h1 {
    font-size: clamp(2.6rem, 6.5vw, 5rem);
    color: #1A1A2E;
}

h2 {
    font-family: 'Commissioner', sans-serif;
    font-weight: 500;
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    color: #1A1A2E;
    letter-spacing: 0.01em;
    margin-bottom: 2rem;
}

h3 {
    font-family: 'Commissioner', sans-serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: #1A1A2E;
}

p {
    font-family: 'Lora', serif;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: #5A5A6E;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ===========================
   Section Styling
   =========================== */

.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(4rem, 8vh, 8rem) clamp(3rem, 10vw, 10rem);
    position: relative;
}

/* Title Section */
.title-section {
    background-color: #FAF8F4;
    justify-content: flex-start;
    align-items: center;
}

.title-container {
    width: 45%;
    padding-left: 15%;
    padding-top: 10%;
}

.main-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 5.5rem);
    color: #1A1A2E;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

/* Intro Section */
.intro-section {
    background-color: #F0EDE8;
    display: flex;
    align-items: center;
    gap: clamp(3rem, 8vw, 8rem);
}

.section-content {
    width: 45%;
    max-width: 500px;
}

.section-title {
    margin-bottom: 1.5rem;
    color: #3A2A5A;
}

.section-text {
    font-family: 'Lora', serif;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: #5A5A6E;
    line-height: 1.9;
    max-width: 450px;
}

.botanical-image {
    width: 35%;
    min-width: 250px;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, rgba(26, 106, 74, 0.1) 0%, rgba(26, 58, 106, 0.1) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(30%);
}

.botanical-image svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(26, 26, 46, 0.15));
}

/* Entries Section */
.entries-section {
    background-color: #FAF8F4;
    flex-direction: column;
    padding: clamp(4rem, 8vh, 8rem) clamp(3rem, 10vw, 10rem);
}

.entries-section .section-title {
    align-self: flex-start;
    width: 100%;
}

.entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(2rem, 5vw, 3.5rem);
    width: 100%;
    max-width: 1000px;
}

/* Card Flip Interaction */
.entry-card {
    perspective: 1000px;
    height: 320px;
    cursor: pointer;
}

.entry-card:hover {
    /* Hover effect without flip on desktop */
}

.card-face {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card-front {
    background: linear-gradient(135deg, #FAF8F4 0%, #F0EDE8 100%);
    border: 1px solid rgba(106, 90, 138, 0.2);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    z-index: 2;
    transform: rotateY(0deg);
}

.entry-card:hover .card-front {
    transform: rotateY(180deg);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.card-back {
    background: linear-gradient(135deg, #3A2A5A 0%, #1A3A6A 100%);
    color: #FAF8F4;
    transform: rotateY(-180deg);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    z-index: 1;
}

.entry-card:hover .card-back {
    transform: rotateY(0deg);
}

.card-image {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.card-image svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 6px rgba(26, 26, 46, 0.2));
}

.card-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 600;
    font-size: 1.3rem;
    color: #1A1A2E;
    margin-bottom: 0.5rem;
    text-align: center;
}

.card-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #5A5A6E;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.card-detail {
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    color: #FAF8F4;
    line-height: 1.7;
    text-align: center;
    margin: 0;
}

/* Conclusion Section */
.conclusion-section {
    background-color: #F0EDE8;
    flex-direction: column;
    align-items: center;
}

.conclusion-content {
    width: 45%;
    max-width: 550px;
    text-align: center;
}

.pull-quote {
    font-family: 'Lora', serif;
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    font-style: italic;
    color: #3A2A5A;
    line-height: 1.9;
    margin: 2rem 0;
    padding: clamp(2rem, 4vh, 3rem) 0;
    border-top: 2px solid #6A5A8A;
    border-bottom: 2px solid #6A5A8A;
}

.pull-quote p {
    margin-bottom: 1rem;
}

.quote-attribution {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #5A5A6E;
    font-style: normal;
    margin-top: 1rem;
    margin-bottom: 0;
}

.conclusion-text {
    font-family: 'Lora', serif;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: #5A5A6E;
    line-height: 1.8;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
    .section {
        flex-direction: column;
        padding: clamp(3rem, 6vh, 6rem) clamp(2rem, 6vw, 4rem);
    }

    .title-container {
        width: 100%;
        padding-left: 0;
        padding-top: 0;
    }

    .intro-section {
        flex-direction: column;
        gap: 2rem;
    }

    .section-content {
        width: 100%;
    }

    .botanical-image {
        width: 100%;
        max-width: 350px;
    }

    .entries-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
    }

    .conclusion-content {
        width: 100%;
    }

    .pull-quote {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .entries-grid {
        grid-template-columns: 1fr;
    }

    .entry-card {
        height: 280px;
    }

    .pull-quote {
        font-size: 1rem;
        padding: 1.5rem 0;
    }
}

/* ===========================
   Animations & Effects
   =========================== */

@media (prefers-reduced-motion: no-preference) {
    .entry-card {
        transition: transform 0.3s ease;
    }

    .card-front,
    .card-back {
        transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .botanical-image {
        animation: gentleGlow 4s ease-in-out infinite;
    }

    @keyframes gentleGlow {
        0%, 100% {
            filter: grayscale(30%) brightness(1);
        }
        50% {
            filter: grayscale(25%) brightness(1.05);
        }
    }
}

/* ===========================
   Ma-Negative-Space Enforcement
   =========================== */

.section {
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 55%;
    height: 100%;
    background-color: rgba(240, 237, 232, 0.3);
    pointer-events: none;
    z-index: -1;
}

.intro-section::before,
.entries-section::before,
.conclusion-section::before {
    display: none;
}

/* Color Palette Application */
:root {
    --color-charcoal: #5A5A6E;
    --color-deep-plum: #3A2A5A;
    --color-burgundy: #8A2A3A;
    --color-slate-blue: #1A3A6A;
    --color-off-white: #F0EDE8;
    --color-ivory: #FAF8F4;
    --color-mauve: #6A5A8A;
    --color-jet: #1A1A2E;
    --color-emerald: #1A6A4A;
}
