/* plotgrapher.com - Zen-Deco Fusion */
/* Palette: #0b1929 #0e2240 #0f2744 #132e52 #6b8aad #a8b8cc #c9a96e #d4a054 #d4cfe0 #e8c49a */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0b1929;
    color: #a8b8cc;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    line-height: 1.85;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* Pulse Animation */
@keyframes pulse-attention {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(232, 196, 154, 0.15); }
    50% { transform: scale(1.08); box-shadow: 0 0 20px 8px rgba(232, 196, 154, 0.15); }
}

@keyframes stroke-pulse {
    0%, 100% { stroke-width: 2; }
    50% { stroke-width: 3; }
}

@keyframes letter-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Compass Navigation */
.compass-nav {
    position: fixed;
    top: 32px;
    left: 32px;
    z-index: 1000;
    width: 24px;
    height: 24px;
    transition: width 400ms cubic-bezier(0.34, 1.56, 0.64, 1), height 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.compass-nav:hover {
    width: 120px;
    height: 120px;
}

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

.compass-label {
    position: absolute;
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b8aad;
    text-decoration: none;
    opacity: 0;
    transition: opacity 400ms ease;
    white-space: nowrap;
}

.compass-nav:hover .compass-label {
    opacity: 1;
}

.compass-n { top: 0; left: 50%; transform: translateX(-50%); }
.compass-e { top: 50%; right: -10px; transform: translateY(-50%); }
.compass-s { bottom: 0; left: 50%; transform: translateX(-50%); }
.compass-w { top: 50%; left: -10px; transform: translateY(-50%); }

.compass-label:hover {
    color: #c9a96e;
}

/* Flowing Curve Background */
.flowing-curve {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 650vh;
    pointer-events: none;
    z-index: 0;
}

/* Zones */
.zone {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.zone-1 {
    background: #0b1929;
    height: 130vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zone1-content {
    text-align: center;
}

.sine-wave {
    width: 80vw;
    max-width: 800px;
    height: auto;
    opacity: 0;
}

.sine-wave.animate {
    opacity: 1;
}

#sine-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 3s ease-out;
}

#sine-path.drawn {
    stroke-dashoffset: 0;
}

.site-title {
    font-family: 'Poiret One', cursive;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #c9a96e;
    margin-top: 2rem;
    opacity: 0;
}

.site-title.visible {
    opacity: 1;
}

.site-title span {
    display: inline-block;
    opacity: 0;
    animation: letter-fade 0.4s ease forwards;
}

.zone-2 {
    background: #0f2744;
    padding: 10vh 5vw;
    min-height: 140vh;
}

.zone-3 {
    background: #132e52;
    padding: 10vh 5vw;
    min-height: 140vh;
}

.zone-4 {
    background: #0e2240;
    padding: 10vh 5vw;
    min-height: 140vh;
}

.zone-5 {
    background: #0b1929;
    padding: 15vh 5vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Zone Text */
.zone-text {
    max-width: 600px;
    margin: 0 auto 6rem;
    text-align: center;
}

.zone-intro {
    color: #d4cfe0;
    font-weight: 600;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
}

/* Collage Containers */
.collage-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    min-height: 500px;
}

/* Graph Cards */
.graph-card {
    position: absolute;
    background: rgba(15, 39, 68, 0.6);
    border: 1px solid rgba(201, 169, 110, 0.4);
    padding: 1rem;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 600ms ease-out, transform 600ms ease-out, border-color 300ms ease;
}

.graph-card.revealed {
    opacity: 1;
    transform: scale(1) rotate(var(--rotation, 0deg));
}

.graph-card:hover {
    transform: scale(1) rotate(var(--rotation, 0deg)) translateY(-4px);
    border-color: rgba(201, 169, 110, 0.8);
}

.graph-card::before,
.graph-card::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
}

.graph-card::before {
    top: -4px;
    left: -4px;
    border-top: 8px solid #c9a96e;
    border-right: 8px solid transparent;
    opacity: 0.4;
}

.graph-card::after {
    bottom: -4px;
    right: -4px;
    border-bottom: 8px solid #c9a96e;
    border-left: 8px solid transparent;
    opacity: 0.4;
}

.graph-card svg {
    width: 100%;
    height: auto;
    display: block;
}

.card-label {
    display: block;
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b8aad;
    margin-top: 0.5rem;
}

/* Sparse Collage - Zone 2 */
.card-1 { top: 5%; left: 5%; width: 280px; --rotation: -1.5deg; z-index: 2; }
.card-2 { top: 15%; right: 10%; width: 240px; --rotation: 2deg; z-index: 1; }
.card-3 { top: 45%; left: 15%; width: 320px; --rotation: 1deg; z-index: 3; }
.card-4 { top: 55%; right: 5%; width: 220px; --rotation: -2deg; z-index: 2; }

/* Dense Collage - Zone 4 */
.card-dense-1 { top: 0; left: 5%; width: 220px; --rotation: 1.5deg; z-index: 2; }
.card-dense-2 { top: 5%; left: 35%; width: 200px; --rotation: -1deg; z-index: 3; }
.card-dense-3 { top: 2%; right: 8%; width: 180px; --rotation: 2.5deg; z-index: 1; }
.card-dense-4 { top: 35%; left: 2%; width: 200px; --rotation: -2deg; z-index: 2; }
.card-dense-5 { top: 40%; left: 30%; width: 190px; --rotation: 0.5deg; z-index: 4; }
.card-dense-6 { top: 38%; right: 5%; width: 200px; --rotation: -1.5deg; z-index: 3; }
.card-dense-7 { top: 70%; left: 20%; width: 170px; --rotation: 3deg; z-index: 2; }

/* Zone 3 Layout */
.zone3-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 80vh;
    flex-wrap: wrap;
}

.zone3-text {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
}

.zone3-text-left {
    text-align: right;
}

.zone3-text-right {
    text-align: left;
}

.morph-curve {
    width: 200px;
    height: 400px;
    flex-shrink: 0;
}

.morph-curve path {
    animation: stroke-pulse 4s ease-in-out infinite;
}

/* Zone 5 */
.zone5-content {
    text-align: center;
    max-width: 600px;
}

.farewell-text {
    color: #d4cfe0;
    margin-bottom: 2rem;
    transition: opacity 1s ease;
}

.farewell-final {
    font-family: 'Poiret One', cursive;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: 0.1em;
    color: #c9a96e;
}

.farewell-text.faded {
    opacity: 0.2;
}

/* Pulse Dots */
.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d4a054;
    border: 1px solid #e8c49a;
    margin: 3rem auto;
    animation: pulse-attention 2s ease-in-out infinite;
}

.pulse-dot-final {
    margin-top: 4rem;
}

/* Deco Fan */
.deco-fan {
    text-align: center;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
    background: linear-gradient(#132e52, #0e2240);
}

.deco-fan svg {
    width: 80px;
    height: 40px;
}

/* Inkblot transitions */
.zone-2::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 160px;
    background: radial-gradient(ellipse, #0f2744 0%, transparent 70%);
    pointer-events: none;
}

.zone-3::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 30%;
    width: 400px;
    height: 120px;
    background: radial-gradient(ellipse, #132e52 0%, transparent 70%);
    pointer-events: none;
}
