/* =========================================================
   MD Development — Dark theme (JMBH-inspired), blue accent
   ========================================================= */

:root {
    --bg:            #05070d;
    --bg-soft:       #0a0e18;
    --foreground:    #e9eff8;
    --muted:         #8a97ab;
    --primary:       #3b82f6;
    --primary-400:   #60a5fa;
    --primary-600:   #2563eb;
    --primary-700:   #1d4ed8;
    --border:        rgba(255, 255, 255, 0.09);
    --card:          rgba(255, 255, 255, 0.03);
    --radius:        14px;
    --max:           100rem;
    --font: "Arimo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

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

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--foreground);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Ambient blue glows that sit above the canvas */
body::before {
    content: "";
    position: fixed;
    top: -10%; left: -5%;
    width: 45vw; height: 45vw;
    background: radial-gradient(circle, rgba(59,130,246,.22), transparent 60%);
    filter: blur(40px);
    z-index: -1;
    pointer-events: none;
}

/* Particle canvas background */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: -2;
    display: block;
    pointer-events: none;
}

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 26px; }
.muted { color: var(--muted); }

a { color: var(--primary-400); text-decoration: none; }
a:hover { text-decoration: none; }

/* ---------- Gradient text ---------- */
.gtext {
    background: linear-gradient(to right, var(--foreground), rgba(233,239,248,.45));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.gtext-blue {
    background: linear-gradient(to right, var(--primary-400), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h1, h2, h3 { margin: 0; line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }

.display {
    font-size: clamp(2.6rem, 8vw, 6.5rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.03em;
}
.section-title {
    font-size: clamp(2.2rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -.03em;
}
.eyebrow {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.01em;
    margin-bottom: .3rem;
}
.lead { font-size: 1.18rem; color: var(--muted); max-width: 34rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 600; font-size: .96rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: rgba(59,130,246,.5);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 8px 30px rgba(59,130,246,.28);
}
.btn-primary:hover { background: var(--primary); box-shadow: 0 12px 40px rgba(59,130,246,.45); }
.btn-ghost {
    background: rgba(255,255,255,.02);
    border-color: var(--border);
    color: var(--foreground);
}
.btn-ghost:hover { border-color: var(--primary); background: rgba(59,130,246,.08); }

/* ---------- Top nav (floating glass) ---------- */
.site-header {
    position: fixed;
    top: 16px; left: 0; right: 0;
    z-index: 60;
    display: flex; justify-content: center;
    pointer-events: none;
}
.nav-shell {
    pointer-events: auto;
    display: flex; align-items: center; justify-content: space-between;
    gap: 26px;
    width: min(1120px, calc(100% - 32px));
    padding: 10px 12px 10px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(10,14,24,.55);
    backdrop-filter: saturate(160%) blur(14px);
    box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-logo { height: 42px; width: auto; display: block; }
.brand-mark {
    display: grid; place-items: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-700));
    color: #fff; font-weight: 800; letter-spacing: .5px;
    box-shadow: 0 6px 20px rgba(59,130,246,.4);
}
.brand-text strong { display: block; color: var(--foreground); font-size: .98rem; line-height: 1; }
.brand-text small { color: var(--muted); font-size: .72rem; }

.tabs ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.tab {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600; font-size: .9rem;
    transition: color .15s ease, background .15s ease;
}
.tab:hover { color: var(--foreground); background: rgba(255,255,255,.05); }
.tab.is-active { color: #fff; background: rgba(59,130,246,.22); }

.nav-cta { display: inline-flex; }
.nav-toggle, .nav-toggle-label { display: none; }

/* ---------- Sections ---------- */
.section {
    position: relative;
    z-index: 1;
    padding: 96px 0;
}
.section-screen { min-height: 100vh; display: flex; align-items: center; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head .lead { margin: 14px auto 0; }
.text-right { text-align: right; }
.text-right .lead { margin-left: auto; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 90px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; width: 100%; }
.hero-brand { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.hero .cta-row { display: flex; gap: 12px; margin-top: 28px; }

/* Floating stat cluster */
.stat-cluster { position: relative; min-height: 460px; }
.stat-card {
    position: absolute;
    display: flex; align-items: center; gap: 14px;
    min-width: 210px;
    padding: 16px;
    border: 1px solid rgba(59,130,246,.22);
    border-radius: var(--radius);
    background: rgba(10,14,24,.35);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(59,130,246,.12);
    animation: floaty 6s ease-in-out infinite;
}
.stat-card:hover { transform: scale(1.04); }
.stat-card .ico {
    display: grid; place-items: center;
    width: 42px; height: 42px; flex-shrink: 0;
    border-radius: 50%;
    background: rgba(59,130,246,.14);
    color: var(--primary-400);
}
.stat-card .num { font-size: 1.7rem; font-weight: 800; color: var(--foreground); line-height: 1; }
.stat-card .lbl { color: var(--muted); font-size: .82rem; font-weight: 500; }

.stat-card.p1 { top: 4%;   left: 0; }
.stat-card.p2 { top: 4%;   right: 0; animation-delay: .8s; }
.stat-card.p3 { top: 44%;  left: -6%; animation-delay: 1.6s; }
.stat-card.p4 { top: 44%;  right: -6%; animation-delay: 2.4s; }
.stat-card.p5 { bottom: 4%; left: 0; animation-delay: 3.2s; }
.stat-card.p6 { bottom: 4%; right: 0; animation-delay: 4s; }

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

/* Mobile stat grid (hidden on desktop) */
.stat-grid { display: none; }

/* ---------- Cards / services ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    backdrop-filter: blur(8px);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-5px); border-color: rgba(59,130,246,.4); box-shadow: 0 16px 40px rgba(59,130,246,.15); }
.card .ico {
    display: grid; place-items: center;
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(59,130,246,.12);
    color: var(--primary-400);
    margin-bottom: 16px;
}
.card h3 { font-size: 1.18rem; margin-bottom: 8px; color: var(--foreground); }
.card p { margin: 0; color: var(--muted); }

/* ---------- Hosting plans ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan {
    position: relative;
    display: flex; flex-direction: column;
    padding: 32px 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    backdrop-filter: blur(8px);
}
.plan.featured {
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(59,130,246,.22);
    background: rgba(59,130,246,.06);
}
.plan .badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: #fff;
    padding: 4px 14px; border-radius: 999px;
    font-size: .68rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
.plan h3 { color: var(--foreground); font-size: 1.3rem; }
.plan .price { font-size: 2.6rem; font-weight: 800; margin: 8px 0 2px; }
.plan .price span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.plan .blurb { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; }
.plan ul li { padding: 8px 0 8px 26px; position: relative; border-bottom: 1px solid var(--border); color: var(--foreground); }
.plan ul li::before { content: "✓"; position: absolute; left: 0; color: var(--primary-400); font-weight: 800; }
.plan .btn { margin-top: auto; justify-content: center; }

/* ---------- Projects carousel ---------- */
.carousel { position: relative; }
.carousel-viewport { overflow: hidden; border-radius: var(--radius); }
.carousel-track { display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.slide { flex: 0 0 60%; min-width: 0; padding: 0 10px; }
.work {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-soft);
}
.work .thumb { aspect-ratio: 16/9; display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: rgba(255,255,255,.85); }
.work .thumb.g1 { background: linear-gradient(135deg,#1d4ed8,#0a2540); }
.work .thumb.g2 { background: linear-gradient(135deg,#2563eb,#1e3a8a); }
.work .thumb.g3 { background: linear-gradient(135deg,#3b82f6,#1d4ed8); }
.work .thumb.g4 { background: linear-gradient(135deg,#0a2540,#3b82f6); }
.work .thumb.g5 { background: linear-gradient(135deg,#1e40af,#60a5fa); }
.work .thumb.g6 { background: linear-gradient(135deg,#0891b2,#22d3ee); }
.work .overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,7,13,.92), transparent 55%); }
.work .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; }
.work .tag { color: var(--primary-400); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; }
.work h3 { font-size: 1.5rem; margin: 6px 0 4px; color: #fff; }
.work p { margin: 0; color: var(--muted); font-size: .92rem; }

.carousel-btns { display: flex; justify-content: center; gap: 8px; margin-top: 26px; }
.dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.2); cursor: pointer; transition: background .2s, width .2s; padding: 0; }
.dot.active { background: var(--primary); width: 24px; border-radius: 999px; }

/* ---------- Contact ---------- */
.contact-card {
    max-width: 760px; margin: 0 auto;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(10,14,24,.4);
    backdrop-filter: blur(12px);
}
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 7px; color: var(--foreground); }
.field input, .field textarea, .field select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255,255,255,.03);
    color: var(--foreground);
    font-family: inherit; font-size: .98rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: #55617a; }
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.22);
}
.field textarea { min-height: 130px; resize: vertical; }
.field select option { background: var(--bg-soft); }
.form-err { color: #fca5a5; font-size: .82rem; margin-top: 5px; display: block; }
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 20px; font-weight: 600; font-size: .95rem; }
.alert-success { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.4); color: #86efac; }
.alert-error { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); color: #fca5a5; }
.contact-meta { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; margin-top: 26px; color: var(--muted); font-size: .95rem; }
.contact-meta a { color: var(--foreground); }

/* ---------- Content / legal pages ---------- */
.page-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.page-head .updated { color: var(--muted); font-size: .9rem; margin-top: 10px; }
.prose {
    max-width: 800px; margin: 0 auto;
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    backdrop-filter: blur(8px);
}
.prose h3 { color: var(--foreground); font-size: 1.25rem; margin: 30px 0 10px; }
.prose h3:first-child { margin-top: 0; }
.prose h4 { color: var(--primary-400); font-size: 1.02rem; margin: 20px 0 6px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 20px; margin: 0 0 12px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--primary-400); }

/* Updates timeline */
.timeline { max-width: 760px; margin: 0 auto; }
.update-item {
    display: flex; gap: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    backdrop-filter: blur(8px);
    margin-bottom: 16px;
    transition: border-color .16s ease, transform .16s ease;
}
.update-item:hover { border-color: rgba(59,130,246,.4); transform: translateY(-3px); }
.update-item .date { flex-shrink: 0; width: 90px; color: var(--muted); font-size: .88rem; font-weight: 600; padding-top: 3px; }
.update-item .u-tag {
    display: inline-block; margin-bottom: 6px;
    padding: 3px 10px; border-radius: 999px;
    font-size: .68rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    background: rgba(59,130,246,.15); color: var(--primary-400);
}
.update-item h3 { font-size: 1.15rem; color: var(--foreground); margin: 0 0 4px; }
.update-item p { margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); background: rgba(5,7,13,.6); backdrop-filter: blur(10px); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; padding: 56px 0 36px; }
.footer-col h4 { color: var(--foreground); font-size: 1rem; margin: 0 0 14px; }
.footer-col p { color: var(--muted); font-size: .9rem; max-width: 15rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: var(--muted); font-size: .9rem; transition: color .15s; }
.footer-links a:hover { color: var(--foreground); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; text-align: center; color: var(--muted); font-size: .85rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px) scale(.99); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
    .hero-grid { grid-template-columns: 1fr; }
    .stat-cluster { display: none; }
    .stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 36px; }
    .stat-grid .stat-card { position: static; min-width: 0; animation: none; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .pricing { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
    .slide { flex-basis: 82%; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .text-right, .text-right .lead { text-align: left; margin-left: 0; }
}
@media (max-width: 720px) {
    .tabs, .nav-cta { display: none; }
    .nav-toggle-label {
        display: inline-flex; flex-direction: column; gap: 5px;
        padding: 8px; cursor: pointer;
    }
    .nav-toggle-label span { width: 22px; height: 2px; background: var(--foreground); border-radius: 2px; }
    .nav-toggle:checked ~ .tabs {
        display: block;
        position: absolute; top: 66px; right: 16px;
        background: rgba(10,14,24,.95);
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 10px;
        backdrop-filter: blur(14px);
    }
    .nav-toggle:checked ~ .tabs ul { flex-direction: column; align-items: stretch; }
    .tab { display: block; }
}
@media (max-width: 560px) {
    .grid-3, .grid-2, .field-row, .footer-grid, .stat-grid { grid-template-columns: 1fr; }
    .hero .cta-row { flex-direction: column; }
}
