/* =============================================
   archetype.works - Styles
   Japanese-Minimal meets Art Deco
   ============================================= */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.02em;
    color: #5c4a3a;
    background-color: #f5f0e8;
    overflow-x: hidden;
    position: relative;
}

/* --- Leather Texture Overlay (global) --- */
#leather-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(46, 33, 24, 0.08) 100%);
}

#leather-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#leather-grain);
    opacity: 0.06;
    background-color: #ede6d8;
}

/* --- Navigation --- */
#site-nav {
    position: fixed;
    top: 24px;
    left: 32px;
    z-index: 100;
}

.nav-domain {
    font-family: 'Poiret One', 'Arial', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.18em;
    color: #4a3728;
    text-decoration: none;
    text-transform: lowercase;
    transition: color 0.3s ease;
}

.nav-domain:hover {
    color: #b08860;
}

/* --- Plate System --- */
.plate {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
}

.content-plate {
    padding-top: 60px;
    padding-bottom: 60px;
}

/* --- Hero Plate --- */
#hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding-top: 0;
    padding-bottom: 0;
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* --- Archetype Seal --- */
#archetype-seal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 1;
    transition: opacity 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

#archetype-seal.seal-hidden {
    opacity: 0;
}

.seal-circle {
    width: 80px;
    height: 80px;
    border: 1px solid #b08860;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seal-letter {
    font-family: 'Poiret One', 'Arial', sans-serif;
    font-size: 48px;
    font-weight: 400;
    color: #4a3728;
    line-height: 1;
}

.seal-line {
    width: 120px;
    height: 1px;
    background-color: #b08860;
    position: relative;
}

.seal-line::before,
.seal-line::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    background-color: #b08860;
    transform: translateY(-50%) rotate(45deg);
}

.seal-line::before {
    left: -3px;
}

.seal-line::after {
    right: -3px;
}

/* --- Hero Title --- */
#hero-title {
    font-family: 'Poiret One', 'Arial', sans-serif;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    font-weight: 400;
    letter-spacing: 0.18em;
    color: #4a3728;
    text-transform: uppercase;
    line-height: 1.15;
    text-align: center;
    min-height: 1.2em;
}

/* --- Typewriter Effect --- */
.typewriter-text {
    display: inline;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 0.9em;
    background-color: #b08860;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink-cursor 530ms step-end infinite;
    opacity: 0;
}

.typewriter-cursor.active {
    opacity: 1;
}

.typewriter-cursor.fade-out {
    animation: cursor-fade-out 530ms step-end 3 forwards;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes cursor-fade-out {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Scroll Indicator --- */
#scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

#scroll-indicator.visible {
    opacity: 1;
}

.scroll-chevron {
    width: 12px;
    height: 12px;
    border-right: 2px solid #9a8a6e;
    border-bottom: 2px solid #9a8a6e;
    transform: rotate(45deg);
    animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(6px); }
}

/* --- Diamond Chain Divider --- */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 640px;
    margin: 0 auto;
    padding: 60px 24px;
    position: relative;
    z-index: 1;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #c8b898;
}

.diamond {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #b08860;
    transform: rotate(45deg);
    margin: 0 16px;
    flex-shrink: 0;
}

/* --- Plate Headings --- */
.plate-heading {
    font-family: 'Poiret One', 'Arial', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 400;
    letter-spacing: 0.18em;
    color: #4a3728;
    line-height: 1.15;
    margin-bottom: 28px;
    text-transform: uppercase;
    min-height: 1.4em;
}

/* --- Plate Body --- */
.plate-body {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 800ms ease, transform 800ms ease;
}

.plate-body.revealed {
    opacity: 1;
    transform: translateY(0);
}

.plate-body p {
    margin-bottom: 1.2em;
}

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

.plate-body em {
    font-weight: 600;
    font-style: italic;
}

/* --- Meta Text (Cutive Mono) --- */
.meta-text {
    font-family: 'Cutive Mono', 'Courier New', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: #9a8a6e;
    margin-top: 1.5em;
}

/* --- Leather Patch --- */
.leather-patch {
    background-color: #d4c5a8;
    border: 1px solid #c8b898;
    border-radius: 12px;
    padding: 40px 36px;
    position: relative;
    overflow: hidden;
}

.leather-patch::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#leather-grain);
    opacity: 0.08;
    background-color: #d4c5a8;
    pointer-events: none;
    border-radius: 12px;
}

.leather-patch:hover::after {
    opacity: 0.10;
}

/* --- Chevron Border --- */
.chevron-border {
    position: relative;
    padding-top: 80px;
}

.chevron-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background:
        linear-gradient(45deg, #c8b898 25%, transparent 25%) 0 0 / 16px 8px,
        linear-gradient(-45deg, #c8b898 25%, transparent 25%) 0 0 / 16px 8px;
    background-position: 0 0, 8px 0;
    background-repeat: repeat-x;
}

/* --- Sunburst Corners --- */
.sunburst-plate {
    position: relative;
    overflow: hidden;
}

.sunburst-plate::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    width: 48px;
    height: 48px;
    background: conic-gradient(
        #c8b898 0deg, transparent 22.5deg,
        #c8b898 45deg, transparent 67.5deg,
        #c8b898 90deg, transparent 112.5deg,
        #c8b898 135deg, transparent 157.5deg,
        #c8b898 180deg, transparent 202.5deg,
        #c8b898 225deg, transparent 247.5deg,
        #c8b898 270deg, transparent 292.5deg,
        #c8b898 315deg, transparent 337.5deg,
        #c8b898 360deg
    );
    border-radius: 0 0 48px 0;
    opacity: 0.4;
    clip-path: inset(0 0 0 0);
}

.sunburst-plate::after {
    content: '';
    position: absolute;
    bottom: -12px;
    right: -12px;
    width: 48px;
    height: 48px;
    background: conic-gradient(
        #c8b898 0deg, transparent 22.5deg,
        #c8b898 45deg, transparent 67.5deg,
        #c8b898 90deg, transparent 112.5deg,
        #c8b898 135deg, transparent 157.5deg,
        #c8b898 180deg, transparent 202.5deg,
        #c8b898 225deg, transparent 247.5deg,
        #c8b898 270deg, transparent 292.5deg,
        #c8b898 315deg, transparent 337.5deg,
        #c8b898 360deg
    );
    border-radius: 48px 0 0 0;
    opacity: 0.4;
    clip-path: inset(0 0 0 0);
}

/* --- Stepped Border (Art Deco Cornice) --- */
.stepped-border {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
    height: 12px;
    background: transparent;
    margin-top: 40px;
}

.stepped-border::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: #c8b898;
    box-shadow:
        0 3px 0 0 #c8b898,
        3px 3px 0 0 #c8b898,
        -3px 3px 0 0 #c8b898,
        0 6px 0 0 #c8b898,
        6px 6px 0 0 #c8b898,
        -6px 6px 0 0 #c8b898;
}

/* --- Footer --- */
#site-footer {
    text-align: center;
    padding: 80px 24px;
    position: relative;
    z-index: 1;
}

.footer-signature {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    letter-spacing: 0.04em;
    color: #2e2118;
}

/* --- Animation States --- */
.content-plate .plate-heading .typewriter-text {
    visibility: hidden;
}

.content-plate.animated .plate-heading .typewriter-text {
    visibility: visible;
}

/* --- Mobile Responsive --- */
@media (max-width: 640px) {
    #site-nav {
        top: 16px;
        left: 20px;
    }

    .nav-domain {
        font-size: 12px;
    }

    .plate {
        padding-left: 24px;
        padding-right: 24px;
    }

    .divider {
        padding: 40px 24px;
    }

    .content-plate {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .leather-patch {
        padding: 28px 24px;
    }

    .chevron-border {
        padding-top: 60px;
    }
}

/* --- Ensure no horizontal scrollbar --- */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}
