/* tanso.center - Liquid Chrome Blobitecture */
/* Colors: #0d0d12, #1a1b24, #c0c5d0, #e8ecf4, #7de8e8, #d4a053, #3a3d4e, #8b90a8 */

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #0d0d12;
    color: #c0c5d0;
    font-family: "Quicksand", sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* ============================================
   NAVIGATION PILL
   ============================================ */
#nav-pill {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
}

#nav-trigger {
    width: 48px;
    height: 48px;
    border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
    background: linear-gradient(135deg, #3a3d4e 0%, #8b90a8 45%, #c0c5d0 70%, #e8ecf4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-radius 0.6s ease-in-out, transform 0.3s ease;
    box-shadow: 0 0 30px rgba(125, 232, 232, 0.06);
}

#nav-trigger:hover {
    border-radius: 50% 50% 50% 50%;
    transform: scale(1.1);
}

#nav-glyph {
    font-family: "Varela Round", sans-serif;
    font-size: 1.4rem;
    color: #0d0d12;
    line-height: 1;
}

#nav-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    background: rgba(13, 13, 18, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 45% 55% 50% 50% / 40% 50% 50% 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    opacity: 0;
    transition: width 0.4s ease, height 0.4s ease, opacity 0.3s ease, border-radius 0.6s ease;
}

#nav-pill.open #nav-overlay {
    width: 280px;
    height: 360px;
    opacity: 1;
    border-radius: 35% 65% 55% 45% / 45% 55% 45% 55%;
}

#nav-pill.open #nav-trigger {
    opacity: 0;
    pointer-events: none;
}

.nav-link {
    font-family: "Varela Round", sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #c0c5d0;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.4rem 1rem;
}

.nav-link:hover {
    color: #7de8e8;
}

/* ============================================
   GLITCH LAYER
   ============================================ */
#glitch-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.glitch-band {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #7de8e8;
    opacity: 0;
    transform: translateX(0);
}

.glitch-band.active {
    opacity: 0.4;
    animation: glitchSlide 0.15s ease-out forwards;
}

@keyframes glitchSlide {
    0% { transform: translateX(0); opacity: 0.4; }
    50% { transform: translateX(5px); opacity: 0.6; }
    100% { transform: translateX(0); opacity: 0; }
}

body.glitch-active {
    filter: hue-rotate(15deg);
}

/* ============================================
   CHAMBERS (SECTIONS)
   ============================================ */
.chamber {
    position: relative;
    overflow: hidden;
}

.chamber-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, #1a1b24 0%, #0d0d12 100%);
    z-index: 0;
}

.chamber-bg-surface {
    background: radial-gradient(ellipse at 50% 30%, #1a1b24 0%, #1a1b24 100%);
}

.chamber-bg-dark {
    background: radial-gradient(ellipse at 50% 40%, #131420 0%, #0d0d12 100%);
}

.chamber-bg-void {
    background: #0d0d12;
}

.membrane {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 5;
    display: block;
}

/* ============================================
   CHROME BLOBS
   ============================================ */
.chrome-blob {
    background: linear-gradient(135deg, #3a3d4e 0%, #8b90a8 45%, #c0c5d0 70%, #e8ecf4 100%);
    position: relative;
    z-index: 2;
}

.blob-shadow {
    position: absolute;
    background: rgba(13, 13, 18, 0.5);
    filter: blur(30px);
    opacity: 0.3;
    z-index: 1;
}

.blob-glitch-clone {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    clip-path: inset(45% 0 52% 0);
    transform: translateX(0);
    opacity: 0;
    filter: hue-rotate(180deg);
    pointer-events: none;
    z-index: 10;
}

.glitch-active .blob-glitch-clone {
    opacity: 0.6;
    transform: translateX(4px);
}

/* ============================================
   SPECTRAL EDGE LINES
   ============================================ */
.spectral-edge {
    position: absolute;
    z-index: 3;
    pointer-events: none;
}

.spectral-path {
    animation: spectralCrawl 8s linear infinite;
}

@keyframes spectralCrawl {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 100; }
}

/* ============================================
   CHROME TEXT
   ============================================ */
.chrome-text {
    background: linear-gradient(90deg, #3a3d4e 0%, #8b90a8 25%, #c0c5d0 50%, #e8ecf4 75%, #c0c5d0 100%);
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-position: 100% 0;
    transition: background-position 1.2s ease;
}

.chrome-text.revealed {
    background-position: 0% 0;
}

/* ============================================
   SECTION 1: FULLERENE CHAMBER
   ============================================ */
#fullerene {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero-blob {
    width: clamp(320px, 65vw, 700px);
    height: clamp(320px, 65vw, 700px);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 80px rgba(125, 232, 232, 0.08);
    animation: blobBreathe1 14.5s ease-in-out infinite;
    transform: scale(0.85);
    transition: transform 0.8s ease-out;
}

#hero-blob.in-view {
    transform: scale(1);
}

.blob-shadow-1 {
    width: clamp(340px, 67vw, 740px);
    height: clamp(340px, 67vw, 740px);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 50%;
    left: 50%;
    transform: translate(calc(-50% + 10px), calc(-50% + 20px));
    animation: blobBreathe1 14.5s ease-in-out infinite;
}

.blob-shadow-2 {
    width: clamp(360px, 70vw, 760px);
    height: clamp(360px, 70vw, 760px);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 50%;
    left: 50%;
    transform: translate(calc(-50% + 15px), calc(-50% + 25px));
    background: rgba(13, 13, 18, 0.3);
    filter: blur(50px);
    opacity: 0.2;
    animation: blobBreathe1 14.5s ease-in-out infinite;
}

#hero-title {
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: clamp(3.5rem, 8vw, 7rem);
    letter-spacing: -0.03em;
    line-height: 1;
}

.hero-subtitle {
    font-family: "Varela Round", sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8b90a8;
    margin-top: 1rem;
}

.spectral-edge-hero {
    width: clamp(360px, 70vw, 760px);
    height: clamp(360px, 70vw, 760px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Blob Breathing Keyframes */
@keyframes blobBreathe1 {
    0%   { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25%  { border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%; }
    50%  { border-radius: 40% 60% 65% 35% / 35% 55% 45% 65%; }
    75%  { border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

@keyframes blobBreathe2 {
    0%   { border-radius: 40% 60% 65% 35% / 35% 55% 45% 65%; }
    33%  { border-radius: 55% 45% 50% 50% / 45% 50% 50% 55%; }
    66%  { border-radius: 35% 65% 55% 45% / 55% 45% 55% 45%; }
    100% { border-radius: 40% 60% 65% 35% / 35% 55% 45% 65%; }
}

@keyframes blobBreathe3 {
    0%   { border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%; }
    33%  { border-radius: 35% 65% 60% 40% / 40% 55% 45% 55%; }
    66%  { border-radius: 60% 40% 45% 55% / 55% 50% 50% 45%; }
    100% { border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%; }
}

/* ============================================
   SECTION 2: LATTICE CORRIDOR
   ============================================ */
#lattice {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem;
}

.lattice-pattern {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.corridor-content {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.corridor-text {
    font-family: "Quicksand", sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    color: #c0c5d0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.corridor-text.revealed {
    opacity: 1;
    transform: translateY(0);
}

.amber-accent {
    color: #d4a053;
    font-weight: 600;
}

/* ============================================
   SECTION 3: NANOTUBE GALLERY
   ============================================ */
#nanotube {
    min-height: 150vh;
    padding: 6rem 2rem 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-stack {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.gallery-blob-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-blob-wrapper .blob-shadow {
    width: 105%;
    height: 105%;
    border-radius: inherit;
    top: 20px;
    left: 10px;
}

.gallery-blob-wrapper .spectral-edge {
    position: absolute;
    inset: -15px;
}

.gallery-blob {
    width: clamp(300px, 55vw, 550px);
    height: clamp(250px, 40vw, 400px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 80px rgba(125, 232, 232, 0.08);
    transform: scale(0.85);
    transition: transform 0.8s ease-out;
    overflow: hidden;
}

.gallery-blob.in-view {
    transform: scale(1);
}

.gallery-blob-1 {
    margin-bottom: -8%;
    z-index: 3;
}

.gallery-blob-1 .gallery-blob {
    border-radius: 40% 60% 65% 35% / 35% 55% 45% 65%;
    animation: blobBreathe1 12s ease-in-out infinite;
}
.gallery-blob-1 .blob-shadow {
    border-radius: 40% 60% 65% 35% / 35% 55% 45% 65%;
    animation: blobBreathe1 12s ease-in-out infinite;
}

.gallery-blob-2 {
    margin-bottom: -8%;
    z-index: 2;
}

.gallery-blob-2 .gallery-blob {
    border-radius: 55% 45% 50% 50% / 45% 50% 50% 55%;
    animation: blobBreathe2 15s ease-in-out infinite;
}
.gallery-blob-2 .blob-shadow {
    border-radius: 55% 45% 50% 50% / 45% 50% 50% 55%;
    animation: blobBreathe2 15s ease-in-out infinite;
}

.gallery-blob-3 {
    z-index: 1;
}

.gallery-blob-3 .gallery-blob {
    border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%;
    animation: blobBreathe3 17s ease-in-out infinite;
}
.gallery-blob-3 .blob-shadow {
    border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%;
    animation: blobBreathe3 17s ease-in-out infinite;
}

.gallery-title {
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    letter-spacing: -0.03em;
    position: relative;
    z-index: 5;
}

/* Glitch compositions inside gallery blobs */
.glitch-composition {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.glitch-strip {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #7de8e8;
    opacity: 0.15;
}

.comp-1 .glitch-strip:nth-child(1) { top: 25%; width: 60%; left: 10%; }
.comp-1 .glitch-strip:nth-child(2) { top: 50%; width: 40%; left: 30%; }
.comp-1 .glitch-strip:nth-child(3) { top: 75%; width: 70%; left: 5%; }

.comp-2 .glitch-strip:nth-child(1) { top: 20%; width: 50%; left: 25%; }
.comp-2 .glitch-strip:nth-child(2) { top: 55%; width: 65%; left: 10%; }
.comp-2 .glitch-strip:nth-child(3) { top: 80%; width: 35%; left: 40%; }

.comp-3 .glitch-strip:nth-child(1) { top: 30%; width: 55%; left: 20%; }
.comp-3 .glitch-strip:nth-child(2) { top: 45%; width: 45%; left: 15%; }
.comp-3 .glitch-strip:nth-child(3) { top: 70%; width: 60%; left: 25%; }

.glitch-rect-group {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ============================================
   SECTION 4: DIAMOND ANVIL
   ============================================ */
#anvil {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
}

.anvil-content {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
    text-align: center;
}

.anvil-text {
    font-family: "Quicksand", sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    color: #8b90a8;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.anvil-text.revealed {
    opacity: 1;
    transform: translateY(0);
}

.anvil-accent-blob {
    position: absolute;
    z-index: 2;
    opacity: 0.5;
    box-shadow: 0 0 60px rgba(125, 232, 232, 0.05);
}

.anvil-blob-left {
    width: 120px;
    height: 120px;
    left: 8%;
    top: 30%;
    border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
    animation: blobBreathe2 13s ease-in-out infinite;
    background: linear-gradient(135deg, #3a3d4e 0%, #8b90a8 45%, #c0c5d0 70%, #e8ecf4 100%);
}

.anvil-blob-right {
    width: 90px;
    height: 90px;
    right: 10%;
    bottom: 35%;
    border-radius: 55% 45% 50% 50% / 45% 50% 50% 55%;
    animation: blobBreathe3 16s ease-in-out infinite;
    background: linear-gradient(135deg, #3a3d4e 0%, #8b90a8 45%, #c0c5d0 70%, #e8ecf4 100%);
}

/* ============================================
   SECTION 5: THE HORIZON
   ============================================ */
#horizon {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
}

.horizon-blob-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

#horizon-blob {
    width: 100%;
    max-width: 1200px;
    height: 120px;
    border-radius: 50% 50% 50% 50% / 80% 80% 20% 20%;
    animation: blobBreathe1 18s ease-in-out infinite;
    box-shadow: 0 0 80px rgba(125, 232, 232, 0.06);
}

.horizon-shadow {
    width: 100%;
    max-width: 1240px;
    height: 140px;
    border-radius: 50% 50% 50% 50% / 80% 80% 20% 20%;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation: blobBreathe1 18s ease-in-out infinite;
}

.horizon-domain {
    font-family: "Varela Round", sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8b90a8;
    margin-top: 3rem;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.horizon-domain.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   NAV ACTIVE STATE (amber border)
   ============================================ */
#nav-pill.open #nav-overlay {
    border: 1px solid #d4a053;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    #hero-blob {
        width: clamp(260px, 80vw, 400px);
        height: clamp(260px, 80vw, 400px);
    }
    
    .gallery-blob {
        width: clamp(240px, 75vw, 380px);
        height: clamp(200px, 55vw, 300px);
    }
    
    .anvil-blob-left,
    .anvil-blob-right {
        display: none;
    }
    
    .corridor-content {
        gap: 4rem;
    }
    
    #nav-pill.open #nav-overlay {
        width: 220px;
        height: 300px;
    }
}
