/* ==========================================================================
   maljosim.com - Wabi-Sabi Imperfect Ceramic Aesthetic
   ========================================================================== */

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

/* Ceramic texture noise (subtle grain at 2% opacity) */
body {
    background-color: #FAF6EF;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.85;
    color: #5C4A3A;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    color: #3D2B1F;
    letter-spacing: 0.04em;
}

.annotation {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 14px;
    color: #8B7355;
    margin-top: 2em;
}

/* ==========================================================================
   Opening Frame
   ========================================================================== */

.opening-frame {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    position: relative;
    padding: 0 8%;
}

.site-title {
    font-size: 72px;
    font-weight: 300;
    color: #3D2B1F;
    letter-spacing: 0.04em;
    position: absolute;
    left: 30%;
    top: 40%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.site-title.revealed {
    opacity: 1;
}

.site-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 20px;
    color: #8B7355;
    letter-spacing: 0.06em;
    position: absolute;
    left: 34%;
    top: 48%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out 0.4s;
}

.site-subtitle.revealed {
    opacity: 1;
}

#seal-hero {
    position: absolute;
    left: 28%;
    top: 56%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out 0.8s;
}

#seal-hero.revealed {
    opacity: 1;
}

/* ==========================================================================
   Content Vessels
   ========================================================================== */

.content-vessel {
    background: #F5EDE3;
    border: 1px solid rgba(139, 115, 85, 0.2);
    border-radius: 40px 20px 35px 25px;
    padding: 60px 50px;
    max-width: 600px;
    position: relative;
    box-shadow: 0 4px 30px rgba(61, 43, 31, 0.06);
    transition: box-shadow 600ms ease;
}

.content-vessel:hover {
    box-shadow: 0 0 40px rgba(201, 168, 76, 0.06);
}

/* Alternating alignment */
.vessel-left {
    margin-left: 10%;
    margin-right: auto;
}

.vessel-right {
    margin-right: 10%;
    margin-left: auto;
}

.vessel-center {
    margin-left: auto;
    margin-right: auto;
}

/* Fade-in for vessels */
.fade-vessel {
    opacity: 0;
    transition: opacity 800ms ease-in-out;
}

.fade-vessel.revealed {
    opacity: 1;
}

.vessel-title {
    font-size: 40px;
    font-weight: 300;
    margin-bottom: 0.6em;
    line-height: 1.2;
}

.vessel-body p {
    margin-bottom: 2em;
    max-width: 100%;
}

.vessel-body p:last-child {
    margin-bottom: 0;
}

/* Analysis text - poetic short lines */
.analysis-text {
    max-width: 400px;
}

.analysis-text p {
    margin-bottom: 2em;
    line-height: 2;
}

/* ==========================================================================
   Brush Stroke Dividers
   ========================================================================== */

.brush-stroke {
    margin-bottom: 2em;
    max-width: 300px;
}

/* ==========================================================================
   Kintsugi Dividers (between sections)
   ========================================================================== */

.kintsugi-divider {
    width: 80%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: center;
}

.kintsugi-divider svg {
    display: block;
}

/* Kintsugi line animation */
.kintsugi-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.5s ease-in-out;
}

.kintsugi-line.drawn {
    stroke-dashoffset: 0;
}

/* ==========================================================================
   Kintsugi Border Lines (on vessels)
   ========================================================================== */

.kintsugi-border-line {
    position: absolute;
    pointer-events: none;
}

.kintsugi-border-top {
    top: -5px;
    left: 40px;
    right: 40px;
    height: 10px;
}

.kintsugi-border-left {
    left: -5px;
    top: 40px;
    bottom: 40px;
    width: 10px;
}

.kintsugi-border-right {
    right: -5px;
    top: 40px;
    bottom: 40px;
    width: 10px;
}

/* ==========================================================================
   Inter-Section Marks
   ========================================================================== */

.inter-section-mark {
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gold-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C9A84C;
    opacity: 0.6;
}

/* ==========================================================================
   Crack Line Dividers
   ========================================================================== */

.crack-line-divider {
    display: flex;
    justify-content: center;
    height: 160px;
    align-items: center;
}

/* ==========================================================================
   Seal (potter's mark)
   ========================================================================== */

.seal {
    display: inline-block;
}

.seal svg {
    display: block;
}

/* ==========================================================================
   Closing Frame
   ========================================================================== */

.closing-frame {
    min-height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 8%;
}

.closing-content {
    text-align: center;
}

.closing-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 28px;
    color: #3D2B1F;
    letter-spacing: 0.04em;
    line-height: 1.6;
    max-width: 500px;
    margin-bottom: 3em;
}

#seal-closing {
    margin-bottom: 2em;
}

.closing-domain {
    font-family: 'Karla', sans-serif;
    font-size: 14px;
    color: #C8B89A;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   Subtle Glaze Overlay (on body via pseudo-element)
   ========================================================================== */

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: rgba(201, 168, 76, 0.08);
    mix-blend-mode: multiply;
    opacity: 0.3;
    z-index: 9999;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .site-title {
        font-size: 42px;
        left: 25%;
        top: 35%;
    }

    .site-subtitle {
        font-size: 16px;
        left: 28%;
        top: 44%;
    }

    #seal-hero {
        left: 24%;
        top: 52%;
    }

    .content-vessel {
        margin-left: 5% !important;
        margin-right: 5% !important;
        padding: 40px 30px;
        max-width: calc(100% - 10%);
    }

    .vessel-title {
        font-size: 30px;
    }

    .closing-text {
        font-size: 22px;
    }

    .kintsugi-divider {
        width: 90%;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 32px;
        left: 20%;
        top: 32%;
    }

    .site-subtitle {
        font-size: 14px;
        left: 22%;
        top: 42%;
    }

    .content-vessel {
        padding: 30px 22px;
        border-radius: 30px 15px 25px 18px;
    }

    .vessel-title {
        font-size: 24px;
    }

    .inter-section-mark {
        height: 100px;
    }

    .crack-line-divider {
        height: 100px;
    }
}
