/* ===========================================
   home.css — homepage-specific styles
   Loaded after css/shared.css in index.html.
   =========================================== */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
/* Hero */
.coming-soon-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4rem 2rem 3rem;
    text-align: center;
}
.coming-soon-container { max-width: 760px; min-height: 820px; }
@media (max-width: 760px) {
    .coming-soon-container { min-height: 0; }
}
.coming-soon-logo {
    width: 140px;
    height: auto;
    margin-bottom: 1.5rem;
}
.coming-soon-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-tagline {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}
.coming-soon-subtitle {
    font-size: 0.875rem;
    color: var(--color-gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    white-space: nowrap;
}
@media (max-width: 760px) {
    .coming-soon-subtitle {
        white-space: normal;
        font-size: 0.875rem;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}
.launch-badge {
    display: inline-block;
    background: white;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}
.launch-badge:hover {
    background: var(--color-primary);
    color: white;
}

/* Waitlist form */
.waitlist {
    max-width: 520px;
    margin: 0 auto 2.5rem;
    background: white;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    text-align: left;
    scroll-margin-top: 90px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.waitlist.is-highlighted {
    animation: waitlist-pulse 1.8s ease-out 1;
}
@keyframes waitlist-pulse {
    0% {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4), 0 2px 12px rgba(0, 0, 0, 0.03);
    }
    50% {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 12px rgba(37, 99, 235, 0), 0 8px 24px rgba(37, 99, 235, 0.15);
    }
    100% {
        border-color: rgba(15, 23, 42, 0.08);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0), 0 2px 12px rgba(0, 0, 0, 0.03);
    }
}
.waitlist-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 0.35rem;
    text-align: center;
}
.waitlist-sub {
    font-size: 0.85rem;
    color: var(--color-gray-600);
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.waitlist-form { display: flex; flex-direction: column; gap: 0.6rem; }
.waitlist-row { display: flex; gap: 0.6rem; }
.waitlist-row > * { flex: 1; }
@media (max-width: 520px) {
    .waitlist-row { flex-direction: column; gap: 0.6rem; }
}
.waitlist-purpose {
    display: flex;
    gap: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    padding: 4px;
    background: rgba(15, 23, 42, 0.04);
    margin: 0;
    min-width: 0;
}
.waitlist-purpose-option {
    position: relative;
    flex: 1;
    text-align: center;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-gray-600);
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.waitlist-purpose-option input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}
.waitlist-purpose-option:has(input:checked) {
    background: white;
    color: var(--color-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.waitlist-purpose-option:hover:not(:has(input:checked)) {
    color: var(--color-gray-900);
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.waitlist input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font-size: 0.9rem;
    font-family: inherit;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: white;
    color: var(--color-gray-900);
    transition: border 0.15s, box-shadow 0.15s;
}
.waitlist input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.waitlist-btn {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.waitlist-btn:hover { background: #1d4ed8; }
.waitlist-btn:disabled { background: #94a3b8; cursor: not-allowed; }
.waitlist-fine {
    font-size: 0.72rem;
    color: var(--color-gray-600);
    text-align: center;
    margin-top: 0.5rem;
}
.waitlist-error {
    color: #dc2626;
    font-size: 0.8rem;
    display: none;
}
.waitlist-error.show { display: block; }
.waitlist-success {
    display: none;
    text-align: center;
    padding: 0.5rem 0;
}
.waitlist-success.show { display: block; }
.waitlist-success-icon {
    width: 44px;
    height: 44px;
    background: #d1fae5;
    color: #059669;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
    font-size: 22px;
    font-weight: 700;
}
.waitlist-success-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 0.25rem;
}
.waitlist-success-text {
    font-size: 0.85rem;
    color: var(--color-gray-600);
}
.waitlist-form.hide { display: none; }

/* Wider section for feature cards + trust badges (matches System Profile page width) */
.home-features-section {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto 2.5rem;
    padding: 0 24px;
    box-sizing: border-box;
}
.home-features-section .sp-grid { margin: 0 0 1.5rem; }

/* Trust badges */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-gray-700);
}
.trust-badge svg { width: 14px; height: 14px; color: var(--color-primary); }

/* Arabic-mode swaps via [lang="ar"] on <html> — toggles full RTL layout */
.ar-only {
    display: none;
    font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
    direction: rtl;
    unicode-bidi: isolate;
}
html[lang="ar"] .en-only { display: none; }
html[lang="ar"] .ar-only { display: revert; }
html[lang="ar"] body { direction: rtl; font-family: 'Noto Sans Arabic', 'Inter', sans-serif; }
html[lang="ar"] .features { text-align: right; }

/* Featured AI demo video — sits between the launch badge and the
   features grid. Click-to-play (controls visible), preload=metadata
   so we don't ship 23 MB to every visitor's browser. */
.ai-demo {
    margin: 1rem auto 2rem;
    max-width: 720px;
    text-align: center;
}
.ai-demo-heading {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #0f172a;
    margin: 0 0 0.5rem;
}
.ai-demo-sub {
    font-size: 0.92rem;
    color: #64748b;
    margin: 0 0 1.1rem;
}
.ai-demo-frame {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
    background: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.08);
}
/* Fake browser chrome — three traffic-light dots on the left, URL
   pill in the center. Signals "this is a web product" without
   heavy graphics. Subtle gradient gives it a glassy feel. */
.browser-chrome {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    min-height: 32px;
}
.browser-dots {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}
.browser-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #cbd5e1;
}
.browser-dots span:nth-child(1) { background: #f87171; }   /* close */
.browser-dots span:nth-child(2) { background: #fbbf24; }   /* minimize */
.browser-dots span:nth-child(3) { background: #34d399; }   /* maximize */
.browser-url {
    flex: 1;
    text-align: center;
    font-size: 0.78rem;
    color: #64748b;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    padding: 0.22rem 0.85rem;
    max-width: 260px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ai-demo-frame video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #0f172a;
}

/* Responsive */
@media (max-width: 640px) {
    .coming-soon-title { font-size: 2.1rem; }
    .hero-tagline { font-size: 1.2rem; }
    .hero-tagline-ar { font-size: 1.1rem; }
    .navbar .container { flex-wrap: wrap; gap: 0.75rem; }
    .brand-strap { font-size: 0.65rem; }
    .ai-demo { margin-top: 1.5rem; }
    .ai-demo-heading { font-size: 1.05rem; }
}
