/* RESET & FOUNDATION */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffffff; /* Stark pure white */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* THE GLASS NAV */
.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 48px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    background-color: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0);
    transition: border-color 200ms ease;
}

.global-nav.scrolled {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-link {
    text-decoration: none;
    font-size: 11px;
    color: #86868b;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 2px;
    transition: color 200ms ease-in-out;
    font-weight: 400;
}

.nav-link:hover {
    color: #000000;
}

/* THE SOFTWARE HERO */
#software-hero {
    position: relative;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Centered axis */
    padding: 0 5vw;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center; /* Editorial centered alignment */
    width: 100%;
}

/* TYPOGRAPHY */
.software-watermark {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.45em;
    color: #B0A99F;
    margin: 0 auto 32px auto; /* Centered perfectly */
}

.staggered-headline {
    line-height: 0.98; /* Crushed typographic mass */
    margin: 0;
}

.staggered-headline .line-1,
.staggered-headline .line-2 {
    font-size: clamp(56px, 6vw, 88px); /* Uniform massive scale */
    font-weight: 800; /* Heavy weight */
    letter-spacing: -0.04em; /* Extremely tight interlocking tracking */
    color: #1d1d1f;
    display: block;
    white-space: nowrap;
}

.terminal-period {
    color: #0a0a0a; /* Absolute finality */
}

.descriptor {
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: #888888;
    margin: 40px auto 0 auto; /* Centered below headline */
    max-width: 600px;
}

/* THE CLINICAL BLOOM */
.clinical-bloom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.clinical-bloom > div {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.10; /* Max 10%-12% as specified */
    animation: clinicalDrift 15s infinite alternate ease-in-out;
    transform-origin: center center;
}

/* Weighted heavily toward the bottom right */
.node-rose {
    background-color: #ffc0cb;
    width: 60vw;
    height: 60vw;
    bottom: -20vh;
    right: -10vw;
}

.node-amber {
    background-color: #ffbf00;
    width: 50vw;
    height: 50vw;
    bottom: -10vh;
    right: 15vw;
    animation-delay: -5s !important;
}

.node-lavender {
    background-color: #e6e6fa;
    width: 55vw;
    height: 55vw;
    bottom: -30vh;
    right: 5vw;
    animation-delay: -10s !important;
}

@keyframes clinicalDrift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-2vw, -2vh) scale(1.05); }
}

/* SECTION 2: THE UNIVERSAL MATRIX */
#universal-matrix {
    width: 100vw;
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10vh 5vw;
}

.duality-split {
    display: flex;
    gap: 120px;
    align-items: flex-start;
    max-width: 1400px;
    width: 100%;
    justify-content: center;
}

.environment-column {
    flex: 1;
    padding: 60px;
    background-color: transparent;
    border-radius: 20px; /* Slight rounding for the subtle wash */
    transition: background-color 400ms ease-out;
}

/* The Thermal Hover Physics */
.environment-column.local:hover {
    background-color: rgba(232, 228, 245, 0.25); /* Cool lavender wash */
}

.environment-column.live:hover {
    background-color: rgba(245, 239, 224, 0.35); /* Warm amber wash */
}

/* Typography */
.micro-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #86868b;
    margin-bottom: 16px;
    font-weight: 500;
}

.environment-column h2 {
    font-size: clamp(40px, 5vw, 60px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #1d1d1f;
    margin-bottom: 24px;
    white-space: nowrap;
}

.clinical-desc {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
    color: #888888;
}

/* SECTION 3: ARCHITECTURAL SUPREMACY */
#architectural-supremacy {
    width: 100vw;
    padding: 10vh 5vw;
    display: flex;
    justify-content: center;
}

.supremacy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1400px;
    width: 100%;
}

@media (max-width: 1024px) {
    .supremacy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .system-card.card-anchor {
        grid-column: span 2;
    }
}

@media (min-width: 1025px) {
    .system-card.card-anchor {
        grid-column: span 3;
    }
}

/* The Card Anatomy */
.system-card {
    position: relative;
    background-color: #FAFAFA;
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 400ms ease-out, box-shadow 400ms ease-out;
}

/* The Liquid Hover Mechanic */
.system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(255, 192, 203, 0.8) 0%, 
        rgba(255, 191, 0, 0.5) 40%, 
        rgba(230, 230, 250, 0.8) 80%
    );
    opacity: 0;
    filter: blur(24px);
    z-index: 1;
    transition: opacity 500ms ease-out;
    pointer-events: none;
}

.system-card:hover::before {
    opacity: 0.22; /* Max out at 18-22% */
}

/* Ensure content sits above the wash */
.system-index, .system-name, .system-spec {
    position: relative;
    z-index: 2;
}

/* Clinical Typography */
.system-index {
    font-size: 11px;
    letter-spacing: 0.3em;
    color: #a0a0a0;
    margin-bottom: 24px;
}

.system-name {
    font-size: clamp(22px, 2vw, 26px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1d1d1f;
    margin-bottom: 16px;
    white-space: nowrap; /* CRITICAL: No wrapping, geometric sans-serif (inherited) */
}

.system-spec {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    color: #777777;
}

/* SECTION 4: CODE GALLERY */
#code-gallery {
    width: 100vw;
    padding: 10vh 5vw 20vh 5vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 90px; /* Massive gap between blocks */
}

.code-block-wrapper {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.placard-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #86868b;
    margin-bottom: 24px;
    font-weight: 500;
}

.code-artifact {
    position: relative;
    width: 100%;
    background-color: #F8F7F5; /* Warm off-white canvas */
    border-radius: 28px;
    padding: 52px; /* Massive internal padding */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.container-badge {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #86868b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 500;
}

.pristine-code {
    font-family: 'JetBrains Mono', 'IBM Plex Mono', 'SFMono-Regular', Consolas, Menlo, monospace;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.8;
    color: #2D2926; /* Monochromatic charcoal ink */
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

/* Optical Weight Contrast (No Colors) */
.pristine-code .code-strong {
    font-weight: 500;
    color: #1A1714; /* Deep near-black */
}

/* THE GLOBAL ANCHOR (FOOTER) */
#global-anchor {
    position: relative;
    width: 100vw;
    background-color: transparent;
    padding: 200px 5vw;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    overflow: hidden;
}

.ambient-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(circle at center 70%, black 10%, transparent 80%);
    mask-image: radial-gradient(circle at center 70%, black 10%, transparent 80%);
}

.vignette-node {
    position: absolute;
    border-radius: 50%;
    filter: blur(160px);
    opacity: 0.8;
}

.node-a {
    width: 800px;
    height: 800px;
    background: rgba(230, 180, 200, 0.6);
    top: 10%;
    left: 20%;
    animation: vignetteDrift1 24s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.node-b {
    width: 900px;
    height: 900px;
    background: rgba(245, 215, 170, 0.5);
    bottom: -10%;
    right: 15%;
    animation: vignetteDrift2 26s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.node-c {
    width: 700px;
    height: 700px;
    background: rgba(180, 170, 220, 0.6);
    top: 30%;
    left: 40%;
    animation: vignetteDrift3 22s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes vignetteDrift1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(15%, 10%) scale(1.1); }
}
@keyframes vignetteDrift2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-15%, -15%) scale(1.05); }
}
@keyframes vignetteDrift3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-10%, 20%) scale(1.2); }
}

.anchor-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.tracking-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #888888;
}

.anchor-headline {
    font-size: clamp(96px, 8vw, 140px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #1d1d1f;
    line-height: 1.05;
    margin-top: 40px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .anchor-headline {
        font-size: clamp(60px, 12vw, 96px);
    }
}

.capsule-btn {
    background-color: #1d1d1f;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 16px 40px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transform: scale(1);
    transition: transform 200ms ease-out;
    margin-bottom: 120px;
}

.capsule-btn:hover {
    transform: scale(1.02);
}

.footer-bookend {
    margin-top: auto;
    text-transform: none; /* Strip the all-caps */
    letter-spacing: normal; /* Restore standard sentence spacing */
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-link {
    text-decoration: none;
    font-size: 11px;
    color: #86868b;
    letter-spacing: 0.05em;
    transition: color 200ms ease;
}

.footer-link:hover {
    color: #1d1d1f; /* Deep near-black on hover */
}
