/* ══════════════════════════════════════
   AltyapiCode — Custom Theme CSS
   ══════════════════════════════════════ */

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2234;
    --bg-card-hover: #1e2a40;
    --accent: #22d3ee;
    --accent-dim: #0e7490;
    --accent-glow: rgba(34, 211, 238, 0.15);
    --accent-warm: #f59e0b;
    --accent-warm-glow: rgba(245, 158, 11, 0.15);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #1e293b;
    --success: #10b981;
    --purple: #a78bfa;
    --purple-glow: rgba(167, 139, 250, 0.15);
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ── NAV ── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-family: 'Space Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo .mark { color: var(--accent); }
.logo .dim { color: var(--text-muted); font-weight: 400; }

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
    background: var(--accent);
    color: var(--bg-primary) !important;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: all 0.2s !important;
}
.nav-cta:hover {
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-1px);
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ── HERO ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero-grid-bg {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at 60% 40%, black 20%, transparent 70%);
}
.hero-content {
    max-width: 1200px;
    margin: 0 auto; width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative; z-index: 1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-glow);
    border: 1px solid var(--accent-dim);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}
.hero-badge::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
.hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}
.hero h1 .highlight {
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 520px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* ── BUTTONS ── */
.btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.85rem 1.8rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600; font-size: 0.95rem;
    transition: all 0.25s;
    border: none; cursor: pointer;
}
.btn-primary:hover {
    box-shadow: 0 4px 30px rgba(34, 211, 238, 0.3);
    transform: translateY(-2px);
}
.btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent;
    color: var(--text-secondary);
    padding: 0.85rem 1.8rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500; font-size: 0.95rem;
    border: 1px solid var(--border);
    transition: all 0.25s;
}
.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* ── TERMINAL ── */
.hero-visual { animation: fadeInUp 0.8s ease-out 0.4s both; }
.terminal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.terminal-header {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid var(--border);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }
.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}
.terminal-body {
    padding: 1.2rem 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.8;
}
.code-comment { color: var(--text-muted); }
.code-keyword { color: #c084fc; }
.code-string { color: #34d399; }
.code-method { color: var(--accent); }
.code-number { color: #f59e0b; }
.code-type { color: #60a5fa; }

/* ── STATS ── */
.stats-bar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 2.5rem 2rem;
}
.stats-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}
.stat-item h3 {
    font-size: 2rem; font-weight: 700;
    color: var(--accent);
    font-family: 'Space Mono', monospace;
}
.stat-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ── SECTIONS ── */
.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}
.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}
.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin-bottom: 3rem;
}

/* ── PRODUCT CARDS ── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.product-card:hover {
    border-color: var(--accent-dim);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.product-card:hover::before { opacity: 1; }
.product-icon {
    width: 48px; height: 48px;
    background: var(--accent-glow);
    border: 1px solid var(--accent-dim);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
}
.product-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.8rem;
}
.product-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}
.product-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.product-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.product-features li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.product-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    font-size: 0.8rem;
}

/* ── STANDARDS ── */
.standards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.standard-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    text-align: center;
    transition: all 0.2s;
}
.standard-card:hover { border-color: var(--accent-dim); }
.standard-card .icon { font-size: 2rem; margin-bottom: 0.8rem; }
.standard-card h4 { font-size: 1rem; margin-bottom: 0.4rem; }
.standard-card p { font-size: 0.8rem; color: var(--text-muted); }

/* ── WORKFLOW ── */
.workflow-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.workflow-step { padding: 1.5rem; }
.step-number {
    font-family: 'Space Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--border);
    line-height: 1;
    margin-bottom: 0.8rem;
}
.workflow-step h4 { font-size: 1rem; margin-bottom: 0.5rem; }
.workflow-step p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

/* ── BLOG GRID ── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
}
.blog-card:hover {
    border-color: var(--accent-dim);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.blog-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}
.blog-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}
.blog-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── CTA ── */
.cta-section {
    text-align: center;
    padding: 6rem 2rem;
}
.cta-box {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4rem;
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}
.cta-box::before {
    content: '';
    position: absolute;
    top: -2px; left: 20%; right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.cta-box h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.cta-box p { color: var(--text-secondary); margin-bottom: 2rem; font-size: 1.05rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.whatsapp-btn {
    background: #25D366;
    color: white;
    padding: 0.85rem 1.8rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600; font-size: 0.95rem;
    display: inline-flex;
    align-items: center; gap: 0.5rem;
    transition: all 0.25s;
}
.whatsapp-btn:hover {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    transform: translateY(-2px);
}

/* ── PAGE CONTENT (Single & List) ── */
.page-content {
    padding-top: 8rem;
    min-height: 70vh;
}
.page-header {
    margin-bottom: 3rem;
    max-width: 720px;
}
.page-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}
.page-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}
.page-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}
.page-body {
    max-width: 720px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}
.page-body h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.page-body h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}
.page-body p {
    margin-bottom: 1.2rem;
}
.page-body ul, .page-body ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}
.page-body li {
    margin-bottom: 0.4rem;
}
.page-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-dim);
    transition: border-color 0.2s;
}
.page-body a:hover {
    border-color: var(--accent);
}
.page-body strong {
    color: var(--text-primary);
    font-weight: 600;
}
.page-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}
.page-body em {
    color: var(--text-muted);
    font-style: italic;
}
.page-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.empty-message {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ── FOOTER ── */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-left p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-primary); }
.footer-bottom {
    max-width: 1200px;
    margin: 1.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .hero-content { grid-template-columns: 1fr; gap: 2rem; }
    .hero-visual { display: none; }
}
@media (max-width: 768px) {
    nav { padding: 0.8rem 1rem; }
    .nav-links {
        display: none;
        position: fixed;
        top: 60px; left: 0; right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1rem;
    }
    .nav-links.open { display: flex; }
    .mobile-menu-btn { display: block; }
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: 1fr; }
    .standards-grid { grid-template-columns: 1fr; }
    .workflow-steps { grid-template-columns: repeat(2, 1fr); }
    .blog-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
    .cta-box { padding: 2.5rem 1.5rem; }
    .hero { padding: 6rem 1.5rem 3rem; }
    .container { padding: 3rem 1.5rem; }
}
