/* ============================================
   lugubrious.dev - Styles
   Palette:
     Honeycomb Warm:  #F2E8D5
     Dark Honey:      #5A4A35
     Amber Glow:      #D4A84B
     Marble Vein:     #9B8B7A
     Cream White:     #FAF6F0
     Street Charcoal: #2A2420
     Blush Rose:      #C4917A
   Fonts:
     Headlines:  Space Grotesk 600/700
     Body:       Libre Baskerville 400
     Accent:     Azeret Mono 400
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: clamp(15px, 1vw, 18px);
    line-height: 1.75;
    color: #5A4A35;
    background-color: #F2E8D5;
    overflow-x: hidden;
}

/* --- SVG Filters (hidden) --- */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ============================================
   HERO SECTION
   ============================================ */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F2E8D5;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 90%;
    max-width: 1400px;
}

#hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 12vw, 180px);
    line-height: 0.88;
    letter-spacing: -0.03em;
    color: #2A2420;
    overflow: hidden;
    padding: 0.05em 0;
}

#hero-title .letter {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.12s ease-out;
}

#hero-title .letter.visible {
    opacity: 1;
}

#hero-subtitle {
    margin-top: 0.3em;
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

#hero-subtitle.visible {
    opacity: 1;
}

.dot-dev {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(18px, 3vw, 42px);
    color: #D4A84B;
    letter-spacing: 0.02em;
}

#hero-tagline {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: clamp(14px, 1.5vw, 20px);
    color: #9B8B7A;
    margin-top: 1em;
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

#hero-tagline.visible {
    opacity: 1;
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
#portfolio {
    padding: 40px 24px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Grid Container --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   TILES - Base
   ============================================ */
.tile {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    min-height: 220px;
}

.tile-span-1 {
    grid-row-end: span 1;
}

.tile-span-2 {
    grid-row-end: span 2;
    min-height: 460px;
}

/* --- Fade Reveal --- */
.tile-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.tile-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   TILE: Text Content
   ============================================ */
.tile-text {
    background-color: #FAF6F0;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.tile-text-dark {
    background-color: #2A2420;
    color: #FAF6F0;
}

.tile-text-dark .tile-label {
    color: #D4A84B;
}

.tile-text-dark .tile-heading {
    color: #FAF6F0;
}

.tile-text-dark .tile-body {
    color: #C4917A;
}

.tile-label {
    font-family: 'Azeret Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9B8B7A;
    margin-bottom: 12px;
}

.tile-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(18px, 2vw, 28px);
    color: #2A2420;
    line-height: 1.2;
    margin-bottom: 12px;
}

.tile-body {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: clamp(15px, 1vw, 18px);
    line-height: 1.75;
    color: #5A4A35;
}

/* ============================================
   TILE: Mixed Media
   ============================================ */
.tile-media {
    position: relative;
    min-height: 280px;
}

.tile-media-tall {
    min-height: 400px;
}

.media-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.media-photo {
    filter: sepia(20%) saturate(90%) brightness(105%);
    mix-blend-mode: multiply;
}

.media-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(42, 36, 32, 0.25);
}

.media-overlay-alt {
    background: rgba(90, 74, 53, 0.35);
    align-items: flex-end;
    justify-content: flex-start;
    padding: 24px;
}

.media-overlay-blend {
    background: rgba(212, 168, 75, 0.15);
}

.overlay-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 5vw, 72px);
    color: #FAF6F0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 2px 20px rgba(42, 36, 32, 0.3);
}

.overlay-text-sm {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2.5vw, 32px);
    color: #FAF6F0;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.3;
    text-shadow: 0 2px 12px rgba(42, 36, 32, 0.4);
}

/* --- Torn Paper Edge --- */
.tile-torn-edge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    z-index: 3;
    background: #FAF6F0;
    clip-path: polygon(
        0% 40%,
        3% 55%,
        6% 35%,
        10% 50%,
        14% 30%,
        18% 48%,
        22% 28%,
        26% 45%,
        30% 32%,
        34% 52%,
        38% 26%,
        42% 46%,
        46% 30%,
        50% 50%,
        54% 28%,
        58% 44%,
        62% 32%,
        66% 52%,
        70% 24%,
        74% 48%,
        78% 30%,
        82% 50%,
        86% 28%,
        90% 44%,
        94% 32%,
        97% 50%,
        100% 35%,
        100% 100%,
        0% 100%
    );
}

/* ============================================
   TILE: Marble Accent
   ============================================ */
.tile-marble {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marble-texture {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(135deg, #d0c8bc 0%, #e8e0d4 25%, #c9bfb0 40%, #ddd5c8 60%, #c4b8a8 75%, #e0d8cc 100%);
    overflow: hidden;
}

.marble-texture::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            110deg,
            transparent 0px,
            transparent 8px,
            rgba(155, 139, 122, 0.15) 8px,
            rgba(155, 139, 122, 0.15) 9px,
            transparent 9px,
            transparent 28px
        ),
        repeating-linear-gradient(
            160deg,
            transparent 0px,
            transparent 14px,
            rgba(155, 139, 122, 0.1) 14px,
            rgba(155, 139, 122, 0.1) 15px,
            transparent 15px,
            transparent 40px
        ),
        repeating-linear-gradient(
            95deg,
            transparent 0px,
            transparent 20px,
            rgba(196, 145, 122, 0.08) 20px,
            rgba(196, 145, 122, 0.08) 21px,
            transparent 21px,
            transparent 50px
        );
}

.marble-texture::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 200px 80px at 30% 40%, rgba(155, 139, 122, 0.12) 0%, transparent 100%),
        radial-gradient(ellipse 150px 60px at 70% 60%, rgba(196, 145, 122, 0.1) 0%, transparent 100%),
        radial-gradient(ellipse 100px 200px at 50% 50%, rgba(155, 139, 122, 0.06) 0%, transparent 100%);
}

.tile-marble-alt .marble-texture {
    background:
        linear-gradient(225deg, #c9bfb0 0%, #ddd5c8 30%, #c4b8a8 55%, #e0d8cc 80%, #d0c8bc 100%);
}

.marble-overlay-text {
    position: relative;
    z-index: 2;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 56px);
    color: #2A2420;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.7;
    mix-blend-mode: multiply;
}

/* ============================================
   INTERSTITIAL QUOTES
   ============================================ */
.interstitial {
    width: 100%;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 40px;
    margin: 32px 0;
    background-color: #EDE2CF;
    position: relative;
    clip-path: polygon(
        0% 0%,
        100% 0%,
        100% 100%,
        97% 92%,
        94% 100%,
        90% 94%,
        86% 100%,
        82% 92%,
        78% 100%,
        74% 95%,
        70% 100%,
        66% 93%,
        62% 100%,
        58% 94%,
        54% 100%,
        50% 92%,
        46% 100%,
        42% 95%,
        38% 100%,
        34% 93%,
        30% 100%,
        26% 94%,
        22% 100%,
        18% 92%,
        14% 100%,
        10% 95%,
        6% 100%,
        3% 93%,
        0% 100%
    );
}

.interstitial-quote {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: clamp(14px, 1.2vw, 18px);
    color: #9B8B7A;
    text-align: center;
    max-width: 700px;
    line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
#site-footer {
    position: relative;
    width: 100%;
    padding: 80px 24px;
    background-color: #2A2420;
    text-align: center;
    overflow: hidden;
}

#site-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

.footer-content {
    position: relative;
    z-index: 2;
}

.footer-domain {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 6vw, 80px);
    color: #D4A84B;
    letter-spacing: -0.02em;
    display: block;
    margin-bottom: 16px;
    text-shadow: 0 0 40px rgba(212, 168, 75, 0.3);
}

.footer-signoff {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: clamp(14px, 1.2vw, 18px);
    color: #9B8B7A;
    letter-spacing: 0.02em;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 560px) {
    .tile-span-2 {
        min-height: 300px;
    }

    .tile-media-tall {
        min-height: 300px;
    }

    .tile-text {
        padding: 24px 20px;
    }

    #portfolio {
        padding: 24px 16px 40px;
    }

    .interstitial {
        padding: 20px 24px;
        margin: 20px 0;
    }
}
