/* ================================================
   penclo.com — Luxury Fine Stationery Atelier
   ================================================ */

:root {
    --marble-base: #F4EDE4;
    --marble-vein: #B8A99A;
    --warm-accent: #C4956A;
    --deep-ground: #1E1A17;
    --frost-tint: #D6CFC7;
    --accent-bright: #E8B4A2;

    --font-display: 'Jost', sans-serif;
    --font-body: 'Libre Baskerville', serif;
    --font-ui: 'DM Sans', sans-serif;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    scroll-behavior: smooth;
}

body.penclo {
    background: var(--marble-base);
    color: var(--deep-ground);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* ---- Monogram Navigation ---- */

.monogram-nav {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
}

.monogram {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    color: var(--deep-ground);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(30, 26, 23, 0.15);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    transition: border-color 0.3s ease;
}

.monogram:hover {
    border-color: var(--warm-accent);
}

/* ---- Nav Overlay ---- */

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 237, 228, 0.10);
    backdrop-filter: blur(40px) saturate(1.4);
    -webkit-backdrop-filter: blur(40px) saturate(1.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    clip-path: circle(0% at 3.5rem 3.5rem);
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: all;
    clip-path: circle(150% at 3.5rem 3.5rem);
    transition: clip-path 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
}

.nav-overlay-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--deep-ground);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    padding: 0.5rem 1.5rem;
    border-radius: 2px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--warm-accent);
}

/* ---- Slab Container ---- */

.slab-container {
    width: 100%;
}

/* ---- Marble Slab Sections ---- */

.slab {
    width: 100vw;
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slab.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Marble texture via CSS gradients */
.slab::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        /* Base warm ivory */
        linear-gradient(0deg, var(--marble-base), var(--marble-base)),
        /* Primary vein */
        linear-gradient(
            var(--vein-angle, 25deg),
            transparent 0%,
            transparent 40%,
            rgba(184, 169, 154, var(--vein-opacity, 0.1)) 42%,
            transparent 44%,
            transparent 60%,
            rgba(184, 169, 154, calc(var(--vein-opacity, 0.1) * 0.7)) 62%,
            transparent 64%,
            transparent 100%
        ),
        /* Secondary vein */
        linear-gradient(
            calc(var(--vein-angle, 25deg) + 70deg),
            transparent 0%,
            transparent 30%,
            rgba(184, 169, 154, calc(var(--vein-opacity, 0.1) * 0.5)) 32%,
            transparent 34%,
            transparent 70%,
            rgba(184, 169, 154, calc(var(--vein-opacity, 0.1) * 0.4)) 72%,
            transparent 74%,
            transparent 100%
        ),
        /* Radial warmth center */
        radial-gradient(
            ellipse at var(--warmth-x, 50%) var(--warmth-y, 50%),
            rgba(232, 180, 162, 0.06) 0%,
            transparent 60%
        ),
        /* Speckle noise */
        repeating-linear-gradient(
            calc(var(--vein-angle, 25deg) - 10deg),
            transparent 0px,
            transparent 3px,
            rgba(184, 169, 154, 0.03) 3px,
            rgba(184, 169, 154, 0.03) 4px
        );
    z-index: 0;
}

.slab > * {
    position: relative;
    z-index: 1;
}

/* ---- Writing Line ---- */

.writing-line {
    position: absolute;
    top: 61.8%;
    left: 0;
    right: 0;
    height: 0.5px;
    background: var(--warm-accent);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 1;
    transition: transform 1.2s ease-out;
}

.slab.visible .writing-line {
    transform: scaleX(1);
}

/* ---- Frost Panels ---- */

.frost-panel {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    box-shadow: 0 8px 32px rgba(30, 26, 23, 0.06);
    padding: 3rem 3.5rem;
    max-width: 580px;
}

.frost-panel--right {
    margin-left: auto;
    margin-right: 8vw;
}

.frost-panel--left {
    margin-left: 8vw;
    margin-right: auto;
}

.frost-panel--center-narrow {
    margin: 0 auto;
    max-width: 500px;
    text-align: center;
}

/* ---- Typography ---- */

.hero-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(3rem, 6vw, 5.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--deep-ground);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--warm-accent);
    margin-bottom: 2rem;
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1rem, 1.15vw, 1.125rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    color: rgba(30, 26, 23, 0.8);
}

.section-heading {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--deep-ground);
    margin-bottom: 2rem;
}

.narrative-column {
    max-width: 42ch;
}

.narrative-column p,
.showcase-text,
.contact-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.15vw, 1.125rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    color: rgba(30, 26, 23, 0.8);
    margin-bottom: 1.5rem;
}

.narrative-column p:last-child,
.showcase-text:last-child {
    margin-bottom: 0;
}

/* ---- Contact ---- */

.contact-link {
    display: inline-block;
    font-family: var(--font-ui);
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--warm-accent);
    text-decoration: none;
    padding: 0.8rem 2rem;
    border: 1px solid var(--warm-accent);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease, background 0.3s ease;
    margin-bottom: 2rem;
}

.contact-link:hover {
    background: rgba(196, 149, 106, 0.08);
}

.contact-meta {
    font-family: var(--font-ui);
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--frost-tint);
}

/* ---- Nib Divider ---- */

.nib-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    background: var(--marble-base);
    scroll-snap-align: none;
}

/* ---- Circuit Motifs ---- */

.circuit-motif {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.circuit-motif--bottom-left {
    bottom: 8%;
    left: 4%;
}

.circuit-motif--top-right {
    top: 10%;
    right: 4%;
}

/* ---- Ripple Effect ---- */

.ripple-target {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(232, 180, 162, 0.3);
    transform: scale(0);
    animation: ripple-expand 600ms ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-expand {
    to {
        transform: scale(3);
        opacity: 0;
    }
}

/* ---- Ink Drop Loading ---- */

.ink-drop {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(30, 26, 23, 0.4);
    transform: translate(-50%, -50%) scale(0);
    animation: ink-drop 1.5s ease-in-out;
    z-index: 2000;
    pointer-events: none;
}

@keyframes ink-drop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0.4; }
    50% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
    100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .frost-panel {
        margin: 0 1.5rem;
        padding: 2rem;
        max-width: calc(100vw - 3rem);
    }

    .frost-panel--right,
    .frost-panel--left {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }

    .monogram-nav {
        top: 1rem;
        left: 1rem;
    }

    .circuit-motif {
        display: none;
    }
}
