:root {
    /* Brand Colors */
    --primary: #924DDB;
    /* The vibrant, premium purple */
    --primary-hover: #7b3db7;
    --primary-light: #f3e8ff;

    --ink: #0f172a;
    --ink-muted: #64748b;
    --ink-light: #94a3b8;

    --bg: #ffffff;
    --bg-offset: #f8fafc;

    --border: #e2e8f0;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    overflow-y: scroll;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background-color: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================================
   Navigation & Header
=================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

#site-header {
    height: 80px;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.logo:hover {
    text-decoration: none;
}

.wordmark {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--ink);
}

.wordmark span {
    color: var(--primary);
}

.links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.links a {
    color: var(--ink);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink);
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.mobile-menu-btn:focus {
    outline: none;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: white;
    padding: 16px 24px 32px;
    border-top: 1px solid var(--border);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-bottom: 1px solid var(--border);
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a:not(.btn) {
    padding: 16px 0;
    font-weight: 500;
    color: var(--ink);
    border-bottom: 1px solid var(--border);
}

.mobile-nav .btn {
    margin-top: 24px;
    width: 100%;
    text-align: center;
}

@media (max-width: 900px) {

    .nav .links,
    .nav .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

/* ==================================
   Buttons
=================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.btn.primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn.primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn.ghost {
    background-color: transparent;
    color: var(--ink);
    border: 1px solid var(--border);
}

.btn.ghost:hover {
    background-color: var(--bg-offset);
}

.btn.hero-outline {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn.hero-outline:hover {
    background-color: white;
    color: var(--primary);
    border-color: white;
}

.btn.white {
    background-color: white;
    color: var(--primary);
}

.btn.white:hover {
    background-color: var(--bg-offset);
    transform: translateY(-1px);
}

.btn.large {
    padding: 16px 32px;
    font-size: 1.05rem;
}

/* ==================================
   Forms
=================================== */
.demo-form {
    display: flex;
    flex-direction: row;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
    gap: 12px;
}

.demo-form input {
    flex: 1;
    padding: 14px 20px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    outline: none;
    transition: box-shadow 0.2s;
}

.demo-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

@media (max-width: 600px) {
    .demo-form {
        flex-direction: column;
    }

    .demo-form .btn {
        width: 100%;
    }
}

.full-contact-form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
    gap: 16px;
    text-align: left;
}

.full-contact-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.full-contact-form label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
}

.full-contact-form input,
.full-contact-form textarea,
.full-contact-form select {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    background-color: white;
    outline: none;
    transition: box-shadow 0.2s, border-color 0.2s;
    width: 100%;
}

.full-contact-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%231e293b%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
    cursor: pointer;
}

.full-contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.full-contact-form input:focus,
.full-contact-form textarea:focus {
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.full-contact-form .btn {
    margin-top: 8px;
    justify-content: center;
}

/* ==================================
   Hero Section
=================================== */
.hero {
    position: relative;
    padding: 120px 0 120px;
    background-color: var(--bg-offset);
    overflow: hidden;
    z-index: 1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, #7636ba 100%);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12vw), 0 100%);
    z-index: -1;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.1fr 1.1fr;
    gap: 40px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.25;
    color: white;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

.hero .lead {
    font-size: 1.15rem;
    color: #ffffff;
    max-width: 500px;
    margin-bottom: 40px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Display Mockup on the right */
.dashboard-mockup {
    position: relative;
    width: 110%;
    margin-right: -10%;
    overflow: hidden;
    background: white;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px -12px rgba(15, 23, 42, 0.3), 0 18px 36px -18px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: perspective(2000px) rotateY(-10deg) rotateX(5deg) translateZ(0);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.hero-slide img {
    transform: translateZ(1px); /* Slight lift for clarity */
}

.dashboard-mockup:hover {
    transform: perspective(2000px) rotateY(0deg) rotateX(0deg) translateZ(0);
}

.hero-dots-wrapper {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    margin-right: -10%;
}

.dashboard-mockup:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.dashboard-header {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background-color: var(--bg-offset);
    border-bottom: 1px solid var(--border);
}

.mac-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.mac-dot.red {
    background-color: #ef4444;
}

.mac-dot.yellow {
    background-color: #f59e0b;
}

.mac-dot.green {
    background-color: #10b981;
}

.dashboard-body {
    display: flex;
    height: 350px;
}

.sidebar {
    width: 80px;
    background-color: var(--bg-offset);
    border-right: 1px solid var(--border);
}

.content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.header-bar {
    height: 24px;
    width: 40%;
    background: var(--bg-offset);
    border-radius: 4px;
    border: 1px solid var(--border);
}

.stats {
    display: flex;
    gap: 16px;
}

.stat-box {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    background: white;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

.stat-value.accent {
    color: #ef4444;
}

.stat-label {
    font-size: 12px;
    color: var(--ink-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.table-mock {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.row {
    height: 24px;
    border-bottom: 1px solid var(--border);
    background: white;
}

.row.header {
    background: var(--bg-offset);
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .eyebrow {
        margin: 0 auto 24px;
    }

    .hero .lead {
        margin: 0 auto 40px;
    }

    .hero-content .actions {
        justify-content: center;
    }

    .dashboard-mockup {
        transform: none;
        width: 100%;
        margin-right: 0;
    }

    .hero-dots-wrapper {
        margin-right: 0;
    }

    .hero-bg::after {
        bottom: -10vh;
    }
}

/* ==================================
   Sections structure
=================================== */
.section {
    padding: 100px 0;
    position: relative;
}

.bg-light {
    background-color: var(--bg-offset);
}

.section-header {
    margin-bottom: 64px;
}

.section-header.center {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 64px;
}

.section h2 {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    color: var(--ink);
}

.section p.muted {
    font-size: 1.15rem;
    color: var(--ink-muted);
}

/* ==================================
   Z-Pattern Features
=================================== */
.feature-z {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 100px;
}

.feature-z:last-child {
    margin-bottom: 0;
}

.feature-z.reverse .feature-visual {
    order: -1;
}

.feature-text h2 {
    font-size: 2.25rem;
    margin-bottom: 24px;
}

.feature-text p {
    font-size: 1.1rem;
    color: var(--ink-muted);
    margin-bottom: 32px;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    font-weight: 500;
    color: var(--ink);
}

.feature-list li::before {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    margin-right: 16px;
    font-size: 0.85rem;
    font-weight: 700;
}

.visual-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

@media (max-width: 900px) {
    .feature-z {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .feature-z.reverse .feature-visual {
        order: 0;
    }

    .feature-text ul {
        text-align: left;
    }
}

/* ==================================
   Features Grid
=================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.icon {
    font-size: 2rem;
    margin-bottom: 24px;
    display: inline-block;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.card p {
    color: var(--ink-muted);
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================================
   Insights / Blog Grid (Brico Style)
=================================== */
.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

@media (max-width: 900px) {
    .insights-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.insight-card {
    display: flex;
    flex-direction: column;
}

.img-placeholder {
    height: 200px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.insight-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.insight-content p {
    color: var(--ink-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.insight-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.tag {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.date {
    color: var(--ink-light);
    font-size: 0.85rem;
    font-weight: 500;
}

@media (max-width: 900px) {
    .insights-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .insights-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================================
   FAQ
=================================== */
.faq-controls {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
}

.link-btn:hover {
    text-decoration: underline;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s;
}

.faq-item:hover {
    border-color: var(--primary-light);
}

.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    list-style: none;
    /* Hide default arrow */
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item .answer {
    padding: 0 24px 24px;
    color: var(--ink-muted);
    line-height: 1.6;
}

.faq-item .chevron {
    color: var(--primary);
    font-size: 1.5rem;
    transition: transform 0.3s;
    font-weight: 400;
}

.faq-item[open] .chevron {
    transform: rotate(45deg);
}

/* ==================================
   Legal and Article Documents
=================================== */
.legal-main {
    padding: 140px 0 60px;
}

.paper {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.article-hero {
    padding: 140px 0 60px;
    text-align: center;
}

.article-content {
    max-width: 768px;
    margin: 0 auto 80px;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--ink);
}

@media (max-width: 600px) {
    .legal-main, .article-hero {
        padding: 100px 0 40px;
    }
    .paper {
        padding: 32px 24px;
    }
    .article-content {
        font-size: 1rem;
    }
}

/* ==================================
   CTA
=================================== */
.cta-section {
    background-color: var(--primary);
    color: white;
}

/* ==================================
   Footer styling
=================================== */
footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--border);
    background: var(--bg-offset);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-grid .left {
    color: var(--ink-muted);
    font-size: 0.95rem;
}

.footer-grid .right {
    display: flex;
    gap: 24px;
}

.footer-grid .right a {
    color: var(--ink-muted);
    font-weight: 500;
}

.footer-grid .right a:hover {
    color: var(--primary);
}

@media (max-width: 600px) {
    .footer-grid {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
.article-content h2 { margin-top: 48px; margin-bottom: 24px; }
.article-content p { margin-bottom: 24px; }
.article-content ul { margin-bottom: 24px; padding-left: 24px; }
.article-content li { margin-bottom: 8px; }
.author-date { color: var(--ink-muted); font-size: 0.95rem; margin-top: 24px; font-weight: 500; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-muted); text-decoration: none; font-weight: 500; margin-bottom: 32px; transition: color 0.2s; }
.back-link:hover { color: var(--primary); }
