/* ===========================================
   bada.studio - Victorian Engraving Workshop
   =========================================== */

/* --- CSS Custom Properties --- */
:root {
    --oxblood: #4a0e1c;
    --burgundy-press: #7a1b3a;
    --blush-proof: #c4707e;
    --oxidized-copper: #b87333;
    --laid-paper: #f2e8dc;
    --marble-dust: #d4cbc0;
    --mahogany: #1e0d12;
    --press-black: #1a1016;
    --noise-url: 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='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--mahogany);
    color: var(--laid-paper);
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Noise Texture Mixin (applied via ::before) --- */
.noise-dark::before,
.threshold::before,
.press-room::before,
.marble-slab::before,
.panel-1::before,
.panel-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--noise-url);
    background-repeat: repeat;
    background-size: 300px 300px;
    opacity: 0.06;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 1;
}

.noise-light::before,
.panel-2::before,
.colophon::before,
.specimen-cabinet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--noise-url);
    background-repeat: repeat;
    background-size: 300px 300px;
    opacity: 0.04;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 1;
}

/* --- Fixed Monogram --- */
.monogram {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 100;
    width: 48px;
    height: 48px;
    border: 1px solid var(--oxidized-copper);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    background: rgba(30, 13, 18, 0.85);
}

.monogram-letter {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--oxidized-copper);
    text-shadow: 0 0 1px rgba(74, 14, 28, 0.3);
    mix-blend-mode: normal;
    line-height: 1;
}

.monogram-dot {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.7rem;
    color: var(--oxidized-copper);
    line-height: 1;
    opacity: 0.7;
}

/* --- Section 1: The Threshold --- */
.threshold {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: var(--mahogany);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.threshold-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(4rem, 10vw, 8rem);
    color: var(--blush-proof);
    opacity: 0;
    letter-spacing: 0.02em;
    line-height: 1.1;
    animation: fadeInTitle 2s ease-out 0.3s forwards;
}

.threshold-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--oxidized-copper);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    opacity: 0;
    margin-top: 1.5rem;
    animation: fadeInTitle 1.5s ease-out 2.5s forwards;
}

@keyframes fadeInTitle {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* --- Section 2: The Press Room --- */
.press-room {
    position: relative;
    width: 100%;
    min-height: 180vh;
    padding: clamp(4rem, 8vh, 8rem) 0;
    background-color: var(--mahogany);
    overflow: hidden;
}

.press-room-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 3rem);
    position: relative;
}

.press-panel {
    position: relative;
    padding: clamp(2rem, 4vw, 4rem);
    transform: rotate(var(--tilt, 0deg));
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    clip-path: inset(50% 50% 50% 50%);
}

.press-panel.revealed {
    clip-path: inset(0%);
}

.panel-1 {
    grid-column: 1 / 7;
    grid-row: 1;
    background-color: var(--burgundy-press);
    z-index: 3;
    margin-bottom: -60px;
}

.panel-2 {
    grid-column: 4 / 11;
    grid-row: 2;
    background-color: var(--laid-paper);
    color: var(--press-black);
    z-index: 4;
    margin-top: clamp(2rem, 5vh, 5rem);
}

.panel-2 .panel-body {
    color: var(--press-black);
}

.panel-3 {
    grid-column: 7 / 13;
    grid-row: 3;
    background-color: var(--mahogany);
    z-index: 5;
    margin-top: clamp(2rem, 5vh, 5rem);
    border: 1px solid rgba(184, 115, 51, 0.15);
}

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

.panel-body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    line-height: 1.72;
    color: var(--laid-paper);
}

.panel-quote {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    color: var(--oxidized-copper);
    letter-spacing: 0.02em;
    line-height: 1.35;
    border: none;
    padding: 0;
    margin: 0;
}

/* --- Ornate Border System --- */
.ornate-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.ornate-corner {
    position: absolute;
    width: 24px;
    height: 24px;
}

.corner-tl {
    top: 12px;
    left: 12px;
    border-top: 2px solid rgba(184, 115, 51, 0.5);
    border-left: 2px solid rgba(184, 115, 51, 0.5);
}

.corner-tr {
    top: 12px;
    right: 12px;
    border-top: 2px solid rgba(184, 115, 51, 0.5);
    border-right: 2px solid rgba(184, 115, 51, 0.5);
}

.corner-bl {
    bottom: 12px;
    left: 12px;
    border-bottom: 2px solid rgba(184, 115, 51, 0.5);
    border-left: 2px solid rgba(184, 115, 51, 0.5);
}

.corner-br {
    bottom: 12px;
    right: 12px;
    border-bottom: 2px solid rgba(184, 115, 51, 0.5);
    border-right: 2px solid rgba(184, 115, 51, 0.5);
}

.ornate-diamond {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(184, 115, 51, 0.45);
    transform: rotate(45deg);
}

.diamond-top {
    top: 10px;
    left: 50%;
    margin-left: -3px;
}

.diamond-bottom {
    bottom: 10px;
    left: 50%;
    margin-left: -3px;
}

.diamond-left {
    left: 10px;
    top: 50%;
    margin-top: -3px;
}

.diamond-right {
    right: 10px;
    top: 50%;
    margin-top: -3px;
}

/* Inner border shadow */
.press-panel .ornate-border::after,
.specimen-plate .ornate-border::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    box-shadow: inset 0 0 0 1px rgba(184, 115, 51, 0.25);
    pointer-events: none;
}

/* --- Hover interactions --- */
.press-panel:hover {
    transform: rotate(calc(var(--tilt, 0deg) + 0.5deg));
}

.press-panel:hover .ornate-corner {
    border-color: var(--oxidized-copper);
}

.press-panel:hover .ornate-diamond {
    background: var(--oxidized-copper);
}

/* --- Section 3: The Specimen Cabinet --- */
.specimen-cabinet {
    position: relative;
    width: 100%;
    min-height: 170vh;
    padding: clamp(4rem, 8vh, 8rem) 0;
    background-color: var(--laid-paper);
    overflow: hidden;
}

.specimen-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(2rem, 4vw, 4rem);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 3rem);
    position: relative;
    z-index: 2;
}

.specimen {
    transform: rotate(var(--tilt, 0deg));
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    clip-path: inset(50% 50% 50% 50%);
}

.specimen.revealed {
    clip-path: inset(0%);
}

.specimen:nth-child(1) {
    grid-column: 2 / 6;
}

.specimen:nth-child(2) {
    grid-column: 7 / 11;
    margin-top: clamp(3rem, 8vh, 8rem);
}

.specimen:nth-child(3) {
    grid-column: 3 / 7;
    margin-top: clamp(1rem, 3vh, 3rem);
}

.specimen:nth-child(4) {
    grid-column: 8 / 12;
    margin-top: clamp(2rem, 5vh, 5rem);
}

.specimen:hover {
    transform: rotate(calc(var(--tilt, 0deg) + 0.5deg));
}

.specimen:hover .ornate-corner {
    border-color: var(--oxidized-copper);
}

.specimen:hover .ornate-diamond {
    background: var(--oxidized-copper);
}

.specimen-plate {
    position: relative;
    aspect-ratio: 3 / 4;
    background-color: var(--mahogany);
    overflow: hidden;
}

/* --- Specimen Art Patterns --- */
.specimen-art {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    opacity: 0.5;
}

.art-radial {
    background:
        radial-gradient(ellipse at 30% 40%, rgba(122, 27, 58, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(184, 115, 51, 0.25) 0%, transparent 50%),
        repeating-conic-gradient(from 0deg at 50% 50%, rgba(196, 112, 126, 0.1) 0deg 10deg, transparent 10deg 20deg);
}

.art-linear {
    background:
        repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(122, 27, 58, 0.15) 8px, rgba(122, 27, 58, 0.15) 9px),
        repeating-linear-gradient(-45deg, transparent, transparent 12px, rgba(184, 115, 51, 0.1) 12px, rgba(184, 115, 51, 0.1) 13px),
        linear-gradient(180deg, rgba(74, 14, 28, 0.3) 0%, transparent 100%);
}

.art-concentric {
    background:
        radial-gradient(circle at 50% 50%, transparent 20%, rgba(122, 27, 58, 0.15) 21%, transparent 22%),
        radial-gradient(circle at 50% 50%, transparent 35%, rgba(184, 115, 51, 0.12) 36%, transparent 37%),
        radial-gradient(circle at 50% 50%, transparent 50%, rgba(196, 112, 126, 0.1) 51%, transparent 52%),
        radial-gradient(circle at 50% 50%, transparent 65%, rgba(122, 27, 58, 0.08) 66%, transparent 67%),
        radial-gradient(circle at 50% 50%, transparent 80%, rgba(184, 115, 51, 0.06) 81%, transparent 82%);
}

.art-grid {
    background:
        repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(122, 27, 58, 0.12) 30px, rgba(122, 27, 58, 0.12) 31px),
        repeating-linear-gradient(90deg, transparent, transparent 30px, rgba(184, 115, 51, 0.08) 30px, rgba(184, 115, 51, 0.08) 31px),
        radial-gradient(ellipse at 50% 50%, rgba(196, 112, 126, 0.15) 0%, transparent 70%);
}

/* --- Specimen Labels --- */
.specimen-label {
    padding: 1rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.label-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--press-black);
}

.label-meta {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--burgundy-press);
    opacity: 0.7;
}

/* --- Section 4: The Marble Slab --- */
.marble-slab {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: var(--marble-dust);
    background-image:
        repeating-linear-gradient(115deg, transparent, transparent 60px, rgba(74, 14, 28, 0.06) 60px, rgba(74, 14, 28, 0.06) 61px),
        repeating-linear-gradient(165deg, transparent, transparent 90px, rgba(184, 115, 51, 0.04) 90px, rgba(184, 115, 51, 0.04) 91px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.marble-line {
    width: 60%;
    height: 2px;
    z-index: 2;
    position: relative;
}

.marble-line line {
    transition: stroke-dashoffset 3s ease-in-out;
}

.marble-line.animate line {
    stroke-dashoffset: 0;
}

/* --- Section 5: The Colophon --- */
.colophon {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: var(--laid-paper);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(4rem, 8vh, 8rem) clamp(1rem, 3vw, 3rem);
    overflow: hidden;
}

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

.colophon-line {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    margin-bottom: 1.5rem;
}

.colophon-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.colophon-studio {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--press-black);
}

.colophon-year {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--burgundy-press);
}

.colophon-statement {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--press-black);
    letter-spacing: 0.02em;
}

.colophon-contact {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--burgundy-press);
}

/* --- Decorative Rule --- */
.decorative-rule {
    position: relative;
    width: 200px;
    height: 20px;
    margin: 3rem auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.decorative-rule::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(184, 115, 51, 0.4);
}

.decorative-rule::after {
    content: '';
    position: absolute;
    top: calc(50% - 3px);
    left: 10%;
    right: 10%;
    height: 0;
    border-top: 0.5px solid rgba(184, 115, 51, 0.3);
    border-bottom: 0.5px solid rgba(184, 115, 51, 0.3);
    padding-top: 6px;
}

.rule-diamond {
    width: 6px;
    height: 6px;
    background: var(--oxidized-copper);
    transform: rotate(45deg);
    position: relative;
    z-index: 2;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .press-room-grid {
        display: flex;
        flex-direction: column;
        gap: clamp(2rem, 4vh, 4rem);
    }

    .press-panel {
        width: 90%;
    }

    .panel-1 {
        margin-bottom: 0;
        align-self: flex-start;
    }

    .panel-2 {
        margin-top: -20px;
        align-self: flex-end;
    }

    .panel-3 {
        margin-top: -20px;
        align-self: flex-start;
        margin-left: 10%;
    }

    .specimen-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: clamp(3rem, 6vh, 6rem);
    }

    .specimen {
        width: 80%;
        max-width: 400px;
        margin-top: 0 !important;
    }

    .monogram {
        top: 1rem;
        left: 1rem;
        width: 40px;
        height: 40px;
    }

    .monogram-letter {
        font-size: 0.8rem;
    }
}
