/* ============================================================
   Cognitivess — Premium minimalist design system
   Gradient mesh hero + geometric shapes + achromatic UI
   ============================================================ */

:root {
    --ink:        #0d0d0d;
    --ink-soft:   #444;
    --ink-muted:  #777;
    --ink-faint:  #999;
    --canvas:     #ffffff;
    --surface:    #f7f7f7;
    --surface-2:  #ededed;
    --hairline:   #e5e5e5;
    --hairline-2: #d0d0d0;
    --accent-1:   #6366f1;
    --accent-2:   #10a37f;
    --accent-3:   #3b82f6;
    --radius:     8px;
    --pill:       9999px;
    --font:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-w:      1120px;
    --ease:       cubic-bezier(0.16, 1, 0.3, 1);
    --transition: 200ms var(--ease);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font); color: var(--ink); background: var(--canvas); line-height: 1.6; font-size: 16px; font-weight: 400; overflow-x: hidden; }
::selection { background: var(--ink); color: var(--canvas); }

/* ─── Navigation ─── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(255,255,255,0.85); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid var(--hairline); }
.nav-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.nav-logo-icon { width: 32px; height: 32px; object-fit: contain; }
.nav-logo-text { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none; padding: 8px 16px; border-radius: 40px; transition: color 150ms, background 150ms; }
.nav-links a:hover { color: var(--ink); background: var(--surface); }
.nav-cta { background: var(--ink) !important; color: var(--canvas) !important; padding: 8px 20px !important; font-size: 14px !important; font-weight: 500 !important; border-radius: 40px !important; transition: opacity 150ms, transform 150ms !important; }
.nav-cta:hover { opacity: 0.85; transform: translateY(-1px); background: var(--ink) !important; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; z-index: 101; }
.nav-hamburger span { width: 20px; height: 1.5px; background: var(--ink); border-radius: 1px; transition: all 0.3s ease; }
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* ─── Hero ─── */
.hero {
    position: relative;
    padding: 220px 0 140px;
    text-align: center;
    overflow: hidden;
    background: #fafafa;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

/* Gradient mesh (4 overlapping radial gradients) */
.hero-mesh { position: absolute; inset: 0; overflow: hidden; }
.hero-mesh-orb { position: absolute; border-radius: 50%; }

.hero-mesh-orb--1 {
    width: 900px; height: 900px;
    background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, transparent 70%);
    top: -40%; left: -15%;
    animation: meshDrift1 22s ease-in-out infinite;
}
.hero-mesh-orb--2 {
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(16,163,127,0.14) 0%, transparent 70%);
    top: -20%; right: -10%;
    animation: meshDrift2 28s ease-in-out infinite;
}
.hero-mesh-orb--3 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
    bottom: -30%; left: 20%;
    animation: meshDrift3 20s ease-in-out infinite;
}
.hero-mesh-orb--4 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(139,92,246,0.10) 0%, transparent 70%);
    top: 30%; right: 25%;
    animation: meshDrift4 24s ease-in-out infinite;
}

@keyframes meshDrift1 { 0%,100%{transform:translate(0,0) scale(1)} 33%{transform:translate(80px,50px) scale(1.05)} 66%{transform:translate(-40px,70px) scale(.97)} }
@keyframes meshDrift2 { 0%,100%{transform:translate(0,0) scale(1)} 33%{transform:translate(-60px,60px) scale(1.03)} 66%{transform:translate(50px,-40px) scale(.96)} }
@keyframes meshDrift3 { 0%,100%{transform:translate(0,0) scale(1)} 33%{transform:translate(50px,-50px) scale(1.04)} 66%{transform:translate(-70px,30px) scale(.98)} }
@keyframes meshDrift4 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-30px,-40px) scale(1.06)} }

/* Grid overlay */
.hero-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 75%);
}

/* Geometric shapes */
.hero-shape { position: absolute; pointer-events: none; }

.hero-shape--ring {
    width: 320px; height: 320px;
    border: 1px solid rgba(99,102,241,0.10);
    border-radius: 50%;
    top: 8%; right: 8%;
    animation: shapeSpin 60s linear infinite;
}
.hero-shape--ring::after {
    content: ''; position: absolute; inset: 24px;
    border: 1px solid rgba(16,163,127,0.08);
    border-radius: 50%;
}

.hero-shape--diamond {
    width: 80px; height: 80px;
    border: 1px solid rgba(59,130,246,0.12);
    transform: rotate(45deg);
    bottom: 25%; left: 6%;
    animation: shapeFloat 12s ease-in-out infinite;
}

.hero-shape--dots {
    width: 1px; height: 1px;
    top: 20%; left: 12%;
    box-shadow:
        20px 0 0 rgba(99,102,241,0.15), 40px 0 0 rgba(99,102,241,0.10), 60px 0 0 rgba(99,102,241,0.06),
        0 20px 0 rgba(99,102,241,0.15), 20px 20px 0 rgba(99,102,241,0.10), 40px 20px 0 rgba(99,102,241,0.06),
        0 40px 0 rgba(99,102,241,0.10), 20px 40px 0 rgba(99,102,241,0.06),
        0 60px 0 rgba(99,102,241,0.06);
    animation: shapeDots 8s ease-in-out infinite;
}

@keyframes shapeSpin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes shapeFloat { 0%,100%{transform:rotate(45deg) translateY(0)} 50%{transform:rotate(45deg) translateY(-20px)} }
@keyframes shapeDots { 0%,100%{opacity:1} 50%{opacity:0.5} }

/* Horizontal glow line at bottom of hero */
.hero-glow {
    position: absolute; bottom: 0; left: 10%; right: 10%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.2), rgba(16,163,127,0.15), rgba(59,130,246,0.2), transparent);
}

/* Hero content */
.hero-inner { position: relative; z-index: 1; max-width: 740px; margin: 0 auto; padding: 0 24px; }

.hero-badge {
    display: inline-block; padding: 7px 18px;
    background: rgba(255,255,255,0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--hairline); border-radius: var(--pill);
    font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--ink-muted); margin-bottom: 32px;
}

.hero-title {
    font-size: clamp(2.4rem, 5.5vw, 3.75rem); font-weight: 600; line-height: 1.08;
    letter-spacing: -1.5px; margin-bottom: 28px; color: var(--ink);
}

.hero-body {
    font-size: 17px; font-weight: 400; line-height: 1.65; color: var(--ink-muted);
    max-width: 560px; margin: 0 auto 44px;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 13px 28px; font-family: var(--font); font-size: 14px; font-weight: 500; line-height: 1;
    border: none; border-radius: var(--pill); cursor: pointer; text-decoration: none;
    background: var(--ink); color: var(--canvas); transition: opacity 150ms, transform 150ms;
}
.btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--hairline); }
.btn-ghost:hover { background: var(--surface); border-color: var(--hairline-2); opacity: 1; transform: translateY(-1px); }
.btn--full { width: 100%; }
.btn--dark { background: var(--ink); color: var(--canvas); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }
.btn:disabled:hover { opacity: 0.35; transform: none; }
.button-loader { display: none; width: 18px; height: 18px; border: 2px solid var(--canvas); border-radius: 50%; border-top-color: transparent; animation: spin .7s linear infinite; position: absolute; }
.btn.loading .button-text { visibility: hidden; }
.btn.loading .button-loader { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Sections ─── */
.section { padding: 128px 0; }
.section-alt { background: var(--surface); }
.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.section-inner--narrow { max-width: 960px; }
.section-head { text-align: center; max-width: 520px; margin: 0 auto 72px; }
.section-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 16px; }
.section-title { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.5px; color: var(--ink); }

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

.card {
    padding: 36px 32px 32px; border: 1px solid var(--hairline); border-radius: 12px;
    background: var(--canvas); transition: border-color 200ms, box-shadow 200ms, transform 200ms;
}
.card:hover { border-color: var(--hairline-2); box-shadow: 0 12px 40px rgba(0,0,0,0.06); transform: translateY(-4px); }

.card-visual { width: 56px; height: 56px; margin-bottom: 24px; }
.card-visual-inner {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    border-radius: 14px; transition: transform 300ms var(--ease);
}
.card:hover .card-visual-inner { transform: scale(1.05); }
.card-visual--1 { background: linear-gradient(135deg, #eef2ff, #e0e7ff); color: var(--accent-1); border: 1px solid rgba(99,102,241,0.15); }
.card-visual--2 { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: var(--accent-2); border: 1px solid rgba(16,163,127,0.15); }
.card-visual--3 { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: var(--accent-3); border: 1px solid rgba(59,130,246,0.15); }

.card-heading { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; margin-bottom: 10px; color: var(--ink); }
.card-body { font-size: 14px; line-height: 1.65; color: var(--ink-soft); margin-bottom: 20px; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card-tags span { font-size: 11px; font-weight: 500; padding: 4px 10px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px; color: var(--ink-muted); letter-spacing: 0.01em; }

/* ─── Steps ─── */
.steps { display: flex; align-items: flex-start; }
.step { flex: 1; padding: 36px 24px; }
.step-num { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 20px; }
.step-bar { width: 32px; height: 2px; background: var(--ink); margin-bottom: 20px; }
.step-heading { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; margin-bottom: 10px; color: var(--ink); }
.step-body { font-size: 14px; line-height: 1.65; color: var(--ink-soft); }

.step-connector { display: flex; flex-direction: column; align-items: center; padding-top: 56px; min-width: 40px; }
.step-connector-line { width: 1px; height: 24px; background: var(--hairline-2); }
.step-connector-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); flex-shrink: 0; }

/* ─── Contact ─── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.contact-title { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.5px; margin-bottom: 16px; color: var(--ink); }
.contact-body { font-size: 16px; color: var(--ink-soft); line-height: 1.65; margin-bottom: 36px; }
.contact-details { display: flex; flex-direction: column; gap: 14px; }
.contact-detail { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-soft); }
.contact-detail-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px; font-size: 13px; color: var(--ink-muted); }

/* ─── Form ─── */
.form { padding: 40px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--canvas); }
.form-field { margin-bottom: 16px; }
.form-field input, .form-field select { width: 100%; padding: 13px 16px; font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--radius); outline: none; transition: border-color 150ms, box-shadow 150ms; appearance: none; -webkit-appearance: none; }
.form-field input::placeholder { color: var(--ink-faint); }
.form-field input:focus, .form-field select:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.file-input { width: 0.1px; height: 0.1px; opacity: 0; overflow: hidden; position: absolute; z-index: -1; }
.file-label { display: flex; align-items: center; justify-content: center; padding: 13px 16px; background: var(--surface); border: 1px dashed var(--hairline); border-radius: var(--radius); cursor: pointer; font-size: 13px; color: var(--ink-soft); transition: all 150ms; }
.file-label:hover { border-color: var(--ink); color: var(--ink); }
.file-label i { margin-right: 8px; }
.file-name { margin-top: 6px; font-size: 12px; color: var(--ink-muted); display: none; }
.g-recaptcha { display: flex; justify-content: center; margin: 16px 0; width: 100%; }
.g-recaptcha > div { margin: 0 auto; }

/* ─── Footer ─── */
.footer { background: #0a0a0a; color: #e5e5e5; padding: 80px 0 40px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 64px; margin-bottom: 56px; }
.footer-logo-icon { filter: brightness(0) invert(1); width: 28px; height: 28px; object-fit: contain; }
.footer-logo-text { color: #fff !important; -webkit-text-fill-color: #fff !important; }
.footer-tagline { font-size: 14px; color: #666; margin-top: 16px; line-height: 1.6; max-width: 280px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-heading { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: #555; margin-bottom: 6px; }
.footer-col a { font-size: 14px; color: #888; text-decoration: none; transition: color 150ms; }
.footer-col a:hover { color: #fff; }
.social-links { display: flex; gap: 10px; margin-top: 4px; }
.social-links a { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid #2a2a2a; border-radius: 50%; color: #888; font-size: 14px; transition: all 150ms; }
.social-links a:hover { color: #fff; border-color: #555; background: #1a1a1a; transform: translateY(-2px); }
.footer-bottom { padding-top: 32px; border-top: 1px solid #1a1a1a; text-align: center; font-size: 12px; color: #444; }

/* ─── Toast ─── */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 9999; pointer-events: none; }
.toast { min-width: 280px; padding: 14px 20px; border-radius: var(--radius); display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; margin-bottom: 8px; box-shadow: 0 4px 24px rgba(0,0,0,0.15); opacity: 0; transform: translateY(-8px); animation: toastIn .25s ease forwards; pointer-events: auto; }
.toast i { font-size: 16px; }
.toast--success { background: var(--ink); color: var(--canvas); }
.toast--error { background: #dc2626; color: #fff; }
.toast--out { animation: toastOut .25s ease forwards; }
@keyframes toastIn { to { opacity:1; transform:translateY(0) } }
@keyframes toastOut { to { opacity:0; transform:translateY(-8px) } }

/* ─── Reveal on scroll ─── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .services { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
    .steps { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
    .step-connector { display: none; }
}

@media (max-width: 768px) {
    body { font-size: 15px; }
    .nav-hamburger { display: flex; }
    .nav-links { position: fixed; top: 64px; left: 0; width: 100%; height: calc(100vh - 64px); background: var(--canvas); flex-direction: column; align-items: center; justify-content: center; gap: 8px; display: none; z-index: 99; border-bottom: 1px solid var(--hairline); }
    .nav-links.active { display: flex; }
    .nav-links a { font-size: 17px; padding: 16px 24px; }
    .hero { padding: 140px 0 80px; }
    .hero-title { font-size: 2.2rem; letter-spacing: -0.8px; }
    .hero-body { font-size: 15px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .hero-shape--ring { width: 180px; height: 180px; top: 5%; right: 2%; }
    .hero-shape--diamond { width: 50px; height: 50px; bottom: 15%; left: 3%; }
    .hero-mesh-orb--1 { width: 500px; height: 500px; }
    .hero-mesh-orb--2 { width: 400px; height: 400px; }
    .hero-mesh-orb--3 { width: 300px; height: 300px; }
    .hero-mesh-orb--4 { display: none; }
    .section { padding: 80px 0; }
    .contact-grid { grid-template-columns: 1fr; gap: 48px; }
    .form { padding: 24px; }
    .footer-top { grid-template-columns: 1fr; gap: 40px; }
    .steps { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
    body.menu-open { overflow: hidden; position: fixed; width: 100%; left: 0; top: 0; }
}

@media (max-width: 480px) {
    .hero { padding: 120px 0 60px; }
    .hero-title { font-size: 1.85rem; letter-spacing: -0.6px; }
    .card { padding: 28px 24px; }
    .section-head { margin-bottom: 48px; }
    .hero-shape--ring { display: none; }
    .hero-shape--diamond { display: none; }
    .hero-shape--dots { display: none; }
}