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

html {
    scroll-behavior: smooth;
}

body {
    background: #0a0a0a;
    color: #a09080;
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    /* palette refs: #0f0f0f #111111 #2a3a2a #6b3a2a */
}

/* === Noise Grain Overlay === */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
}

/* === Kanji Watermarks === */
.kanji-watermark {
    position: absolute;
    font-family: 'Noto Serif JP', serif;
    font-weight: 200;
    font-size: clamp(8rem, 20vw, 16rem);
    color: rgba(196, 164, 89, 0.04);
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.kanji-hero {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.kanji-mid {
    top: 30%;
    right: 5%;
    animation: kanji-drift 30s ease-in-out infinite alternate;
}

.kanji-bottom {
    position: fixed;
    bottom: 10%;
    left: 5%;
    animation: kanji-drift-2 35s ease-in-out infinite alternate;
}

@keyframes kanji-drift {
    from { transform: translateY(0); }
    to { transform: translateY(-30px); }
}

@keyframes kanji-drift-2 {
    from { transform: translateY(0); }
    to { transform: translateY(25px); }
}

/* === Hero Section === */
.hero {
    height: 100vh;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: clamp(3.5rem, 9vw, 7rem);
    color: #d4c8b8;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.hero-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: #a09080;
    opacity: 0;
    margin-top: 1.5rem;
    letter-spacing: 0.15em;
    animation: subtitle-fade 2s ease-out 3s forwards;
}

@keyframes subtitle-fade {
    to { opacity: 0.6; }
}

/* === Rain Particles === */
.rain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.rain-drop {
    position: absolute;
    width: 1px;
    background: linear-gradient(to bottom, rgba(196, 164, 89, 0.2), transparent);
    animation: rain-fall linear infinite;
}

@keyframes rain-fall {
    0% { transform: translateY(-20px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* === Hero Crack SVG === */
.hero-crack {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.crack-path {
    stroke: #c4a459;
    stroke-width: 1.5px;
    fill: none;
    filter: drop-shadow(0 0 4px rgba(196, 164, 89, 0.3));
}

.crack-main-1, .crack-main-2 {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: crack-draw 8s ease-out 0.5s forwards;
}

.crack-branch-1, .crack-branch-2, .crack-branch-3 {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: crack-draw-branch 4s ease-out 4s forwards;
    stroke-width: 1px;
    opacity: 0.7;
}

@keyframes crack-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes crack-draw-branch {
    to { stroke-dashoffset: 0; }
}

/* === Section Cracks === */
.section-crack {
    position: absolute;
    left: 0;
    width: 100%;
    height: 200px;
    pointer-events: none;
    z-index: 0;
}

.section-crack:first-of-type {
    top: 15%;
}

.section-crack-2 {
    bottom: 20%;
}

.crack-section-1, .crack-section-2 {
    stroke: #c4a459;
    stroke-width: 1.5px;
    fill: none;
    filter: drop-shadow(0 0 6px rgba(196, 164, 89, 0.25));
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 3s ease-out;
}

.crack-section-1.revealed, .crack-section-2.revealed {
    stroke-dashoffset: 0;
}

/* === Collection Section === */
.collection {
    position: relative;
    padding: clamp(4rem, 8vh, 8rem) clamp(1rem, 4vw, 4rem);
    max-width: 1400px;
    margin: 0 auto;
}

/* === Card Grid === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(0.5rem, 1.5vw, 1.5rem);
    margin-bottom: clamp(2rem, 4vh, 4rem);
}

.card {
    background: rgba(15, 15, 15, 0.6);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    position: relative;
    border-left: 1px solid rgba(196, 164, 89, 0.12);
    transition: border-color 400ms ease-out, background 400ms ease-out;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 600ms ease-out, transform 600ms ease-out, border-color 400ms ease-out;
}

.card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    border-color: rgba(196, 164, 89, 0.3);
    background: linear-gradient(135deg, rgba(196, 164, 89, 0.05) 0%, transparent 60%), rgba(15, 15, 15, 0.6);
}

.card-span-4 { grid-column: span 4; }
.card-span-5 { grid-column: span 5; }
.card-span-6 { grid-column: span 6; }
.card-span-7 { grid-column: span 7; }
.card-span-8 { grid-column: span 8; }

.card h2 {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: #d4c8b8;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.card p {
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
    line-height: 1.8;
}

/* === Card Botanicals & Geometrics === */
.card-botanical, .card-geometric {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    display: block;
}

/* === Chipped Card Effect === */
.card.chipped {
    clip-path: polygon(0 0, 100% 0, 100% 85%, 92% 100%, 0 100%);
}

/* === Gold Seam Divider === */
.gold-seam {
    height: 2px;
    border: none;
    background: linear-gradient(90deg, transparent 0%, #c4a459 20%, #d4b76a 50%, #c4a459 80%, transparent 100%);
    opacity: 0;
    margin: clamp(3rem, 6vh, 6rem) auto;
    width: 80%;
    transition: opacity 1s ease-out;
}

.gold-seam.revealed {
    opacity: 0.7;
}

/* === Floating Geometric Accents === */
.floating-geometric {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.geo-1 {
    top: 25%;
    right: 8%;
    width: 80px;
    height: 80px;
    animation: spin 60s linear infinite;
}

.geo-2 {
    bottom: 30%;
    left: 6%;
    width: 60px;
    height: 60px;
    animation: spin 45s linear infinite reverse;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* === Footer === */
.footer {
    padding: clamp(6rem, 15vh, 12rem) 0;
    background: #0a0a0a;
    text-align: center;
    position: relative;
}

.footer-botanical {
    width: 60px;
    height: 120px;
    display: block;
    margin: 0 auto 2rem;
}

.footer-domain {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    color: rgba(160, 144, 128, 0.3);
    letter-spacing: 0.2em;
}

/* === Responsive === */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .card-span-4, .card-span-5, .card-span-6, .card-span-7, .card-span-8 {
        grid-column: span 1;
    }

    .card {
        padding: clamp(1.5rem, 5vw, 2.5rem);
    }

    .floating-geometric {
        display: none;
    }

    .section-crack {
        display: none;
    }
}
