/* ============================================
   KI in a Box – Modern Landing Page
   ============================================ */

:root {
    --bg: #0b0f19;
    --bg-elev: #111827;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --text: #0f172a;
    --text-muted: #475569;
    --text-soft: #64748b;
    --text-inverse: #f8fafc;

    --brand: #4f46e5;
    --brand-2: #06b6d4;
    --brand-3: #8b5cf6;
    --accent: #10b981;

    --gradient: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-soft: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.15), 0 4px 8px -4px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 25px 60px -20px rgba(79, 70, 229, 0.25), 0 10px 20px -10px rgba(15, 23, 42, 0.15);

    --container: 1180px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); letter-spacing: -0.03em; font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: var(--brand); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--brand-3); }
ul, ol { padding: 0; margin: 0; list-style: none; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand);
    background: var(--gradient-soft);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
}
.logo-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    background: var(--gradient);
    color: white;
    border-radius: 10px;
    box-shadow: 0 6px 14px -4px rgba(79, 70, 229, 0.5);
}
.logo-text {
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 1.05rem;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}
.nav-links a:hover { color: var(--text); }
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
}
.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.98rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
    white-space: nowrap;
}
.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 10px 24px -8px rgba(79, 70, 229, 0.55);
}
.btn-primary:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -10px rgba(79, 70, 229, 0.65);
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-ghost:hover {
    background: var(--surface-soft);
    color: var(--text);
}
.btn-small {
    padding: 10px 18px;
    font-size: 0.9rem;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    padding: clamp(60px, 8vw, 110px) 0 clamp(60px, 8vw, 100px);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: -30% 0 auto 0;
    height: 120%;
    background:
        radial-gradient(60% 50% at 20% 20%, rgba(79, 70, 229, 0.12), transparent 60%),
        radial-gradient(40% 45% at 85% 10%, rgba(6, 182, 212, 0.10), transparent 60%),
        radial-gradient(35% 30% at 70% 80%, rgba(139, 92, 246, 0.08), transparent 60%);
    z-index: -1;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 64px;
}
.hero-text .lead {
    font-size: 1.18rem;
    color: var(--text-muted);
    max-width: 560px;
    margin-bottom: 32px;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 28px;
}
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 24px;
    font-size: 0.92rem;
    color: var(--text-soft);
    font-weight: 500;
}

/* Mail mockup visual */
.hero-visual {
    position: relative;
}
.mail-mock {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    padding: 0;
    overflow: hidden;
    transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
    transition: transform 0.5s var(--ease);
}
.mail-mock:hover { transform: perspective(1200px) rotateY(-3deg) rotateX(1deg); }
.mail-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--border);
}
.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.mail-title {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-soft);
    font-weight: 500;
}
.mail-row {
    display: flex;
    gap: 14px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}
.mail-row:last-child { border-bottom: 0; }
.mail-row.incoming { background: linear-gradient(180deg, rgba(79, 70, 229, 0.03), rgba(6, 182, 212, 0.03)); }
.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.avatar.ai {
    background: var(--gradient);
    color: white;
    border: 0;
}
.mail-body { flex: 1; min-width: 0; }
.mail-from {
    font-size: 0.78rem;
    color: var(--text-soft);
    margin-bottom: 4px;
    font-family: 'JetBrains Mono', monospace;
}
.mail-subject {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.mail-preview {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.mail-attach { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    display: inline-block;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

/* ===== Sections ===== */
.section {
    padding: clamp(64px, 8vw, 110px) 0;
}
.section-head {
    max-width: 720px;
    margin: 0 auto 56px;
    text-align: center;
}
.section-lead {
    font-size: 1.08rem;
    color: var(--text-muted);
}

.grid {
    display: grid;
    gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Features ===== */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: transparent;
}
.card:hover::before { transform: scaleX(1); }
.card-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--gradient-soft);
    color: var(--brand);
    margin-bottom: 20px;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; font-size: 0.97rem; }

/* ===== Advantages ===== */
.advantages { background: var(--surface-soft); }
.advantage {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    position: relative;
    border: 1px solid var(--border);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.advantage:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.advantage-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.4rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.advantage p { margin: 0; }

/* ===== Process / Steps ===== */
.process {
    background:
        radial-gradient(60% 80% at 50% 0%, rgba(79, 70, 229, 0.04), transparent 60%),
        white;
}
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    counter-reset: step;
    position: relative;
}
.steps::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    opacity: 0.2;
    z-index: 0;
}
.step {
    position: relative;
    text-align: center;
    padding: 0 8px;
    z-index: 1;
}
.step-num {
    width: 64px;
    height: 64px;
    margin: 0 auto 22px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.4rem;
    box-shadow: 0 10px 24px -10px rgba(79, 70, 229, 0.6);
    border: 6px solid white;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { font-size: 0.95rem; margin: 0; }

/* ===== Cases ===== */
.cases { background: var(--surface-soft); }
.case {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    display: flex;
    flex-direction: column;
}
.case:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.case-tag {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand);
    background: var(--gradient-soft);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.case h3 { margin-bottom: 12px; }
.case p { font-size: 0.97rem; margin: 0; }

/* ===== Privacy box ===== */
.privacy-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 36px;
    align-items: center;
    background: var(--bg);
    color: var(--text-inverse);
    border-radius: var(--radius-xl);
    padding: clamp(40px, 6vw, 64px);
    position: relative;
    overflow: hidden;
}
.privacy-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(40% 60% at 10% 20%, rgba(79, 70, 229, 0.35), transparent 60%),
        radial-gradient(40% 60% at 90% 80%, rgba(6, 182, 212, 0.25), transparent 60%);
    z-index: 0;
}
.privacy-box > * { position: relative; z-index: 1; }
.privacy-badge {
    width: 96px;
    height: 96px;
    background: var(--gradient);
    border-radius: 24px;
    display: grid;
    place-items: center;
    color: white;
    box-shadow: 0 20px 40px -12px rgba(79, 70, 229, 0.6);
}
.privacy-badge svg { width: 48px; height: 48px; }
.privacy-content .eyebrow {
    background: rgba(255, 255, 255, 0.14);
    color: #eef2ff;
}
.privacy-content h2 { color: white; }
.privacy-content p {
    color: #cbd5e1;
    font-size: 1.05rem;
    margin-bottom: 22px;
    max-width: 640px;
}
.privacy-content strong { color: white; }
.privacy-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 28px;
}
.privacy-list li {
    position: relative;
    padding-left: 26px;
    color: #e2e8f0;
    font-size: 0.95rem;
}
.privacy-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    color: var(--accent);
    font-weight: 700;
}

/* ===== CTA ===== */
.cta-box {
    text-align: center;
    max-width: 720px;
    padding-block: 40px;
}
.cta-box h2 { margin-bottom: 14px; }
.cta-box p { font-size: 1.1rem; margin-bottom: 32px; }
.cta-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--bg);
    color: #94a3b8;
    padding: 56px 0 32px;
    margin-top: 40px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 40px;
    align-items: start;
}
.footer-brand .logo-text { color: white; font-size: 1.15rem; display: block; margin-bottom: 6px; }
.footer-brand p { color: #94a3b8; margin: 0; font-size: 0.95rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: #cbd5e1; font-size: 0.95rem; }
.footer-links a:hover { color: white; }
.footer-legal {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.footer-legal a { color: #94a3b8; }
.footer-legal a:hover { color: white; }
.footer-note {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
}
.no-cookie {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(220, 38, 38, 0.25));
}

/* ===== Reveal animation ===== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .mail-mock { transform: none; max-width: 520px; margin: 0 auto; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .steps::before { display: none; }
    .privacy-box { grid-template-columns: 1fr; text-align: left; }
    .privacy-badge { margin: 0; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-legal { justify-content: flex-start; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 24px 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .nav-links.open { display: flex; }
    .nav-links a {
        padding: 14px 0;
        border-bottom: 1px solid var(--border);
    }
    .nav-links a:last-child {
        border: 0;
        margin-top: 8px;
        text-align: center;
    }
    .nav-toggle { display: flex; }
    .nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .privacy-list { grid-template-columns: 1fr; }
    .hero-actions .btn { width: 100%; }
    .hero-badges { flex-direction: column; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
