/* ============================================================
   addrenvoy.com - Art Deco Diplomatic Dossier
   Color Palette: Navy-Gold-Cream diplomatic triad
   Fonts: Playfair Display, Libre Baskerville, Raleway
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Raleway:wght@300;400&display=swap');

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

:root {
    --diplomatic-navy: #0F1628;
    --deep-embassy: #1A2240;
    --burnished-gold: #C9A43E;
    --bright-brass: #E8C84A;
    --ivory-parchment: #F2EADB;
    --warm-linen: #D4C9B8;
    --aged-bronze: #8A8070;
    --antique-gold: #8B7025;
    --pattern-navy: #1E2A4A;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Libre Baskerville', 'Times New Roman', serif;
    --font-accent: 'Raleway', 'Helvetica Neue', sans-serif;

    --brushed-metal: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.08) 50%, transparent 60%);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--diplomatic-navy);
    color: var(--ivory-parchment);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.8;
    overflow-x: hidden;
}

/* ============================================================
   PERSISTENT VIEWPORT FRAME
   ============================================================ */

.viewport-frame {
    position: fixed;
    top: 24px;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 100;
    pointer-events: none;
}

/* Frame border lines - 3px gold */
.frame-line {
    position: absolute;
    background: var(--burnished-gold);
    background-image: var(--brushed-metal);
    transform: scaleX(0);
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.frame-top {
    top: 0;
    left: 48px;
    right: 48px;
    height: 3px;
    transform-origin: center center;
}

.frame-right {
    top: 48px;
    right: 0;
    bottom: 48px;
    width: 3px;
    transform: scaleY(0);
    transform-origin: center center;
}

.frame-right.visible {
    transform: scaleY(1);
}

.frame-bottom {
    bottom: 0;
    left: 48px;
    right: 48px;
    height: 3px;
    transform-origin: center center;
}

.frame-left {
    top: 48px;
    left: 0;
    bottom: 48px;
    width: 3px;
    transform: scaleY(0);
    transform-origin: center center;
}

.frame-left.visible {
    transform: scaleY(1);
}

/* Corner ornaments */
.frame-corner {
    position: absolute;
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.frame-corner.visible {
    opacity: 0.7;
}

.frame-corner.brightened {
    opacity: 1;
}

.frame-corner-tl { top: 0; left: 0; }
.frame-corner-tr { top: 0; right: 0; }
.frame-corner-bl { bottom: 0; left: 0; }
.frame-corner-br { bottom: 0; right: 0; }

/* ============================================================
   MAIN CONTENT CONTAINER
   ============================================================ */

.dossier-content {
    position: relative;
    z-index: 10;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================================
   SECTIONS - General
   ============================================================ */

.dossier-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 32px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.dossier-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   VIEWPORT 1: THE SEAL (Hero)
   ============================================================ */

.hero-section {
    text-align: center;
    padding: 0 32px;
    opacity: 1;
    transform: none;
}

/* Emblem */
.hero-emblem {
    margin-bottom: 2rem;
    opacity: 0;
}

.hero-emblem.revealed {
    opacity: 1;
    transition: opacity 0.6s ease-out;
}

.emblem-svg {
    width: 220px;
    height: 220px;
}

/* Sun rays draw animation */
.sun-ray {
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    opacity: 0;
}

.hero-emblem.revealed .sun-ray {
    animation: drawRay 1.5s ease-out forwards;
    animation-delay: calc(var(--ray-index, 0) * 0.15s);
}

@keyframes drawRay {
    0% {
        stroke-dashoffset: 80;
        opacity: 0;
    }
    20% {
        opacity: 0.6;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.6;
    }
}

/* Emblem circles draw animation */
.emblem-circle {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    opacity: 0;
}

.hero-emblem.revealed .emblem-circle-outer {
    animation: drawCircle 2s ease-out 0.3s forwards;
}

.hero-emblem.revealed .emblem-circle-inner {
    animation: drawCircle 1.8s ease-out 0.6s forwards;
}

@keyframes drawCircle {
    0% {
        stroke-dashoffset: 400;
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
}

/* AE Monogram draw */
.monogram-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    opacity: 0;
}

.hero-emblem.revealed .monogram-path {
    animation: drawMonogram 2.5s ease-out 1s forwards;
}

@keyframes drawMonogram {
    0% {
        stroke-dashoffset: 200;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* Chevron decorative rules */
.hero-chevron-rule {
    margin-bottom: 1.5rem;
    opacity: 0;
}

.hero-chevron-rule.revealed {
    animation: fadeSlideUp 1s ease-out forwards;
}

.hero-chevron-lower {
    margin-top: 2.5rem;
    opacity: 0;
}

.hero-chevron-lower.revealed {
    animation: fadeSlideUp 1s ease-out 0.3s forwards;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 0.6;
        transform: translateY(0);
    }
}

/* Hero title */
.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.5rem);
    letter-spacing: 0.08em;
    color: var(--ivory-parchment);
    opacity: 0;
    transform: translateY(15px);
}

.hero-title.revealed {
    animation: titleReveal 1.5s ease-out forwards;
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero tagline */
.hero-tagline {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--burnished-gold);
    margin-top: 1rem;
    opacity: 0;
}

.hero-tagline.revealed {
    animation: taglineReveal 1.2s ease-out forwards;
}

@keyframes taglineReveal {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

/* ============================================================
   SECTION DIVIDER BANDS
   ============================================================ */

.section-divider {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    height: 64px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.section-divider.visible {
    opacity: 1;
}

.divider-pattern {
    opacity: 0;
}

.section-divider.visible .divider-pattern {
    animation: patternSweep 0.8s ease-out forwards;
}

@keyframes patternSweep {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.6;
    }
}

.divider-chevron,
.divider-zigzag {
    opacity: 0;
}

.section-divider.visible .divider-chevron,
.section-divider.visible .divider-zigzag {
    animation: chevronAppear 0.6s ease-out forwards;
}

.section-divider.visible .divider-chevron:nth-child(1) { animation-delay: 0.0s; }
.section-divider.visible .divider-chevron:nth-child(2) { animation-delay: 0.03s; }
.section-divider.visible .divider-chevron:nth-child(3) { animation-delay: 0.06s; }
.section-divider.visible .divider-chevron:nth-child(4) { animation-delay: 0.09s; }
.section-divider.visible .divider-chevron:nth-child(5) { animation-delay: 0.12s; }
.section-divider.visible .divider-chevron:nth-child(6) { animation-delay: 0.15s; }
.section-divider.visible .divider-chevron:nth-child(7) { animation-delay: 0.18s; }
.section-divider.visible .divider-chevron:nth-child(8) { animation-delay: 0.21s; }
.section-divider.visible .divider-chevron:nth-child(9) { animation-delay: 0.24s; }
.section-divider.visible .divider-chevron:nth-child(10) { animation-delay: 0.27s; }
.section-divider.visible .divider-chevron:nth-child(11) { animation-delay: 0.30s; }
.section-divider.visible .divider-chevron:nth-child(12) { animation-delay: 0.33s; }
.section-divider.visible .divider-chevron:nth-child(13) { animation-delay: 0.36s; }
.section-divider.visible .divider-chevron:nth-child(14) { animation-delay: 0.39s; }
.section-divider.visible .divider-chevron:nth-child(15) { animation-delay: 0.42s; }
.section-divider.visible .divider-chevron:nth-child(16) { animation-delay: 0.45s; }
.section-divider.visible .divider-chevron:nth-child(17) { animation-delay: 0.48s; }
.section-divider.visible .divider-chevron:nth-child(18) { animation-delay: 0.51s; }
.section-divider.visible .divider-chevron:nth-child(19) { animation-delay: 0.54s; }
.section-divider.visible .divider-chevron:nth-child(20) { animation-delay: 0.57s; }

@keyframes chevronAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 0.7;
        transform: scale(1);
    }
}

/* ============================================================
   DOSSIER SPREADS (Two-column magazine layout)
   ============================================================ */

.spread-section {
    padding: 80px 0;
}

.spread-layout {
    display: flex;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    max-width: 960px;
}

.spread-left {
    width: 45%;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spread-right {
    width: 45%;
    padding: 32px;
}

/* Decorative SVG illustrations */
.spread-decoration {
    margin-bottom: 2rem;
    opacity: 0.5;
}

.spread-deco-svg {
    width: 200px;
    height: 200px;
    display: block;
    margin: 0 auto;
}

/* Sunburst hover rotation */
.sunburst-hover-target:hover .deco-sunburst-group {
    animation: sunburstRotate 10s linear infinite;
}

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

/* Spread titles */
.spread-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--ivory-parchment);
    letter-spacing: 0.04em;
    text-align: center;
    font-variant: small-caps;
}

/* Spread body text */
.spread-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--warm-linen);
    margin-bottom: 1.5rem;
}

.spread-text:last-child {
    margin-bottom: 0;
}

/* Vertical Column Divider with diamond ornaments */
.spread-divider {
    width: 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 0;
    min-height: 300px;
}

.divider-line {
    flex: 1;
    width: 1px;
    background: var(--burnished-gold);
    opacity: 0.5;
}

.divider-diamond {
    padding: 12px 0;
    opacity: 0.6;
    transition: transform 0.3s ease-out;
}

.divider-diamond:hover {
    transform: scale(1.2);
}

/* ============================================================
   STEPPED PYRAMID
   ============================================================ */

.stepped-pyramid {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2.5rem;
    gap: 4px;
}

.pyramid-step {
    height: 8px;
    background: var(--burnished-gold);
    background-image: var(--brushed-metal);
    opacity: 0;
    transform: scaleX(0);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.pyramid-step.visible {
    opacity: 0.7;
    transform: scaleX(1);
}

.step-1 { width: 40px; transition-delay: 0s; }
.step-2 { width: 70px; transition-delay: 0.15s; }
.step-3 { width: 100px; transition-delay: 0.3s; }
.step-4 { width: 130px; transition-delay: 0.45s; }
.step-5 { width: 160px; transition-delay: 0.6s; }

/* ============================================================
   VIEWPORT 5: THE VAULT (Inverted palette)
   ============================================================ */

.vault-section {
    background-color: var(--burnished-gold);
    background-image: var(--brushed-metal);
    min-height: 100vh;
    padding: 80px 32px;
    position: relative;
}

.vault-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 60px;
}

/* Concentric rectangular borders (the vault doors) */
.vault-frame {
    position: absolute;
    border: 2px solid var(--diplomatic-navy);
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.vault-frame.visible {
    opacity: 1;
    transform: scale(1);
}

.vault-frame-1 {
    top: 0; left: 0; right: 0; bottom: 0;
    border-width: 3px;
    transition-delay: 0s;
}

.vault-frame-2 {
    top: 16px; left: 16px; right: 16px; bottom: 16px;
    border-width: 2px;
    transition-delay: 0.2s;
}

.vault-frame-3 {
    top: 30px; left: 30px; right: 30px; bottom: 30px;
    border-width: 1.5px;
    transition-delay: 0.4s;
}

.vault-frame-4 {
    top: 42px; left: 42px; right: 42px; bottom: 42px;
    border-width: 1px;
    transition-delay: 0.6s;
}

.vault-frame-5 {
    top: 52px; left: 52px; right: 52px; bottom: 52px;
    border-width: 0.5px;
    transition-delay: 0.8s;
}

.vault-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
}

.vault-fan {
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.vault-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--diplomatic-navy);
    letter-spacing: 0.08em;
    font-variant: small-caps;
    margin-bottom: 1.5rem;
}

.vault-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--diplomatic-navy);
    max-width: 480px;
    margin: 0 auto 1.5rem;
}

.vault-seal {
    margin-top: 1rem;
    opacity: 0.4;
}

/* ============================================================
   FOOTER
   ============================================================ */

.dossier-footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 80px 2rem 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-decoration {
    opacity: 0.4;
}

.footer-text {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    color: var(--burnished-gold);
    opacity: 0.3;
}

.footer-label {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.6875rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--aged-bronze);
    opacity: 0.4;
}

/* ============================================================
   BACKGROUND WATERMARK (faded geometric at 5% opacity)
   ============================================================ */

body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, transparent 30%, transparent 30%),
                repeating-conic-gradient(from 0deg, var(--burnished-gold) 0deg 2deg, transparent 2deg 30deg);
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .spread-layout {
        flex-direction: column;
    }

    .spread-left,
    .spread-right {
        width: 100%;
    }

    .spread-divider {
        width: 100%;
        flex-direction: row;
        min-height: auto;
        padding: 16px 0;
    }

    .divider-line {
        flex: 1;
        height: 1px;
        width: auto;
    }

    .divider-diamond {
        padding: 0 12px;
    }

    .viewport-frame {
        top: 12px;
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .frame-top,
    .frame-bottom {
        left: 24px;
        right: 24px;
    }

    .frame-right,
    .frame-left {
        top: 24px;
        bottom: 24px;
    }

    .vault-content {
        padding: 60px 40px;
    }

    .vault-frame-1 { top: 0; left: 0; right: 0; bottom: 0; }
    .vault-frame-2 { top: 10px; left: 10px; right: 10px; bottom: 10px; }
    .vault-frame-3 { top: 20px; left: 20px; right: 20px; bottom: 20px; }
    .vault-frame-4 { top: 28px; left: 28px; right: 28px; bottom: 28px; }
    .vault-frame-5 { top: 36px; left: 36px; right: 36px; bottom: 36px; }

    .dossier-section {
        padding: 60px 16px;
    }
}
