:root {
    /* Colors */
    --color-bg-dark: rgb(254, 241, 239);
    --color-bg-card: rgba(255, 255, 255, 0.6);
    --color-text-primary: rgb(160, 62, 52);
    --color-text-secondary: rgba(160, 62, 52, 0.7);
    --color-primary: rgb(160, 62, 52);
    /* Terracotta */
    --color-secondary: #e67e22;
    /* Orange-ish to complement */
    --color-accent: #27ae60;
    /* Green for success/money */

    --gradient-primary: linear-gradient(135deg, rgb(160, 62, 52) 0%, #c0392b 100%);
    --gradient-dark: linear-gradient(180deg, rgb(254, 241, 239) 0%, #fff 100%);
    --gradient-glass: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 100%);

    /* Typography */
    --font-heading: 'Varela Round', sans-serif;
    --font-body: 'Varela Round', sans-serif;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    --spacing-2xl: 8rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(160, 62, 52, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(160, 62, 52, 0.1), 0 2px 4px -1px rgba(160, 62, 52, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(160, 62, 52, 0.1), 0 4px 6px -2px rgba(160, 62, 52, 0.05);
    --shadow-glow: 0 0 20px rgba(160, 62, 52, 0.2);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(160, 62, 52, 0.1);
    color: var(--color-primary);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(160, 62, 52, 0.2);
}

.btn-secondary:hover {
    background: rgba(160, 62, 52, 0.2);
    transform: translateY(-2px);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-md) 0;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(160, 62, 52, 0.1);
    background: rgba(254, 241, 239, 0.8);
    /* Match bg color with transparency */
    transition: padding 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: var(--spacing-md);
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .site-header {
        padding: var(--spacing-sm) 0;
    }

    .header-actions {
        gap: var(--spacing-sm);
    }

    .logo img {
        height: 32px !important;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .header-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
        /* Hide text on small screens */
    }

    .header-actions .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Glassmorphism Card */
.glass-card {
    background: var(--gradient-glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.feature-screenshot {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(160, 62, 52, 0.1);
    transition: transform 0.3s ease;
}

.feature-screenshot:hover {
    transform: translateY(-5px);
}

/* Infographics */
.infographic-container {
    width: 100%;
    max-width: 500px;
    height: 350px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(160, 62, 52, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.infographic-header {
    height: 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

/* Automation Infographic */
.split-view {
    display: flex;
    height: 100%;
}

.split-left {
    flex: 1;
    padding: 20px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.split-right {
    flex: 1;
    padding: 20px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.info-label {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 2px;
    font-weight: 500;
}

.form-line {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    width: 100%;
}

.form-input {
    height: 28px;
    border: 1px solid #eee;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 0.75rem;
    color: #333;
    background: white;
}

.doc-preview {
    width: 80%;
    height: 85%;
    background: white;
    box-shadow: var(--shadow-sm);
    border-radius: 4px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-header {
    height: 30px;
    border-bottom: 2px solid var(--color-primary);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Invoicing Infographic */
.invoice-list {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.invoice-header-row {
    display: flex;
    padding: 0 10px;
    margin-bottom: 5px;
}

.invoice-header-row span {
    font-size: 0.65rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
}

.col-client {
    flex: 2;
}

.col-date {
    flex: 1;
}

.col-amount {
    flex: 1;
    text-align: right;
}

.col-status {
    flex: 1;
    text-align: right;
}

.invoice-row {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    transition: background 0.2s;
}

.invoice-row:hover {
    background: #fcfcfc;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 2;
}

.client-avatar {
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #666;
    font-weight: bold;
}

.client-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: #333;
}

.invoice-date {
    flex: 1;
    font-size: 0.75rem;
    color: #888;
}

.invoice-amount {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    text-align: right;
}

.invoice-status {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.status-paid {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.status-sent {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

/* Dashboard Infographic */
.dashboard-grid {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}

.kpi-row {
    display: flex;
    gap: 12px;
}

.kpi-card {
    flex: 1;
    padding: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin: 4px 0;
}

.kpi-trend {
    font-size: 0.7rem;
    font-weight: 600;
}

.trend-up {
    color: #27ae60;
}

.trend-down {
    color: #e74c3c;
}

.chart-area {
    flex: 1;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px 15px 5px 35px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    position: relative;
}

.chart-y-axis {
    position: absolute;
    left: 8px;
    top: 10px;
    bottom: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.6rem;
    color: #aaa;
}

.bar {
    width: 12%;
    background: var(--color-primary);
    opacity: 0.8;
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease;
    position: relative;
}

.bar:hover {
    opacity: 1;
}

.bar::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: #aaa;
}

/* Bank Infographic */
.bank-card {
    background: white;
    /* Border radius and shadow handled by container now, or we can keep inner radius */
    border-radius: 0 0 8px 8px;
    /* Rounded bottom only if header is separate, but we'll put it inside container */
    overflow: hidden;
    font-family: var(--font-body);
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bank-header {
    background: #ffebe9;
    /* Light pink from screenshot */
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bank-balance {
    font-size: 1.2rem;
    font-weight: 700;
    color: #a03e34;
    /* Dark red/brown */
}

.bank-account {
    font-size: 0.65rem;
    color: #666;
    margin-top: 2px;
}

.bank-controls {
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.bank-filter {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.75rem;
    color: #666;
    background: white;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.transaction-list {
    padding: 0;
}

.transaction-row {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f9f9f9;
    font-size: 0.75rem;
}

.transaction-row:last-child {
    border-bottom: none;
}

.t-checkbox {
    width: 14px;
    height: 14px;
    border: 1px solid #ccc;
    border-radius: 2px;
    margin-right: 15px;
}

.t-date {
    width: 80px;
    color: #888;
}

.t-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.t-amount {
    width: 80px;
    text-align: right;
    font-weight: 600;
}

.amount-pos {
    color: #27ae60;
}

.amount-neg {
    color: #e74c3c;
}

.t-status {
    width: 30px;
    display: flex;
    justify-content: flex-end;
    color: #27ae60;
}

/* Mobile Infographic */
.mobile-screen {
    width: 100%;
    height: 100%;
    background: #fff5f3;
    /* Light peach bg */
    display: flex;
    flex-direction: column;
    padding: 40px 15px 15px;
    /* Top padding for notch */
    position: relative;
    overflow: hidden;
    border-radius: 40px;
}

.mobile-header {
    margin-bottom: 20px;
}

.mobile-header h3 {
    color: var(--color-primary);
    font-size: 1.2rem;
    font-weight: 700;
}

.mobile-actions {
    background: white;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 0.6rem;
    color: var(--color-primary);
    text-align: center;
}

.action-icon {
    width: 35px;
    height: 35px;
    background: rgba(160, 62, 52, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.mobile-stats-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
}

.stat-val {
    font-size: 0.9rem;
    font-weight: 700;
    color: #27ae60;
}

.stat-val.red {
    color: #e74c3c;
}

.stat-label {
    font-size: 0.6rem;
    color: #888;
}

.mobile-chart {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding-top: 20px;
    padding-bottom: 10px;
    border-top: 1px solid #f0f0f0;
}

.m-bar {
    width: 8px;
    border-radius: 4px 4px 0 0;
    position: relative;
}

.m-bar.sales {
    background: #e6be8a;
}

/* Gold/Beige */
.m-bar.purchases {
    background: #ffadad;
}

/* Light Red */

.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #eee;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.6rem;
    color: #aaa;
    gap: 3px;
}

.nav-item.active {
    color: var(--color-primary);
}

/* Steps Section */
.step-card {
    position: relative;
    padding: var(--spacing-lg);
    border-left: 2px solid var(--color-primary);
    background: linear-gradient(90deg, rgba(160, 62, 52, 0.05) 0%, transparent 100%);
}

.step-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(160, 62, 52, 0.1);
    position: absolute;
    top: 0;
    right: var(--spacing-md);
    line-height: 1;
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(160, 62, 52, 0.1);
    padding: var(--spacing-lg);
    background: var(--color-bg-dark);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-link {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
    display: block;
}

.footer-link:hover {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Footer Content Refactor */
.footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--spacing-lg);
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer-center {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.footer-right {
    justify-self: end;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
}

.footer-slogan {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.peppol-badge {
    height: 60px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-lg);
    }

    .footer-left {
        align-items: center;
    }

    .footer-right {
        justify-self: center;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Dashboard Reveal */
.hero {
    perspective: 1000px;
    overflow-x: hidden;
    width: 100%;
    /* Prevent horizontal scroll from glow elements */
    padding-bottom: 100px !important;
    /* Space for the tilted dashboard */
}

.hero-dashboard-container {
    width: 100%;
    max-width: 900px;
    margin: 40px auto 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow:
        0 20px 50px rgba(160, 62, 52, 0.15),
        0 1px 0 rgba(255, 255, 255, 0.5) inset;
    transform: rotateX(20deg) scale(0.95);
    transform-style: preserve-3d;
    animation: heroFloat 6s ease-in-out infinite;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: rotateX(20deg) scale(0.95) translateY(0);
    }

    50% {
        transform: rotateX(20deg) scale(0.95) translateY(-15px);
    }
}

.hero-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(160, 62, 52, 0.1);
}

.hero-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.hero-kpi-card {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-chart-section {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 20px;
    height: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    position: relative;
}

/* Responsive adjustments for hero */
@media (max-width: 768px) {
    .hero {
        perspective: none;
        padding-bottom: var(--spacing-xl) !important;
    }

    .hero-dashboard-container {
        transform: none;
        animation: none;
        margin-top: var(--spacing-xl);
    }

    .hero-dashboard-grid {
        grid-template-columns: 1fr;
    }
}