/* ========================================
   doublestandard.xyz - Blobitecture Design
   ======================================== */

:root {
    --base-dark: #0B0C2A;
    --mid-dark: #161838;
    --accent-primary: #00E5A0;
    --accent-secondary: #00B8D4;
    --text-primary: #C8D0E0;
    --text-secondary: #5B6B8A;
    --surface-light: #EDF2F8;
    --text-on-light: #2A2D3E;
}

/* ===== Reset & Base ===== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.65;
    letter-spacing: 0.005em;
    color: var(--text-primary);
    background-color: var(--base-dark);
    overflow-x: hidden;
}

/* ===== Viewport Sections ===== */

.viewport {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

.viewport-1 {
    background: var(--base-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewport-2 {
    background: linear-gradient(180deg, var(--base-dark) 0%, var(--mid-dark) 50%, var(--base-dark) 100%);
}

.viewport-3 {
    background: radial-gradient(ellipse at center, var(--mid-dark) 0%, var(--base-dark) 70%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewport-4 {
    background: linear-gradient(180deg, var(--base-dark) 0%, var(--mid-dark) 30%, var(--surface-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Corner Brackets ===== */

.corner-bracket {
    position: absolute;
    z-index: 10;
}

.corner-bracket.top-left {
    top: 20px;
    left: 20px;
}

.corner-bracket.top-right {
    top: 20px;
    right: 20px;
}

.corner-bracket.bottom-left {
    bottom: 20px;
    left: 20px;
}

.corner-bracket.bottom-right {
    bottom: 20px;
    right: 20px;
}

/* ===== Blob Nav ===== */

#blob-nav {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
}

.nav-dots {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 10px;
    background: rgba(11, 12, 42, 0.85);
    border: 1px solid rgba(0, 229, 160, 0.2);
    border-radius: 40% 60% 60% 40% / 50% 50% 50% 50%;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity 0.3s ease;
}

.nav-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-primary);
}

.nav-links {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(11, 12, 42, 0.92);
    border: 1px solid rgba(0, 229, 160, 0.25);
    border-radius: 30% 50% 50% 40% / 40% 40% 60% 60%;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#blob-nav:hover .nav-dots {
    opacity: 0;
    pointer-events: none;
}

#blob-nav:hover .nav-links {
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
}

.nav-link-blob {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 40% 60% 50% 50% / 50% 50% 50% 50%;
    transition: color 0.25s ease, background 0.25s ease;
    white-space: nowrap;
}

.nav-link-blob:hover {
    color: var(--accent-primary);
    background: rgba(0, 229, 160, 0.08);
}

/* ===== SVG Noise Filter (global) ===== */

.blob-noise::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* ===== Viewport 1: The Membrane ===== */

.membrane-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 60px;
    width: 90%;
    max-width: 1200px;
    padding: 80px 40px;
    z-index: 2;
    position: relative;
}

.title-blob {
    background: rgba(11, 12, 42, 0.85);
    border: 1px solid rgba(0, 229, 160, 0.2);
    box-shadow: 0 0 60px rgba(0, 229, 160, 0.08);
    padding: 60px 50px;
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.title-blob::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.blob-pulse {
    animation: blobPulse 8s ease-in-out infinite;
}

@keyframes blobPulse {
    0% {
        border-radius: 40% 60% 70% 30% / 50% 40% 60% 50%;
    }
    25% {
        border-radius: 60% 40% 50% 60% / 40% 60% 40% 60%;
    }
    50% {
        border-radius: 50% 50% 40% 60% / 60% 50% 50% 40%;
    }
    75% {
        border-radius: 30% 70% 60% 40% / 50% 30% 70% 50%;
    }
    100% {
        border-radius: 40% 60% 70% 30% / 50% 40% 60% 50%;
    }
}

.site-title {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: clamp(40px, 5.5vw, 72px);
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.site-subtitle {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 48px);
    color: var(--accent-secondary);
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 20px;
}

.site-tagline {
    font-family: 'Work Sans', sans-serif;
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.hero-svg-blob {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-svg {
    width: 100%;
    max-width: 450px;
    mix-blend-mode: screen;
}

/* Stroke draw animation */
.draw-circle, .draw-triangle {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: strokeDraw 1.5s ease-out forwards;
}

.c1 { animation-delay: 0s; }
.c2 { animation-delay: 0.2s; }
.c3 { animation-delay: 0.4s; }
.c4 { animation-delay: 0.6s; }
.c5 { animation-delay: 0.8s; }
.draw-triangle { animation-delay: 1.0s; }

@keyframes strokeDraw {
    to {
        stroke-dashoffset: 0;
    }
}

/* ===== Pulse Rings ===== */

.pulse-ring {
    position: absolute;
    width: 0;
    height: 0;
    z-index: 5;
    pointer-events: none;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid var(--accent-primary);
    animation: sonarPing 3s ease-out infinite;
}

@keyframes sonarPing {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* ===== HUD Strip ===== */

.hud-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(11, 12, 42, 0.6);
    border-top: 1px solid rgba(0, 229, 160, 0.1);
    z-index: 10;
}

.hud-text {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.hud-strip-faded {
    background: rgba(237, 242, 248, 0.3);
    border-top: 1px solid rgba(90, 107, 138, 0.15);
}

.hud-strip-faded .hud-text {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* ===== Viewport 2: The Scan Chamber ===== */

.scan-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 40px 60px;
    min-height: 100vh;
    align-content: center;
}

.scan-left {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.text-blob {
    position: relative;
    background: rgba(11, 12, 42, 0.85);
    border: 1px solid rgba(0, 229, 160, 0.2);
    box-shadow: 0 0 60px rgba(0, 229, 160, 0.08);
    padding: 36px 40px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.text-blob::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.blob-shape-1 {
    border-radius: 40% 60% 70% 30% / 50% 40% 60% 50%;
}

.blob-shape-2 {
    border-radius: 60% 40% 30% 70% / 40% 60% 50% 50%;
}

.blob-shape-3 {
    border-radius: 50% 50% 60% 40% / 60% 40% 40% 60%;
}

.blob-shape-4 {
    border-radius: 35% 65% 55% 45% / 45% 55% 65% 35%;
}

.section-heading {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 3vw, 36px);
    color: var(--accent-primary);
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 14px;
}

.text-blob p {
    color: var(--text-primary);
    font-size: 17px;
}

/* Reveal animations */
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

.reveal-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger delays for text blobs */
.text-blob:nth-child(1) { transition-delay: 0s; }
.text-blob:nth-child(2) { transition-delay: 0.15s; }
.text-blob:nth-child(3) { transition-delay: 0.3s; }
.text-blob:nth-child(4) { transition-delay: 0.45s; }

/* Floating particles */
.scan-right {
    position: relative;
    min-height: 400px;
}

.float-particle {
    position: absolute;
    mix-blend-mode: screen;
}

.p1 {
    width: 60px;
    top: 5%;
    left: 20%;
    animation: floatDrift1 25s ease-in-out infinite alternate;
}

.p2 {
    width: 50px;
    top: 15%;
    right: 10%;
    animation: floatDrift2 30s ease-in-out infinite alternate;
}

.p3 {
    width: 80px;
    top: 30%;
    left: 10%;
    animation: floatDrift3 20s ease-in-out infinite alternate;
}

.p4 {
    width: 40px;
    top: 40%;
    right: 25%;
    animation: floatDrift4 35s ease-in-out infinite alternate;
}

.p5 {
    width: 70px;
    top: 55%;
    left: 30%;
    animation: floatDrift5 28s ease-in-out infinite alternate;
}

.p6 {
    width: 50px;
    top: 65%;
    right: 5%;
    animation: floatDrift6 22s ease-in-out infinite alternate;
}

.p7 {
    width: 60px;
    top: 75%;
    left: 5%;
    animation: floatDrift7 32s ease-in-out infinite alternate;
}

.p8 {
    width: 45px;
    top: 85%;
    right: 20%;
    animation: floatDrift8 18s ease-in-out infinite alternate;
}

.p9 {
    width: 55px;
    top: 10%;
    left: 50%;
    animation: floatDrift9 40s ease-in-out infinite alternate;
}

.p10 {
    width: 65px;
    top: 48%;
    left: 55%;
    animation: floatDrift10 26s ease-in-out infinite alternate;
}

@keyframes floatDrift1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, -20px) rotate(15deg); }
}

@keyframes floatDrift2 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-25px, 35px) rotate(-20deg); }
}

@keyframes floatDrift3 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(40px, 15px) rotate(10deg); }
}

@keyframes floatDrift4 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-15px, -30px) rotate(25deg); }
}

@keyframes floatDrift5 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(20px, 25px) rotate(-15deg); }
}

@keyframes floatDrift6 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-35px, -10px) rotate(20deg); }
}

@keyframes floatDrift7 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(25px, -25px) rotate(-10deg); }
}

@keyframes floatDrift8 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-20px, 20px) rotate(30deg); }
}

@keyframes floatDrift9 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(15px, 30px) rotate(-25deg); }
}

@keyframes floatDrift10 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-30px, -15px) rotate(12deg); }
}

/* ===== Viewport 3: The Core ===== */

.radial-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    animation: rotate360 120s linear infinite;
    pointer-events: none;
}

@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.core-blob {
    position: relative;
    width: 70%;
    max-width: 800px;
    z-index: 5;
}

.core-outer-membrane {
    position: absolute;
    inset: -20px;
    border-radius: 45% 55% 50% 50% / 50% 45% 55% 50%;
    background: rgba(11, 12, 42, 0.5);
    border: 1px solid rgba(0, 229, 160, 0.1);
    box-shadow: 0 0 80px rgba(0, 229, 160, 0.06);
    z-index: 1;
}

.core-middle-layer {
    position: absolute;
    inset: -8px;
    border-radius: 50% 50% 45% 55% / 55% 50% 50% 45%;
    background: rgba(22, 24, 56, 0.6);
    z-index: 2;
}

.core-middle-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.06;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.core-inner {
    position: relative;
    z-index: 3;
    background: rgba(11, 12, 42, 0.9);
    border: 1px solid rgba(0, 229, 160, 0.2);
    box-shadow: 0 0 60px rgba(0, 229, 160, 0.08);
    border-radius: 50% 50% 48% 52% / 48% 52% 50% 50%;
    padding: 60px 55px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.core-heading {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 4vw, 52px);
    color: var(--accent-primary);
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 24px;
    text-align: center;
}

.core-text {
    color: var(--text-primary);
    font-size: 17px;
    margin-bottom: 18px;
    line-height: 1.65;
}

.core-text:last-child {
    margin-bottom: 0;
}

/* ===== Viewport 4: The Exhale ===== */

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

.echo-particle {
    position: absolute;
}

.e1 {
    width: 80px;
    top: 15%;
    left: 10%;
    animation: floatDrift1 35s ease-in-out infinite alternate;
}

.e2 {
    width: 60px;
    top: 25%;
    right: 15%;
    animation: floatDrift3 28s ease-in-out infinite alternate;
}

.e3 {
    width: 100px;
    bottom: 30%;
    left: 20%;
    animation: floatDrift5 40s ease-in-out infinite alternate;
}

.e4 {
    width: 70px;
    bottom: 20%;
    right: 25%;
    animation: floatDrift7 32s ease-in-out infinite alternate;
}

.exhale-center {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px;
}

.exhale-blob {
    max-width: 480px;
    background: rgba(237, 242, 248, 0.7);
    border: 1px solid rgba(90, 107, 138, 0.15);
    border-radius: 45% 55% 52% 48% / 48% 52% 48% 52%;
    padding: 50px 44px;
    box-shadow: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.exhale-text {
    font-family: 'Work Sans', sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-on-light);
    margin-bottom: 24px;
}

.exhale-sign {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* ===== Responsive ===== */

@media (max-width: 900px) {
    .membrane-content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 60px 24px;
    }

    .hero-svg-blob {
        order: -1;
    }

    .hero-svg {
        max-width: 300px;
    }

    .scan-grid {
        grid-template-columns: 1fr;
        padding: 80px 24px 60px;
    }

    .scan-right {
        display: none;
    }

    .core-blob {
        width: 90%;
    }

    .core-inner {
        padding: 40px 30px;
        border-radius: 40% 60% 50% 50% / 50% 40% 60% 50%;
    }

    .exhale-blob {
        border-radius: 40% 60% 55% 45% / 50% 50% 50% 50%;
    }

    .hud-strip {
        flex-wrap: wrap;
        height: auto;
        padding: 4px 12px;
        gap: 4px;
    }

    .hud-text {
        font-size: 9px;
    }
}

@media (max-width: 600px) {
    .site-title {
        font-size: 32px;
    }

    .site-subtitle {
        font-size: 22px;
    }

    .title-blob {
        padding: 36px 28px;
    }

    .text-blob {
        padding: 28px 24px;
    }

    .core-inner {
        padding: 32px 24px;
    }

    .nav-links {
        display: none;
    }
}
