/* =============================================
   addrenvoy.com — Diplomatic Privacy Shield
   Sci-Fi HUD / Classified Briefing Interface
   ============================================= */

:root {
    --deep-void: #0B0E17;
    --midnight-steel: #1A1F2E;
    --envoy-teal: #3AAFA9;
    --diplomatic-amber: #C7884B;
    --redaction-ink: #2C3040;
    --clearance-white: #E8ECF1;
    --signal-green: #4ADE80;
    --alert-crimson: #DC2626;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

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

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

body {
    background-color: var(--deep-void);
    color: var(--clearance-white);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Coordinate Grid --- */
.coord-grid {
    position: fixed;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(58, 175, 169, 0.03) 39px, rgba(58, 175, 169, 0.03) 40px),
        repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(58, 175, 169, 0.03) 39px, rgba(58, 175, 169, 0.03) 40px);
    pointer-events: none;
    z-index: 0;
}

/* --- Security Margins --- */
.security-margin {
    position: fixed;
    top: 0;
    height: 100%;
    width: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    z-index: 50;
    border-right: 1px solid rgba(58, 175, 169, 0.08);
}

.margin-left { left: 0; }
.margin-right {
    right: 0;
    border-right: none;
    border-left: 1px solid rgba(58, 175, 169, 0.08);
}

.margin-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--envoy-teal);
    opacity: 0.4;
    animation: marginPulse 3s ease-in-out infinite;
}

@keyframes marginPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

.margin-text {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--envoy-teal);
    opacity: 0.3;
    writing-mode: vertical-rl;
    text-transform: uppercase;
}

/* --- Top Bar --- */
.topbar {
    position: fixed;
    top: 0;
    left: 40px;
    right: 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 200;
    background: rgba(11, 14, 23, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(58, 175, 169, 0.1);
}

.logotype {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--clearance-white);
}

.access-btn {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--diplomatic-amber);
    background: transparent;
    border: 1px solid var(--diplomatic-amber);
    padding: 8px 20px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.access-btn:hover {
    background: var(--diplomatic-amber);
    color: var(--deep-void);
}

/* --- Section Index --- */
.section-index {
    position: fixed;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.index-item {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: rgba(58, 175, 169, 0.3);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s ease;
    padding-left: 12px;
    border-left: 1px solid transparent;
}

.index-item.active {
    color: var(--envoy-teal);
    border-left-color: var(--envoy-teal);
}

.index-item:hover {
    color: var(--clearance-white);
}

/* --- Phases (sections) --- */
.phase {
    min-height: 100vh;
    position: relative;
    z-index: 5;
    padding: 6rem 0;
}

.content-area {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 4rem;
}

/* --- Section Rules --- */
.section-rule {
    width: calc(100% - 120px);
    margin: 0 auto;
    height: 1px;
    background: repeating-linear-gradient(
        90deg,
        rgba(58, 175, 169, 0.2) 0px,
        rgba(58, 175, 169, 0.2) 8px,
        transparent 8px,
        transparent 24px
    );
}

/* --- Hero / Seal Section --- */
#seal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
}

.hero-content {
    text-align: center;
    max-width: 700px;
}

.diplomatic-seal {
    width: 180px;
    height: 180px;
    margin: 0 auto 3rem;
}

.seal-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawSeal 2.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.6s;
}

.envelope-path {
    animation-delay: 1.2s;
}

@keyframes drawSeal {
    to { stroke-dashoffset: 0; }
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--clearance-white);
    margin-bottom: 2rem;
    min-height: 1.2em;
}

.redaction-block {
    position: relative;
}

.redaction-bar {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 8px;
    background: var(--redaction-ink);
    border-radius: 2px;
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.redaction-bar:nth-child(1) { top: 0; transition-delay: 0s; }
.redaction-bar:nth-child(2) { top: 16px; transition-delay: 0.12s; }
.redaction-bar:nth-child(3) { top: 32px; transition-delay: 0.24s; }

.redaction-bar.revealed {
    transform: scaleX(0);
}

.hero-subheadline {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--clearance-white);
    opacity: 0.8;
    margin-top: 3rem;
}

/* --- Dossier Modules --- */
.dossier-module {
    background: rgba(26, 31, 46, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(58, 175, 169, 0.4);
    position: relative;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 0 30px rgba(58, 175, 169, 0.03);
}

.dossier-module.visible {
    opacity: 1;
    transform: translateX(0);
}

.classification-strip {
    height: 8px;
    width: 0;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.dossier-module.visible .classification-strip {
    width: 100%;
}

.strip-teal { background: var(--envoy-teal); }

.module-brackets {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.bracket-corner {
    position: absolute;
    width: 12px;
    height: 12px;
}

.bracket-corner.tl { top: 0; left: 0; border-top: 1px solid var(--envoy-teal); border-left: 1px solid var(--envoy-teal); }
.bracket-corner.tr { top: 0; right: 0; border-top: 1px solid var(--envoy-teal); border-right: 1px solid var(--envoy-teal); }
.bracket-corner.bl { bottom: 0; left: 0; border-bottom: 1px solid var(--envoy-teal); border-left: 1px solid var(--envoy-teal); }
.bracket-corner.br { bottom: 0; right: 0; border-bottom: 1px solid var(--envoy-teal); border-right: 1px solid var(--envoy-teal); }

.module-inner {
    padding: 2rem;
}

.module-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: background-color 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.status-indicator.amber {
    background: var(--diplomatic-amber);
    animation: statusPulse 2s ease-in-out infinite;
}

.status-indicator.green {
    background: var(--signal-green);
    animation: none;
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.status-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--envoy-teal);
}

.module-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    margin-bottom: 0.8rem;
}

.module-text {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--clearance-white);
    opacity: 0.85;
}

/* --- Redaction Demo --- */
.section-header {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    text-align: center;
    margin-bottom: 3rem;
}

.address-display {
    max-width: 400px;
    margin: 0 auto 3rem;
}

.addr-line {
    position: relative;
    margin-bottom: 1rem;
    text-align: center;
}

.addr-text {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 500;
    color: var(--clearance-white);
}

.redact-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--redaction-ink);
    border-radius: 2px;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.redact-bar.active {
    clip-path: inset(0 0 0 0);
}

.protected-label {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.15em;
    color: var(--diplomatic-amber);
    opacity: 0;
    transition: opacity 0.8s ease;
}

.protected-label.visible {
    opacity: 1;
}

/* --- Protocol Timeline --- */
.protocol-layout {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.timeline {
    flex: 2;
    position: relative;
    padding-left: 2rem;
}

.timeline-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 0;
    background: var(--envoy-teal);
    transition: height 1.5s ease;
}

.timeline-step {
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.step-number {
    font-family: var(--font-display);
    font-size: 80px;
    font-weight: 700;
    color: var(--envoy-teal);
    opacity: 0.12;
    line-height: 1;
    display: block;
    margin-bottom: -1.5rem;
}

.step-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.step-text {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--clearance-white);
    opacity: 0.85;
}

.protocol-seal {
    flex: 1;
    display: flex;
    justify-content: center;
    padding-top: 4rem;
}

.rotating-seal {
    width: 160px;
    height: 160px;
    animation: sealRotateY 20s linear infinite;
}

@keyframes sealRotateY {
    0% { transform: perspective(400px) rotateY(0deg); }
    100% { transform: perspective(400px) rotateY(360deg); }
}

/* --- Close / Footer --- */
.close-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.final-seal {
    width: 200px;
    height: 200px;
    margin-bottom: 3rem;
}

.cta-seal {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--diplomatic-amber);
    color: var(--deep-void);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    margin-bottom: 3rem;
}

.cta-seal:hover {
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(199, 136, 75, 0.3);
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-domain {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--envoy-teal);
    letter-spacing: 0.1em;
}

.footer-legal {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(232, 236, 241, 0.3);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .security-margin { display: none; }
    .section-index { display: none; }
    .topbar { left: 0; right: 0; }
    .content-area { padding: 0 1.5rem; }
    .protocol-layout { flex-direction: column; }
    .protocol-seal { display: none; }
}
