/* ===========================================
   bada.casa — Y2K Futurism x Botanical Atelier
   =========================================== */

/* --- Palette Reference ---
   #0c1228 - Primary navy (void/background)
   #141e3a - Deep navy (card backgrounds)
   #1a2444 - Brushed metal accent
   #4a6a9e - Metallic highlight
   #5a7a6a - Botanical sage
   #8a7a5a - Warm metallic (leaf veins)
   #8a96ad - Muted silver-blue
   #c0c8d8 - Steel silver
   #d4dce8 - Display text silver-blue
   #e8edf4 - Chrome white
*/

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0c1228;
    color: #c0c8d8;
    font-family: 'Albert Sans', sans-serif;
    font-size: 15px;
    line-height: 1.65;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Fixed Background Watermark --- */
.watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Dela Gothic One', cursive;
    font-size: clamp(80px, 15vw, 260px);
    color: #c0c8d8;
    opacity: 0.04;
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
    letter-spacing: -0.03em;
    user-select: none;
    will-change: transform;
}

/* --- Background Organic Blobs --- */
.blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    animation: blobBreathe 12s ease-in-out infinite;
}

.blob-1 {
    width: 800px;
    height: 800px;
    top: -100px;
    right: -200px;
}

.blob-2 {
    width: 700px;
    height: 700px;
    top: 900px;
    left: -250px;
}

.blob-3 {
    width: 750px;
    height: 750px;
    top: 2400px;
    right: -150px;
    animation-delay: -4s;
}

.blob-4 {
    width: 850px;
    height: 850px;
    top: 4200px;
    left: -200px;
    animation-delay: -8s;
}

@keyframes blobBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* --- Hero / Narrative Opening --- */
.hero {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 30vh;
    background: transparent;
}

.hero-content {
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    padding: 0 80px;
}

.hero-title {
    font-family: 'Dela Gothic One', cursive;
    font-size: clamp(64px, 10vw, 120px);
    color: #d4dce8;
    text-shadow: 0 2px 40px rgba(100, 140, 200, 0.15);
    letter-spacing: -0.03em;
    line-height: 1;
    opacity: 0;
    transition: opacity 1s ease;
}

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

.hero-line {
    width: 0;
    height: 1px;
    background-color: #4a6a9e;
    margin: 16px 0;
    transition: width 0.8s ease-out;
}

.hero-line.drawn {
    width: 200px;
}

/* --- Masonry Grid --- */
.masonry-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 80px;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    grid-auto-flow: dense;
}

/* Card Heights */
.card-short {
    min-height: 280px;
}

.card-medium {
    min-height: 420px;
}

.card-tall {
    min-height: 560px;
}

/* --- Specimen Cards --- */
.specimen-card {
    background-color: #141e3a;
    border: 1px solid rgba(74, 106, 158, 0.08);
    box-shadow: 0 0 0 1px rgba(74, 106, 158, 0.08);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.specimen-card:hover {
    border-color: rgba(74, 106, 158, 0.4);
    box-shadow: 0 0 0 1px rgba(74, 106, 158, 0.4);
}

/* Brushed metal texture */
.brushed-metal {
    background: repeating-linear-gradient(
        3deg,
        #141e3a,
        #141e3a 1px,
        #1a2444 1px,
        #1a2444 2px
    );
}

.card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 28px 32px;
    height: 100%;
}

/* --- Leaf Illustrations --- */
.leaf-illustration {
    width: 120px;
    max-height: 180px;
    margin-bottom: 28px;
    flex-shrink: 0;
}

.leaf-vein {
    stroke: #8a7a5a;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 1.2s ease-out;
}

.specimen-card.veins-drawn .leaf-vein,
.specimen-card:hover .leaf-vein {
    stroke-dashoffset: 0;
}

/* --- Card Text --- */
.card-text {
    text-align: center;
}

.card-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: #5a7a6a;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.card-title {
    font-family: 'Dela Gothic One', cursive;
    font-size: 20px;
    color: #d4dce8;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    line-height: 1.2;
}

.card-description {
    font-family: 'Albert Sans', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #8a96ad;
    font-weight: 400;
}

/* --- Breathing Rows --- */
.breathing-row {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.breathing-blob {
    position: absolute;
    width: 800px;
    height: 800px;
    animation: blobRotate 60s linear infinite;
    z-index: 0;
}

@keyframes blobRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.breathing-text {
    position: relative;
    z-index: 1;
    font-family: 'Dela Gothic One', cursive;
    font-size: clamp(48px, 8vw, 96px);
    color: #c0c8d8;
    opacity: 0;
    letter-spacing: -0.04em;
    line-height: 1.1;
    text-align: center;
    transition: opacity 0.8s ease;
}

.breathing-text.visible {
    opacity: 0.6;
}

.breathing-text-underline {
    display: block;
    width: 0;
    height: 1.5px;
    background: #4a6a9e;
    margin: 16px auto 0;
    transition: width 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.breathing-text.visible .breathing-text-underline {
    width: 120px;
}

/* --- Specimen Garden --- */
.specimen-garden {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    padding: 120px 40px;
    overflow: hidden;
}

.garden-inner {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    height: 700px;
}

.garden-leaf {
    position: absolute;
    opacity: 0;
    transition: opacity 1s ease;
}

.garden-leaf.visible {
    opacity: 1;
}

.garden-leaf.visible .leaf-vein {
    stroke-dashoffset: 0;
}

.garden-leaf-1 {
    width: 140px;
    top: 5%;
    left: 5%;
    transform: rotate(-15deg);
}

.garden-leaf-2 {
    width: 100px;
    top: 15%;
    left: 30%;
    transform: rotate(10deg);
}

.garden-leaf-3 {
    width: 90px;
    top: 0;
    left: 55%;
    transform: rotate(-5deg);
}

.garden-leaf-4 {
    width: 120px;
    top: 10%;
    right: 10%;
    transform: rotate(20deg);
}

.garden-leaf-5 {
    width: 110px;
    top: 45%;
    left: 12%;
    transform: rotate(8deg);
}

.garden-leaf-6 {
    width: 100px;
    top: 50%;
    left: 42%;
    transform: rotate(-12deg);
}

.garden-leaf-7 {
    width: 80px;
    top: 40%;
    right: 25%;
    transform: rotate(25deg);
}

.garden-leaf-8 {
    width: 110px;
    top: 55%;
    right: 5%;
    transform: rotate(-8deg);
}

/* --- Navigation Pill --- */
.nav-pill {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 32px;
    padding: 14px 36px;
    background: rgba(12, 18, 40, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(160, 180, 220, 0.15);
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-pill.visible {
    opacity: 1;
}

.nav-link {
    font-family: 'Albert Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #8a96ad;
    text-decoration: none;
    position: relative;
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #e8edf4;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: #4a6a9e;
    transition: width 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

/* --- Footer --- */
.site-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 48px 40px 96px;
}

.footer-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: #5a7a6a;
    text-transform: uppercase;
}

.footer-divider {
    display: block;
    width: 40px;
    height: 1px;
    background-color: #4a6a9e;
    opacity: 0.4;
}

/* --- Responsive --- */

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

    .hero-content {
        padding: 0 40px;
    }

    .masonry-wrapper {
        padding: 0 40px;
    }
}

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

    .hero-content {
        padding: 0 24px;
    }

    .masonry-wrapper {
        padding: 0 24px;
    }

    .hero-title {
        font-size: clamp(48px, 15vw, 80px);
    }

    .breathing-text {
        font-size: clamp(36px, 10vw, 64px);
    }

    .nav-pill {
        gap: 20px;
        padding: 12px 24px;
    }

    .garden-inner {
        height: 900px;
    }

    .garden-leaf-1 { top: 0; left: 5%; width: 110px; }
    .garden-leaf-2 { top: 12%; left: 55%; width: 80px; }
    .garden-leaf-3 { top: 22%; left: 20%; width: 70px; }
    .garden-leaf-4 { top: 32%; right: 5%; width: 100px; }
    .garden-leaf-5 { top: 44%; left: 10%; width: 90px; }
    .garden-leaf-6 { top: 55%; left: 50%; width: 80px; }
    .garden-leaf-7 { top: 66%; right: 15%; width: 70px; }
    .garden-leaf-8 { top: 78%; left: 30%; width: 90px; }

    .site-footer {
        flex-direction: column;
        gap: 12px;
    }

    .footer-divider {
        width: 1px;
        height: 20px;
    }

    .card-inner {
        padding: 32px 20px 24px;
    }
}
