/* =========================================================
   BLUE NEST — CINEMATIC MULTI-SCENE STYLE SYSTEM
   Intentionally distinct from LAB and NeuroGrid
   File: /lab/bluenest/assets/style.css
   ========================================================= */

:root {
    --rail-width: 260px;

    --amber-bg: #f8efe2;
    --amber-surface: rgba(255, 250, 241, 0.78);
    --amber-ink: #2f3a4a;
    --amber-soft: #6f7e90;
    --amber-accent: #c99658;

    --slate-bg: #1b232f;
    --slate-surface: rgba(29, 37, 49, 0.74);
    --slate-ink: #ecf2f8;
    --slate-soft: #a8b9c9;
    --slate-accent: #7ba2bf;

    --jade-bg: #13353a;
    --jade-surface: rgba(18, 53, 58, 0.72);
    --jade-ink: #ebf8f5;
    --jade-soft: #b8d9d4;
    --jade-accent: #8dc6bb;

    --wine-bg: #2b1f28;
    --wine-surface: rgba(43, 31, 40, 0.74);
    --wine-ink: #f8edf3;
    --wine-soft: #d8bccb;
    --wine-accent: #c58aa6;

    --night-bg: #10131d;
    --night-surface: rgba(20, 24, 37, 0.78);
    --night-ink: #eaf0ff;
    --night-soft: #a8b4d6;
    --night-accent: #8ea6ff;

    --shadow-soft: 0 22px 44px rgba(7, 13, 20, 0.2);
    --shadow-strong: 0 30px 68px rgba(4, 9, 15, 0.3);

    --radius-lg: 1.35rem;
    --radius-md: 0.96rem;
    --radius-sm: 0.7rem;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: var(--amber-ink);
    background: var(--amber-bg);
    line-height: 1.64;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
    margin: 0;
}

ul,
ol {
    list-style: none;
    padding: 0;
}

a,
button {
    color: inherit;
}

button {
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

/* =========================================================
   Ambient overlays
   ========================================================= */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.07;
    background-image: radial-gradient(circle at 1px 1px, rgba(8, 16, 24, 0.7) 1px, transparent 0);
    background-size: 3px 3px;
}

.spotlight {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 40%), rgba(255, 255, 255, 0.17), transparent 35%);
    mix-blend-mode: soft-light;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1200;
    background: rgba(0, 0, 0, 0.08);
}

.scroll-progress span {
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #cf9f64, #95afde, #c58aa6);
}

/* =========================================================
   Side Rail navigation (core identity difference)
   ========================================================= */
.side-rail {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--rail-width);
    height: 100vh;
    z-index: 1000;
    border-right: 1px solid rgba(35, 50, 66, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 250, 241, 0.94), rgba(247, 237, 220, 0.92));
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    padding: 1rem 0.86rem;
}

.rail-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.brand span {
    display: grid;
    gap: 0.08rem;
}

.brand strong {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand small {
    font-size: 0.68rem;
    color: #6f7e90;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rail-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 0.74rem;
    border: 1px solid rgba(35, 50, 66, 0.2);
    background: rgba(255, 255, 255, 0.8);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.24rem;
}

.rail-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #233446;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.rail-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(3px) rotate(45deg);
}

.rail-toggle[aria-expanded="true"] span:nth-child(2) {
    transform: translateY(-3px) rotate(-45deg);
}

.rail-nav {
    margin-top: 1rem;
    display: grid;
    gap: 0.42rem;
}

.nav-link {
    text-decoration: none;
    color: #5b6e82;
    font-size: 0.86rem;
    font-weight: 600;
    border-radius: 0.76rem;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.42);
    padding: 0.62rem 0.66rem;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
    color: #2a3b4f;
    border-color: rgba(201, 150, 88, 0.38);
    background: rgba(201, 150, 88, 0.14);
    transform: translateX(3px);
    outline: none;
}

.rail-reserve {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 999px;
    color: #263342;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0.72rem 0.92rem;
    border: 1px solid rgba(201, 150, 88, 0.38);
    background: linear-gradient(120deg, #f3d6ab, #c99658);
    box-shadow: 0 14px 28px rgba(173, 122, 58, 0.23);
}

/* =========================================================
   Stage / Scene system (very different layout paradigm)
   ========================================================= */
.stage {
    margin-left: var(--rail-width);
}

.scene {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: clamp(3rem, 7vw, 5.2rem) clamp(1rem, 4vw, 3rem);
    overflow: hidden;
}

.scene::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
    background:
        radial-gradient(circle at 10% 12%, rgba(255, 255, 255, 0.35), transparent 45%),
        radial-gradient(circle at 88% 82%, rgba(255, 255, 255, 0.25), transparent 48%);
}

.scene-grid {
    width: min(1240px, 100%);
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.kicker {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.66rem;
    opacity: 0.84;
}

/* Scene palettes */
.scene[data-theme="amber"] {
    color: var(--amber-ink);
    background: linear-gradient(180deg, #f8efe2 0%, #f4e7d5 100%);
}

.scene[data-theme="amber"] .kicker { color: #9b6e36; }

.scene[data-theme="slate"] {
    color: var(--slate-ink);
    background: linear-gradient(180deg, #222c39, #1a2330);
}

.scene[data-theme="slate"] .kicker { color: #9dc4de; }

.scene[data-theme="jade"] {
    color: var(--jade-ink);
    background: linear-gradient(180deg, #17464c, #13353a);
}

.scene[data-theme="jade"] .kicker { color: #b6e5dd; }

.scene[data-theme="wine"] {
    color: var(--wine-ink);
    background: linear-gradient(180deg, #352634, #2b1f28);
}

.scene[data-theme="wine"] .kicker { color: #e7b9cf; }

.scene[data-theme="night"] {
    color: var(--night-ink);
    background: linear-gradient(180deg, #161b28, #10131d);
}

.scene[data-theme="night"] .kicker { color: #b5c4ff; }

/* =========================================================
   Scene 01 Hero
   ========================================================= */
.hero-grid {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 1rem;
    align-items: center;
}

.hero-copy h1,
.rhythm-intro h2,
.menu-intro h2,
.gallery-head h2,
.chef-copy h2,
.reserve-copy h2 {
    font-family: "Times New Roman", Georgia, serif;
    letter-spacing: 0.01em;
}

.hero-copy h1 {
    font-size: clamp(2.25rem, 5vw, 4.8rem);
    line-height: 1.01;
    margin-bottom: 0.86rem;
    text-wrap: balance;
}

.hero-copy p {
    color: #5f6f82;
    max-width: 60ch;
}

.hero-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.64rem;
}

.hero-facts {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-facts li {
    border: 1px solid rgba(40, 57, 75, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    color: #364759;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.42rem 0.68rem;
}

.hero-photo {
    position: relative;
    border-radius: 2.4rem 2.4rem 1rem 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    border: 1px solid rgba(255, 255, 255, 0.64);
}

.hero-photo img {
    width: 100%;
    height: clamp(410px, 50vw, 650px);
    object-fit: cover;
}

.hero-photo figcaption {
    position: absolute;
    left: 0.7rem;
    bottom: 0.7rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f4f7fb;
    background: rgba(17, 27, 39, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.34rem 0.58rem;
}

.hero-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.44);
    pointer-events: none;
}

.ring-a {
    width: 130px;
    height: 130px;
    right: -36px;
    top: -36px;
    animation: spin 13s linear infinite;
}

.ring-b {
    width: 88px;
    height: 88px;
    left: -22px;
    bottom: 20%;
    animation: spin 8s linear infinite reverse;
}

/* Buttons */
.magnetic {
    --mx: 0px;
    --my: 0px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0.74rem 1.06rem;
    transform: translate3d(var(--mx), var(--my), 0);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translate3d(var(--mx), calc(var(--my) - 2px), 0);
    outline: none;
}

.btn-gold {
    color: #1f2a35;
    background: linear-gradient(120deg, #f2cf9f, #c99658);
    box-shadow: 0 14px 30px rgba(165, 114, 50, 0.28);
}

.btn-line {
    color: currentColor;
    border: 1px solid currentColor;
    background: transparent;
}

/* =========================================================
   Scene 02 Rhythm track
   ========================================================= */
.rhythm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

.rhythm-intro h2 {
    font-size: clamp(1.7rem, 3.5vw, 3rem);
    line-height: 1.1;
    margin-bottom: 0.64rem;
}

.rhythm-intro p {
    color: #a8b9c9;
}

.rhythm-image {
    margin-top: 1rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.rhythm-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.rhythm-track {
    border: 1px solid rgba(157, 196, 222, 0.28);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.9rem;
    display: grid;
    gap: 0.62rem;
}

.rhythm-track li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    align-items: start;
    border: 1px solid rgba(157, 196, 222, 0.23);
    border-radius: 0.86rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.66rem;
}

.rhythm-track span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(157, 196, 222, 0.45);
    color: #d2e6f7;
    font-size: 0.8rem;
    font-weight: 700;
}

.rhythm-track h3 {
    font-size: 1.02rem;
    margin-bottom: 0.18rem;
}

.rhythm-track p {
    color: #b3c3d2;
    font-size: 0.9rem;
}

/* =========================================================
   Scene 03 plating stage (overlap layout)
   ========================================================= */
.menu-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 1rem;
    align-items: center;
}

.menu-intro h2 {
    font-size: clamp(1.72rem, 3.5vw, 2.9rem);
    line-height: 1.1;
    margin-bottom: 0.66rem;
}

.menu-intro p {
    color: #bddfd9;
}

.plating-stage {
    position: relative;
    min-height: 520px;
}

.dish {
    position: absolute;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-strong);
    background: rgba(255, 255, 255, 0.05);
}

.dish img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dish figcaption {
    position: absolute;
    left: 0.6rem;
    bottom: 0.6rem;
    font-size: 0.75rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #edfaf8;
    background: rgba(10, 28, 32, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 0.3rem 0.52rem;
}

.dish-main {
    width: 58%;
    height: 330px;
    top: 0;
    left: 0;
}

.dish-side {
    width: 42%;
    height: 210px;
    top: 22px;
    right: 0;
}

.dish-side-2 {
    width: 42%;
    height: 210px;
    right: 0;
    bottom: 96px;
}

.menu-notes {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 58%;
    border: 1px solid rgba(141, 198, 187, 0.44);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.74rem;
}

.menu-notes h3 {
    font-size: 0.98rem;
    margin-bottom: 0.34rem;
}

.menu-notes ul {
    display: grid;
    gap: 0.4rem;
}

.menu-notes li {
    position: relative;
    color: #c6e6e0;
    padding-left: 0.9rem;
    font-size: 0.88rem;
}

.menu-notes li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.48rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c8f4ec;
}

/* =========================================================
   Scene 04 film frames
   ========================================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    align-items: start;
}

.gallery-head {
    grid-column: 1 / -1;
}

.gallery-head h2 {
    font-size: clamp(1.66rem, 3.3vw, 2.8rem);
    line-height: 1.12;
}

.film-frame {
    border: 1px solid rgba(197, 138, 166, 0.3);
    border-radius: 1.1rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: var(--shadow-soft);
}

.film-frame img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.frame-copy {
    padding: 0.74rem;
}

.frame-copy h3 {
    font-size: 1rem;
    margin-bottom: 0.24rem;
}

.frame-copy p {
    color: #d9c3d0;
    font-size: 0.9rem;
}

/* =========================================================
   Scene 05 Chef
   ========================================================= */
.chef-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1rem;
    align-items: center;
}

.chef-photo {
    border-radius: 1.7rem 1.7rem 0.9rem 0.9rem;
    overflow: hidden;
    border: 1px solid rgba(47, 58, 74, 0.2);
    box-shadow: var(--shadow-strong);
}

.chef-photo img {
    width: 100%;
    height: clamp(340px, 43vw, 560px);
    object-fit: cover;
}

.chef-copy h2 {
    font-size: clamp(1.76rem, 3.4vw, 3rem);
    line-height: 1.1;
    margin-bottom: 0.64rem;
}

.chef-copy blockquote {
    border-left: 3px solid rgba(201, 150, 88, 0.48);
    padding-left: 0.74rem;
    color: #657589;
    font-size: clamp(1rem, 1.9vw, 1.2rem);
    font-style: italic;
    line-height: 1.66;
}

.signature {
    margin-top: 0.7rem;
    color: #7d8896;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* =========================================================
   Scene 06 Reserve (dashboard style)
   ========================================================= */
.reserve-grid {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 1rem;
    align-items: center;
    border: 1px solid rgba(142, 166, 255, 0.3);
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: var(--shadow-strong);
    padding: 1rem;
}

.reserve-copy h2 {
    font-size: clamp(1.66rem, 3.3vw, 2.8rem);
    line-height: 1.12;
    margin-bottom: 0.6rem;
}

.reserve-copy p {
    color: #a8b4d6;
}

.reserve-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.64rem;
}

.reserve-details {
    border: 1px solid rgba(142, 166, 255, 0.36);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.reserve-details li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border-bottom: 1px solid rgba(142, 166, 255, 0.2);
    padding: 0.72rem 0.8rem;
}

.reserve-details li:last-child {
    border-bottom: 0;
}

.reserve-details span {
    color: #9fb0d6;
    font-size: 0.86rem;
}

.reserve-details strong {
    color: #e7efff;
    font-size: 0.9rem;
}

/* =========================================================
   Footer + scroll top
   ========================================================= */
.site-footer {
    margin-left: var(--rail-width);
    border-top: 1px solid rgba(35, 50, 66, 0.14);
    padding: 1.2rem 1rem 1.5rem;
    text-align: center;
    color: #6c7a8a;
    background: #f1e6d3;
}

.site-footer p {
    font-size: 0.84rem;
}

.scroll-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(94, 118, 180, 0.4);
    background: linear-gradient(130deg, #d6e0ff, #95afde);
    color: #243142;
    display: grid;
    place-items: center;
    font-size: 1rem;
    box-shadow: 0 16px 32px rgba(12, 23, 37, 0.2);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    z-index: 999;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.scroll-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* =========================================================
   Motion helpers
   ========================================================= */
.parallax-item {
    --py: 0px;
}

.parallax-item:not(.tilt-card) {
    transform: translate3d(0, var(--py), 0);
}

.tilt-card {
    --rx: 0deg;
    --ry: 0deg;
    transform: translate3d(0, var(--py, 0px), 0) perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
    transform-style: preserve-3d;
    transition: transform 0.24s ease;
}

.reveal {
    opacity: 0;
    transform: translateY(24px) scale(0.99);
    transition:
        opacity 0.76s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.76s cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: var(--d, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* =========================================================
   Keyframes
   ========================================================= */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1200px) {
    :root {
        --rail-width: 220px;
    }

    .hero-grid,
    .rhythm-grid,
    .menu-grid,
    .gallery-grid,
    .chef-grid,
    .reserve-grid {
        grid-template-columns: 1fr;
    }

    .plating-stage {
        min-height: 640px;
    }
}

@media (max-width: 980px) {
    :root {
        --rail-width: 0px;
    }

    .side-rail {
        width: 100%;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(35, 50, 66, 0.12);
        padding: 0.6rem 0.8rem;
    }

    .rail-toggle {
        display: inline-flex;
    }

    .rail-nav {
        display: none;
        margin-top: 0.6rem;
    }

    .rail-nav.is-open {
        display: grid;
    }

    .rail-reserve {
        display: none;
    }

    .stage,
    .site-footer {
        margin-left: 0;
    }

    .scene {
        min-height: auto;
        padding-top: 4.5rem;
    }

    .dish-main,
    .dish-side,
    .dish-side-2,
    .menu-notes {
        position: static;
        width: 100%;
        height: auto;
        margin-bottom: 0.6rem;
    }

    .dish img {
        height: 260px;
    }

    .plating-stage {
        min-height: 0;
    }
}

@media (max-width: 760px) {
    .hero-actions,
    .reserve-actions {
        width: 100%;
    }

    .hero-actions .btn,
    .reserve-actions .btn {
        width: 100%;
    }

    .hero-facts {
        display: grid;
        grid-template-columns: 1fr;
    }

    .rhythm-track li {
        grid-template-columns: 1fr;
    }

    .rhythm-track span {
        width: 48px;
        height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .spotlight,
    .grain,
    .hero-ring {
        display: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
