/* =========================================
   TAVLO LANDING - MINIMALIST ELEGANT SAAS (v6)
   "Serious & Scalable" - Invisible Precision
   ========================================= */

:root {
    /* --- Palette: Sophisticated & Trustworthy --- */
    --color-primary: #1e40af;
    /* Tavlo Blue - Deep & Corporate */
    --color-primary-hover: #1e3a8a;

    --color-text-main: #0f172a;
    /* Slate 900 */
    --color-text-secondary: #475569;
    /* Slate 600 */
    --color-text-tertiary: #94a3b8;
    /* Slate 400 */

    --bg-body: #ffffff;
    --bg-subtle: #f8fafc;
    /* Slate 50 */
    --bg-surface: #ffffff;

    /* --- Borders & Depth --- */
    --border-subtle: 1px solid rgba(0, 0, 0, 0.06);
    --border-hover: 1px solid rgba(0, 0, 0, 0.12);

    --shadow-xs: 0px 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0px 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0px 8px 16px -4px rgba(0, 0, 0, 0.04), 0px 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0px 20px 40px -8px rgba(0, 0, 0, 0.06);

    /* --- Typography --- */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --tracking-tight: -0.02em;
    --tracking-tighter: -0.04em;

    /* --- Layout --- */
    --max-width: 1200px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--color-text-main);
    font-weight: 600;
    /* Lighter weights for elegance */
    letter-spacing: var(--tracking-tight);
    line-height: 1.2;
}

h1 {
    font-weight: 700;
    letter-spacing: var(--tracking-tighter);
    font-size: clamp(3rem, 5vw, 4.5rem);
    color: #0f172a;
}

h2 {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

p.lead {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Components: Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-text-main);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
}

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

.btn-secondary {
    background: transparent;
    color: var(--color-text-secondary);
    border: var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    color: var(--color-text-main);
    border-color: rgba(0, 0, 0, 0.1);
}

/* --- Components: Cards (Glass/Clean) --- */
.card-clean {
    background: #fff;
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: all 0.3s ease;
    height: 100%;
}

.card-clean:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(30, 64, 175, 0.1);
}

/* --- Layout Utils --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-spacer {
    padding: 100px 0;
}

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

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

/* --- Nav --- */
nav.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--border-subtle);
    z-index: 1000;
    height: 64px;
    display: flex;
    align-items: center;
}

/* --- Grid System --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

/* --- Animations --- */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-enter {
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* --- Visual Details --- */
.gradient-subtle {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background:
        radial-gradient(circle at 15% 50%, rgba(30, 64, 175, 0.03), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.03), transparent 25%);
    z-index: -1;
    pointer-events: none;
}

/* --- Extracted Hero & Components --- */
.hero-section {
    padding-top: 160px;
    padding-bottom: 100px;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 99px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: -0.03em;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--color-primary);
}

/* --- FAQ Accordion --- */
.faq-item {
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
    margin-bottom: 16px;
    background: #fff;
}

.faq-item:hover {
    border-color: rgba(0, 0, 0, 0.1);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-text-tertiary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
    color: var(--color-primary);
}

.faq-answer {
    padding: 0 24px 24px 24px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    display: none;
    /* Controlled by JS */
}

/* Force display block when not hidden (for JS toggle) */
.faq-answer[hidden] {
    display: none;
}

.faq-answer:not([hidden]) {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Footer (3-Column Grid) --- */
.site-footer {
    padding: 60px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    font-size: 0.9rem;
    /* Elegant Separation */
    box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* Left, Center, Right */
    align-items: center;
    gap: 24px;
}

.footer-col-left {
    justify-self: start;
    font-weight: 600;
    color: var(--color-text-main);
}

.footer-col-center {
    justify-self: center;
    display: flex;
    gap: 24px;
}

.footer-col-right {
    justify-self: end;
    color: var(--color-text-tertiary);
}

.footer-col-center a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col-center a:hover {
    color: var(--color-primary);
}

/* Footer Mobile: Stacked */
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        justify-items: center;
        /* Center everything */
        text-align: center;
        gap: 32px;
    }

    .footer-col-left,
    .footer-col-center,
    .footer-col-right {
        justify-self: center;
    }

    .footer-col-center {
        flex-direction: column;
        /* Stack links vertically on mobile for better touch targets */
        gap: 16px;
    }
}

/* --- Lightbox --- */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    /* Dark clean background */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    la opacity: 1;
}

/* Zoomable pointer */
.zoomable {
    cursor: pointer;
    /* "Manita" as requested */
    transition: transform 0.2s ease;
}

.zoomable:hover {
    transform: scale(1.02);
}

/* --- Trusted By Section --- */
.trusted-container {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.trusted-label {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trusted-logos {
    /* Desktop: Exact match to inline styles */
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.8;
    filter: grayscale(1);
    width: 100%;
}

.trusted-logo-item {
    font-weight: 700;
    font-size: 1.2rem;
}

/* Mobile: 2x2 Grid */
@media (max-width: 768px) {
    .trusted-logos {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 32px;
        justify-items: center;
    }

    .trusted-logo-item {
        font-size: 1.1rem;
        /* Slightly smaller for mobile grid fit */
    }
}