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

:root {
    --ink: #04141f;
    --foam: #f4fbfd;
    --aqua: #7fe3f0;
    --deep: #021019;
}

html { scroll-behavior: smooth; }
body {
    background: var(--deep);
    color: var(--foam);
    font-family: Inter, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { display: block; }

/* ---------- nav ---------- */
.nav {
    position: fixed; inset: 0 0 auto 0; z-index: 20;
    display: flex; justify-content: space-between; align-items: center;
    padding: 22px clamp(20px, 4vw, 56px);
    mix-blend-mode: normal;
}
.logo {
    color: var(--foam); text-decoration: none;
    font-family: Fraunces, serif; font-weight: 500; font-size: 22px; letter-spacing: .01em;
}
.logo span { font-weight: 300; font-style: italic; }
.nav-cta {
    color: var(--foam); text-decoration: none; font-size: 14px; font-weight: 500;
    padding: 10px 18px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px;
    backdrop-filter: blur(8px); background: rgba(255,255,255,.08);
    transition: background .3s;
}
.nav-cta:hover { background: rgba(255,255,255,.22); }

.btn {
    display: inline-block; border: 0; cursor: pointer;
    background: var(--foam); color: var(--ink);
    font: 600 15px Inter, sans-serif; text-decoration: none;
    padding: 16px 30px; border-radius: 999px;
    transition: transform .3s, box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.25); }

/* ---------- shared canvas ---------- */
canvas.water { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-fallback {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    animation: drift 30s ease-in-out infinite alternate;
}
.webgl .hero-fallback { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.hero-shade {
    position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(180deg, rgba(2,16,25,.45) 0%, rgba(2,16,25,0) 30%),
        linear-gradient(0deg, rgba(2,16,25,.85) 0%, rgba(2,16,25,0) 45%),
        linear-gradient(90deg, rgba(2,16,25,.45) 0%, rgba(2,16,25,0) 50%);
}
.hero-copy {
    position: absolute; left: clamp(20px, 6vw, 96px); bottom: clamp(60px, 12vh, 140px);
    pointer-events: none;
}
.hero-copy .btn { pointer-events: auto; margin-top: 34px; }
h1 {
    font-family: Fraunces, serif; font-weight: 300;
    font-size: clamp(52px, 9vw, 148px); line-height: .95; letter-spacing: -.02em;
    text-shadow: 0 2px 40px rgba(0,0,0,.25);
    animation: rise 1.6s cubic-bezier(.2,.7,.2,1) both;
}
h1 em { font-style: italic; color: var(--aqua); }
.hero-copy .btn { animation: rise 1.6s .35s cubic-bezier(.2,.7,.2,1) both; }

.scroll-cue {
    position: absolute; right: clamp(20px, 4vw, 56px); bottom: 40px;
    width: 1px; height: 70px; background: rgba(255,255,255,.25); overflow: hidden;
}
.scroll-cue span {
    position: absolute; left: 0; top: -30px; width: 1px; height: 30px; background: #fff;
    animation: cue 2.2s ease-in-out infinite;
}

/* ---------- deep / classes ---------- */
.deep { position: relative; min-height: 100vh; padding: 18vh clamp(16px, 4vw, 56px) 26vh; overflow: hidden; }
.deep::before, .deep::after { content: ""; position: absolute; left: 0; right: 0; height: 22vh; pointer-events: none; }
.deep::before { top: 0; background: linear-gradient(180deg, var(--deep), rgba(2,16,25,0)); }
.deep::after { bottom: 0; background: linear-gradient(0deg, var(--deep), rgba(2,16,25,0)); }
.classes {
    position: relative; z-index: 1; display: grid; gap: clamp(12px, 1.6vw, 24px);
    grid-template-columns: repeat(4, 1fr);
    max-width: 1500px; margin: 0 auto;
}
.card {
    position: relative; overflow: hidden; border-radius: 18px;
    aspect-ratio: 3 / 4.4; color: var(--foam); text-decoration: none;
    box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.card:nth-child(even) { transform: translateY(8vh); }
.card img {
    width: 100%; height: 100%; object-fit: cover;
    animation: drift 22s ease-in-out infinite alternate;
}
.card::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(2,16,25,.75), rgba(2,16,25,0) 50%);
}
.card span {
    position: absolute; left: 22px; bottom: 20px; z-index: 1;
    font-family: Fraunces, serif; font-size: clamp(20px, 1.8vw, 28px); font-weight: 300;
}

/* ---------- strip ---------- */
.strip { overflow: hidden; padding: 6vh 0; background: var(--deep); }
.track { display: flex; gap: 14px; width: max-content; animation: slide 70s linear infinite; }
.track img {
    height: clamp(220px, 38vh, 420px); width: auto; aspect-ratio: 4 / 3;
    object-fit: cover; border-radius: 14px;
}
.track img:nth-child(3n+2) { aspect-ratio: 3 / 4; }

/* ---------- who ---------- */
.who {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
    height: 100vh; min-height: 520px;
}
.panel { position: relative; overflow: hidden; }
.panel img {
    width: 100%; height: 100%; object-fit: cover; filter: saturate(.9);
    transition: transform 2s cubic-bezier(.2,.7,.2,1), filter 1s;
    animation: drift 26s ease-in-out infinite alternate;
}
.panel:nth-child(2) img { animation-delay: -9s; }
.panel:nth-child(3) img { animation-delay: -17s; }
.panel:hover img, .card:hover img { filter: saturate(1.15) brightness(1.05); }
.card img { transition: filter .8s; }
.panel::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(2,16,25,.7), rgba(2,16,25,0) 40%);
}
figcaption {
    position: absolute; left: clamp(18px, 3vw, 40px); bottom: clamp(24px, 6vh, 60px); z-index: 1;
    font-family: Fraunces, serif; font-weight: 300; font-size: clamp(24px, 2.6vw, 40px);
}

/* ---------- book ---------- */
.book { position: relative; height: 100vh; min-height: 560px; overflow: hidden; display: grid; place-items: center; }
.book-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(2,16,25,.55), rgba(2,16,25,.15) 70%); pointer-events: none; }
.search { position: relative; text-align: center; width: min(820px, 92vw); }
h2 {
    font-family: Fraunces, serif; font-weight: 300;
    font-size: clamp(40px, 6vw, 96px); letter-spacing: -.02em; margin-bottom: 36px;
    text-shadow: 0 2px 30px rgba(0,0,0,.3);
}
.fields {
    display: flex; gap: 8px; padding: 8px; border-radius: 999px;
    background: rgba(255,255,255,.14); backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.3);
}
.fields input, .fields select {
    flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
    color: var(--foam); font: 400 16px Inter, sans-serif; padding: 0 20px;
}
.fields input::placeholder { color: rgba(255,255,255,.75); }
.fields select option { color: var(--ink); }
.fields input { border-right: 1px solid rgba(255,255,255,.25); }
.thanks { margin-top: 18px; opacity: 0; transition: opacity .6s; }
.search.sent .thanks { opacity: 1; }

.foot {
    display: flex; justify-content: space-between; padding: 26px clamp(20px, 4vw, 56px);
    font-size: 13px; color: rgba(244,251,253,.5);
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; translate: 0 60px; transition: opacity 1.2s, translate 1.4s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; translate: 0 0; }
.classes .reveal:nth-child(2) { transition-delay: .12s; }
.classes .reveal:nth-child(3) { transition-delay: .24s; }
.classes .reveal:nth-child(4) { transition-delay: .36s; }
.who .reveal:nth-child(2) { transition-delay: .15s; }
.who .reveal:nth-child(3) { transition-delay: .3s; }

/* ---------- keyframes ---------- */
@keyframes drift { from { transform: scale(1.12) translate(0, 0); } to { transform: scale(1.2) translate(-2%, -1.5%); } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes rise  { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes cue   { 0% { top: -30px; } 100% { top: 70px; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .classes { grid-template-columns: repeat(2, 1fr); }
    .card:nth-child(even) { transform: translateY(5vh); }
    .who { grid-template-columns: 1fr; height: auto; }
    .panel { height: 70vh; }
}
@media (max-width: 560px) {
    .fields { flex-direction: column; border-radius: 22px; }
    .fields input, .fields select { padding: 14px 16px; }
    .fields input { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.25); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; translate: none; }
}
