/* =============================================
   THEME TOKENS (Soft Blackout — Light only)
   ============================================= */
:root {
    --bg: #F7F5E7;
    --bg-alt: #EFEBD8;
    --text-heading: #1E1E1E;
    --text: #4b5563;
    --muted: #6b7280;
    --border: rgba(30, 30, 30, 0.08);
    --primary: #1E1E1E;
    --primary-hover: #333333;
    --primary-contrast: #F7F5E7;
    --surface: rgba(30, 30, 30, 0.04);
    --surface-container-low: #EFEBD8;
    --surface-container-lowest: #ffffff;
    --surface-container: #e5e7eb;
    --outline-variant: #d1d5db;
    --on-surface-variant: #374151;
    --primary-fixed: #e5e7eb;
    --tertiary-fixed: #f3f4f6;
    --on-tertiary-fixed: #111827;
    --tertiary: #4b5563;
}

/* =============================================
   RESET & BASE
   ============================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
h4 {
    font-family: 'Manrope', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    background: rgba(247, 245, 231, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 32px rgba(30, 30, 30, 0.05);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.04em;
    text-transform: none;
    display: flex;
    align-items: center;
    gap: 0;
    font-family: 'Inter', sans-serif;
}

.nav-logo-accent {
    color: var(--primary);
    font-weight: 500;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 4px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.nav-center a {
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    transition: all 0.2s;
}

.nav-center a:hover,
.nav-center a.active {
    color: var(--text-heading);
    background: var(--surface);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-cta {
    padding: 8px 20px;
    border-radius: 8px;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s;
    cursor: pointer;
    background: transparent;
}

.nav-cta:hover {
    background: var(--primary);
    color: var(--primary-contrast);
}

/* =============================================
   ASYMMETRIC BREAK
   ============================================= */
.asymmetric-break {
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

/* =============================================
   HERO
   ============================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--bg);
    padding-top: 72px;
}

.hero-inner {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-title {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-heading);
    line-height: 1.1;
}

.hero-title-accent {
    color: var(--primary);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--on-surface-variant);
    line-height: 1.7;
    max-width: 42rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    align-items: center;
}

.hero-cta {
    background: linear-gradient(135deg, #1e1e1e 0%, #333333 100%);
    color: var(--primary-contrast);
    padding: 0 2.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 20px 25px -5px rgba(30, 30, 30, 0.2);
    transition: all 0.3s;
}

.hero-cta:hover {
    transform: translateY(-4px);
}

.hero-github {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-heading);
    padding: 0 1.5rem;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1.15rem;
    gap: 0.5rem;
    transition: all 0.3s;
}

.hero-github:hover {
    background: var(--surface);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.hero-github svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.hero-ph-badge {
    display: block;
    width: 280px;
    height: 64px;
    transition: all 0.3s;
}

.hero-ph-badge:hover {
    opacity: 0.9;
    transform: translateY(-4px);
}

.hero-ph-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-mockup-wrapper {
    position: relative;
}

.hero-mockup {
    position: relative;
    z-index: 1;
    margin: 0 auto;
    width: 100%;
    max-width: 290px;
    border-radius: 14px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.8rem;
    color: #F7F5E7;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

.sb-popup-title-wrapper {
    margin-bottom: 1.25rem;
}

.sb-popup-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #ffffff;
}

.sb-popup-line {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin-top: 0.75rem;
}

.sb-popup-card {
    background: #222222;
    border-radius: 10px;
    padding: 0.8rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sb-popup-card-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #8e8e8e;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
    text-align: center;
    width: 100%;
}

.sb-popup-toggle-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 0.25rem;
}

.sb-popup-toggle {
    width: 48px;
    height: 24px;
    border-radius: 99px;
    background: #3a3a3a;
    position: relative;
    cursor: default;
}

.sb-popup-toggle-thumb {
    width: 18px;
    height: 18px;
    background: #8e8e8e;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
}

.sb-popup-action-row {
    display: grid;
    grid-template-columns: 1fr 40px;
    gap: 0.4rem;
    width: 100%;
}

.sb-popup-btn {
    width: 100%;
    background: transparent;
    border: 1px solid #444444;
    color: #ffffff;
    padding: 0.6rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.sb-popup-btn-outline {
    background: transparent;
    border-color: #444444;
    color: #ffffff;
}

.sb-popup-btn-outline:hover {
    border-color: #666666;
}

.sb-btn-icon {
    padding: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sb-btn-icon .material-symbols-outlined {
    font-size: 1.15rem;
    color: #8e8e8e;
}

.sb-margin-top {
    margin-top: 0.5rem;
}

.sb-popup-btn-danger {
    margin-top: 0.5rem;
    background: #3c1a1a;
    border: 1px solid #4a1e1e;
    color: #ff9999;
}

.sb-popup-btn-danger:hover {
    background: #4a1e1e;
}

.sb-popup-history-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.5rem;
}

.sb-btn-history {
    color: #8e8e8e;
    font-size: 0.7rem;
    padding: 0.5rem 0.25rem;
}

.sb-btn-history .material-symbols-outlined {
    font-size: 0.9rem;
}

.sb-popup-footer {
    margin-top: 1rem;
    color: #555555;
    font-size: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
}

.sb-footer-thanks {
    font-weight: 500;
}

.sb-popup-version {
    font-weight: 500;
}

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

.hero-decoration {
    position: absolute;
    top: -2.5rem;
    right: -2.5rem;
    width: 16rem;
    height: 16rem;
    background: rgba(30, 30, 30, 0.08);
    border-radius: 9999px;
    filter: blur(48px);
    z-index: 0;
}

/* =============================================
   FEATURES SECTION (Bento Grid)
   ============================================= */
.features-section {
    background: var(--surface-container-low);
    padding: 8rem 0;
}

.features-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.features-header {
    margin-bottom: 5rem;
    padding-left: 1rem;
}

.features-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

.features-subtitle {
    color: var(--on-surface-variant);
    max-width: 36rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.feature-card {
    background: var(--surface-container-lowest);
    padding: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(30, 30, 30, 0.08);
    transition: border-color 0.3s;
}

.feature-card:hover {
    border-color: rgba(30, 30, 30, 0.2);
}

.feature-card-large {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.feature-card .material-symbols-outlined {
    color: var(--primary);
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--on-surface-variant);
    line-height: 1.7;
    font-size: 1.125rem;
}

.feature-card-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--surface-container);
}

.feature-tag {
    background: var(--surface-container-low);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

/* =============================================
   HOW IT WORKS SECTION
   ============================================= */
.how-it-works {
    padding: 8rem 0;
    background: var(--bg);
}

.how-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.how-layout {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

.how-sidebar {
    width: 100%;
}

.how-sidebar-sticky {
    position: static;
}

.how-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
}

.how-subtitle {
    color: var(--on-surface-variant);
    line-height: 1.7;
}

.how-steps {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.how-step {
    display: flex;
    gap: 2rem;
}

.how-step-number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: var(--primary-fixed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.25rem;
}

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

.how-step-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
}

.how-step-content p {
    color: var(--on-surface-variant);
    line-height: 1.7;
}

/* =============================================
   USE CASES SECTION
   ============================================= */
.use-cases {
    padding: 8rem 0;
    background: var(--surface-container-low);
    border-top: 1px solid rgba(30, 30, 30, 0.05);
    border-bottom: 1px solid rgba(30, 30, 30, 0.05);
}

.use-cases-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.use-cases-header {
    margin-bottom: 5rem;
}

.use-cases-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-heading);
    margin-bottom: 1rem;
}

.use-cases-subtitle {
    color: var(--on-surface-variant);
    font-size: 1.125rem;
    max-width: 42rem;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.use-case-card {
    position: relative;
    background: var(--surface-container-lowest);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(30, 30, 30, 0.08);
    transition: all 0.5s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.use-case-card:hover {
    border-color: rgba(30, 30, 30, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.use-case-glow {
    position: absolute;
    right: -2rem;
    bottom: -2rem;
    width: 10rem;
    height: 10rem;
    border-radius: 9999px;
    filter: blur(48px);
    transition: background 0.3s;
}

.use-case-glow-zinc {
    background: rgba(30, 30, 30, 0.05);
}

.use-case-card:hover .use-case-glow-zinc {
    background: rgba(30, 30, 30, 0.1);
}

.use-case-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.5s;
}

.use-case-card:hover .use-case-icon {
    transform: scale(1.1);
}

.use-case-icon-zinc {
    background: rgba(30, 30, 30, 0.1);
    color: #1e1e1e;
}

.use-case-icon .material-symbols-outlined {
    font-size: 1.875rem;
    margin-bottom: 0;
}

.use-case-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 1.5rem;
}

.use-case-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.use-case-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--on-surface-variant);
    font-size: 0.9375rem;
}

.use-case-list .material-symbols-outlined {
    color: var(--primary);
    font-size: 1.25rem;
    margin-top: 0.125rem;
    margin-bottom: 0;
}

/* =============================================
   REQUIREMENTS SECTION
   ============================================= */
.requirements {
    padding: 6rem 0;
    max-width: 80rem;
    margin: 0 auto;
}

.requirements-inner {
    padding: 0 1.5rem;
}

.requirements-card {
    background: rgba(30, 30, 30, 0.04);
    padding: 3rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(30, 30, 30, 0.15);
}

.requirements-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.requirements-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.requirement-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.requirement-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.requirement-header .material-symbols-outlined {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 0;
}

.requirement-header p {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.125rem;
}

.requirement-item > p {
    font-size: 0.875rem;
    color: var(--text-heading);
    line-height: 1.7;
}

/* =============================================
   FINAL CTA
   ============================================= */
.final-cta {
    padding: 8rem 0;
    background: #1e1e1e;
}

.final-cta-inner {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
}

.final-cta-title {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #F7F5E7;
    line-height: 1.15;
}

.final-cta-subtitle {
    font-size: 1.25rem;
    color: rgba(247, 245, 231, 0.8);
}

.final-cta-btn {
    background: #F7F5E7;
    color: #1e1e1e;
    padding: 1.25rem 2.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s;
    display: inline-block;
}

.final-cta-btn:hover {
    transform: translateY(-4px);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-desc {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.footer-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.footer-contact {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 16px;
    display: block;
}

.footer-col-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text);
    transition: color 0.2s;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--muted);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (min-width: 768px) {
    .hero-inner {
        grid-template-columns: 7fr 5fr;
    }

    .features-grid {
        grid-template-columns: repeat(12, 1fr);
    }

    .feature-card-wide {
        grid-column: span 8;
    }

    .feature-card-narrow {
        grid-column: span 4;
    }

    .feature-card-half {
        grid-column: span 6;
    }

    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .requirements-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-header {
        padding-left: 0;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }

    .how-layout {
        flex-direction: row;
    }

    .how-sidebar {
        width: 33.333%;
    }

    .how-sidebar-sticky {
        position: sticky;
        top: 8rem;
    }

    .how-steps {
        width: 66.666%;
    }

    .use-cases-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-center {
        display: none;
    }

    .hero-mockup-wrapper {
        display: none;
    }

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

@media (max-width: 480px) {
    .nav-inner {
        padding: 0 1rem;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-cta {
        padding: 6px 12px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .nav-right {
        gap: 0.4rem;
    }
}
