/* ================================================
   OpexClick Landing — Style System
   Aesthetic: Industrial precision / dark terminal
   ================================================ */

/* --- Tokens --- */
:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-elevated: #18181b;
    --bg-card: #1c1c1f;
    --bg-card-hover: #222226;

    --text-primary: #f0f0f2;
    --text-secondary: #a0a0a8;
    --text-muted: #6b6b73;

    --accent: #2dd4a8;
    --accent-dim: rgba(45, 212, 168, 0.12);
    --accent-glow: rgba(45, 212, 168, 0.25);

    --cta: #f59e0b;
    --cta-hover: #fbbf24;
    --cta-glow: rgba(245, 158, 11, 0.3);

    --border: #2a2a2e;
    --border-hover: #3a3a3f;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --font-display: 'Manrope', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* --- Utilities --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.text-accent {
    color: var(--accent);
}

/* --- Animations --- */
@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

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

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

.anim-rise {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim-rise.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: background 0.3s, padding 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.logo-img {
    display: block;
    border-radius: 6px;
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    font-size: 1rem;
    color: var(--text-secondary);
    padding: 8px 0;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-primary {
    background: var(--cta);
    color: #000;
    box-shadow: 0 0 0 0 var(--cta-glow);
}

.btn-primary:hover {
    background: var(--cta-hover);
    box-shadow: 0 4px 24px var(--cta-glow);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-xl {
    padding: 16px 32px;
    font-size: 1.05rem;
}

/* --- Grid Overlay --- */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
}

.hero-glow--1 {
    width: 600px;
    height: 600px;
    background: var(--accent-dim);
    top: -200px;
    right: -100px;
}

.hero-glow--2 {
    width: 400px;
    height: 400px;
    background: rgba(245, 158, 11, 0.06);
    bottom: 0;
    left: -100px;
}

.hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2s ease infinite;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 56px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* Hero Terminal Preview */
.hero-preview {
    max-width: 640px;
    margin: 0 auto;
}

.preview-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-align: left;
}

.preview-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot--red { background: #ef4444; }
.dot--yellow { background: #f59e0b; }
.dot--green { background: #22c55e; }

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

.preview-body {
    padding: 20px 24px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.85rem;
    line-height: 2;
}

.preview-line {
    opacity: 0;
    animation: rise 0.4s ease forwards;
}

.preview-line:nth-child(1) { animation-delay: 0.8s; }
.preview-line:nth-child(2) { animation-delay: 1.6s; }
.preview-line:nth-child(3) { animation-delay: 2.4s; }
.preview-line:nth-child(4) { animation-delay: 3.2s; }

.prompt {
    color: var(--accent);
    margin-right: 8px;
}

.preview-line--muted {
    color: var(--text-muted);
}

.preview-line--success {
    color: #22c55e;
}

.icon-rec {
    color: #ef4444;
    margin-right: 6px;
    animation: pulse-dot 1s ease infinite;
}

.icon-check {
    color: #22c55e;
    margin-right: 6px;
}

/* --- Logos --- */
.logos-section {
    padding: 48px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.logos-label {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
}

.logos-row {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.logo-item {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.logo-item:hover {
    opacity: 0.8;
}

/* --- Sections --- */
.section {
    padding: 100px 0;
    position: relative;
}

.section--dark {
    background: var(--bg-secondary);
}

.section-label {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 56px;
    line-height: 1.7;
}

/* --- Pain Cards --- */
.pain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 48px;
}

.pain-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.3s, transform 0.3s;
}

.pain-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.pain-icon {
    color: #ef4444;
    margin-bottom: 16px;
    opacity: 0.7;
}

.pain-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pain-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Steps --- */
.steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: 48px;
}

.step {
    flex: 1;
    text-align: center;
    padding: 32px 24px;
}

.step-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    opacity: 0.2;
    margin-bottom: 20px;
    line-height: 1;
}

.step-visual {
    margin-bottom: 20px;
}

.step-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(45, 212, 168, 0.2);
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 320px;
    margin: 0 auto;
}

.step-connector {
    flex: 0 0 60px;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 20px;
    margin-top: 48px;
}

.feature-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.3s, transform 0.3s, background 0.3s;
}

.feature-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.feature-icon {
    color: var(--accent);
    margin-bottom: 16px;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

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

/* --- Use Cases --- */
.usecase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 48px;
}

.usecase-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.3s, transform 0.3s;
}

.usecase-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.usecase-icon {
    color: var(--accent);
    margin-bottom: 16px;
}

.usecase-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.usecase-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.usecase-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* --- Comparison Table --- */
.comparison-table-wrap {
    overflow-x: auto;
    margin-top: 48px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 600px;
}

.comparison-table th,
.comparison-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-table td {
    color: var(--text-secondary);
}

.comparison-table tbody tr:hover {
    background: var(--bg-elevated);
}

.highlight-col {
    background: var(--accent-dim);
}

.highlight-col strong {
    color: var(--accent);
}

.check {
    color: var(--accent);
    font-weight: 700;
}

/* --- FAQ --- */
.faq-list {
    max-width: 720px;
    margin: 48px auto 0;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-q {
    padding: 20px 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    transition: color 0.2s;
    user-select: none;
}

.faq-q::-webkit-details-marker {
    display: none;
}

.faq-q::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--text-muted);
    transition: transform 0.3s, color 0.3s;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item[open] .faq-q::after {
    content: '\2212';
    color: var(--accent);
}

.faq-a {
    padding: 0 0 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.faq-a strong {
    color: var(--text-primary);
}

/* --- CTA Section --- */
.cta-section {
    position: relative;
    overflow: hidden;
    text-align: center;
}

.cta-bg {
    position: absolute;
    inset: 0;
}

.cta-glow {
    position: absolute;
    width: 800px;
    height: 400px;
    border-radius: 50%;
    background: var(--accent-dim);
    filter: blur(150px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cta-inner {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.cta-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.cta-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Footer --- */
.footer {
    padding: 64px 0 32px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.footer-brand .logo-text {
    font-size: 1.3rem;
    margin-bottom: 8px;
    display: block;
}

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

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

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 4px 0;
    transition: color 0.2s;
}

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

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

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

/* --- Responsive --- */
@media (max-width: 900px) {
    .nav-links, .nav-actions {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .steps {
        flex-direction: column;
    }

    .step-connector {
        flex: 0 0 auto;
        width: 2px;
        height: 40px;
        padding: 0;
        margin: 0 auto;
    }

    .step-connector svg {
        display: none;
    }

    .step-connector::after {
        content: '';
        display: block;
        width: 2px;
        height: 40px;
        border-left: 2px dashed var(--border);
    }

    .footer-inner {
        flex-direction: column;
        gap: 32px;
    }

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

@media (max-width: 600px) {
    .hero {
        padding: 100px 0 60px;
    }

    .hero-stats {
        gap: 24px;
    }

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

    .hero-ctas .btn {
        width: 100%;
        justify-content: center;
    }

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

    .comparison-table {
        font-size: 0.8rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 12px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-buttons .btn {
        justify-content: center;
    }

    .logos-row {
        gap: 24px;
    }
}

/* --- Noise Texture Overlay --- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* Selection */
::selection {
    background: var(--accent);
    color: #000;
}