/* DSGuard Website Styles */
:root {
    --primary: #1f2937;
    --secondary: #374151;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --accent-light: #fb923c;
    --accent-gradient: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
    --surface: #ffffff;
    --surface-2: #fafaf9;
    --surface-3: #f5f5f4;
    --border: #e5e5e5;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--surface);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.logo svg {
    width: 180px;
    height: 68px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

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

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

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

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

.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--text-secondary) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    border-color: var(--text-secondary) !important;
}

.btn-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text);
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    background: var(--surface-2);
    color: var(--accent);
}

/* Focus Styles */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
    transition: outline 0.2s ease;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    z-index: 1000;
    border-radius: 0 0 8px 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.skip-link:focus {
    top: 0;
    transform: translateY(0);
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Hero */
.hero {
    padding: 160px 0 120px;
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    height: 100%;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59,130,246,0.08), transparent);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--primary);
    margin-bottom: 20px;
    letter-spacing: -1.5px;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.hero-actions .btn {
    padding: 14px 28px;
    font-size: 15px;
}

/* Trust Bar */
.trust-bar {
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
}

.trust-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.trust-item svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

/* Sections */
section {
    padding: 100px 0;
}

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

.section-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Features */
.features {
    background: var(--surface);
}

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

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 24px;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--surface-3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.feature-card:hover .feature-icon {
    background: var(--accent);
    color: white;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary);
}

.feature-card ul {
    list-style: none;
    font-size: 14px;
    color: var(--text-secondary);
}

.feature-card li {
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-card li::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
}

/* Deployment */
.deployment {
    background: var(--surface-2);
}

.deploy-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.deploy-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    transition: all 0.2s;
}

.deploy-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.deploy-icon {
    width: 56px;
    height: 56px;
    background: var(--surface-3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 26px;
}

.deploy-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.deploy-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Industries */
.industries {
    background: var(--surface);
}

.industries-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.industry-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 14px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
}

.industry-item:hover {
    background: var(--surface);
    box-shadow: var(--shadow);
}

.industry-item span {
    font-size: 20px;
}

/* Databases */
.databases {
    background: var(--primary);
    color: white;
}

.databases .section-label {
    color: var(--accent-light);
}

.databases .section-title {
    color: white;
}

.databases .section-desc {
    color: rgba(255,255,255,0.7);
}

.db-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.db-category {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 32px;
}

.db-category h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

.db-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.db-item {
    background: rgba(255,255,255,0.1);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s;
}

.db-item:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
}

/* CTA */
.cta {
    background: var(--surface-2);
    text-align: center;
}

.cta-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 64px;
    box-shadow: var(--shadow);
}

.cta h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.cta p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* CTA Statistics */
.cta-stats {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
}

.cta-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.cta-stat-number {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}

.cta-stat-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.cta-stat-tooltip {
    position: relative;
    cursor: help;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.cta-stat-tooltip:hover {
    opacity: 1;
}

.cta-stat-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.cta-stat-tooltip::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.cta-stat-tooltip:hover::before,
.cta-stat-tooltip:hover::after,
.cta-stat-tooltip.tooltip-active::before,
.cta-stat-tooltip.tooltip-active::after {
    opacity: 1;
    visibility: visible;
}

.cta-stat-tooltip:hover,
.cta-stat-tooltip.tooltip-active {
    opacity: 1;
}

.cta-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    padding: 16px 32px;
    background: var(--surface-3);
    border-radius: 12px;
    transition: all 0.2s;
}

.cta-email:hover {
    background: var(--accent);
    color: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--surface);
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

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

.modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.close {
    position: absolute;
    top: 20px;
    right: 24px;
    color: var(--text-secondary);
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: var(--accent);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.form-label.required::after {
    content: " *";
    color: #dc2626;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--surface);
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.checkbox-item:hover {
    background: var(--surface-2);
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.checkbox-item label {
    font-size: 14px;
    cursor: pointer;
}

.form-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.form-success {
    background: #dcfce7;
    border: 1px solid #16a34a;
    color: #166534;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    margin-bottom: 24px;
    display: none;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover:not(:disabled) {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

/* Footer */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 48px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    /* three columns of unequal height (logo+tagline, resources list, contact):
       top-align them instead of centring, or the short columns float mid-block */
    align-items: flex-start;
    gap: 40px;
}

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

.footer-logo svg {
    width: 32px;
    height: 32px;
}

.footer-logo span {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.footer-copy {
    text-align: center;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
    .features-grid, .deploy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: fixed;
        top: 73px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
        z-index: 99;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        text-align: center;
        padding: 12px 0;
        width: 100%;
    }

    .nav-links .btn {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 17px;
    }

    .section-title {
        font-size: 28px;
    }

    .features-grid, .deploy-grid, .db-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
    }

    .cta-box {
        padding: 40px 24px;
    }

    .cta-stat-item {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .cta-stat-number {
        font-size: 18px;
    }

    .cta-stat-text {
        font-size: 13px;
    }

    .modal-content {
        margin: 20px;
        padding: 32px 24px;
    }

    .form-checkbox-group {
        grid-template-columns: 1fr;
    }
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loading state */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* High contrast and reduced motion support */
@media (prefers-contrast: high) {
    :root {
        --border: #000000;
        --text-secondary: #000000;
    }

    .btn-outline {
        border-width: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .skip-link {
        transition: none;
    }
}

/* ====================================================================
   HYBRID reCAPTCHA STYLING (v3 + v2 Intelligent Security)
   ==================================================================== */

/* reCAPTCHA Challenge Section */
.recaptcha-challenge {
    margin: 24px 0;
    padding: 20px;
    background: #fafaf9;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.recaptcha-challenge.visible {
    background: #fef3c7;
    border-color: #fbbf24;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.15);
}

/* reCAPTCHA Wrapper */
.recaptcha-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 16px 0;
    min-height: 78px; /* Standard reCAPTCHA height */
}

/* reCAPTCHA Widget Container */
#recaptcha-v2-widget {
    transform-origin: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#recaptcha-v2-widget.loading {
    opacity: 0.6;
    transform: scale(0.95);
}

/* reCAPTCHA Challenge Message */
.recaptcha-challenge-message {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #fbbf24;
}

.recaptcha-challenge-message i {
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* reCAPTCHA Error Styling */
#recaptcha-error {
    margin-top: 8px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    background: #fef2f2;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #fecaca;
}

/* Submit Button States for reCAPTCHA */
.btn-submit[data-recaptcha-state="verifying"] {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    cursor: wait;
}

.btn-submit[data-recaptcha-state="challenge"] {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    animation: pulse-orange 2s infinite;
}

@keyframes pulse-orange {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 25px -5px rgba(249, 115, 22, 0.25);
    }
}

/* reCAPTCHA Loading State */
.recaptcha-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 78px;
    color: var(--text-secondary);
    font-size: 14px;
}

.recaptcha-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border: 2px solid #e5e5e5;
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* reCAPTCHA Success State */
.recaptcha-success {
    background: #f0f9ff;
    border-color: #0ea5e9;
    color: #0c4a6e;
}

.recaptcha-success .form-label::after {
    content: " ✓";
    color: #059669;
    font-weight: 700;
}

/* Mobile Responsive reCAPTCHA */
@media (max-width: 768px) {
    .recaptcha-wrapper {
        margin: 12px 0;
        min-height: 78px;
    }

    /* Scale down reCAPTCHA widget on very small screens */
    @media (max-width: 320px) {
        #recaptcha-v2-widget {
            transform: scale(0.85);
        }

        .recaptcha-wrapper {
            min-height: 66px;
        }
    }

    .recaptcha-challenge-message {
        font-size: 13px;
        padding: 10px 12px;
        margin: 12px 0;
    }
}

/* Dark Mode reCAPTCHA Support (if implemented later) */
@media (prefers-color-scheme: dark) {
    .recaptcha-challenge {
        background: #1f2937;
        border-color: #374151;
    }

    .recaptcha-challenge.visible {
        background: #1e293b;
        border-color: #fbbf24;
    }

    .recaptcha-challenge-message {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        color: #fbbf24;
        border-color: #6b7280;
    }

    #recaptcha-error {
        background: #1e1b1b;
        color: #f87171;
        border-color: #7f1d1d;
    }
}

/* High Contrast reCAPTCHA Support */
@media (prefers-contrast: high) {
    .recaptcha-challenge {
        border-width: 2px;
        background: white;
    }

    .recaptcha-challenge-message {
        border-width: 2px;
        font-weight: 700;
    }

    #recaptcha-error {
        border-width: 2px;
        font-weight: 700;
    }
}

/* Reduced Motion reCAPTCHA Support */
@media (prefers-reduced-motion: reduce) {
    .recaptcha-challenge,
    #recaptcha-v2-widget,
    .recaptcha-challenge-message {
        transition: none !important;
        animation: none !important;
    }

    .btn-submit[data-recaptcha-state="challenge"] {
        animation: none !important;
    }

    .recaptcha-loading::before {
        animation: none !important;
        border-top-color: var(--accent);
    }
}
/* --- Redesign iteration 1 --- */
.feature-icon { color: var(--accent); }
.feature-icon svg { width: 26px; height: 26px; }
.db-note { color: var(--accent); font-weight: 600; margin-left: 2px; }
.db-footnote { text-align: center; color: var(--text-3, #94a3b8); font-size: 13px; margin-top: 24px; }

/* ============================================================
   Redesign iteration 2 — new sections, icons, dark theme
   ============================================================ */

/* Deploy + industry icons (emoji -> SVG) */
.deploy-icon { color: var(--accent); }
.deploy-icon svg { width: 28px; height: 28px; }
.industry-item span { display: inline-flex; align-items: center; color: var(--accent); }

/* How it works */
.howitworks { background: var(--surface-2); }
.flow {
    display: flex; align-items: stretch; justify-content: center;
    gap: 16px; flex-wrap: wrap; margin-bottom: 64px;
}
.flow-node {
    flex: 1 1 220px; max-width: 300px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 28px 24px; text-align: center;
}
.flow-node--core { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.flow-ico {
    width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 14px;
    background: var(--surface-3); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.flow-node--core .flow-ico { background: var(--accent-gradient); color: #fff; }
.flow-ico svg { width: 26px; height: 26px; }
.flow-node h4 { font-size: 16px; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.flow-node p { font-size: 13px; color: var(--text-secondary); }
.flow-arrow { display: flex; align-items: center; font-size: 26px; color: var(--accent); font-weight: 700; }

.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pipe-step { display: flex; gap: 16px; }
.pipe-num {
    flex: none; width: 36px; height: 36px; border-radius: 50%;
    background: var(--accent-gradient); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
}
.pipe-step h4 { font-size: 16px; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.pipe-step p { font-size: 14px; color: var(--text-secondary); }

/* AI Sandbox Shell */
.shellai { background: var(--surface-2); }
.shellai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.shellai-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 32px 24px; transition: all 0.3s;
}
.shellai-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.shellai-ico {
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--surface-3); color: var(--accent);
    display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.shellai-ico svg { width: 26px; height: 26px; }
.shellai-card h3 { font-size: 18px; font-weight: 600; color: var(--primary); margin-bottom: 12px; }
.shellai-card p { font-size: 14px; color: var(--text-secondary); }

/* Compliance */
.compliance { background: var(--surface); }
.compliance-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.comp-card {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 14px; padding: 28px 20px; text-align: center;
}
.comp-card h4 { font-size: 16px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.comp-card p { font-size: 13px; color: var(--text-secondary); }

/* Responsive for new grids */
@media (max-width: 900px) {
    .pipeline { grid-template-columns: repeat(2, 1fr); }
    .shellai-grid { grid-template-columns: repeat(2, 1fr); }
    .compliance-grid { grid-template-columns: repeat(2, 1fr); }
    /* The arrow is a flex item in a stretch container, so it is as tall as the
       cards next to it (199px). Rotating it 90deg turns that height into visual
       WIDTH and pushed the page to 453px at a 390px viewport - the whole of the
       horizontal scroll on mobile. Only stretch it when it is not rotated. */
    .flow-arrow { transform: rotate(90deg); align-self: center; }
}
@media (max-width: 560px) {
    .pipeline, .shellai-grid, .compliance-grid { grid-template-columns: 1fr; }
}

/* ---- Dark theme (respects OS preference) ---- */
@media (prefers-color-scheme: dark) {
    :root {
        --surface: #0f172a;
        --surface-2: #131d31;
        --surface-3: #1e293b;
        --border: #293548;
        --text: #e2e8f0;
        --text-secondary: #94a3b8;
        --primary: #f1f5f9;               /* headings become light */
        --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
        --shadow: 0 4px 6px -1px rgba(0,0,0,0.45), 0 2px 4px -1px rgba(0,0,0,0.4);
        --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.55), 0 10px 10px -5px rgba(0,0,0,0.4);
    }
    body { background: var(--surface); }
    header { background: rgba(15,23,42,0.85); }

    /* --primary is now light, so elements that used it as a *background* must be pinned dark */
    .btn-primary { background: var(--accent); color: #fff; }
    .btn-primary:hover { background: var(--accent-dark); }
    .databases { background: #0a0f1c; }

    .hero { background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%); }
    .hero-badge { background: var(--surface-3); }

    /* Logo + footer wordmark use a hardcoded dark ink — lighten it on dark header/footer */
    header [stroke="#1f2937"] { stroke: #e2e8f0; }
    footer [stroke="#1f2937"] { stroke: #cbd5e1; }
}

/* Problem section (iter2b) */
.problem { background: var(--surface); }
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.problem-card {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 16px; padding: 32px 24px;
}
.problem-card h4 { font-size: 18px; font-weight: 600; color: var(--primary); margin-bottom: 10px; }
.problem-card p { font-size: 14px; color: var(--text-secondary); }
@media (max-width: 780px) { .problem-grid { grid-template-columns: 1fr; } }

/* ============================================================
   iter3 — threat model, architecture, compliance table, editions
   ============================================================ */

/* Threat model */
.threats { background: var(--surface-2); }
.threat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.threat-item {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 24px 20px; position: relative;
}
.threat-item h4 {
    font-size: 15px; font-weight: 600; color: var(--primary);
    margin-bottom: 8px; padding-left: 26px; position: relative;
}
.threat-item h4::before {
    content: ''; position: absolute; left: 0; top: 3px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--accent-gradient);
}
.threat-item p { font-size: 13px; color: var(--text-secondary); }

/* Architecture detail */
.arch {
    display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 56px;
}
.arch-col {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 32px;
}
.arch-col h3 {
    font-size: 13px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1.5px; color: var(--accent); margin-bottom: 20px;
}
.arch-list { list-style: none; }
.arch-list li {
    font-size: 14px; color: var(--text-secondary);
    padding: 9px 0 9px 18px; position: relative; border-bottom: 1px solid var(--border);
}
.arch-list li:last-child { border-bottom: none; }
.arch-list li::before {
    content: ''; position: absolute; left: 0; top: 17px;
    width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.arch-list strong { color: var(--primary); font-weight: 600; }

/* Compliance table */
.comp-table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--border); }
.comp-table { width: 100%; border-collapse: collapse; background: var(--surface); min-width: 700px; }
.comp-table th {
    text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-secondary);
    padding: 16px 20px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.comp-table td {
    padding: 16px 20px; font-size: 14px; color: var(--text-secondary);
    border-bottom: 1px solid var(--border); vertical-align: top;
}
.comp-table tr:last-child td { border-bottom: none; }
.comp-fw { font-weight: 700; color: var(--accent); white-space: nowrap; }

/* Editions */
.editions { background: var(--surface-2); }
.editions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.edition-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 18px; padding: 32px 26px; position: relative;
}
.edition-card--featured { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.edition-flag {
    position: absolute; top: -12px; left: 26px;
    background: var(--accent-gradient); color: #fff;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    padding: 5px 12px; border-radius: 100px;
}
.edition-card h3 { font-size: 22px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.edition-tag { font-size: 13px; color: var(--accent); font-weight: 500; margin-bottom: 20px; }
.edition-list { list-style: none; }
.edition-list li {
    font-size: 14px; color: var(--text-secondary);
    padding: 8px 0 8px 20px; position: relative;
}
.edition-list li::before {
    content: ''; position: absolute; left: 0; top: 15px;
    width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.edition-list strong { color: var(--primary); font-weight: 600; }
.edition-note {
    margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border);
    font-size: 12.5px; color: var(--text-secondary); line-height: 1.6;
}

@media (max-width: 1000px) {
    .threat-grid { grid-template-columns: repeat(2, 1fr); }
    .arch { grid-template-columns: 1fr; }
    .editions-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .threat-grid { grid-template-columns: 1fr; } }

/* Dark-theme fixes for iter3 blocks */
@media (prefers-color-scheme: dark) {
    .comp-table { background: var(--surface); }
    .comp-table th { background: var(--surface-3); }
}

/* ============================================================
   Contact surfaces (header button, footer block, inline links)
   ============================================================ */

/* Header: plain "Contact" nav link, sits right after Editions.
   Accent-coloured so it still reads as the action among the section links. */
.nav-contact { color: var(--accent) !important; font-weight: 600; }
.nav-contact:hover { color: var(--accent-dark) !important; }

/* Mobile-only twin: keeps a text "Contact" beside the hamburger so it stays
   reachable without opening the menu. Hidden on desktop, where the nav link
   above already covers it. */
.nav-contact-mobile { display: none; }

/* Footer contact block */
.footer-contact h4 {
    font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1.2px; color: var(--text-secondary); margin-bottom: 10px;
}
.footer-contact a {
    font-size: 16px; font-weight: 600; color: var(--accent); text-decoration: none;
}
.footer-contact a:hover { text-decoration: underline; }
.footer-contact p { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }

/* Footer resources column - Docker Hub / Community / video tutorials */
.footer-links h4 {
    font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1.2px; color: var(--text-secondary); margin-bottom: 10px;
}
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li + li { margin-top: 6px; }
.footer-links a {
    font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none;
}
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

/* Inline links inside footnotes */
.footnote-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.footnote-link:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .nav-contact-mobile {
        display: inline-flex; align-items: center;
        order: 2; margin-left: auto; margin-right: 16px;
        color: var(--accent); font-size: 14px; font-weight: 600;
        text-decoration: none; white-space: nowrap;
    }
    .mobile-menu-btn { order: 3; }
    .footer-links { margin-top: 20px; }
    .footer-contact { margin-top: 20px; }
}

/* Hero vision line — the staged-positioning bridge sentence */
.hero-vision {
    font-size: 15px !important;
    color: var(--accent) !important;
    font-weight: 500;
    max-width: 560px;
    margin: -20px auto 40px !important;
}

/* Links inside edition cards (e.g. Docker Hub) */
.edition-list a.edition-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.edition-list a.edition-link:hover { text-decoration: underline; }

/* Value subtitle under each capability card heading (hybrid: value + feature bullets) */
.feature-value {
    font-size: 13.5px; color: var(--accent); font-weight: 500;
    margin: -6px 0 12px; line-height: 1.5;
}
/* Founder line in footer */
.footer-tagline {
    margin-top: 10px; font-size: 13px; color: var(--text-secondary);
    max-width: 420px; line-height: 1.6;
}
