/* ===================================================
   renai.party — Wabi-Sabi Gathering
   Palette: #3D2B1F #8B5E3C #C49A6C #E8DBC8 #F5F0E8 #A67B5B #6B4226 #D4C5A9
   Fonts: Cormorant Garamond, DM Mono, Lora
   =================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #E8DBC8;
    color: #3D2B1F;
    font-family: 'Lora', serif;
    font-size: 17px;
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

/* --- SVG Defs (hidden) --- */
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* --- Navigation --- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 24px 48px;
    transition: opacity 0.6s ease;
}

.site-nav.hidden {
    opacity: 0;
    pointer-events: none;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.wordmark {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 22px;
    letter-spacing: 0.08em;
    color: #3D2B1F;
    user-select: none;
}

.dot-menu {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.dot-menu span {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #8B5E3C;
    transition: opacity 0.3s ease;
}

.dot-menu:hover span {
    opacity: 0.6;
}

/* --- Blob Layer --- */
.blob-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.blobs {
    width: 100%;
    height: 100%;
}

/* Blob drift animations */
.blob-1 {
    animation: blobDrift 40s ease-in-out infinite alternate;
    animation-delay: 0s;
}
.blob-2 {
    animation: blobDrift 40s ease-in-out infinite alternate;
    animation-delay: -8s;
}
.blob-3 {
    animation: blobDrift 40s ease-in-out infinite alternate;
    animation-delay: -16s;
}
.blob-4 {
    animation: blobDrift 40s ease-in-out infinite alternate;
    animation-delay: -24s;
}
.blob-5 {
    animation: blobDrift 40s ease-in-out infinite alternate;
    animation-delay: -32s;
}

@keyframes blobDrift {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(18px, -12px) scale(1.03); }
    66%  { transform: translate(-12px, 20px) scale(0.97); }
    100% { transform: translate(10px, 8px) scale(1.02); }
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 120px 80px 80px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(72px, 12vw, 160px);
    line-height: 0.92;
    color: #3D2B1F;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
}

.hero-sub {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: #8B5E3C;
    text-transform: lowercase;
    line-height: 2;
}

/* --- Cluster Sections --- */
.cluster {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
}

.cluster-inner {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
}

.cluster-label {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #A67B5B;
    text-transform: lowercase;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.cluster-label.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Block Grid --- */
.block-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 24px;
    align-items: start;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }

/* Intentional 12px nudge on every third card */
.card-nudge {
    position: relative;
    top: 12px;
    left: 12px;
}

/* --- Glassmorphic Cards --- */
.glass-card {
    position: relative;
    background: rgba(245, 240, 232, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(166, 123, 91, 0.3);
    border-radius: 18px 12px 22px 8px;
    padding: 36px 32px;
    min-height: 200px;
    box-shadow: 0 2px 24px rgba(61, 43, 31, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    transition: box-shadow 0.3s ease, opacity 0.7s ease, transform 0.7s ease;
}

.glass-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.glass-card:hover {
    box-shadow: 0 8px 40px rgba(61, 43, 31, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Varied min-heights for organic feel */
.glass-card:nth-child(3n+1) { min-height: 220px; }
.glass-card:nth-child(3n+2) { min-height: 240px; }
.glass-card:nth-child(3n)   { min-height: 200px; }

/* Asymmetric radii variation per card position */
.glass-card:nth-child(2) { border-radius: 22px 8px 18px 14px; }
.glass-card:nth-child(3) { border-radius: 10px 20px 12px 24px; }
.glass-card:nth-child(4) { border-radius: 16px 22px 8px 18px; }
.glass-card:nth-child(5) { border-radius: 24px 10px 20px 12px; }
.glass-card:nth-child(6) { border-radius: 12px 18px 16px 22px; }
.glass-card:nth-child(7) { border-radius: 8px 24px 14px 20px; }

/* Noise texture overlay */
.noise-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
    filter: url(#noise);
    opacity: 0.03;
    background: #3D2B1F;
}

/* --- Card Typography --- */
.card-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.15;
    color: #3D2B1F;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.card-label {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #A67B5B;
    text-transform: lowercase;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.card-body {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.8;
    color: #3D2B1F;
    position: relative;
    z-index: 1;
}

.card-accent {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(32px, 5vw, 72px);
    line-height: 1.1;
    color: #8B5E3C;
    position: relative;
    z-index: 1;
}

.card-quote {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(22px, 3vw, 38px);
    line-height: 1.4;
    color: #6B4226;
    border: none;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.card-cite {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: #A67B5B;
    font-style: normal;
    position: relative;
    z-index: 1;
}

.card-link {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 17px;
    color: #8B5E3C;
    text-decoration: none;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.card-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #8B5E3C;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-link:hover::after {
    width: 100%;
}

/* --- Ripple --- */
.ripple-ring {
    position: absolute;
    border-radius: 50%;
    width: 240px;
    height: 240px;
    margin-left: -120px;
    margin-top: -120px;
    background: radial-gradient(circle, rgba(139, 94, 60, 0.15) 0%, transparent 70%);
    pointer-events: none;
    transform: scale(0);
    opacity: 0.15;
    animation: rippleOut 600ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
    z-index: 2;
}

@keyframes rippleOut {
    0%   { transform: scale(0); opacity: 0.15; }
    100% { transform: scale(1); opacity: 0; }
}

/* --- Ink-Wash Dividers --- */
.ink-divider {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 0 48px;
}

.ink-divider svg {
    width: 100%;
    height: 24px;
    display: block;
}

/* --- Closing Footer --- */
.closing {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #E8DBC8;
    margin-top: 80px;
}

.closing-line {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 24px;
    color: #A67B5B;
    text-align: center;
    letter-spacing: 0.04em;
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
    .site-nav {
        padding: 20px 24px;
    }

    .hero-section {
        padding: 100px 24px 60px;
    }

    .cluster-inner {
        padding: 0 24px;
    }

    .block-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .span-2,
    .span-3,
    .span-4,
    .span-5 {
        grid-column: span 1;
    }

    .card-nudge {
        top: 0;
        left: 0;
    }

    .ink-divider {
        padding: 0 24px;
    }

    .hero-heading {
        font-size: clamp(60px, 18vw, 120px);
    }
}
