:root {
    --background: #05070f;
    --background-alt: #0b1020;
    --background-card: #111830;
    --gradient-hero: radial-gradient(circle at 20% 20%, rgba(99,102,241,0.45), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(14,165,233,0.35), transparent 60%),
        linear-gradient(180deg, #05070f 0%, #070a18 100%);
    --gradient-accent: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --text-primary: #f5f6ff;
    --text-muted: #9aa4c6;
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-soft: 0 20px 45px rgba(0, 0, 0, 0.35);
    --radius-lg: 24px;
    --radius-md: 16px;
    --transition: all 0.25s ease;
    --container-width: min(1180px, 92vw);
    --section-spacing: 120px;
    --font-heading: 'Sora', 'Inter', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--gradient-hero);
    min-height: 100vh;
}

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

a:hover {
    color: #c7ceff;
}

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

.container {
    width: var(--container-width);
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

/* Header / Navigation */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    background: rgba(5, 7, 15, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 0;
}

.logo a {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.04em;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 999px;
    transition: var(--transition);
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.14);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gradient-accent);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 18px 40px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(139, 92, 246, 0.18);
    color: #d0d6ff;
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.28);
}

/* Hero */
.hero {
    padding: 140px 0 110px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(99, 102, 241, 0.18), transparent 55%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 60px;
    position: relative;
    z-index: 1;
}

.hero-headline {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.16);
    color: #d7dcff;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    width: fit-content;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    line-height: 1.1;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 520px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-card {
    background: linear-gradient(160deg, rgba(15, 19, 42, 0.8), rgba(17, 24, 48, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: grid;
    gap: 24px;
    box-shadow: var(--shadow-soft);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric strong {
    font-size: 1.8rem;
    font-family: var(--font-heading);
}

.metric span {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Sections */
.section {
    padding: var(--section-spacing) 0;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 760px;
    margin-bottom: 60px;
}

.section-header.center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.pill {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd2ff;
    font-size: 0.95rem;
}

/**** Cards & Grids ****/
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.card {
    background: var(--background-card);
    border-radius: var(--radius-md);
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    gap: 18px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 18px 40px rgba(10, 11, 30, 0.55);
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.65;
}

.check-list {
    display: grid;
    gap: 12px;
}

.check-list li {
    list-style: none;
    display: flex;
    gap: 12px;
    color: var(--text-muted);
}

.check-list li::before {
    content: '\2713';
    color: #a78cff;
}

.split-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    align-items: center;
}

.highlight-panel {
    background: linear-gradient(160deg, rgba(139, 92, 246, 0.18), rgba(14, 165, 233, 0.14));
    border-radius: var(--radius-lg);
    padding: 34px;
    border: 1px solid rgba(169, 161, 255, 0.22);
    display: grid;
    gap: 18px;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 26px;
}

.process-step {
    padding: 28px;
    border-radius: var(--radius-md);
    background: rgba(17, 24, 48, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: grid;
    gap: 12px;
}

.process-step span {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(167, 178, 255, 0.7);
}

.testimonial {
    background: linear-gradient(160deg, rgba(17, 24, 48, 0.95), rgba(5, 7, 19, 0.95));
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 26px;
}

.testimonial blockquote {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.testimonial cite {
    font-style: normal;
    color: #d4d9ff;
    font-weight: 600;
}

.cta-section {
    padding: 110px 0;
}

.cta-card {
    background: linear-gradient(160deg, rgba(99, 102, 241, 0.28), rgba(14, 165, 233, 0.22));
    border-radius: var(--radius-lg);
    padding: 48px;
    display: grid;
    gap: 18px;
    justify-items: center;
    text-align: center;
    border: 1px solid rgba(120, 130, 255, 0.35);
}

.cta-card h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.cta-card p {
    color: #e8ebff;
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.blog-post {
    background: rgba(17, 24, 48, 0.88);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.blog-post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-post-content {
    padding: 28px;
    display: grid;
    gap: 12px;
}

.blog-post-content h3 a {
    font-family: var(--font-heading);
    font-size: 1.25rem;
}

.blog-post-content p {
    color: var(--text-muted);
    line-height: 1.6;
}

.read-more {
    color: #9aaeff;
    font-weight: 600;
}

.post-meta {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(196, 204, 255, 0.65);
}

.blog-post-full {
    display: grid;
    gap: 22px;
    background: rgba(17, 24, 48, 0.7);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-post-full .post-summary {
    color: var(--text-muted);
}

.blog-post-full .post-image {
    border-radius: var(--radius-md);
}

.blog-post-full .post-body {
    color: var(--text-muted);
    line-height: 1.75;
}

.blog-post-full .post-body h2,
.blog-post-full .post-body h3 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 12px;
}

.blog-post-full .post-body ul {
    margin: 18px 0 18px 1.4rem;
    display: grid;
    gap: 10px;
    color: var(--text-muted);
}

/* Tables (admin) */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(17, 24, 48, 0.85);
    color: var(--text-primary);
}

.admin-table th,
.admin-table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table th {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(183, 193, 255, 0.75);
}

.edit-btn,
.delete-btn {
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.edit-btn {
    background: rgba(139, 92, 246, 0.25);
    color: #dad8ff;
}

.delete-btn {
    background: rgba(244, 63, 94, 0.25);
    color: #ffccd3;
}

/* Forms */
form {
    display: grid;
    gap: 18px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    background: rgba(17, 24, 48, 0.85);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.form-message {
    font-size: 0.95rem;
    color: #6ee7b7;
}

.form-message.error {
    color: #fda4af;
}

.admin-login-form {
    background: rgba(17, 24, 48, 0.8);
    border-radius: var(--radius-md);
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tabs {
    display: inline-flex;
    gap: 10px;
    background: rgba(17, 24, 48, 0.7);
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
}

.tab-link {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.tab-link.active,
.tab-link:hover {
    background: rgba(139, 92, 246, 0.2);
    color: var(--text-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Contact */
.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
}

.contact-item {
    background: rgba(17, 24, 48, 0.78);
    border-radius: var(--radius-md);
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    display: grid;
    gap: 10px;
}

.contact-item i {
    font-size: 1.8rem;
    color: #a78bfa;
}

/* Footer */
.footer {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(5, 7, 15, 0.85);
    text-align: center;
}

.footer p {
    color: rgba(195, 202, 240, 0.75);
    font-size: 0.92rem;
}

/* Chatbot widget */
#cloudpeakify-chatbot {
    position: fixed;
    bottom: 1.5rem; /* default pin bottom-right */
    right: 1.5rem;
    left: auto;
    top: auto;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    pointer-events: auto; /* ensure toggle is always clickable */
}
/* when cookie banner is open, lift the widget above it */
body.cookie-open #cloudpeakify-chatbot{ bottom: calc(1.5rem + var(--cookie-banner-h, 0px)); }

#cloudpeakify-chatbot.chatbot--visible {
    pointer-events: auto;
}

.chatbot__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(99, 102, 241, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot__toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px rgba(99, 102, 241, 0.4);
}

.chatbot__toggle-icon {
    font-size: 1.25rem;
}

.chatbot__window {
    width: min(320px, calc(100vw - 2.5rem));
    background: rgba(5, 7, 15, 0.96);
    color: #f8fafc;
    border-radius: 18px;
    box-shadow: 0 32px 70px rgba(2, 6, 23, 0.55);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 1;
    transform: translateY(0);
}

.chatbot--hidden .chatbot__window {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

.chatbot__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(8px);
}

.chatbot__header h2 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.chatbot__header p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.65);
}

.chatbot__close {
    background: transparent;
    color: rgba(226, 232, 240, 0.7);
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
}

.chatbot__messages {
    flex: 1;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 320px;
    overflow-y: auto;
}

.chatbot__message {
    display: flex;
}

.chatbot__message--user {
    justify-content: flex-end;
}

.chatbot__message--user .chatbot__bubble {
    background: rgba(99, 102, 241, 0.95);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.chatbot__message--assistant .chatbot__bubble {
    background: rgba(148, 163, 184, 0.14);
    color: #e2e8f0;
    border-bottom-left-radius: 6px;
}

.chatbot__bubble {
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    line-height: 1.45;
    max-width: 100%;
    font-size: 0.95rem;
    box-shadow: 0 18px 32px rgba(2, 6, 23, 0.45);
}

.chatbot__form {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chatbot__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.7);
}

.chatbot__input-group {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.chatbot__input {
    flex: 1;
    resize: none;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    background: rgba(15, 23, 42, 0.68);
    color: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chatbot__input:focus {
    border-color: rgba(129, 140, 248, 0.9);
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.3);
    outline: none;
}

.chatbot__send {
    background: var(--gradient-accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.55rem 0.9rem;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot__hint {
    margin: 0;
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.6);
}

.chatbot__status {
    min-height: 1em;
    margin: 0;
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.75);
}

@media (max-width: 640px) {
    #cloudpeakify-chatbot {
        bottom: 1rem;
        right: 1rem;
    }
    body.cookie-open #cloudpeakify-chatbot{ bottom: calc(1rem + var(--cookie-banner-h, 0px)); }

    .chatbot__window {
        width: min(100%, 360px);
    }

    .chatbot__toggle {
        padding: 0.55rem 0.85rem;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        padding: 120px 0 80px;
    }

    .nav-links {
        gap: 14px;
    }

    .section {
        padding: 90px 0;
    }
}

/* Cookie banner */
.cookie-banner{position:fixed;left:0;right:0;bottom:0;z-index:9999;background:rgba(5,7,15,0.9);backdrop-filter:blur(10px);border-top:1px solid rgba(255,255,255,0.1)}
.cookie-banner__content{width:var(--container-width);margin:0 auto;display:flex;gap:16px;align-items:center;justify-content:space-between;padding:14px 0}
.cookie-banner__text{color:#c6cae4;font-size:0.95rem}
.cookie-banner__actions{display:flex;gap:10px}
.cookie-btn{background:rgba(255,255,255,0.1);color:#fff;border:1px solid rgba(255,255,255,0.2);border-radius:999px;padding:8px 14px;cursor:pointer}
.cookie-btn--primary{background:var(--gradient-accent);border:none}
@media(max-width:680px){.cookie-banner__content{flex-direction:column;align-items:flex-start;padding:12px 14px}.cookie-banner__actions{width:100%;justify-content:flex-end}}

/* Prevent footer content being hidden behind the cookie banner */
body.cookie-open{padding-bottom:var(--cookie-banner-h,80px)}

/* Scrollspy (section indicator) */
.scrollspy{position:fixed;left:16px;top:50%;transform:translateY(-50%);z-index:1400;display:flex;flex-direction:column;gap:10px;pointer-events:none}
.scrollspy__item{display:flex;align-items:center;gap:8px}
.scrollspy__dot{width:10px;height:10px;border-radius:999px;border:2px solid rgba(255,255,255,0.6);background:transparent;transition:all .2s ease;pointer-events:auto;cursor:pointer}
.scrollspy__item.active .scrollspy__dot{background:#fff;border-color:#fff;transform:scale(1.15)}
.scrollspy__label{color:#c6cae4;background:rgba(5,7,15,0.75);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,0.12);padding:4px 8px;border-radius:999px;font-size:12px;opacity:0;transform:translateX(-6px);transition:all .2s ease;white-space:nowrap;pointer-events:none}
.scrollspy__item:hover .scrollspy__label,.scrollspy__item.active .scrollspy__label{opacity:1;transform:translateX(0)}
@media(max-width: 900px){.scrollspy{display:none}}

@media (max-width: 640px) {
    .navbar {
        flex-direction: column;
        gap: 18px;
    }

    .hero-actions {
        width: 100%;
    }

    .card,
    .highlight-panel,
    .testimonial,
    .blog-post-full,
    .cta-card {
        padding: 24px;
    }

    .nav-links a {
        padding: 6px 12px;
    }
}
