/* ============================================================
   namu.market — Submarine Cottagecore Editorial
   Palette: navy-metallic with aurora accents
   ============================================================ */

:root {
    --deep-ocean: #0B1426;
    --ink-surface: #152238;
    --ink-deep: #1E3050;
    --glass-edge: #3A5A7C;
    --silver-mist: #C8D6E5;
    --pearl-white: #EDF2F7;
    --aurora-teal: #2CFFD1;
    --aurora-violet: #7B68EE;
    --aurora-rose: #FF6B9D;
    --metallic-gold: #C9A96E;
    --frost: rgba(21, 34, 56, 0.7);

    --font-display: "Playfair Display", Georgia, serif;
    --font-body: "Source Sans 3", "Inter", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", "Space Mono", monospace;

    --aurora-gradient: linear-gradient(135deg, #2CFFD1 0%, #7B68EE 50%, #FF6B9D 100%);
    --reading-gradient: linear-gradient(180deg, #0B1426 0%, #152238 60%, #1E3050 100%);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--deep-ocean);
    color: var(--silver-mist);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    line-height: 1.7;
    font-weight: 300;
    font-size: 17px;
    position: relative;
    min-height: 100vh;
}

/* ====== Progress Bar ====== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--aurora-gradient);
    z-index: 100;
    transition: width 80ms linear;
    box-shadow: 0 0 12px rgba(123, 104, 238, 0.55);
}

/* ====== Aurora Backdrop (page-wide) ====== */
.aurora-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.aurora-layer {
    position: absolute;
    inset: -20%;
    mix-blend-mode: screen;
    opacity: 0.18;
    filter: blur(60px);
}

.aurora-1 {
    background: radial-gradient(ellipse at 20% 30%, var(--aurora-teal) 0%, transparent 55%);
    background-size: 400% 400%;
    animation: aurora-drift-1 60s ease-in-out infinite;
}

.aurora-2 {
    background: radial-gradient(ellipse at 80% 40%, var(--aurora-violet) 0%, transparent 50%);
    background-size: 400% 400%;
    animation: aurora-drift-2 50s ease-in-out infinite;
}

.aurora-3 {
    background: radial-gradient(ellipse at 50% 80%, var(--aurora-rose) 0%, transparent 45%);
    background-size: 400% 400%;
    animation: aurora-drift-3 70s ease-in-out infinite;
}

@keyframes aurora-drift-1 {
    0%, 100% { background-position: 0% 50%; transform: translate(0, 0); }
    50% { background-position: 100% 50%; transform: translate(4%, -3%); }
}
@keyframes aurora-drift-2 {
    0%, 100% { background-position: 100% 0%; transform: translate(0, 0); }
    50% { background-position: 0% 100%; transform: translate(-3%, 4%); }
}
@keyframes aurora-drift-3 {
    0%, 100% { background-position: 50% 100%; transform: translate(0, 0); }
    50% { background-position: 50% 0%; transform: translate(2%, -2%); }
}

/* ====== Ambient Bubbles ====== */
.ambient-bubbles {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.ambient-bubble {
    position: absolute;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, rgba(44,255,209,0.20), transparent 70%),
        radial-gradient(circle at 70% 70%, rgba(123,104,238,0.10), transparent 65%),
        rgba(58, 90, 124, 0.06);
    box-shadow:
        inset 0 0 12px rgba(44,255,209,0.12),
        inset 6px 6px 16px rgba(237,242,247,0.08),
        0 4px 14px rgba(0,0,0,0.25);
    animation: drift-up var(--drift-time, 28s) linear infinite;
    opacity: 0;
}

@keyframes drift-up {
    0% { transform: translate(0, 100vh) scale(0.9); opacity: 0; }
    8% { opacity: 0.6; }
    92% { opacity: 0.5; }
    100% { transform: translate(var(--drift-x, 0), -120vh) scale(1.05); opacity: 0; }
}

/* ====== Topbar ====== */
.topbar {
    position: fixed;
    top: 2px;
    left: 0;
    right: 0;
    height: 56px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
    background: linear-gradient(180deg, rgba(11,20,38,0.85), rgba(11,20,38,0));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.wordmark {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    color: var(--pearl-white);
    font-size: 22px;
    letter-spacing: 0.2px;
}

.wordmark .dot { color: var(--aurora-teal); }

.hamburger {
    background: transparent;
    border: 1px solid rgba(58, 90, 124, 0.5);
    width: 38px;
    height: 30px;
    padding: 7px 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    border-radius: 2px;
    transition: border-color 400ms ease;
}

.hamburger span {
    height: 1px;
    background: var(--silver-mist);
    width: 100%;
    transition: transform 400ms ease, opacity 400ms ease;
}

.hamburger:hover { border-color: var(--aurora-teal); }
.hamburger:hover span { background: var(--pearl-white); }

.hamburger.open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* ====== Terrarium Column ====== */
.terrarium-column {
    position: relative;
    z-index: 2;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 40px;
}

.terrarium-column::before,
.terrarium-column::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: 1px;
    pointer-events: none;
    z-index: 3;
    background: linear-gradient(180deg,
        rgba(58, 90, 124, 0) 0%,
        rgba(58, 90, 124, 0.45) 25%,
        rgba(58, 90, 124, 0.45) 75%,
        rgba(58, 90, 124, 0) 100%);
}

.terrarium-column::before { left: max(40px, calc(50vw - 460px)); }
.terrarium-column::after { right: max(40px, calc(50vw - 460px)); }

/* ====== Spread (generic section) ====== */
.spread {
    position: relative;
    width: 100%;
    padding: 120px 0;
}

.spread-heading {
    text-align: left;
    margin-bottom: 64px;
    padding-top: 24px;
}

.spread-heading .eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--metallic-gold);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 18px;
}

.spread-heading h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 42px;
    line-height: 1.15;
    color: var(--pearl-white);
    letter-spacing: -0.5px;
}

/* ====== Spread 1 — Opening Tableau ====== */
.spread-opening {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 56px;
    overflow: hidden;
}

.opening-content {
    position: relative;
    z-index: 5;
    max-width: 760px;
    padding: 0 24px;
}

.hero-wordmark {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 72px;
    color: var(--pearl-white);
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 32px;
}

.hero-dot { color: var(--aurora-teal); font-style: normal; }

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 19px;
    line-height: 1.7;
    color: var(--silver-mist);
    max-width: 560px;
    margin: 0 auto;
    letter-spacing: 0.3px;
}

.opening-bubble {
    position: absolute;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
}

.bubble-large {
    background:
        radial-gradient(circle at 30% 30%, rgba(44,255,209,0.18), transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(123,104,238,0.12), transparent 65%),
        radial-gradient(circle at 50% 50%, rgba(255,107,157,0.05), transparent 70%);
    box-shadow:
        inset 0 0 60px rgba(44,255,209,0.08),
        inset -8px -16px 30px rgba(0,0,0,0.18),
        inset 8px 12px 20px rgba(237,242,247,0.06),
        0 12px 60px rgba(0,0,0,0.45);
    border: 1px solid rgba(200, 214, 229, 0.06);
}

.bubble-pos-1 {
    width: 240px; height: 240px;
    top: 12%; left: 8%;
    animation: bubble-float-1 28s ease-in-out infinite;
}
.bubble-pos-2 {
    width: 180px; height: 180px;
    top: 20%; right: 10%;
    animation: bubble-float-2 32s ease-in-out infinite;
}
.bubble-pos-3 {
    width: 160px; height: 160px;
    bottom: 14%; left: 24%;
    animation: bubble-float-3 36s ease-in-out infinite;
}

@keyframes bubble-float-1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(12px, -18px); }
    66% { transform: translate(-8px, 14px); }
}
@keyframes bubble-float-2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-14px, 20px); }
}
@keyframes bubble-float-3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-10px, -12px); }
    66% { transform: translate(14px, 8px); }
}

.opening-flora {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: auto;
    stroke: var(--glass-edge);
    stroke-width: 1;
    fill: none;
    opacity: 0.45;
    z-index: 4;
}

.opening-flora circle { fill: var(--glass-edge); fill-opacity: 0.4; }

/* ====== Spread 2 — Curatorial Statement ====== */
.spread-curatorial {
    padding: 120px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.narrative-strip {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding: 60px 0;
}

.margin-flora {
    position: absolute;
    top: 0;
    width: 60px;
    height: 100%;
    stroke: var(--glass-edge);
    stroke-width: 1;
    fill: none;
    opacity: 0.4;
}

.margin-flora.left { left: -120px; }

.narrative-strip p {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 19px;
    line-height: 1.8;
    color: var(--silver-mist);
    margin-bottom: 32px;
}

.narrative-strip .lede {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 28px;
    line-height: 1.4;
    color: var(--pearl-white);
    margin-bottom: 48px;
}

/* ====== Spread 3 — Product Terrarium Gallery ====== */
.spread-gallery {
    min-height: 120vh;
}

.paired-block {
    display: grid;
    grid-template-columns: 5fr 3fr;
    gap: 56px;
    align-items: center;
    padding: 60px 0;
    position: relative;
}

.paired-block.paired-right {
    grid-template-columns: 3fr 5fr;
}

.paired-text h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 32px;
    color: var(--pearl-white);
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.poetic {
    font-family: var(--font-body);
    font-style: italic;
    font-weight: 300;
    font-size: 17px;
    line-height: 1.7;
    color: var(--silver-mist);
    margin-bottom: 28px;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 24px;
}

.code {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 13px;
    color: var(--silver-mist);
    opacity: 0.65;
    letter-spacing: 0.04em;
}

.price {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 16px;
    color: var(--metallic-gold);
    letter-spacing: 0.04em;
}

.paired-bubble {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ====== Bubble Frames (product) ====== */
.bubble-frame {
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

.bubble-product {
    width: 220px;
    height: 220px;
}

.bubble-medium {
    width: 180px;
    height: 180px;
}

.bubble-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle at 30% 30%, rgba(237,242,247,0.22), transparent 35%),
        radial-gradient(circle at 70% 70%, rgba(123,104,238,0.10), transparent 60%);
}

.bubble-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: 3;
    pointer-events: none;
    box-shadow:
        inset 0 0 30px rgba(44,255,209,0.10),
        inset -10px -20px 40px rgba(0,0,0,0.30),
        inset 10px 16px 24px rgba(237,242,247,0.10),
        0 8px 32px rgba(0,0,0,0.4),
        0 0 40px rgba(44,255,209,0.08);
    border: 1px solid rgba(200, 214, 229, 0.10);
}

.bubble-tint-teal {
    background:
        radial-gradient(circle at 30% 30%, rgba(44,255,209,0.18), transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(58,90,124,0.50), rgba(11,20,38,0.85));
}

.bubble-tint-violet {
    background:
        radial-gradient(circle at 30% 30%, rgba(123,104,238,0.22), transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(58,90,124,0.50), rgba(11,20,38,0.85));
}

.bubble-tint-rose {
    background:
        radial-gradient(circle at 30% 30%, rgba(255,107,157,0.18), transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(58,90,124,0.50), rgba(11,20,38,0.85));
}

.bubble-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bubble-inner svg {
    width: 50%;
    height: 50%;
    stroke: var(--silver-mist);
    stroke-width: 1.4;
    fill: none;
    opacity: 0.85;
}

.bubble-inner svg circle,
.bubble-inner svg ellipse {
    fill: var(--silver-mist);
    fill-opacity: 0.18;
}

/* Thread line */
.thread-line {
    border: none;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(201, 169, 110, 0.5) 50%,
        transparent 100%);
    margin: 24px 0;
}

/* ====== Spread 4 — Aurora Interlude ====== */
.spread-aurora {
    padding: 0;
    min-height: 100vh;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.aurora-interlude {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: var(--reading-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.interlude-aurora {
    position: absolute;
    inset: -10%;
    mix-blend-mode: screen;
    filter: blur(70px);
    opacity: 0.40;
}

.aurora-i-1 {
    background: radial-gradient(ellipse at 20% 30%, var(--aurora-teal) 0%, transparent 50%);
    background-size: 400% 400%;
    animation: aurora-drift-1 45s ease-in-out infinite;
}
.aurora-i-2 {
    background: radial-gradient(ellipse at 70% 50%, var(--aurora-violet) 0%, transparent 45%);
    background-size: 400% 400%;
    animation: aurora-drift-2 38s ease-in-out infinite;
}
.aurora-i-3 {
    background: radial-gradient(ellipse at 50% 80%, var(--aurora-rose) 0%, transparent 50%);
    background-size: 400% 400%;
    animation: aurora-drift-3 52s ease-in-out infinite;
}

.interlude-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.interlude-bubble {
    position: absolute;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, rgba(237,242,247,0.22), transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(123,104,238,0.12), transparent 65%);
    box-shadow:
        inset 0 0 14px rgba(44,255,209,0.18),
        0 4px 18px rgba(0,0,0,0.20);
    border: 1px solid rgba(200,214,229,0.08);
    animation: drift-up var(--drift-time, 30s) linear infinite;
    opacity: 0;
}

.interlude-mark {
    position: relative;
    z-index: 5;
    text-align: center;
}

.interlude-mark .micro {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--silver-mist);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    opacity: 0.7;
}

/* ====== Spread 5 — Artisan Narratives ====== */
.spread-artisans {
    min-height: 100vh;
    padding: 120px 0;
}

.vignette {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 48px;
    align-items: start;
    padding: 40px 0;
    max-width: 720px;
    margin: 0 auto;
}

.vignette-flora {
    width: 80px;
    height: auto;
    stroke: var(--glass-edge);
    stroke-width: 1;
    fill: none;
    opacity: 0.55;
}

.vignette-flora circle,
.vignette-flora ellipse {
    fill: var(--glass-edge);
    fill-opacity: 0.35;
}

.vignette-text h4 {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 26px;
    color: var(--pearl-white);
    margin-bottom: 16px;
    letter-spacing: -0.2px;
}

.vignette-text p {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 17px;
    line-height: 1.75;
    color: var(--silver-mist);
}

/* ====== Spread 6 — Seasonal Collection ====== */
.spread-seasonal {
    min-height: 80vh;
    padding: 120px 0;
}

.constellation {
    position: relative;
    padding: 60px 0;
}

.constellation-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    stroke: var(--glass-edge);
    stroke-width: 1;
    stroke-dasharray: 2 5;
    fill: none;
    opacity: 0.45;
    pointer-events: none;
}

.constellation-lines circle {
    fill: var(--glass-edge);
    fill-opacity: 0.7;
    stroke: none;
}

.seasonal-row {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: start;
}

.seasonal-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.seasonal-item h5 {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 18px;
    color: var(--pearl-white);
    margin: 0;
}

.seasonal-item .single-word {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--metallic-gold);
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

/* ====== Spread 7 — Closing Atmosphere ====== */
.spread-closing {
    padding: 0;
    min-height: 60vh;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    overflow: hidden;
}

.closing-aurora {
    position: absolute;
    inset: 0;
    background: var(--reading-gradient);
    z-index: 0;
    overflow: hidden;
}

.closing-aurora-layer {
    position: absolute;
    inset: -20%;
    mix-blend-mode: screen;
    filter: blur(80px);
    opacity: 0.30;
}

.cl-1 {
    background: radial-gradient(ellipse at 30% 50%, var(--aurora-teal) 0%, transparent 50%);
    background-size: 400% 400%;
    animation: aurora-drift-1 60s ease-in-out infinite;
}
.cl-2 {
    background: radial-gradient(ellipse at 70% 50%, var(--aurora-violet) 0%, transparent 50%);
    background-size: 400% 400%;
    animation: aurora-drift-2 55s ease-in-out infinite;
}
.cl-3 {
    background: radial-gradient(ellipse at 50% 70%, var(--aurora-rose) 0%, transparent 45%);
    background-size: 400% 400%;
    animation: aurora-drift-3 65s ease-in-out infinite;
}

.closing-content {
    position: relative;
    z-index: 5;
    height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    text-align: center;
}

.closing-wordmark {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 48px;
    color: var(--pearl-white);
    letter-spacing: -0.5px;
}

.micro-mail {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--silver-mist);
    opacity: 0.7;
    letter-spacing: 0.1em;
}

/* ====== Reveal animation ====== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
    will-change: opacity, transform;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ====== Responsive ====== */
@media (max-width: 920px) {
    .terrarium-column { padding: 0 28px; }
    .terrarium-column::before,
    .terrarium-column::after { display: none; }

    .hero-wordmark { font-size: 56px; }
    .hero-tagline { font-size: 17px; }

    .narrative-strip .lede { font-size: 24px; }
    .margin-flora.left { display: none; }

    .paired-block,
    .paired-block.paired-right {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    .paired-text h3 { font-size: 26px; }
    .paired-bubble { order: 2; }
    .paired-block.paired-right .paired-bubble { order: 1; }
    .paired-block.paired-right .paired-text { order: 2; }
    .meta-row { justify-content: center; }

    .spread-heading h2 { font-size: 32px; }
    .vignette { grid-template-columns: 1fr; gap: 24px; }
    .vignette-flora { width: 60px; }
    .seasonal-row { grid-template-columns: repeat(2, 1fr); gap: 36px; }
    .closing-wordmark { font-size: 36px; }

    .bubble-pos-1 { width: 140px; height: 140px; }
    .bubble-pos-2 { width: 120px; height: 120px; }
    .bubble-pos-3 { width: 100px; height: 100px; }
}

@media (max-width: 520px) {
    .seasonal-row { grid-template-columns: 1fr; }
    .spread { padding: 80px 0; }
    .hero-wordmark { font-size: 44px; }
    .topbar { padding: 0 20px; }
}
