/* diplomacy.bar — The Art of Negotiation
   A nostalgic-retro diplomatic dossier in the browser. */

:root {
    --bg-parchment: #F5ECD7;
    --bg-embassy: #2A201A;
    --text-umber: #3D2B1F;
    --text-linen: #F0E6D0;
    --accent-saddle: #8B4513;
    --accent-brass: #B8860B;
    --accent-terracotta: #C2613A;
    --accent-seal-deep: #8B2500;
    --muted-khaki: #C4B090;
    --shadow-tobacco: #1A0F0A;

    --font-display: 'Playfair Display', 'Times New Roman', serif;
    --font-body: 'Source Serif 4', 'Georgia', serif;
    --font-accent: 'Cormorant Garamond', 'Georgia', serif;

    --measure: 680px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-parchment);
    color: var(--text-umber);
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---------- Navigation ---------- */
.dispatch-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(42, 32, 22, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--text-linen);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(184, 134, 11, 0.4);
}

.nav-domain {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-linen);
}

.nav-menu {
    font-size: 1.25rem;
    color: var(--accent-brass);
    cursor: pointer;
    transition: color 0.3s ease;
}
.nav-menu:hover { color: var(--accent-terracotta); }

/* ---------- Reveal animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Shared Grain Texture ---------- */
.hero-grain,
.band-grain,
.seal-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.06;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.6' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.06  0 0 0 0 0.04  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 160px 160px;
    mix-blend-mode: multiply;
    z-index: 3;
}

/* ---------- Section 1: Hero / Dossier Cover ---------- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    background: var(--shadow-tobacco);
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}

.hero-photo {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(139, 115, 85, 0.95) 0%, rgba(92, 64, 51, 0.95) 50%, rgba(61, 43, 31, 0.95) 100%),
        repeating-linear-gradient(45deg, rgba(26, 15, 10, 0.06) 0px, rgba(26, 15, 10, 0.06) 2px, transparent 2px, transparent 6px);
    background-attachment: fixed;
    background-size: cover;
    filter: sepia(0.25) contrast(1.08) brightness(0.95);
    opacity: 0;
    animation: heroPhotoFadeIn 1.5s ease-out 0.1s forwards;
    z-index: 1;
}

@keyframes heroPhotoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--bg-parchment);
    opacity: 0.15;
    z-index: 2;
}

.hero-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(26, 15, 10, 0.55) 100%);
    z-index: 4;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
    color: var(--text-linen);
}

.hero-eyebrow {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.85rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted-khaki);
    margin: 0 0 2rem;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease-out 0.4s, transform 0.8s ease-out 0.4s;
}
.hero-eyebrow.is-visible { opacity: 1; transform: translateY(0); }

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 1.05;
    margin: 0;
    color: #6E1A14;
    text-shadow: 0 2px 18px rgba(26, 15, 10, 0.55);
    letter-spacing: -0.01em;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1s ease-out 0.6s, transform 1s ease-out 0.6s;
}
.hero-title.is-visible { opacity: 1; transform: translateY(0); }

.brass-rule {
    border: 0;
    height: 1px;
    background: var(--accent-brass);
    width: 220px;
    margin: 2.2rem auto;
    opacity: 0;
    transition: opacity 0.8s ease-out 0.95s, transform 0.8s ease-out 0.95s;
    transform: scaleX(0.4);
    transform-origin: center;
}
.brass-rule.is-visible { opacity: 0.85; transform: scaleX(1); }

.hero-subtitle {
    font-family: var(--font-accent);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-linen);
    margin: 0;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease-out 1.2s, transform 0.8s ease-out 1.2s;
}
.hero-subtitle.is-visible { opacity: 1; transform: translateY(0); }

.hero-scroll-cue {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    font-family: var(--font-accent);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted-khaki);
    transition: opacity 0.8s ease-out 1.8s, transform 0.8s ease-out 1.8s;
}
.hero-scroll-cue.is-visible {
    opacity: 0.75;
    transform: translateX(-50%) translateY(0);
    animation: scrollCueBob 2.4s ease-in-out 2.6s infinite;
}

@keyframes scrollCueBob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Stamp marks (decorative) ---------- */
.stamp {
    position: absolute;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-terracotta);
    border: 3px double var(--accent-terracotta);
    padding: 0.4rem 1.2rem;
    pointer-events: none;
    opacity: 0.18;
    z-index: 6;
    user-select: none;
}

.stamp-received {
    top: 14%;
    left: 6%;
    transform: rotate(-12deg);
}

.stamp-confidential {
    top: 8%;
    right: 6%;
    transform: rotate(-8deg);
    opacity: 0.15;
}

.stamp-corner { z-index: 6; }
.stamp-corner-tr { z-index: 1; }

/* ---------- Text Sections ---------- */
.text-section {
    position: relative;
    background: var(--bg-parchment);
    padding: 12vh 2rem;
    min-height: 100vh;
    overflow: hidden;
    z-index: 5;
}

.text-column {
    max-width: var(--measure);
    margin: 0 auto;
    position: relative;
}

.dateline {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted-khaki);
    margin: 0 0 1.4rem;
}

.section-heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin: 0 0 1.5rem;
    color: var(--text-umber);
    letter-spacing: -0.005em;
}

.ornament {
    text-align: center;
    color: var(--accent-brass);
    opacity: 0.55;
    font-size: 1.6rem;
    margin: 1.6rem 0 2.4rem;
    letter-spacing: 0.4em;
}

.prose {
    margin: 0 0 1.6rem;
    color: var(--text-umber);
}

.prose .dropcap {
    float: left;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 4.5em;
    line-height: 0.8;
    color: var(--accent-saddle);
    margin: 0.08em 0.08em -0.05em 0;
    padding-top: 0.05em;
}

.pull-quote {
    margin: 2.4rem 0;
    padding: 0.4rem 0 0.4rem 1.5rem;
    border-left: 3px solid var(--accent-brass);
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--text-umber);
}

@media (min-width: 1100px) {
    .pull-quote {
        margin-left: -120px;
        max-width: calc(var(--measure) + 120px);
    }
}

.double-rule {
    height: 5px;
    margin: 4rem auto 0;
    width: 60%;
    background:
        linear-gradient(to bottom, var(--accent-brass) 0, var(--accent-brass) 1px, transparent 1px, transparent 4px, var(--accent-brass) 4px, var(--accent-brass) 5px);
    opacity: 0.55;
}

/* Greek key border pattern divider */
.greek-key-divider {
    position: relative;
    width: min(680px, 90%);
    height: 12px;
    margin: 0 auto 4rem;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 40 12'><g fill='none' stroke='%23B8860B' stroke-width='1.2'><path d='M0 11 L0 3 L8 3 L8 8 L4 8 L4 5 L20 5 L20 11 M20 11 L20 3 L28 3 L28 8 L24 8 L24 5 L40 5 L40 11'/></g></svg>");
    background-repeat: repeat-x;
    background-size: 40px 12px;
    opacity: 0.55;
}

/* Map-pin list markers */
.pin-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 2rem;
}
.pin-list li {
    position: relative;
    padding-left: 1.8rem;
    margin: 0.85rem 0;
}
.pin-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-terracotta);
    border: 2px solid var(--accent-brass);
    box-shadow: 0 1px 2px rgba(26, 15, 10, 0.4);
}

/* Redaction bars */
.redaction {
    display: inline-block;
    background: var(--shadow-tobacco);
    color: var(--shadow-tobacco);
    padding: 0 0.35em;
    border-radius: 1px;
    cursor: pointer;
    transition: background 0.4s ease, color 0.4s ease;
    user-select: none;
    line-height: 1.2;
    position: relative;
}
.redaction:hover,
.redaction.is-revealed {
    background: rgba(26, 15, 10, 0.15);
    color: var(--text-umber);
}

/* ---------- Section 3: The Summit (sticky image band) ---------- */
.image-band {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    z-index: 1;
    background: var(--shadow-tobacco);
}

.band-photo {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(61, 43, 31, 0.9) 0%, rgba(139, 69, 19, 0.85) 35%, rgba(42, 32, 22, 0.95) 75%, rgba(26, 15, 10, 1) 100%),
        radial-gradient(circle at 30% 40%, rgba(196, 176, 144, 0.35) 0%, transparent 45%),
        radial-gradient(circle at 70% 60%, rgba(184, 134, 11, 0.18) 0%, transparent 50%);
    filter: sepia(0.25) contrast(1.08) brightness(0.95);
    background-size: cover;
}

.band-vignette {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 120px rgba(26, 15, 10, 0.7);
    pointer-events: none;
    z-index: 4;
}

.band-scrim {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(26, 15, 10, 0.85) 0%, rgba(26, 15, 10, 0.5) 50%, transparent 100%);
    z-index: 5;
}

.band-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12vh;
    z-index: 6;
    color: var(--text-linen);
    text-align: center;
    padding: 0 2rem;
    max-width: 760px;
    margin: 0 auto;
}

.caption-eyebrow {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent-brass);
    margin: 0 0 1rem;
}

.band-heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.1;
    margin: 0 0 1.2rem;
    color: var(--text-linen);
}

.caption-body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 auto;
    max-width: 560px;
    color: var(--text-linen);
}

/* ---------- Section 5: Seal / Closing ---------- */
.seal-section {
    position: relative;
    background: var(--bg-embassy);
    color: var(--text-linen);
    min-height: 100vh;
    padding: 14vh 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 5;
}

.seal-content {
    position: relative;
    z-index: 5;
    max-width: 620px;
    text-align: center;
}

.wax-seal {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 3rem;
    background: radial-gradient(circle at 35% 30%, var(--accent-terracotta) 0%, var(--accent-seal-deep) 70%, #5a1700 100%);
    box-shadow:
        2px 3px 12px rgba(0, 0, 0, 0.5),
        inset 0 0 18px rgba(26, 15, 10, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.wax-seal::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1px dashed rgba(240, 230, 208, 0.55);
    pointer-events: none;
}

.wax-seal-inner {
    width: 76%;
    height: 76%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wax-seal-mark {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: 1.6rem;
    color: var(--text-linen);
    letter-spacing: 0.05em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.wax-seal:hover {
    transform: rotate(15deg);
}

.seal-statement {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 300;
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-linen);
    margin: 0 0 2.4rem;
    opacity: 0.92;
}

.seal-domain {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    color: var(--text-linen);
    letter-spacing: 0.02em;
    margin: 0 0 1.6rem;
}

.brass-bullets {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    margin: 0 0 2.4rem;
}

.brass-bullets span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-brass);
    opacity: 0.7;
}

.seal-colophon {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted-khaki);
    margin: 0;
    opacity: 0.7;
}

/* ---------- Stagger delays for revealed children ---------- */
.reveal[data-stagger="1"] { transition-delay: 0.15s; }
.reveal[data-stagger="2"] { transition-delay: 0.3s; }
.reveal[data-stagger="3"] { transition-delay: 0.45s; }
.reveal[data-stagger="4"] { transition-delay: 0.6s; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 700px) {
    .text-section { padding: 10vh 1.5rem; }
    .stamp { font-size: 1.6rem; padding: 0.3rem 0.8rem; }
    .stamp-received { top: 18%; left: 4%; }
    .pull-quote { font-size: 1.25rem; }
    .dispatch-nav { padding: 0 1.25rem; }
}
