/* diplomacy.day - Styles */
/* Memphis-era diplomatic salon meets sci-fi command lens */

:root {
    --navy: #0d1b2a;
    --midnight-teal: #1b2a3b;
    --ivory: #f5f0e8;
    --hud-teal: #00e5c8;
    --diplomatic-blue: #2d5f8a;
    --memphis-coral: #e85d5d;
    --memphis-marigold: #f2a93b;
    --muted-graphite: #6b7280;
    --ease-bouncy: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-settle: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    color: var(--navy);
    background-color: var(--navy);
    overflow-x: hidden;
}

/* ============================
   HUD LEFT STRIP
   ============================ */

.hud-strip {
    position: fixed;
    left: 0;
    top: 0;
    width: 48px;
    height: 100vh;
    z-index: 100;
    background: rgba(13, 27, 42, 0.85);
    border-right: 1px solid rgba(0, 229, 200, 0.15);
    backdrop-filter: blur(4px);
}

.hud-strip-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 20px 0;
}

.hud-status,
.hud-status-bottom {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.55rem;
    color: var(--hud-teal);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    opacity: 0.7;
}

.hud-section-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hud-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.5rem;
    color: var(--hud-teal);
    letter-spacing: 0.2em;
    opacity: 0.5;
}

.hud-number {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.4rem;
    color: var(--hud-teal);
    letter-spacing: 0.1em;
}

.hud-progress-track {
    width: 2px;
    height: 120px;
    background: rgba(0, 229, 200, 0.15);
    position: relative;
}

.hud-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--hud-teal);
    transition: height 0.3s var(--ease-settle);
}

.hud-dots {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.hud-dot {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid var(--hud-teal);
    background: transparent;
    transition: background 0.3s ease;
}

.hud-dot.active {
    background: var(--hud-teal);
}

/* ============================
   SECTIONS - GENERAL
   ============================ */

.section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding-left: 48px;
}

.section-dark {
    background-color: var(--navy);
    color: var(--ivory);
}

.section-light {
    background-color: var(--ivory);
    color: var(--navy);
}

.scan-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 229, 200, 0.015) 3px,
        rgba(0, 229, 200, 0.015) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    padding: 0 48px;
    min-height: 100vh;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* ============================
   CONTENT PLACEMENT (ASYMMETRIC)
   ============================ */

.content-left {
    grid-column: 2 / 8;
}

.content-right {
    grid-column: 8 / 12;
}

.content-center-wide {
    grid-column: 2 / 11;
}

/* ============================
   SECTION LABELS & TITLES
   ============================ */

.section-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--hud-teal);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: 0.95;
    margin-bottom: 32px;
}

.dark-title {
    color: var(--navy);
    text-shadow: 2px 2px 0 rgba(232, 93, 93, 0.3);
}

.light-title {
    color: var(--ivory);
    text-shadow: 2px 2px 0 rgba(0, 229, 200, 0.3);
}

.section-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    max-width: 38em;
    color: var(--navy);
}

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

.light-body {
    color: var(--ivory);
}

.light-body p {
    color: var(--ivory);
}

/* ============================
   PROTOCOL HEADER (SECTION 1)
   ============================ */

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--navy);
    height: 100vh;
}

.header-photo-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle, transparent 40%, var(--navy) 41%),
        linear-gradient(135deg, var(--midnight-teal) 0%, var(--navy) 100%);
    background-size: 4px 4px, 100% 100%;
    opacity: 0.4;
    z-index: 0;
    animation: fadeInPhoto 0.6s ease 1.8s both;
}

.header-content {
    position: relative;
    z-index: 5;
    text-align: center;
    padding-left: 48px;
}

.header-title-wrap {
    display: inline-block;
}

.header-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: clamp(4rem, 10vw, 9rem);
    color: var(--ivory);
    line-height: 0.95;
    text-shadow: 3px 3px 0 rgba(0, 229, 200, 0.3);
    position: relative;
}

.title-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    animation: typeIn 0.8s steps(13) 0.6s both;
    max-width: 0;
}

.title-cursor {
    display: inline-block;
    color: var(--hud-teal);
    animation: blink 0.8s step-end infinite 1.4s;
    opacity: 0;
    animation: cursorAppear 0.1s ease 1.4s both, blink 0.8s step-end infinite 1.5s;
}

.header-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--hud-teal);
    letter-spacing: 0.25em;
    margin-top: 24px;
    opacity: 0;
    animation: fadeInUp 0.5s ease 1.6s both;
}

/* HUD Corner Brackets */
.hud-bracket {
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: 4;
}

.hud-bracket-tl {
    top: 40px;
    left: 88px;
    border-top: 2px solid var(--hud-teal);
    border-left: 2px solid var(--hud-teal);
    animation: clipBracketTL 0.6s ease both;
}

.hud-bracket-tr {
    top: 40px;
    right: 40px;
    border-top: 2px solid var(--hud-teal);
    border-right: 2px solid var(--hud-teal);
    animation: clipBracketTR 0.6s ease 0.1s both;
}

.hud-bracket-bl {
    bottom: 40px;
    left: 88px;
    border-bottom: 2px solid var(--hud-teal);
    border-left: 2px solid var(--hud-teal);
    animation: clipBracketBL 0.6s ease 0.2s both;
}

.hud-bracket-br {
    bottom: 40px;
    right: 40px;
    border-bottom: 2px solid var(--hud-teal);
    border-right: 2px solid var(--hud-teal);
    animation: clipBracketBR 0.6s ease 0.3s both;
}

.hud-bracket.small {
    width: 24px;
    height: 24px;
    animation: none;
}

.hud-bracket.small.hud-bracket-tl {
    top: -4px;
    left: -4px;
}

.hud-bracket.small.hud-bracket-br {
    bottom: -4px;
    right: -4px;
    top: auto;
    left: auto;
}

/* HUD Coordinates */
.hud-coord {
    position: absolute;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: var(--hud-teal);
    letter-spacing: 0.15em;
    opacity: 0.5;
    z-index: 4;
}

.hud-coord-tl {
    top: 52px;
    left: 100px;
}

.hud-coord-br {
    bottom: 52px;
    right: 52px;
}

/* Diplomatic Seal */
.diplomatic-seal {
    position: absolute;
    top: 40px;
    right: 80px;
    width: 80px;
    height: 80px;
    z-index: 4;
    opacity: 0;
    animation: fadeIn 0.6s ease 1.2s both;
}

.seal-svg {
    width: 100%;
    height: 100%;
    animation: rotateSlow 60s linear infinite;
}

/* ============================
   MEMPHIS SHAPES
   ============================ */

.memphis-shape {
    position: absolute;
    z-index: 3;
    transition: transform 0.4s var(--ease-bouncy), background-color 0.3s ease, border-color 0.3s ease;
}

.memphis-triangle-1 {
    top: 15%;
    left: 80px;
    width: 0;
    height: 0;
    border-left: 45px solid transparent;
    border-right: 45px solid transparent;
    border-bottom: 80px solid var(--memphis-coral);
    opacity: 0;
    animation: slideInFromLeft 0.4s ease 1.0s both;
    filter: drop-shadow(2px 2px 0 var(--navy));
}

.memphis-triangle-1:hover {
    border-bottom-color: var(--hud-teal);
}

.memphis-circle-1 {
    bottom: 20%;
    right: 10%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--hud-teal);
    opacity: 0;
    animation: slideInFromRight 0.4s ease 1.2s both;
}

.memphis-circle-1:hover {
    border-color: var(--memphis-marigold);
    background: rgba(242, 169, 59, 0.15);
}

.memphis-zigzag-1 {
    bottom: 30%;
    left: 15%;
    width: 160px;
    height: 40px;
    opacity: 0;
    animation: slideInFromLeft 0.4s ease 1.4s both;
}

.memphis-square-1 {
    top: 25%;
    right: 20%;
    width: 40px;
    height: 40px;
    background: var(--memphis-marigold);
    border: 2px solid var(--navy);
    transform: rotate(45deg);
    opacity: 0;
    animation: slideInFromRight 0.4s ease 1.1s both;
}

.memphis-square-1:hover {
    background: var(--memphis-coral);
}

/* Floating Memphis shapes in content sections */
.memphis-triangle-float {
    position: relative;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 45px solid var(--memphis-coral);
    filter: drop-shadow(2px 2px 0 var(--navy));
    margin-top: 20px;
}

.memphis-triangle-float:hover {
    border-bottom-color: var(--hud-teal);
    transform: translateY(-6px);
}

.memphis-circle-float {
    bottom: 15%;
    right: 8%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--hud-teal);
}

.memphis-circle-float:hover {
    border-color: var(--memphis-marigold);
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(13, 27, 42, 0.25);
}

.memphis-diamond-float {
    top: 10%;
    right: 15%;
    width: 30px;
    height: 30px;
    background: var(--memphis-marigold);
    border: 2px solid var(--navy);
    transform: rotate(45deg);
}

.memphis-diamond-float:hover {
    background: var(--memphis-coral);
    transform: rotate(45deg) translateY(-6px);
}

.memphis-triangle-corner {
    bottom: 30px;
    left: 70px;
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid var(--memphis-coral);
    filter: drop-shadow(2px 2px 0 var(--navy));
    opacity: 0.6;
}

/* ============================
   MEMPHIS DIVIDERS
   ============================ */

.memphis-divider {
    height: 70px;
    background-color: var(--midnight-teal);
    overflow: hidden;
    position: relative;
    padding-left: 48px;
}

.divider-alt {
    background-color: var(--navy);
}

.divider-svg {
    width: 100%;
    height: 100%;
}

/* ============================
   IMAGE CONTAINERS
   ============================ */

.image-container {
    position: relative;
    transition: transform 0.4s var(--ease-bouncy);
}

.image-container:hover {
    transform: translateY(-6px);
}

.image-placeholder {
    position: relative;
    background: var(--midnight-teal);
    border: 1px solid rgba(0, 229, 200, 0.2);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.image-halftone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 40%, rgba(13, 27, 42, 0.6) 41%);
    background-size: 4px 4px;
    z-index: 2;
    pointer-events: none;
}

.image-content {
    width: 100%;
    height: 100%;
}

.vintage-illustration {
    width: 100%;
    height: 100%;
    display: block;
}

.image-annotation {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: var(--hud-teal);
    letter-spacing: 0.15em;
    margin-top: 8px;
    opacity: 0.6;
}

/* Clipped shapes for images */
.clipped-triangle .image-placeholder {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.clipped-hexagon .image-placeholder {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

/* ============================
   MEMPHIS RULE (MARIGOLD ZIGZAG)
   ============================ */

.memphis-rule {
    margin-top: 24px;
    width: 200px;
    height: 20px;
}

.memphis-rule svg {
    width: 100%;
    height: 100%;
}

/* ============================
   SIGNAL BOARD
   ============================ */

.signal-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.signal-card {
    background: rgba(27, 42, 59, 0.8);
    border: 1px solid rgba(0, 229, 200, 0.2);
    padding: 32px 24px;
    text-align: center;
    transition: transform 0.4s var(--ease-bouncy), box-shadow 0.4s var(--ease-settle);
}

.signal-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(13, 27, 42, 0.25);
}

.signal-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
}

.signal-icon svg {
    width: 100%;
    height: 100%;
}

.signal-label {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ivory);
    margin-bottom: 8px;
}

.signal-status {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: var(--hud-teal);
    letter-spacing: 0.2em;
}

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

.section-footer {
    min-height: auto;
    padding-bottom: 40px;
}

.footer-classification {
    margin-top: 32px;
    padding: 16px 0;
    border-top: 1px solid var(--diplomatic-blue);
}

.classification-stamp {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--memphis-coral);
    letter-spacing: 0.2em;
    margin-bottom: 4px;
}

.classification-date {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: var(--muted-graphite);
    letter-spacing: 0.15em;
}

.diplomatic-seal-large {
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.seal-svg-large {
    width: 100%;
    height: 100%;
    animation: rotateSlow 90s linear infinite;
}

.site-footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 48px;
    border-top: 1px solid rgba(45, 95, 138, 0.3);
    margin-top: 40px;
}

.footer-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: var(--muted-graphite);
    letter-spacing: 0.15em;
}

.footer-protocol {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: var(--hud-teal);
    letter-spacing: 0.2em;
    opacity: 0.6;
}

/* ============================
   FADE-IN ANIMATION (SCROLL)
   ============================ */

.fade-in {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    transition-delay: calc(var(--stagger, 0) * 80ms);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   KEYFRAME ANIMATIONS
   ============================ */

@keyframes typeIn {
    from { max-width: 0; }
    to { max-width: 100%; }
}

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

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

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

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

@keyframes fadeInPhoto {
    from { opacity: 0; }
    to { opacity: 0.4; }
}

@keyframes slideInFromLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes clipBracketTL {
    from { clip-path: inset(100% 100% 0 0); opacity: 0; }
    to { clip-path: inset(0 0 0 0); opacity: 1; }
}

@keyframes clipBracketTR {
    from { clip-path: inset(100% 0 0 100%); opacity: 0; }
    to { clip-path: inset(0 0 0 0); opacity: 1; }
}

@keyframes clipBracketBL {
    from { clip-path: inset(0 100% 100% 0); opacity: 0; }
    to { clip-path: inset(0 0 0 0); opacity: 1; }
}

@keyframes clipBracketBR {
    from { clip-path: inset(0 0 100% 100%); opacity: 0; }
    to { clip-path: inset(0 0 0 0); opacity: 1; }
}

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

/* ============================
   HOVER LIFT ON INTERACTIVE ELEMENTS
   ============================ */

.signal-card,
.image-container,
.memphis-triangle-float,
.memphis-circle-float,
.memphis-diamond-float,
.memphis-triangle-1,
.memphis-circle-1,
.memphis-square-1 {
    cursor: pointer;
}

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

@media (max-width: 768px) {
    .hud-strip {
        display: none;
    }

    .section {
        padding-left: 0;
    }

    .memphis-divider {
        padding-left: 0;
    }

    .section-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        padding: 0 24px;
    }

    .content-left,
    .content-right,
    .content-center-wide {
        grid-column: 1 / -1;
    }

    .section-title {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }

    .header-title {
        font-size: clamp(2.5rem, 10vw, 5rem);
    }

    .header-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .signal-board {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .memphis-shape {
        transform: scale(0.6) !important;
    }

    .memphis-triangle-1,
    .memphis-zigzag-1 {
        display: none;
    }

    .hud-bracket-tl { left: 20px; }
    .hud-bracket-bl { left: 20px; }

    .hud-coord-tl { left: 32px; }

    .diplomatic-seal { right: 20px; }

    .site-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 24px;
    }

    .diplomatic-seal-large {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 480px) {
    .section-grid {
        padding: 0 16px;
    }

    .memphis-circle-1,
    .memphis-square-1,
    .memphis-diamond-float,
    .memphis-circle-float {
        display: none;
    }
}
