/*
 * Copyright (c) 2025 Human Loop Ventures, LLC. All rights reserved.
 * Use of this source code is governed by the Business Source License 1.1
 * included in the LICENSE file at the root of this repository.
 */

/* ══════════════════════════════════════════════
   MASON — Shared Styles
   ══════════════════════════════════════════════ */

:root {
    --bg-primary: #0a0a0a;
    --bg-section-alt: #0f0f0f;
    --text-primary: #fff;
    --text-secondary: #ccc;
    --text-tertiary: #aaa;
    --text-placeholder: #888;
    --border-default: #333;
    --border-focus: #555;
    --btn-bg: #fff;
    --btn-bg-hover: #ddd;
    --btn-text: #0a0a0a;
    --font-stack: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    --transition-default: all 0.3s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-stack);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 18px;
}

/* ── Navigation ── */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(51, 51, 51, 0.3);
    transition: var(--transition-default);
}

.nav-logo {
    font-size: 1.2rem;
    font-weight: 200;
    letter-spacing: 0.3em;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.nav-github {
    color: #79c0ff;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s;
}

.nav-links a.nav-github svg {
    width: 24px;
    height: 24px;
}

.nav-links a.nav-github:hover {
    color: #a5d6ff;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ── Sections ── */

section {
    padding: 8rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.section-alt {
    max-width: 100%;
    background: var(--bg-section-alt);
}

.section-alt > .section-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
}

.section-heading {
    font-size: 2.5rem;
    font-weight: 200;
    letter-spacing: 0.05em;
    line-height: 1.3;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.section-subheading {
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 650px;
}

.section-body {
    font-size: 1rem;
    color: var(--text-tertiary);
    line-height: 1.9;
    max-width: 600px;
}

.section-body p + p {
    margin-top: 1.5rem;
}

/* ── Hero ── */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero .orb {
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 100, 150, 0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 8s ease-in-out infinite;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-logo {
    font-size: 6rem;
    font-weight: 200;
    letter-spacing: 0.4em;
    text-indent: 0.4em;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 2s ease-out;
}

.hero-tagline {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    animation: fadeIn 2s ease-out 0.5s both;
}

.hero-body {
    font-size: 1rem;
    color: var(--text-tertiary);
    line-height: 1.8;
    max-width: 480px;
    margin: 0 auto 3rem;
    animation: fadeIn 2s ease-out 1s both;
}

.hero-cta {
    animation: fadeIn 2s ease-out 1.5s both;
}

.hero-cta a {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--btn-bg);
    color: var(--btn-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-default);
}

.hero-cta a:hover {
    background: var(--btn-bg-hover);
}

/* ── Video Embed ── */

.video-placeholder {
    margin-top: 2rem;
    animation: fadeIn 2s ease-out 1.5s both;
}

.video-embed {
    width: 100%;
    max-width: 840px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
}

.video-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* ── Page Hero (non-home pages) ── */

.page-hero {
    padding-top: 10rem;
    padding-bottom: 4rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.page-hero .section-heading {
    margin-bottom: 1.5rem;
}

.page-hero .section-subheading {
    margin: 0 auto;
}

/* ── Feature Cards ── */

.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2rem;
    border: 1px solid var(--border-default);
    transition: border-color 0.3s;
}

.feature-card:hover {
    border-color: var(--border-focus);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    line-height: 1.7;
}

/* ── Steps ── */

.steps {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 3rem;
}

.step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.step-number {
    font-size: 2.5rem;
    font-weight: 200;
    color: var(--text-placeholder);
    min-width: 3rem;
    text-align: center;
    line-height: 1;
    padding-top: 0.25rem;
}

.step-content h3 {
    font-size: 1.15rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-tertiary);
    line-height: 1.7;
}

/* ── Options Grid (deployment) ── */

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
}

.option-card {
    padding: 2rem 1.5rem;
    border: 1px solid var(--border-default);
    text-align: center;
    transition: border-color 0.3s;
}

.option-card:hover {
    border-color: var(--border-focus);
}

.option-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.option-card h3 {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.option-card p {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    line-height: 1.6;
}

/* ── Callout / Quote ── */

.callout {
    border-left: 2px solid var(--border-default);
    padding: 1.5rem 2rem;
    margin: 3rem 0;
    font-size: 1.15rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
    font-style: italic;
}

/* ── OSS Tags ── */

.oss-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.oss-tag {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border-default);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition-default);
}

.oss-tag:hover {
    border-color: var(--border-focus);
    color: var(--text-primary);
}

/* ── About ── */

.about-text {
    max-width: 700px;
    margin: 0 auto;
}

.about-text p {
    font-size: 0.95rem;
    color: var(--text-tertiary);
    line-height: 1.8;
}

.about-text p + p {
    margin-top: 1.25rem;
}

.about-links {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.about-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-default);
    padding-bottom: 2px;
    transition: var(--transition-default);
}

.about-links a:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* ── Footer CTA ── */

.footer-cta {
    text-align: center;
    padding: 6rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.footer-cta h2 {
    font-size: 2rem;
    font-weight: 200;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.footer-cta p {
    color: var(--text-tertiary);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

/* ── Footer ── */

footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid rgba(51, 51, 51, 0.3);
    color: var(--text-placeholder);
    font-size: 0.8rem;
}

footer a {
    color: var(--text-placeholder);
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--text-secondary);
}

.footer-links {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

/* ── Animations ── */

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

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.3; }
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(10px); }
    60% { transform: translateX(-50%) translateY(5px); }
}

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

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Scrollable Image ── */

.scroll-window {
    border-radius: 20px;
    overflow: hidden;
    scrollbar-color: #555 var(--bg-section-alt);
    scrollbar-width: thin;
}

.scroll-window::-webkit-scrollbar {
    width: 10px;
    -webkit-appearance: none;
}

.scroll-window::-webkit-scrollbar-track {
    background: var(--bg-section-alt);
}

.scroll-window::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 5px;
    min-height: 40px;
}

.scroll-window::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    section {
        padding: 5rem 1.5rem;
    }

    .section-heading {
        font-size: 2rem;
    }

    .hero-logo {
        font-size: 4rem;
        letter-spacing: 0.25em;
        text-indent: 0.25em;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
        gap: 0.75rem;
    }

    .step-number {
        text-align: left;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.95);
        padding: 1rem 2rem 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border-default);
    }

    .nav-links.open {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .page-hero {
        padding-top: 8rem;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        font-size: 3rem;
        letter-spacing: 0.15em;
        text-indent: 0.15em;
    }

    .section-heading {
        font-size: 1.75rem;
    }
}
