/* ─── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: #fff;
    font-family: 'Cormorant Garamond', serif;
    font-weight: bold;
    overflow: hidden; /* locked until animation ends */
}

/* scroll-snap container */
#sections {
    display: none;
    opacity: 0;
    position: fixed;
    inset: 0;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch; /* iOS momentum scroll */
}
#sections::-webkit-scrollbar { display: none; }

/* ─── Bird / logo (animation layer, unchanged) ─────────────── */
.bird, .logo {
	opacity: 0;
	position: fixed;
	top: 40%;
	left: 50%;

	max-width: 90vh;
	width: auto;
	max-height: 80vh;
	height: 30vh;

	transform: translate(-50%, -50%);
}

.bird {
	display: none;
	rotate: 30deg;

    z-index: 10;
	-webkit-filter: drop-shadow(3px 3px 0 white)
	                drop-shadow(-3px 3px 0 white)
	                drop-shadow(3px -3px 0 white)
	                drop-shadow(-3px -3px 0 white);
	filter: drop-shadow(3px 3px 0 white)
	        drop-shadow(-3px 3px 0 white)
	        drop-shadow(3px -3px 0 white)
	        drop-shadow(-3px -3px 0 white);
}

.logo {
	display: none;
	z-index: 1;
}

.logo-final {
	z-index: 20;
}
    
/* ─── Button pulse ring ─────────────────────────────────────── */
@keyframes pulse-ring {
    0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

.play-button {
	z-index: 30;
	position: fixed;
	top: 45%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: block;
	border: none;
	background: none;
	-webkit-backface-visibility: hidden;
	-moz-osx-font-smoothing: grayscale;
}
/* pulse ring via pseudo-element */
.play-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1.5px solid #000;
    animation: pulse-ring 2s ease-out infinite;
    pointer-events: none;
}

.button { cursor: pointer; }
.button:focus { outline: none; }
.button > span { vertical-align: middle; }

.button.button--sacnite {
	width: 70px;
	height: 70px;
	min-width: 0;
	padding: 0;
	color: #fff;
	transition: color 0.3s;
}
.button--sacnite.button--round-l { border-radius: 50%; }
.button--sacnite::before {
	content: '';
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	border-radius: inherit;
	z-index: -1;
	box-shadow: inset 0 0 0 35px #000;
	transform: scale3d(0.9, 0.9, 1);
	transition: box-shadow 0.3s, transform 0.3s;
}
.button--sacnite .button__icon {
	font-style: normal;
	font-size: 22px;
	width: 22px;
}
.button--sacnite > i { transition: all 0.3s; }
.button--sacnite:hover > i { font-size: 32px; }
.button--sacnite > span {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.button--sacnite:hover { color: #000; }
.button--sacnite:hover::before {
	box-shadow: inset 0 0 0 2px #888;
	transform: scale3d(1, 1, 1);
}

/* ─── Sections — shared ─────────────────────────────────────── */
.section {
    position: relative;
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #fff;
}
.section:not(:first-of-type) {
    z-index: 50;
}

/* stealth title watermark */
.section-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(4rem, 14vw, 11rem);
    font-weight: 300;
    letter-spacing: 0.12em;
    white-space: nowrap;
    color: rgba(0,0,0,0.04);
    pointer-events: none;
    user-select: none;
    z-index: 100;
}
/* for project sections, pin watermark to the text (left) half */
.section--project .section-watermark {
    left: 0;
    width: 50%;
    transform: translate(5%, -50%);
    text-align: left;
    overflow: hidden;
}

/* ─── Hero section (transparent) ────────────────────────────── */
.section--hero {
    background: transparent;
    pointer-events: none;
}
.section--hero .hero-discover { pointer-events: all; }

/* Vanta cloud background — renders at 50 % size, scaled 2× via CSS for perf */
#vanta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 50%;
    transform: scale(2);
    transform-origin: top left;
    z-index: 0;
    opacity: 0;
    overflow: hidden;
}
#vanta-bg canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* hero particles canvas (injected by JS) - kept for reference, no longer used */
#hero-particles-canvas { display: none; }

/* minimalist scroll invite */
.hero-discover {
    position: absolute;
    bottom: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    opacity: 0;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.hero-discover__label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.62rem;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.8);
}
.hero-discover__track {
    position: relative;
    width: 1px;
    height: 68px;
    background: rgba(0,0,0,0.3);
    overflow: hidden;
}
@keyframes bead-slide {
    0%   { transform: translateY(-100%); opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { transform: translateY(150%); opacity: 0; }
}
.hero-discover__bead {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -100%);
    width: 4px;
    height: 18px;
    background: rgba(0,0,0,0.8);
    border-radius: 2px;
    animation: bead-slide 1.8s ease-in-out infinite;
}

/* ─── Project sections ───────────────────────────────────────── */
.section--project {
    gap: 0;
}

/* always: text left, image right */
.section--project .project-text {
    flex: 1 1 38%;
    padding: 0 2vw 0 8vw;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 480px;
    height: 100vh;
    background: linear-gradient(to right, #fff 0%, #fff calc(100% - 2vw), rgba(255,255,255,0) 100%);
}

.section--project .project-image {
    flex: 1 1 50%;
    height: 100%;
    overflow: visible;
    position: relative;
}
/* white gradient: bleeds from text side (left) into image */
.section--project .project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Static gradient replaced by animated liquid border canvas */
    background: transparent;
    pointer-events: none;
    z-index: 3;
}
.section--project .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0; /* revealed by ink video mask */

}
.section--project .project-image canvas:not(.mist-canvas) {
    /* Make the image 2vw wider on the left, so it fills the gap created by the text panel's gradient */
    margin-left: -2vw;
    width: calc(100% + 2vw);
}
.section--project .copyright {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.6rem;
    color: rgba(255,255,255,0.8);
    z-index: 4;
}

/* text elements */
.project-tag {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #999;
}
.project-title {
    margin: 0 0 1.2rem;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    line-height: 1.1;
    color: #111;
}
.project-body {
    text-align: justify;
    margin: 0 0 1.8rem;
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    font-weight: 300;
    line-height: 1.75;
    color: #444;
}
.project-link {
    display: inline-block;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
    transition: opacity 0.2s;
}
.project-link:hover { opacity: 0.5; }

/* small logo above title */
.project-logo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-bottom: 1rem;
    display: block;
}

/* ─── Contact section ────────────────────────────────────────── */
.section--contact {
    flex-direction: column;
    background: #fff;
    gap: 1.5vh;
}
.section--contact .section-watermark { color: rgba(0,0,0,0.03); }
.contact-logo {
    width: clamp(60px, 8vw, 90px);
    opacity: 0.15;
    margin-bottom: 1.5vh;
    z-index: 1;
}
.contact-tagline {
    margin: 0;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    font-style: italic;
    color: #777;
    z-index: 1;
}
.contact-label {
    margin: 1.5vh 0 0.3rem;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #999;
    z-index: 1;
}
.contact-body {
    margin: 0;
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    font-weight: 300;
    line-height: 1.9;
    color: #444;
    text-align: center;
    z-index: 1;
}
.contact-link {
    margin-top: 1vh;
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
    transition: opacity 0.2s;
    z-index: 1;
}
.contact-link:hover { opacity: 0.5; }

/* ─── GSAP animation layer (fixed, z below sections) ─────────── */
.logo-final  { z-index: 25; }
#sections    { z-index: 50; }

.logo-title {
	opacity: 0;
	color: #000;
	font-family: 'Cormorant Garamond', serif;
	font-weight: 300;
	position: fixed;
	left: 50%;
	transform: translate(-50%, -50%);
	white-space: nowrap;
	z-index: 25;
}
.logo-title-riparia {
	font-size: 3em;
	top: calc(30% + 19vh);
}
.logo-title-studio {
	font-size: 3.3em;
	top: calc(30% + 23vh);
}

.headline {
	opacity: 0;
	display: none;
	position: fixed;
	top: 58%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #000;
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-size: 1.1em;
	font-weight: 300;
	letter-spacing: 0.08em;
	white-space: nowrap;
	z-index: 25;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .headline {
        top: 65%;
    }
    /* image on top, text panel pinned to bottom */
    .section--project {
        flex-direction: column-reverse !important;
    }
    .section--project .project-text {
        flex: 0 0 auto;
        padding: 5vw 6vw;
        max-width: 100%;
        justify-content: flex-start;
        height: auto;
        background: #fff;
    }
    .section--project .project-image {
        flex: 1 1 auto;
        width: 100%;
        height: 55%;
        overflow: hidden; /* re-clip image on mobile */
    }
    /* fade image bottom into the white text panel */
    .section--project .project-image::after {
        background: linear-gradient(to top, #fff 0%, rgba(255,255,255,0.5) 20%, transparent 50%);
    }
    /* re-centre watermark (desktop rule pins it to the left text column) */
    .section--project .section-watermark {
        left: 50%;
        width: auto;
        transform: translate(-50%, -50%);
        overflow: visible;
    }
    .section-watermark {
        font-size: clamp(3rem, 18vw, 6rem);
    }
    /* hide animated mist border — doesn't suit vertical layout */
    .mist-canvas { display: none !important; }
    /* hide snav labels — too cramped on small screens */
    .snav-dot::before { display: none !important; }
}

/* ─── Scroll direction cursor ────────────────────────────── */
body.scroll-hint-down,
body.scroll-hint-down * { cursor: s-resize !important; }
body.scroll-hint-up,
body.scroll-hint-up *   { cursor: n-resize !important; }

/* ─── Project section without image ────────────────────── */
.section--no-image .project-text {
    flex: 0 0 65%;
    max-width: 700px;
    padding-right: 8vw;
}
.section--no-image .section-watermark {
    left: 50%;
    width: auto;
    transform: translate(-50%, -50%);
    text-align: center;
    overflow: visible;
}
/* ─── Section navigation (right side dots) ───────────── */
#section-nav {
    position: fixed;
    right: 1.8rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.3rem;
    z-index: 200;
    opacity: 0;
    /* Soft white mist behind the dots so they're readable over any image */
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.95))
            drop-shadow(0 0 18px rgba(255,255,255,0.6));
}
.snav-dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(0,0,0,0.32);
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, transform 0.3s, border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}
.snav-dot::before {
    content: attr(data-label);
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #111;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.snav-dot:hover::before,
.snav-dot.active::before { 
    opacity: 1.0; 
    font-weight: bold;
    filter: drop-shadow(0 0 2px #fff);
}
.snav-dot.active {
    background: rgba(0,0,0,0.72);
    border-color: rgba(0,0,0,0.72);
    transform: scale(1.5);
}
.snav-dot:hover:not(.active) { background: rgba(0,0,0,0.42); }