/* Custom Styles for Boardwise */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
    --border-radius: 0.5rem;
}

/* ─── Typography ─────────────────────────────────────────────────── */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark-text);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    color: var(--dark-text);
}

.display-5 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
}

/* ─── Smooth Scroll ──────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

section {
    position: relative;
}

/* ─── Navigation ─────────────────────────────────────────────────── */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.97) !important;
    transition: box-shadow 0.3s ease;
}

.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-text) !important;
    transition: color 0.2s ease;
    padding: 0.5rem 0.85rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-outline-secondary {
    color: var(--secondary-color);
    border-color: #cbd5e1;
}

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

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.05rem;
}

/* ─── Language Toggle ────────────────────────────────────────────── */
.lang-toggle {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--secondary-color);
    text-decoration: none;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    transition: color 0.2s, border-color 0.2s;
}

.lang-toggle:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ─── Hero Section ───────────────────────────────────────────────── */
.hero-section {
    background: linear-gradient(180deg, #ffffff 0%, #f0f4ff 100%);
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 7rem 0 5rem;
}

.hero-badge {
    display: inline-block;
}

.badge-text {
    background: #eff6ff;
    color: var(--primary-color);
    border: 1px solid #bfdbfe;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
}

.hero-headline {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--dark-text);
}

.hero-subhead {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--secondary-color);
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
}

/* ─── Risk Section ───────────────────────────────────────────────── */
.risk-card {
    border-left: 4px solid #fecaca;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.risk-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08) !important;
}

.risk-icon {
    font-size: 2rem;
    line-height: 1;
}

/* ─── Features Section ───────────────────────────────────────────── */
.feature-item {
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-item:hover {
    border-color: #bfdbfe;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.feature-icon {
    font-size: 2rem;
    line-height: 1;
}

/* ─── Feature Tag Lines ──────────────────────────────────────────── */
.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 0;
}

/* ─── Written Consents Section ───────────────────────────────────── */
.consent-feature {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.consent-feature:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.consent-visual {
    position: sticky;
    top: 5rem;
}

/* ─── Role Tabs ──────────────────────────────────────────────────── */
.role-tabs {
    border-bottom: 2px solid #e2e8f0;
    gap: 0.25rem;
}

.role-tabs .nav-link {
    color: var(--secondary-color) !important;
    font-weight: 600;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.75rem 1.25rem !important;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.role-tabs .nav-link:hover {
    color: var(--primary-color) !important;
    border-bottom-color: #bfdbfe;
}

.role-tabs .nav-link.active {
    color: var(--primary-color) !important;
    border-bottom-color: var(--primary-color);
    background: none;
}

.role-tab-content {
    border-top: none;
}

.role-feature-list li {
    padding: 0.35rem 0;
    font-size: 0.95rem;
}

/* ─── Multi-Board Visual ─────────────────────────────────────────── */
.multi-board-visual {
    border: 1px solid #e2e8f0;
    overflow: hidden;
    min-width: 0; /* prevent flex blowout */
}

.org-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

/* ─── Document Feature Cards ─────────────────────────────────────── */
.doc-feature-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08) !important;
}

/* ─── Migration Section ──────────────────────────────────────────── */
.migration-step {
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    margin-top: 0.1rem;
}

.migration-guarantee {
    border-left: 4px solid var(--success-color);
}

/* ─── Security Section ───────────────────────────────────────────── */
.security-item {
    padding: 1.75rem;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.security-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.trust-center-callout {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
}

/* ─── Pricing ────────────────────────────────────────────────────── */
.pricing-card {
    border-radius: 1rem;
}

.pricing-amount {
    line-height: 1;
}

/* ─── Contact Section ────────────────────────────────────────────── */
.contact-section {
    background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
}

.contact-form-wrapper {
    border: 1px solid #e2e8f0;
}

/* ─── Form Controls ──────────────────────────────────────────────── */
.form-label {
    font-size: 0.9rem;
}

.form-control {
    border: 1.5px solid #e2e8f0;
    border-radius: var(--border-radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control-lg {
    padding: 0.7rem 1rem;
    font-size: 1rem;
}

/* ─── Footer ─────────────────────────────────────────────────────── */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

footer a:hover {
    opacity: 1 !important;
    color: white !important;
}

/* ─── Alerts ─────────────────────────────────────────────────────── */
.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-success .alert-heading {
    color: #14532d;
}

.alert-success .alert-link {
    color: #14532d;
}

/* ─── Loading State ──────────────────────────────────────────────── */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Animations ─────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
    animation: fadeInUp 0.5s ease-out;
}

/* ─── Custom Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light-bg); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary-color); }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 6rem 0 4rem;
    }

    .hero-headline {
        font-size: 2rem;
    }

    .d-flex.gap-3 {
        gap: 0.75rem !important;
    }

    .role-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .role-tabs .nav-link {
        white-space: nowrap;
    }

    .multi-board-visual {
        margin-top: 1rem;
    }

    footer .text-md-center,
    footer .text-md-end {
        text-align: left !important;
    }
}

/* ─── Legacy Suite Page ─────────────────────────────────────────── */
.legacy-hero {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 5rem;
}

.legacy-hero h1 {
    color: #ffffff;
}

.legacy-hero p {
    color: #94a3b8;
}

.legacy-hero .badge-text {
    background: rgba(255,255,255,0.1);
    color: #94a3b8;
    border-color: rgba(255,255,255,0.15);
}

.product-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 2.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.product-card .product-emoji {
    font-size: 3rem;
    line-height: 1;
}

.product-card .price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark-text);
}

.product-card .price-period {
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.product-card ul {
    list-style: none;
    padding: 0;
}

.product-card ul li {
    padding: 0.4rem 0;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.product-card ul li i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.spec-table th {
    font-weight: 600;
    color: var(--dark-text);
    white-space: nowrap;
    width: 40%;
}

.spec-table td {
    color: var(--secondary-color);
}

.testimonial-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 2rem;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.testimonial-card blockquote {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--dark-text);
    margin-bottom: 1rem;
}

.testimonial-card .attribution {
    font-size: 0.875rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.faq-question {
    font-weight: 600;
    color: var(--dark-text);
}

.faq-answer {
    color: var(--secondary-color);
}

.comparison-check {
    color: var(--success-color);
}

.comparison-x {
    color: var(--danger-color);
}

.reveal-section {
    background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
}

.reveal-section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.product-hero-img {
    border-radius: 0.5rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.kicker-line {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    margin-bottom: -0.5rem;
}

.legacy-muted-text {
    color: #64748b;
}

.emoji-lg {
    font-size: 3.5rem;
}

.emoji-md {
    font-size: 2.5rem;
}

.product-card-featured {
    border-color: var(--primary-color);
    border-width: 2px;
}

/* ─── Accessibility: Reduce Motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
