/* ============================================================
   monopole.one — Complete Stylesheet
   ============================================================ */

/* ============================================================
   1. ROOT & VARIABLES
   ============================================================ */

:root {
    /* Colors from Design */
    --color-deep-bg: #1C1A17;
    --color-card-bg: #242118;
    --color-ghost-numeral: #3A3530;
    --color-warm-parchment: #D4C8B0;
    --color-body-text: #B0A898;
    --color-caption-text: #8A8070;
    --color-sienna-accent: #A0522D;
    --color-olive-earth: #8B7355;
    --color-forest-green: #6B8F71;
    --color-slate-cool: #708090;
    --color-collage-parchment: #D4C8B0;
    --color-photo-dark: #6B6050;
    --color-photo-light: #4A4438;
    --color-card-accent: #6A6458;
    --color-hero-text: #A09888;

    /* Typography */
    --font-display: "Playfair Display", serif;
    --font-serif: "Baskervville", serif;
    --font-mono: "IBM Plex Mono", monospace;

    /* Sizing */
    --spacing-unit: 1rem;
    --gap-masonry: 24px;

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: all 0.8s ease-out;
}

/* ============================================================
   2. RESET & BASE STYLES
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    background-color: var(--color-deep-bg);
    color: var(--color-body-text);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ============================================================
   3. HERO SECTION
   ============================================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--color-deep-bg);
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.ghost-numeral {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: clamp(15rem, 30vw, 25rem);
    font-weight: 700;
    color: var(--color-ghost-numeral);
    opacity: 1;
    line-height: 1;
    z-index: 1;
    pointer-events: none;
    letter-spacing: -0.05em;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 600px;
    padding: var(--spacing-unit) 2rem;
    animation: fadeInUp 1.2s ease-out 0.5s both;
}

.domain-name {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 400;
    color: var(--color-warm-parchment);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--color-body-text);
    line-height: 1.6;
    opacity: 0.9;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   4. MASONRY GRID SECTION
   ============================================================ */

.masonry-container {
    background-color: var(--color-deep-bg);
    padding: 4rem 2rem;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-masonry);
    max-width: 1400px;
    margin: 0 auto;
    grid-auto-rows: auto;
}

/* Card Sizing Variations */
.card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-ghost-numeral);
    border-radius: 2px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 250px;
    transition: var(--transition-smooth);
    animation: slideInFade 0.6s ease-out backwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.25s; }
.card:nth-child(5) { animation-delay: 0.3s; }
.card:nth-child(6) { animation-delay: 0.35s; }
.card:nth-child(7) { animation-delay: 0.4s; }
.card:nth-child(8) { animation-delay: 0.45s; }
.card:nth-child(9) { animation-delay: 0.5s; }
.card:nth-child(10) { animation-delay: 0.55s; }

.card-tall {
    grid-row: span 2;
    min-height: 500px;
}

.card-large {
    grid-row: span 2;
    min-height: 480px;
}

.card-medium {
    grid-row: span 1;
    min-height: 300px;
}

.card-small {
    grid-row: span 1;
    min-height: 200px;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    background-color: var(--color-ghost-numeral);
    border-color: var(--color-warm-parchment);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(139, 115, 85, 0.15);
}

.card-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-caption-text);
    padding-bottom: 1rem;
}

.card-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: var(--color-warm-parchment);
    letter-spacing: 0.01em;
}

.card-content {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.card-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-body-text);
    margin-bottom: 1rem;
}

.card-content p:last-child {
    margin-bottom: 0;
}

.search-list {
    list-style: none;
    padding: 0;
}

.search-list li {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-body-text);
    margin-bottom: 0.8rem;
    padding-left: 1.2rem;
    position: relative;
}

.search-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-forest-green);
    font-weight: bold;
}

.search-list li strong {
    color: var(--color-caption-text);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-caption-text);
    padding-top: 1rem;
}

.label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-forest-green);
    background-color: rgba(107, 143, 113, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 2px;
}

/* Responsive Masonry Grid */
@media (max-width: 1200px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-tall,
    .card-large {
        grid-row: span 1;
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0;
    }

    .masonry-container {
        padding: 2rem 1rem;
    }

    .card {
        min-height: auto;
        padding: 1.5rem;
    }

    .card-tall,
    .card-large,
    .card-medium,
    .card-small {
        grid-row: span 1;
        min-height: auto;
    }
}

/* ============================================================
   5. CLOSING SECTION
   ============================================================ */

.closing-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-deep-bg);
    overflow: hidden;
    padding: 4rem 2rem;
}

#spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle 150px at center, rgba(139, 115, 85, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.closing-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 700px;
    animation: fadeInUp 1s ease-out;
}

.closing-statement {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--color-warm-parchment);
    line-height: 1.4;
    margin-bottom: 2rem;
    letter-spacing: 0.04em;
}

.closing-footnote {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--color-body-text);
    line-height: 1.6;
}

/* ============================================================
   6. TYPOGRAPHY UTILITIES
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.01em;
}

p {
    font-family: var(--font-serif);
    font-weight: 400;
}

strong {
    font-weight: 500;
    color: var(--color-warm-taupe);
}

em, i {
    font-style: italic;
}

/* ============================================================
   7. ANIMATIONS & INTERACTIONS
   ============================================================ */

@keyframes particleFloat {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes subtleGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(176, 168, 152, 0.3);
    }
    50% {
        text-shadow: 0 0 40px rgba(176, 168, 152, 0.6);
    }
}

.spotlight-active {
    opacity: 1 !important;
}

/* ============================================================
   8. SCROLLBAR STYLING
   ============================================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background-color: var(--color-deep-bg);
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-caption-text);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-body-text);
}

/* ============================================================
   9. SELECTION STYLING
   ============================================================ */

::selection {
    background-color: var(--color-ghost-numeral);
    color: var(--color-warm-parchment);
}

::-moz-selection {
    background-color: var(--color-brown);
    color: var(--color-primary);
}

/* ============================================================
   10. UTILITY CLASSES
   ============================================================ */

.hidden {
    display: none;
}

.invisible {
    visibility: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
