/* Carabaas Landing Base Styles */
/* Shared CSS for landing pages */

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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --accent: #1CA7A6;
    --accent-light: #0E7574;
    --accent-glow: rgba(28, 167, 166, 0.25);
    --gradient-start: #148C8B;
    --gradient-end: #1CA7A6;
    --success: #0E9A8F;
    --warning: #f59e0b;
    --danger: #ef4444;
    --nav-bg: rgba(255, 255, 255, 0.92);
    --pattern-opacity: 0.08;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #152A30;
        --bg-secondary: #0F2228;
        --bg-card: rgba(255,255,255,0.02);
        --bg-card-hover: rgba(255,255,255,0.04);
        --text-primary: #C8D6D6;
        --text-secondary: #9AA4AE;
        --text-muted: #6B7A84;
        --border-color: #0A2A2F;
        --accent: #1CA7A6;
        --accent-light: #2CBFBE;
        --accent-glow: rgba(28, 167, 166, 0.35);
        --gradient-start: #148C8B;
        --gradient-end: #1CA7A6;
        --success: #2ECFBD;
        --warning: #fbbf24;
        --danger: #f87171;
        --nav-bg: rgba(21, 42, 48, 0.90);
        --pattern-opacity: 0.12;
    }

    .logo,
    .footer-brand img {
        filter: drop-shadow(0 0 6px rgba(28, 167, 166, 0.4)) drop-shadow(0 0 14px rgba(28, 167, 166, 0.15));
    }
}

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    background-color: #ffffff;
}

@media (prefers-color-scheme: dark) {
    html {
        background-color: #152A30;
    }
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Pattern */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(28, 167, 166, var(--pattern-opacity)), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(20, 140, 139, calc(var(--pattern-opacity) * 0.6)), transparent),
        radial-gradient(ellipse 60% 40% at 0% 80%, rgba(28, 167, 166, calc(var(--pattern-opacity) * 0.4)), transparent);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

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

.logo {
    height: 36px;
}

.brand-name {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name-main {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.brand-name-sub {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.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,
.nav-links > a.active {
    color: var(--accent-light);
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    font-family: inherit;
    padding: 0;
}

.nav-dropdown-trigger:hover,
.nav-dropdown.open .nav-dropdown-trigger {
    color: var(--accent-light);
}

.nav-dropdown-trigger svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.nav-dropdown.open .nav-dropdown-trigger svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 8px;
    min-width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(8px);
    transition: all 0.2s;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    z-index: 200;
}

@media (prefers-color-scheme: dark) {
    .nav-dropdown-menu {
        box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    }
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.15s;
}

.nav-dropdown-menu a:hover {
    background: var(--bg-secondary);
}

.nav-dd-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(28, 167, 166, 0.15) 0%, rgba(28, 167, 166, 0.05) 100%);
}

.nav-dd-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.5;
}

.nav-dd-text strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.nav-dd-text span {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Mobile nav menu */
.nav-mobile-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
}

.nav-mobile-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

@media (max-width: 768px) {
    .nav-mobile-toggle {
        display: flex;
    }
}

/* Nav divider */
.nav-divider {
    width: 1px;
    height: 16px;
    background: var(--border-color);
    flex-shrink: 0;
}

.nav-cta {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-cta:hover {
    background: var(--gradient-start);
    box-shadow: 0 8px 32px var(--accent-glow);
}

/* Typography */
h1 {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
}

h2 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--accent) 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px var(--accent-glow);
}

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

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 10px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.3s;
}

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

/* Card shadows for light theme */
@media (prefers-color-scheme: light) {
    .card {
        box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.05);
    }
    
    .card:hover {
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }
}

/* Section Styling */
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: 2px;
    color: var(--accent);
    margin-bottom: 16px;
}

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

/* Footer */
footer {
    position: relative;
    z-index: 1;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-brand img {
    height: 28px;
    opacity: 0.8;
}

.footer-brand span {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
}

.footer-brand-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 280px;
}

.footer-col-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-col-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.footer-col-links a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: var(--text-secondary);
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .footer-bottom {
        flex-direction: column-reverse;
        gap: 12px;
        text-align: center;
    }
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

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

.footer-links a:hover {
    color: var(--accent-light);
}

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

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

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(28, 167, 166, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent-light); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Grid */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive Navigation */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .nav-cta {
        display: none;
    }
}

@media (max-width: 480px) {
    section {
        padding: 60px 0;
    }
}

/* Request Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    padding: 20px;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.request-modal {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 36px 40px 40px;
    max-width: 560px;
    width: 100%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.visible .request-modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

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

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.request-form .form-group {
    margin-bottom: 16px;
}

.request-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.request-form input[type="text"],
.request-form input[type="email"],
.request-form textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

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

.request-form input:focus,
.request-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(28, 167, 166, 0.15);
}

.request-form input::placeholder,
.request-form textarea::placeholder {
    color: var(--text-muted);
}

.usecase-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.usecase-option {
    cursor: pointer;
    display: block;
}

.usecase-option input {
    display: none;
}

.usecase-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 17px;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}

.usecase-option input:checked + .usecase-box {
    border-color: var(--accent);
    background: rgba(28, 167, 166, 0.12);
    color: var(--accent-light);
}

.usecase-box:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.form-divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--accent) 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 4px;
}

.submit-btn:hover {
    box-shadow: 0 8px 32px var(--accent-glow);
    transform: translateY(-2px);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 16px;
}

.form-feedback {
    text-align: center;
    padding: 48px 24px;
    animation: fadeInFb 0.3s ease;
}

@keyframes fadeInFb {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-feedback-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.form-feedback.success .form-feedback-icon {
    background: rgba(52, 211, 153, 0.12);
    color: var(--success);
}

.form-feedback.error .form-feedback-icon {
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
}

.form-feedback h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-feedback p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
}

.form-feedback.success h3 { color: var(--success); }
.form-feedback.error h3 { color: #f87171; }

.form-feedback .btn-back {
    display: inline-block;
    margin-top: 24px;
    padding: 10px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.form-feedback .btn-back:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

@media (max-width: 560px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .request-modal {
        padding: 24px;
    }
}
