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

/* ── Tokens ── */
:root {
    --text-primary:      rgba(255, 255, 255, 0.9);
    --text-secondary:    rgba(255, 255, 255, 0.5);
    --text-muted:        rgba(255, 255, 255, 0.3);

    --lavender:          #c8a0e8;
    --lavender-soft:     rgba(200, 160, 232, 0.4);
    --glow:              #5ce0d6;
    --glow-soft:         rgba(92, 224, 214, 0.3);
    --accent-blue:       rgba(120, 140, 255, 0.5);
    --warm-accent:       rgba(230, 160, 60, 0.6);

    --border-subtle:     rgba(255, 255, 255, 0.08);
    --border-light:      rgba(255, 255, 255, 0.05);

    --code-bg:           rgba(255, 255, 255, 0.05);
    --code-text:         rgba(255, 255, 255, 0.65);

    --font-body:         'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono:         'JetBrains Mono', 'SF Mono', Monaco, monospace;
}

/* ── Base ── */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(180deg, #0a0a12 0%, #0f0f1a 50%, #121220 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Grain texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.02;
    z-index: -1;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--lavender); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: rgba(200, 160, 232, 0.9); }

code {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--code-text);
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ── Layout ── */
.container       { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.container-wide  { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 520px; margin: 0 auto; padding: 0 24px; }

/* ── Typography ── */
.heading-display {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: -0.02em;
    font-size: clamp(40px, 8vw, 64px);
    color: var(--text-primary);
    line-height: 1.1;
}

.heading-section {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--lavender);
    margin-bottom: 1.5rem;
}

.glow-text {
    text-shadow: 0 0 40px rgba(200, 160, 232, 0.3);
}

.highlight {
    color: var(--lavender);
    font-weight: 500;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
    width: 100%;
}

.caption {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ── Floating Orbs ── */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
    animation: float-orb 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px; height: 400px;
    background: var(--lavender);
    top: 10%; left: 10%;
    animation-delay: 0s;
}
.orb-2 {
    width: 300px; height: 300px;
    background: var(--glow);
    top: 60%; right: 15%;
    animation-delay: -7s;
}
.orb-3 {
    width: 250px; height: 250px;
    background: #788cff;
    bottom: 20%; left: 20%;
    animation-delay: -14s;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(30px, -30px) scale(1.1); }
    50%      { transform: translate(-20px, 20px) scale(0.9); }
    75%      { transform: translate(20px, 10px) scale(1.05); }
}

/* ── HERO ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 40px 24px;
}

.hero-inner {
    text-align: center;
    max-width: 720px;
    position: relative;
    z-index: 10;
}

.brain-icon {
    display: block;
    margin: 0 auto 32px;
    animation: brain-pulse 3s ease-in-out infinite, brain-glow 4s ease-in-out infinite;
}

@keyframes brain-pulse {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.02); }
}

@keyframes brain-glow {
    0%, 100% { filter: drop-shadow(0 0 40px rgba(200, 160, 232, 0.3)) drop-shadow(0 0 80px rgba(92, 224, 214, 0.15)); }
    50%      { filter: drop-shadow(0 0 60px rgba(200, 160, 232, 0.5)) drop-shadow(0 0 100px rgba(92, 224, 214, 0.25)); }
}

.tagline {
    font-size: 18px;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    margin-bottom: 48px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, rgba(120, 140, 255, 0.25), rgba(200, 160, 232, 0.2));
    color: rgba(255, 255, 255, 0.95);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid rgba(200, 160, 232, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(120, 140, 255, 0.4), rgba(200, 160, 232, 0.3));
    border-color: rgba(200, 160, 232, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(120, 140, 255, 0.3);
    color: #fff;
}
.btn-primary:hover::before { left: 100%; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--lavender-soft);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(200, 160, 232, 0.05);
    transform: translateY(-2px);
}

/* ── Scroll Arrow ── */
.scroll-arrow {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    z-index: 10;
    animation: arrow-bounce 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.scroll-arrow::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    opacity: 0;
    animation: arrow-flash 3s ease-in-out infinite;
}

.scroll-arrow:hover {
    color: #fff;
}

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

@keyframes arrow-flash {
    0%, 100% { opacity: 0; }
    50%      { opacity: 1; }
}

/* ── WHAT IT IS ── */
.what {
    padding: 64px 0 80px;
}

.what-content {
    text-align: center;
    padding: 40px 0;
}

.what-content p {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 20px;
}
.what-content p:first-child { margin-top: 0; }

/* ── CAPABILITIES ── */
.capabilities {
    padding: 64px 0 80px;
}

.cap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border-light);
    border-radius: 16px;
    overflow: hidden;
}

a.cap-cell {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.cap-cell {
    padding: 40px;
    background: rgba(10, 10, 18, 0.6);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: block;
}
.cap-cell:hover {
    background: rgba(15, 15, 28, 0.8);
    border-color: var(--lavender-soft);
}
.cap-cell:hover .cap-label {
    color: #fff;
}

.cap-label {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
    color: var(--lavender);
    margin-bottom: 12px;
}

.cap-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ── HOW IT WORKS ── */
.how-it-works {
    padding: 64px 0 80px;
}

.steps {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    padding: 40px 0;
}

.step-card {
    padding: 32px;
    background: rgba(10, 10, 18, 0.4);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}
.step-card:hover {
    border-color: var(--lavender-soft);
    background: rgba(15, 15, 28, 0.6);
}

.step-number {
    font-weight: 700;
    font-size: 48px;
    line-height: 1;
    color: var(--lavender-soft);
    margin-bottom: 16px;
    opacity: 0.5;
}

.step-label {
    font-weight: 600;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.step-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ── THE APP ── */
.the-app {
    padding: 64px 0 80px;
}

.macos-frame {
    background: rgba(20, 20, 35, 0.7);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: all 0.4s ease;
    box-shadow:
        0 25px 80px -20px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(200, 160, 232, 0.05);
}
.macos-frame:hover {
    box-shadow:
        0 30px 100px -20px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(200, 160, 232, 0.1),
        0 0 60px -20px rgba(200, 160, 232, 0.15);
    transform: translateY(-4px);
}

.macos-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: rgba(30, 30, 50, 0.5);
    border-bottom: 1px solid var(--border-subtle);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red    { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #27c93f; }

.app-screenshot {
    display: block;
    width: 100%;
    height: auto;
}

.the-app .caption {
    text-align: center;
    margin-top: 24px;
}

/* ── REQUIREMENTS ── */
.requirements {
    padding: 64px 0 80px;
}

.req-block {
    padding: 40px 0;
}

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

.req-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.65);
}

.req-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lavender-soft);
}

/* Optional services */
.optional-box {
    border: 1px solid rgba(230, 160, 60, 0.2);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 40px;
    background: rgba(230, 160, 60, 0.03);
    transition: all 0.3s ease;
}
.optional-box:hover {
    border-color: rgba(230, 160, 60, 0.3);
    background: rgba(230, 160, 60, 0.05);
}

.optional-label {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--warm-accent);
    margin-bottom: 8px;
}

.api-note {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.service-card {
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}
.service-card:hover {
    border-color: var(--border-subtle);
    background: rgba(255, 255, 255, 0.04);
}

.service-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}
.service-name:hover { color: var(--lavender); }

.link-arrow {
    font-size: 14px;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.service-name:hover .link-arrow {
    opacity: 1;
    transform: translateX(2px);
    display: inline-block;
}

.service-role {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.service-cost {
    font-size: 13px;
    color: var(--warm-accent);
    font-weight: 500;
    margin-bottom: 8px;
}

.service-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── FOOTER ── */
footer {
    padding: 80px 0 48px;
    text-align: center;
}

.footer-icon {
    display: block;
    margin: 0 auto 24px;
    opacity: 0.7;
}

.footer-title {
    font-size: 24px !important;
    margin-bottom: 32px;
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    text-align: left;
    margin-bottom: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    gap: 32px;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--lavender);
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--lavender);
    transition: width 0.3s ease;
}
.footer-link:hover::after { width: 100%; }

.attribution {
    font-size: 14px;
    color: var(--text-muted);
}

/* ── RESPONSIVE ── */

/* Tablet */
@media (max-width: 768px) {
    .steps {
        grid-template-columns: 1fr;
    }

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

/* Mobile */
@media (max-width: 640px) {
    .hero { min-height: 70vh; }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-columns { grid-template-columns: 1fr; gap: 32px; }
    .footer-links { gap: 24px; }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
    .brain-icon { animation: none; opacity: 1; }
    .floating-orb { animation: none; }
    html { scroll-behavior: auto; }
}
