:root {
    --bg-color: #07080c;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f0f2f5;
    --text-muted: #aeb8c6;
    
    --primary-blue: #4fa6ff;
    --primary-purple: #8e62ff;
    --accent-green: #45cf86;
    
    --gradient-1: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    --gradient-2: linear-gradient(135deg, var(--accent-green), var(--primary-blue));
    
    --font-main: 'Inter', sans-serif;
    --font-code: 'Courier New', Courier, monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-purple);
}

/* Ambient Background Orbs */
.ambient-background {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: drift 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 600px; height: 600px;
    background: var(--primary-blue);
    top: -200px; left: -100px;
}

.orb-2 {
    width: 500px; height: 500px;
    background: var(--primary-purple);
    bottom: -100px; right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px; height: 400px;
    background: var(--accent-green);
    top: 40%; left: 30%;
    opacity: 0.08;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Glassmorphism Navigation */
.glass-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(7, 8, 12, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.logo-bold {
    font-weight: 800;
}

.nav-links a {
    color: var(--text-main);
    margin: 0 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(79, 166, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(79, 166, 255, 0.5);
    transform: translateY(-2px);
    color: #fff;
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
    color: #fff;
}

.btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.62;
    pointer-events: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 0.6rem 1.4rem;
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: #fff;
}

/* Hero Section */
.hero-section {
    padding: 12rem 2rem 6rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(79, 166, 255, 0.1);
    border: 1px solid rgba(79, 166, 255, 0.2);
    border-radius: 20px;
    color: var(--primary-blue);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-alt {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Glass Cards */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2.5rem;
}

/* Sections */
.feature-section {
    padding: 6rem 2rem;
}

.alt-bg {
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.float-hover {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.float-hover:hover {
    transform: translateY(-10px);
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.text-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.text-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-main);
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-blue);
}

/* Mockup Window */
.mockup-header {
    display: flex;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 1.5rem;
}

.dots {
    display: flex;
    gap: 6px;
}

.dots span {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #ff5f56;
}

.dots span:nth-child(2) { background: #ffbd2e; }
.dots span:nth-child(3) { background: #27c93f; }

.mockup-title {
    margin-left: auto;
    margin-right: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.code-font {
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Privacy Document Styling */
.privacy-container {
    padding: 8rem 2rem 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.doc-header {
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.doc-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.doc-section {
    margin-bottom: 2.5rem;
}

.doc-section h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.doc-section p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.doc-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.doc-section li {
    margin-bottom: 0.5rem;
}

.doc-section strong {
    color: var(--text-main);
}

/* Footer */
footer {
    border-top: 1px solid var(--card-border);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand .logo {
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.lab-link {
    color: var(--text-main);
    font-weight: 600;
}

.footer-links a {
    color: var(--text-muted);
    margin-left: 1.5rem;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-blue);
}

/* Active Handoff */
.handoff-hero {
    padding: 11rem 2rem 5rem;
    text-align: left;
}

.handoff-hero h1 {
    max-width: 980px;
    font-size: clamp(3.3rem, 7.5vw, 7.3rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
    margin: 1.2rem 0 1.8rem;
}

.handoff-lede {
    max-width: 840px;
    color: var(--text-muted);
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    margin-bottom: 2.4rem;
}

.handoff-hero .hero-actions { justify-content: flex-start; }

.truth-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 4rem;
    border: 1px solid var(--card-border);
    background: var(--card-border);
    border-radius: 12px;
    overflow: hidden;
}

.truth-strip span { background: #0b0d13; padding: 1.1rem 1.2rem; color: var(--text-muted); }
.truth-strip strong { color: var(--text-main); }
.compact { max-width: 820px; margin-left: auto; margin-right: auto; }
.kicker { color: var(--accent-green); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 800; margin-bottom: 0.8rem; }

.protocol-line {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--card-border);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
}

.protocol-line article { background: #0a0c11; padding: 2rem; min-height: 270px; }
.protocol-line span { color: var(--primary-blue); font-family: var(--font-code); }
.protocol-line h3 { margin: 4rem 0 0.8rem; font-size: 1.25rem; }
.protocol-line p { color: var(--text-muted); font-size: 0.93rem; }
.pitch-split { gap: 5rem; }
.evidence-card { padding: 1.6rem 2rem; }
.evidence-row { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--card-border); color: var(--text-muted); }
.evidence-row:last-child { border: 0; }
.evidence-row strong { color: var(--text-main); text-align: right; }

.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.comparison-grid h3 { font-size: 1.6rem; margin: 0.7rem 0 1.4rem; }
.compare-label { display: inline-block; color: var(--accent-green); border: 1px solid rgba(69,207,134,.35); padding: .35rem .7rem; border-radius: 20px; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.compare-label.cloud { color: var(--primary-blue); border-color: rgba(79,166,255,.35); }
.callout { margin-top: 1.4rem; border-left: 3px solid var(--accent-green); background: rgba(69,207,134,.06); padding: 1.2rem 1.4rem; display: grid; grid-template-columns: auto 1fr; gap: 1rem; }
.callout span { color: var(--text-muted); }

.knob-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.knob-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; padding: 1.4rem; display: grid; gap: 1rem; }
.knob-card > span { font-weight: 800; }
.knob-card small { color: var(--text-muted); }
.fake-slider { height: 7px; border-radius: 9px; background: rgba(255,255,255,.09); overflow: hidden; }
.fake-slider i { display: block; height: 100%; background: var(--gradient-2); }
.number-chip { color: var(--primary-blue); font-size: 1.25rem; font-weight: 800; }
.partner-section { background: linear-gradient(180deg, rgba(79,166,255,.04), rgba(142,98,255,.03)); border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); }
.partner-card h3 { margin-bottom: 1rem; }
.partner-card p { color: var(--text-muted); margin-bottom: 1.5rem; }
.code-sample pre { white-space: pre-wrap; color: #b7dfc8; font-family: var(--font-code); }
.code-sample p { color: var(--text-muted); margin-top: 1rem; }

.status-table { border: 1px solid var(--card-border); border-radius: 14px; overflow: hidden; }
.status-table > div { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--card-border); }
.status-table > div:last-child { border: 0; }
.status-table strong { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.done { color: var(--accent-green); }.candidate { color: #ffbd2e; }.not-done { color: #ff7f75; }
.source-note { max-width: 920px; margin: 1.5rem auto 0; color: var(--text-muted); font-size: .88rem; }
.cta-section { padding: 7rem 2rem; text-align: center; background: radial-gradient(circle at center, rgba(79,166,255,.12), transparent 58%); }
.cta-section h2 { font-size: clamp(2.5rem, 5vw, 5rem); margin-bottom: 1rem; }
.cta-section p:not(.kicker) { color: var(--text-muted); margin: 0 auto 2rem; max-width: 700px; }

/* Programmer field test */
.field-hero {
    padding: 10rem 2rem 4rem;
    max-width: 1120px;
    margin: 0 auto;
}

.field-hero h1 {
    max-width: 900px;
    font-size: clamp(3.2rem, 7vw, 6.8rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
    margin: 1rem 0 1.5rem;
}

.field-lede {
    max-width: 790px;
    color: var(--text-muted);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.runtime-panel {
    margin-top: 3rem;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
}

.status-light {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffbd2e;
    box-shadow: 0 0 18px rgba(255, 189, 46, .55);
}

.status-light.ok { background: var(--accent-green); box-shadow: 0 0 18px rgba(69, 207, 134, .55); }
.status-light.fail { background: #ff6d67; box-shadow: 0 0 18px rgba(255, 109, 103, .55); }
.runtime-copy strong { display: block; font-size: 1.05rem; }
.runtime-copy span { color: var(--text-muted); font-size: .9rem; }
.status-retry { color: var(--text-main); background: transparent; border: 1px solid var(--card-border); }

.field-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.field-card { display: flex; flex-direction: column; min-height: 320px; }
.field-card .card-index { color: var(--primary-blue); font: 700 .78rem var(--font-code); letter-spacing: .12em; }
.field-card h2 { margin: 1.4rem 0 .8rem; font-size: 1.55rem; }
.field-card p { color: var(--text-muted); margin-bottom: 1rem; }
.field-card .btn { margin-top: auto; text-align: center; }
.truth-note { margin-top: 1rem; color: var(--text-muted); font-size: .88rem; }

.field-proof {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.proof-list { list-style: none; }
.proof-list li { padding: 1rem 0; border-bottom: 1px solid var(--card-border); }
.proof-list li:last-child { border-bottom: 0; }
.proof-list strong { display: block; }
.proof-list span { color: var(--text-muted); }

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 920px) {
    .nav-links { display: none; }
    .truth-strip, .protocol-line, .comparison-grid, .knob-grid { grid-template-columns: 1fr; }
    .protocol-line article { min-height: auto; }
    .protocol-line h3 { margin-top: 1.5rem; }
    .pitch-split { grid-template-columns: 1fr; gap: 2rem; }
    .callout { grid-template-columns: 1fr; }
    .field-grid, .field-proof { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .nav-container { padding: 1rem; }
    .nav-container .btn { display: none; }
    .handoff-hero { padding: 8rem 1.2rem 3rem; }
    .handoff-hero .hero-actions { flex-direction: column; }
    .feature-section { padding: 4rem 1.2rem; }
    .glass-card { padding: 1.5rem; }
    .status-table > div { grid-template-columns: 1fr; }
    .footer-container { flex-direction: column; gap: 1.5rem; align-items: flex-start; }
    .footer-links a { margin: 0 1rem 0 0; }
    .field-hero { padding: 8rem 1.2rem 3rem; }
    .runtime-panel { grid-template-columns: auto 1fr; }
    .runtime-panel .status-retry { grid-column: 1 / -1; width: 100%; }
}

/* ---- MasiDyn brand suite (organ mbs; MasiDyn_Logo/BRAND_GUIDE.md) ---------- */
/* The medallion is the logo artifact and carries its own palette. These tokens
   are the exact measured values; the site's existing accent system is unchanged. */
:root {
    --brand-emerald-deep: #16342d;
    --brand-emerald: #436e61;
    --brand-mint: #7ab9a7;
    --brand-pearl: #edf0f5;
    --brand-dyn-blue: #2e52b2;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

/* Clear space per BRAND_GUIDE: never crop, never recolor, never outline. */
.logo-coin {
    width: 34px;
    height: 34px;
    flex: none;
    display: block;
}

.footer-brand .logo-coin {
    width: 28px;
    height: 28px;
}

@media (max-width: 640px) {
    .logo-coin { width: 28px; height: 28px; }
}

/* Wordmark rendition: one flex child so the gap never splits Masi|Dyn.
   Two-tone is canonical per BRAND_GUIDE — Masi neutral, Dyn blue, never swapped. */
.logo-text {
    white-space: nowrap;
}

.logo-dyn {
    font-weight: 800;
    color: #5b7bd5;
}
