/* penclo.com - Immersive Watercolor Dreamscape */

:root {
    --midnight-hull: #0a1628;
    --abyssal-navy: #162544;
    --cartographers-ink: #1b3a5c;
    --compass-steel: #2a4f73;
    --waterline: #4a8cb8;
    --brass-patina: #c9a84c;
    --oxidized-copper: #8b6914;
    --polished-brass: #dbb85a;
    --vellum: #e8dcc8;
    --prussian-wash: #1a4a6e;
    --cerulean-mist: #5b9abd;
}

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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(180deg, #0a1628 0%, #162544 25%, #1b3a5c 50%, #2a4f73 75%, #0a1628 100%);
    background-attachment: fixed;
    color: var(--vellum);
    cursor: none;
    overflow-x: hidden;
    font-family: 'Lora', serif;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Custom Cursor */
#custom-cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid var(--brass-patina);
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, border-color 0.3s;
    mix-blend-mode: screen;
}

#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.trail-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--waterline);
    opacity: 0.6;
    pointer-events: none;
    animation: trailFade 2s ease-out forwards;
}

.trail-dot.gold {
    background: var(--polished-brass);
}

.trail-dot.persistent {
    animation: trailFadeSlow 4s ease-out forwards;
}

@keyframes trailFade {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.3); }
}

@keyframes trailFadeSlow {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.5); }
}

/* Grid Overlay */
#grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background-image:
        repeating-linear-gradient(0deg, rgba(74, 140, 184, 0.08) 0px, transparent 1px, transparent 120px),
        repeating-linear-gradient(90deg, rgba(74, 140, 184, 0.08) 0px, transparent 1px, transparent 120px);
}

/* Tide Marks */
#tide-marks {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tide-mark {
    width: 3px;
    height: 24px;
    background: rgba(74, 140, 184, 0.25);
    border-radius: 2px;
    transition: background 0.6s ease, height 0.4s ease;
}

.tide-mark.active {
    background: var(--waterline);
    height: 36px;
}

/* Wash Sections */
.wash {
    position: relative;
    width: 100%;
    min-height: 100vh;
    scroll-snap-align: start;
    overflow: hidden;
}

.wash-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Watercolor Blobs */
.watercolor-blob {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}

.blob-1 {
    width: 70vw;
    height: 70vh;
    background: var(--prussian-wash);
    opacity: 0.45;
    top: 15%;
    left: 15%;
    animation: driftBlob1 25s ease-in-out infinite alternate;
}

.blob-2 {
    width: 50vw;
    height: 50vh;
    background: var(--cartographers-ink);
    opacity: 0.3;
    top: 30%;
    left: 40%;
    animation: driftBlob2 30s ease-in-out infinite alternate;
}

.blob-3 {
    width: 40vw;
    height: 40vh;
    background: var(--compass-steel);
    opacity: 0.2;
    top: 10%;
    left: 5%;
    animation: driftBlob3 35s ease-in-out infinite alternate;
}

/* Wash 2 Blobs */
.blob-4 {
    width: 60vw;
    height: 60vh;
    background: var(--cerulean-mist);
    opacity: 0.35;
    top: 20%;
    left: 20%;
    animation: driftBlob1 28s ease-in-out infinite alternate;
}

.blob-5 {
    width: 45vw;
    height: 50vh;
    background: var(--prussian-wash);
    opacity: 0.4;
    top: 10%;
    left: 50%;
    animation: driftBlob2 32s ease-in-out infinite alternate;
}

.blob-6 {
    width: 35vw;
    height: 35vh;
    background: var(--brass-patina);
    opacity: 0.12;
    top: 40%;
    left: 10%;
    animation: driftBlob3 22s ease-in-out infinite alternate;
}

/* Wash 3 Blob - minimal */
.blob-7 {
    width: 80vw;
    height: 60vh;
    background: var(--cartographers-ink);
    opacity: 0.1;
    top: 20%;
    left: 10%;
    animation: driftBlob1 40s ease-in-out infinite alternate;
}

/* Wash 4 Blobs - larger, more saturated */
.blob-8 {
    width: 70vw;
    height: 65vh;
    background: var(--cerulean-mist);
    opacity: 0.45;
    top: 10%;
    left: 5%;
    animation: driftBlob2 26s ease-in-out infinite alternate;
}

.blob-9 {
    width: 55vw;
    height: 55vh;
    background: var(--waterline);
    opacity: 0.35;
    top: 25%;
    left: 35%;
    animation: driftBlob1 30s ease-in-out infinite alternate;
}

.blob-10 {
    width: 40vw;
    height: 40vh;
    background: var(--prussian-wash);
    opacity: 0.3;
    top: 5%;
    left: 55%;
    animation: driftBlob3 24s ease-in-out infinite alternate;
}

/* Wash 5 Blobs */
.blob-11 {
    width: 60vw;
    height: 55vh;
    background: var(--brass-patina);
    opacity: 0.08;
    top: 20%;
    left: 20%;
    animation: breathe 8s ease-in-out infinite;
}

.blob-12 {
    width: 50vw;
    height: 50vh;
    background: var(--prussian-wash);
    opacity: 0.2;
    top: 30%;
    left: 30%;
    animation: breathe 8s ease-in-out infinite 2s;
}

@keyframes driftBlob1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(3vw, 2vh) scale(1.05); }
}

@keyframes driftBlob2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-2vw, 3vh) scale(1.03); }
}

@keyframes driftBlob3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(2vw, -2vh) scale(1.07); }
}

@keyframes breathe {
    0%, 100% { opacity: inherit; }
    50% { opacity: 0.15; }
}

/* Wash Content */
.wash-content {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: clamp(8px, 2vw, 24px);
    padding: clamp(24px, 4vw, 64px);
    min-height: 100vh;
    align-content: center;
}

/* Wash 1 - Hero */
#wash-1 {
    background: var(--midnight-hull);
}

.compass-rose-hero {
    position: absolute;
    width: 200px;
    height: 200px;
    right: 10%;
    top: 15%;
    z-index: 5;
    opacity: 0.4;
}

.compass-spin {
    animation: compassRotate 120s linear infinite;
}

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

.wash-1-content {
    align-content: center;
    justify-items: start;
}

.hero-title {
    grid-column: 2 / 7;
    font-family: 'Abril Fatface', serif;
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.05;
    color: var(--brass-patina);
}

.letter {
    display: inline-block;
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.8s ease-out, filter 0.8s ease-out;
}

.letter.revealed {
    opacity: 1;
    filter: blur(0);
}

.hero-subtitle {
    grid-column: 2 / 6;
    font-family: 'Lora', serif;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--vellum);
    opacity: 0;
    transition: opacity 1.2s ease-out 0.5s;
    margin-top: 1.5rem;
}

.hero-subtitle.visible {
    opacity: 1;
}

/* Wash 2 - Open Waters */
#wash-2 {
    background: var(--abyssal-navy);
}

.wash-2-content {
    align-content: center;
}

.glass-panel {
    background: rgba(10, 22, 40, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: clamp(24px, 3vw, 48px);
    position: relative;
    clip-path: polygon(1% 2%, 98% 0%, 100% 97%, 2% 100%);
    box-shadow:
        2px 2px 0 rgba(201, 168, 76, 0.15),
        -1px -1px 0 rgba(201, 168, 76, 0.1),
        3px -2px 0 rgba(201, 168, 76, 0.08),
        -2px 3px 0 rgba(201, 168, 76, 0.12);
}

.panel-left {
    grid-column: 1 / 5;
}

.panel-right {
    grid-column: 5 / 9;
    margin-top: 4rem;
}

.contour-line {
    width: 100%;
    height: 40px;
    margin-bottom: 1rem;
    overflow: visible;
}

.contour-draw {
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease-out;
}

.contour-draw.animated {
    stroke-dashoffset: 0;
}

.section-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--polished-brass);
    margin-bottom: 1.5rem;
}

.body-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--vellum);
    margin-bottom: 1rem;
}

.mini-compass {
    position: absolute;
    width: 64px;
    height: 64px;
    bottom: 10%;
    right: 8%;
    opacity: 0.4;
    z-index: 5;
}

/* Wash 3 - The Deep */
#wash-3 {
    background: var(--midnight-hull);
}

.wash-3-content {
    align-content: center;
    justify-items: center;
}

.deep-word {
    grid-column: 1 / -1;
    font-family: 'Abril Fatface', serif;
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.05;
    text-align: center;
    background: linear-gradient(135deg, #8b6914, #c9a84c, #dbb85a, #c9a84c, #8b6914);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Wash 4 - Rising Light */
#wash-4 {
    background: var(--compass-steel);
}

.wash-4-content {
    align-content: center;
}

.column-left {
    grid-column: 2 / 5;
}

.column-right {
    grid-column: 6 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

#assembling-compass {
    width: 100%;
    max-width: 300px;
}

.compass-petal {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 0.8s ease-out;
    fill: none;
    stroke-width: 1.5;
}

.compass-petal.drawn {
    stroke-dashoffset: 0;
}

/* Wash 5 - Return */
#wash-5 {
    background: var(--midnight-hull);
}

.wash-5-content {
    align-content: center;
    justify-items: center;
    text-align: center;
}

.return-title {
    grid-column: 1 / -1;
    font-family: 'Abril Fatface', serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.05;
    color: var(--vellum);
}

.return-subtitle {
    grid-column: 1 / -1;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--brass-patina);
    margin-top: 1.5rem;
    opacity: 0.8;
}

/* Depth Markings */
.depth-marking {
    position: absolute;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: rgba(232, 220, 200, 0.25);
    z-index: 2;
    pointer-events: none;
}

.dm-1 { bottom: 15%; right: 5%; }
.dm-2 { top: 20%; left: 3%; }
.dm-3 { top: 10%; right: 12%; }
.dm-4 { bottom: 8%; left: 6%; }
.dm-5 { top: 15%; left: 4%; }
.dm-6 { bottom: 20%; right: 6%; }
.dm-7 { top: 50%; right: 3%; }
.dm-8 { bottom: 12%; left: 8%; }
.dm-9 { top: 18%; right: 10%; }
.dm-10 { bottom: 15%; left: 5%; }

/* Compass Navigation */
#compass-nav {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    cursor: none;
}

.compass-nav-icon {
    width: 48px;
    height: 48px;
    transition: transform 0.3s ease;
}

#compass-nav:hover .compass-nav-icon {
    transform: scale(1.1);
}

.compass-nav-menu {
    position: absolute;
    bottom: 60px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#compass-nav:hover .compass-nav-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.compass-nav-item {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brass-patina);
    text-decoration: none;
    cursor: none;
    white-space: nowrap;
    text-align: right;
    padding: 4px 12px;
    background: rgba(10, 22, 40, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-right: 2px solid var(--brass-patina);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.compass-nav-item:hover {
    color: var(--polished-brass);
    border-color: var(--polished-brass);
}

/* Ink Drop Animation */
.ink-drop {
    position: absolute;
    border-radius: 50%;
    background: var(--waterline);
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    animation: inkBloom 1.5s ease-out forwards;
}

@keyframes inkBloom {
    0% { transform: scale(0); opacity: 0.6; }
    50% { opacity: 0.3; }
    100% { transform: scale(1); opacity: 0; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .compass-spin { animation: none; }
    .watercolor-blob { animation: none !important; }
    .trail-dot { animation: none; opacity: 0; }
    .letter { opacity: 1; filter: none; transition: none; }
    .hero-subtitle { opacity: 1; transition: none; }
    html { scroll-snap-type: none; scroll-behavior: auto; }
    .ink-drop { animation: none; }
}

/* Responsive */
@media (max-width: 768px) {
    .wash-content {
        grid-template-columns: repeat(4, 1fr);
        padding: clamp(16px, 4vw, 32px);
    }

    .hero-title { grid-column: 1 / -1; }
    .hero-subtitle { grid-column: 1 / -1; }
    .panel-left { grid-column: 1 / -1; }
    .panel-right { grid-column: 1 / -1; margin-top: 1.5rem; }
    .column-left { grid-column: 1 / -1; }
    .column-right { grid-column: 1 / -1; margin-top: 2rem; }
    .deep-word { font-size: clamp(2.5rem, 10vw, 5rem); }

    .compass-rose-hero {
        width: 120px;
        height: 120px;
        right: 5%;
        top: 10%;
    }

    #tide-marks { display: none; }
}
