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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #0a0a0a;
    color: #e8e0d0;
    overflow-x: hidden;
}

/* === TYPOGRAPHY === */
.monolith-title,
.folio-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 0.85;
}

.folio-prose,
.monolith-subtitle,
.colophon-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    line-height: 1.6;
}

.folio-number,
.colophon-mono {
    font-family: 'Recursive', monospace;
    font-weight: 400;
    letter-spacing: 0.15em;
}

/* === FOLIO BASE === */
.folio {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* === MONOLITH === */
.folio-monolith {
    background: #1a1714;
    flex-direction: column;
    gap: 0;
}

.monolith-title {
    font-size: clamp(5rem, 15vw, 20rem);
    color: #e8e0d0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.monolith-dot {
    color: #c9a84c;
}

.monolith-rule {
    width: 120px;
    height: 2px;
    background: #c9a84c;
    margin: 2rem auto;
    opacity: 0;
    animation: fadeRule 1.5s ease 0.8s forwards;
}

.monolith-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #9a9080;
    font-style: italic;
    text-align: center;
    opacity: 0;
    animation: fadeIn 2s ease 1.2s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 2s ease 2s forwards;
}

.scroll-line {
    display: block;
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, #c9a84c, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

/* === FOLIO SECTIONS === */
.folio-dark {
    background: #1a1714;
}

.folio-light {
    background: #2a2520;
}

.folio-content {
    max-width: 800px;
    width: 100%;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.folio-number {
    position: absolute;
    top: 2rem;
    right: 3rem;
    font-size: 1rem;
    color: #8b7340;
    opacity: 0.6;
}

.folio-heading {
    font-size: clamp(3rem, 10vw, 8rem);
    color: #e8e0d0;
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.folio-heading.visible {
    opacity: 1;
    transform: translateY(0);
}

.folio-prose {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: #9a9080;
    text-align: center;
    max-width: 600px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
}

.folio-prose.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === DIPLOMATIC OBJECTS === */
.diplomatic-object {
    position: relative;
    width: 200px;
    height: 200px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1s ease 0.2s, transform 1s ease 0.2s;
}

.diplomatic-object.visible {
    opacity: 1;
    transform: scale(1);
}

/* --- The Seal --- */
.seal-object {
    display: flex;
    align-items: center;
    justify-content: center;
}

.seal-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid #c9a84c;
}

.seal-ring-outer {
    width: 200px;
    height: 200px;
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.15), inset 0 0 20px rgba(201, 168, 76, 0.05);
}

.seal-ring-middle {
    width: 150px;
    height: 150px;
    border-color: #8b7340;
    box-shadow: 0 0 15px rgba(139, 115, 64, 0.1);
}

.seal-ring-inner {
    width: 100px;
    height: 100px;
    border-color: #c9a84c;
    box-shadow: 0 0 10px rgba(201, 168, 76, 0.2);
}

.seal-core {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #c9a84c, #8b7340, #c9a84c, #8b7340, #c9a84c);
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.3);
}

/* --- The Pen --- */
.pen-object {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pen-body {
    position: absolute;
    width: 12px;
    height: 140px;
    background: linear-gradient(90deg, #2a2520, #8b7340, #c9a84c, #8b7340, #2a2520);
    border-radius: 3px 3px 0 0;
    transform: perspective(300px) rotateY(-5deg);
    box-shadow: 3px 3px 15px rgba(0,0,0,0.5);
}

.pen-nib {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 25px solid #c9a84c;
    top: calc(50% + 70px);
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.4));
}

.pen-clip {
    position: absolute;
    width: 3px;
    height: 50px;
    background: #c9a84c;
    top: calc(50% - 70px);
    left: calc(50% + 8px);
    border-radius: 0 0 3px 3px;
    box-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}

.pen-band {
    position: absolute;
    width: 18px;
    height: 4px;
    background: #c9a84c;
    top: calc(50% - 20px);
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(201, 168, 76, 0.3);
}

/* --- The Table --- */
.table-object {
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-surface {
    position: absolute;
    width: 180px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2520, #1a1714);
    border: 2px solid #8b7340;
    transform: perspective(400px) rotateX(55deg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), inset 0 0 30px rgba(139, 115, 64, 0.1);
    top: 30%;
}

.table-leg {
    position: absolute;
    width: 3px;
    height: 40px;
    background: linear-gradient(180deg, #8b7340, #2a2520);
}

.table-leg-1 { bottom: 20%; left: 30%; }
.table-leg-2 { bottom: 20%; right: 30%; }
.table-leg-3 { bottom: 15%; left: 40%; }
.table-leg-4 { bottom: 15%; right: 40%; }

.table-cloth {
    position: absolute;
    width: 100px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(139, 37, 0, 0.3), transparent);
    top: 35%;
    transform: perspective(400px) rotateX(55deg);
}

/* --- The Envelope --- */
.envelope-object {
    display: flex;
    align-items: center;
    justify-content: center;
}

.envelope-body {
    position: absolute;
    width: 160px;
    height: 100px;
    background: linear-gradient(135deg, #2a2520, #1a1714);
    border: 1px solid #8b7340;
    box-shadow: 5px 5px 20px rgba(0,0,0,0.4);
}

.envelope-flap {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-top: 55px solid #2a2520;
    top: calc(50% - 50px);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

.envelope-flap::after {
    content: '';
    position: absolute;
    top: -56px;
    left: -80px;
    width: 160px;
    height: 1px;
    background: #8b7340;
}

.envelope-seal {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #8b2500, #c9a84c, #8b2500);
    box-shadow: 0 0 15px rgba(139, 37, 0, 0.4);
    top: calc(50% - 5px);
}

/* --- The Key --- */
.key-object {
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-bow {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 6px solid #c9a84c;
    top: 20%;
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.2), inset 0 0 10px rgba(201, 168, 76, 0.1);
}

.key-shaft {
    position: absolute;
    width: 6px;
    height: 80px;
    background: linear-gradient(90deg, #8b7340, #c9a84c, #8b7340);
    top: calc(20% + 50px);
    box-shadow: 2px 2px 10px rgba(0,0,0,0.4);
}

.key-bit {
    position: absolute;
    width: 15px;
    height: 4px;
    background: #c9a84c;
    left: calc(50% + 3px);
}

.key-bit-1 { top: calc(20% + 100px); }
.key-bit-2 { top: calc(20% + 110px); }
.key-bit-3 { top: calc(20% + 120px); width: 10px; }

/* === COLOPHON === */
.folio-colophon {
    background: #0a0a0a;
    min-height: 50vh;
}

.colophon-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.colophon-domain {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8e0d0;
}

.colophon-rule {
    width: 60px;
    height: 1px;
    background: #c9a84c;
}

.colophon-text {
    font-size: 1.1rem;
    color: #9a9080;
    font-style: italic;
}

.colophon-mono {
    font-size: 0.85rem;
    color: #8b7340;
    text-transform: uppercase;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeRule {
    from { opacity: 0; width: 0; }
    to { opacity: 1; width: 120px; }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* Slow rotation for seal rings */
.seal-object.visible .seal-ring-outer {
    animation: rotateSlow 30s linear infinite;
}

.seal-object.visible .seal-ring-middle {
    animation: rotateSlow 20s linear infinite reverse;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Gold shimmer on headings */
.folio-heading.visible {
    background: linear-gradient(90deg, #e8e0d0 0%, #c9a84c 50%, #e8e0d0 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
