/* ═══════════════════════════════════════════════════════
   SCREENCORD — Premium White Landing
   Inspired by Linear · Vercel · Clerk
   Fully scoped to .auth-gate to isolate from app styles
   ═══════════════════════════════════════════════════════ */

/* ─── Variable helpers for inline icon colors ─── */
:root {
    --lp-blue:        #2563eb;
    --lp-blue-glow:   rgba(37, 99, 235, 0.08);
    --lp-green:       #059669;
    --lp-green-glow:  rgba(5, 150, 105, 0.08);
    --lp-purple:      #7c3aed;
    --lp-purple-glow: rgba(124, 58, 237, 0.08);
}

/* ─── Mesh / Dot Grid background (decorative) ─── */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(15,23,42,0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 1;
}

/* ─── Aurora blobs — very soft, light palette ─── */
.bg-aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    animation: lp-blob 28s infinite ease-in-out;
}

.aurora-blob--1 {
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(99,102,241,0.06) 0%, transparent 70%);
    top: -25%; left: -15%;
    animation-delay: 0s;
}

.aurora-blob--2 {
    width: 45vw; height: 45vw;
    background: radial-gradient(circle, rgba(124,58,237,0.05) 0%, transparent 70%);
    bottom: -20%; right: -10%;
    animation-delay: -10s;
}

.aurora-blob--3 {
    width: 35vw; height: 35vw;
    background: radial-gradient(circle, rgba(37,99,235,0.04) 0%, transparent 70%);
    top: 35%; right: 15%;
    animation-delay: -18s;
}

@keyframes lp-blob {
    0%, 100% { transform: translate(0,0) scale(1);      }
    33%       { transform: translate(4%,5%) scale(1.07); }
    66%       { transform: translate(-3%,-2%) scale(0.94); }
}

/* ─── Auth Gate Root ─── */
.auth-gate {
    min-height: 100vh;
    background: #ffffff !important;
    color: #0f172a !important;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ─── Navigation ─── */
.auth-gate .landing-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    padding: 0 clamp(24px, 6%, 80px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(15,23,42,0.07);
    box-shadow: 0 1px 0 rgba(15,23,42,0.04);
}

.auth-gate .landing-nav__links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.auth-gate .landing-nav__links > a {
    color: #475569;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    transition: color 0.18s, background 0.18s;
}

.auth-gate .landing-nav__links > a:hover {
    color: #0f172a;
    background: rgba(15,23,42,0.05);
}

/* ─── Logo ─── */
.auth-gate .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.auth-gate .logo__icon {
    width: 34px; height: 34px;
    background: #4f46e5;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}

.auth-gate .logo__text {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a !important;
}

/* ─── Buttons ─── */
.auth-gate .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.auth-gate .btn--primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 4px 12px rgba(79,70,229,0.25);
}

.auth-gate .btn--primary:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 8px 20px rgba(79,70,229,0.3);
}

.auth-gate .btn--primary:active { transform: translateY(0); }

.auth-gate .btn--ghost {
    background: transparent;
    color: #334155 !important;
    border: 1px solid rgba(15,23,42,0.14);
}

.auth-gate .btn--ghost:hover {
    background: rgba(15,23,42,0.04);
    color: #0f172a !important;
    border-color: rgba(15,23,42,0.2);
}

.auth-gate .btn--sm { padding: 8px 16px; font-size: 0.8125rem; }

/* ─── Content wrapper ─── */
.auth-gate .landing-content {
    position: relative;
    z-index: 1;
    padding-top: 64px;
}

/* ─── Hero ─── */
.auth-gate .hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px clamp(24px, 8%, 100px) 60px;
    gap: 60px;
    min-height: 60vh;
}

.auth-gate .hero__text {
    flex: 1;
    max-width: 560px;
}

.auth-gate .hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px 5px 8px;
    background: rgba(79,70,229,0.06);
    border: 1px solid rgba(79,70,229,0.18);
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4f46e5;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 32px;
    animation: lp-up 0.6s cubic-bezier(0.16,1,0.3,1) both;
}

.pulse-dot {
    width: 6px; height: 6px;
    background: #4f46e5;
    border-radius: 50%;
    display: inline-block;
    animation: lp-pulse 2.2s infinite;
    margin-left: 4px;
}

@keyframes lp-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.85); }
}

.auth-gate .hero__text h1 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(3rem, 6vw, 4.5rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 24px;
    color: #0f172a !important;
    animation: lp-up 0.8s cubic-bezier(0.16,1,0.3,1) 0.08s both;
}

.auth-gate .text-accent {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
}

.auth-gate .hero__text p {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.72;
    margin-bottom: 40px;
    max-width: 430px;
    animation: lp-up 0.6s cubic-bezier(0.16,1,0.3,1) 0.16s both;
}

.auth-gate .hero__ctas {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: lp-up 0.6s cubic-bezier(0.16,1,0.3,1) 0.24s both;
}

.auth-gate .hero__image {
    flex: 1.3;
    position: relative;
    perspective: 1200px;
    animation: lp-right 0.9s cubic-bezier(0.16,1,0.3,1) 0.1s both;
}

.auth-gate .mockup-container {
    position: relative;
    width: 100%;
    transform: rotateY(-12deg) rotateX(4deg);
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.16,1,0.3,1);
    animation: lp-float 6s ease-in-out infinite;
}

@keyframes lp-float {
    0%, 100% { transform: rotateY(-12deg) rotateX(4deg) translateY(0); }
    50%       { transform: rotateY(-10deg) rotateX(2deg) translateY(-20px); }
}

.auth-gate .mockup-img {
    width: 100%;
    border-radius: 18px;
    box-shadow:
        0 0 0 1px rgba(15,23,42,0.08),
        0 8px 24px rgba(15,23,42,0.08),
        0 32px 80px rgba(15,23,42,0.12),
        0 0 80px rgba(79,70,229,0.06);
    display: block;
}

.auth-gate .mockup-glass {
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), transparent 40%, rgba(99,102,241,0.05));
    border: 1px solid rgba(255,255,255,0.3);
    pointer-events: none;
    box-shadow: inset 0 0 40px rgba(255,255,255,0.1);
}

/* ─── Section divider ─── */
.auth-gate .section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(15,23,42,0.08), transparent);
    margin: 0 clamp(24px, 8%, 100px);
}

/* ─── Features ─── */
.auth-gate .features-row {
    padding: 90px clamp(24px, 8%, 100px);
    background: linear-gradient(to bottom, transparent, rgba(248,250,252,0.9));
}

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

.auth-gate .auth-feature-item {
    padding: 36px 30px;
    background: #fff;
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 8px 24px rgba(15,23,42,0.04);
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s, border-color 0.3s;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.auth-gate .auth-feature-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    opacity: 0;
    transition: opacity 0.3s;
}

.auth-gate .auth-feature-item:hover {
    transform: translateY(-6px);
    border-color: rgba(79,70,229,0.15);
    box-shadow: 0 4px 12px rgba(15,23,42,0.06), 0 20px 48px rgba(15,23,42,0.1), 0 0 0 1px rgba(79,70,229,0.08);
}

.auth-gate .auth-feature-item:hover::before { opacity: 1; }

.auth-gate .auth-feature-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    border: 1px solid rgba(15,23,42,0.07);
    flex-shrink: 0;
}

.auth-gate .auth-feature-text h3 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a !important;
    margin-bottom: 10px;
}

.auth-gate .auth-feature-text p {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.65;
}

/* ─── Social Proof ─── */
.auth-gate .social-proof {
    padding: 60px clamp(24px, 8%, 100px) 80px;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid rgba(15,23,42,0.06);
    border-bottom: 1px solid rgba(15,23,42,0.06);
}

.auth-gate .social-proof > p {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 40px;
}

.auth-gate .social-proof__logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 64px;
}

.auth-gate .brand-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #cbd5e1;
    transition: color 0.25s;
}

.auth-gate .brand-logo:hover { color: #475569; }

/* ─── Footer ─── */
.auth-gate .landing-footer {
    padding: 28px clamp(24px, 8%, 100px);
    border-top: 1px solid rgba(15,23,42,0.07);
    background: #fff;
}

.auth-gate .landing-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-gate .landing-footer__inner > p {
    font-size: 0.8125rem;
    color: #94a3b8;
}

.auth-gate .landing-footer__links {
    display: flex;
    gap: 24px;
}

.auth-gate .landing-footer__links a {
    font-size: 0.8125rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-gate .landing-footer__links a:hover { color: #334155; }

/* ─── Scroll animations ─── */
@keyframes lp-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0);    }
}

@keyframes lp-right {
    from { opacity: 0; transform: translateX(32px); }
    to   { opacity: 1; transform: translateX(0);    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1), transform 0.65s cubic-bezier(0.16,1,0.3,1);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Auth Modal ─── */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15,23,42,0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: flex-start; /* Allow scrolling from top */
    justify-content: center;
    padding: 60px 20px;
    overflow-y: auto; /* Enable scrolling */
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 32px;
    padding: 56px;
    position: relative;
    box-shadow: 0 30px 70px rgba(15,23,42,0.12), 0 10px 30px rgba(15,23,42,0.04);
    animation: auth-pop 0.6s cubic-bezier(0.16,1,0.3,1) both;
    margin: 60px auto;
}

.auth-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 33px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(99,102,241,0.2), transparent 40%, rgba(139,92,246,0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes auth-pop {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0);       }
}

.auth-card__header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.auth-card__subtitle {
    margin-top: 6px;
    font-size: 0.875rem;
    color: #64748b;
}

.auth-close-btn {
    position: absolute;
    top: 20px; right: 20px;
    background: #f1f5f9;
    border: 1px solid rgba(15,23,42,0.07);
    color: #64748b;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.auth-close-btn:hover { background: #e2e8f0; color: #0f172a; }

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
    margin-top: 20px;
}

.form-input {
    width: 100%;
    height: 54px;
    background: #fdfdfd;
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 14px;
    padding: 0 18px;
    color: #0f172a;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
    box-shadow: 0 1px 2px rgba(15,23,42,0.02);
}

.form-input:focus {
    outline: none;
    background: #fff;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.08), 0 4px 12px rgba(99,102,241,0.04);
    transform: translateY(-1px);
}

.form-input::placeholder { color: #94a3b8; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0;
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(15,23,42,0.08);
}

.auth-toggle {
    text-align: center;
    margin-top: 20px;
    font-size: 0.875rem;
    color: #64748b;
}

.auth-toggle a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
}

.auth-toggle a:hover { text-decoration: underline; }

.auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.auth-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #059669;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.auth-card .btn--primary {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: 0.9375rem;
    border-radius: 10px;
    margin-top: 4px;
}

.btn--join {
    background: #f8fafc;
    border: 1px solid rgba(15,23,42,0.1);
    color: #334155 !important;
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: 0.9375rem;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, border-color 0.2s;
}

.btn--join:hover {
    background: #f1f5f9;
    border-color: rgba(15,23,42,0.16);
}

/* ─── Why Screencord Section ─── */
.auth-gate .why-section {
    padding: 90px clamp(24px, 8%, 100px) 100px;
    background: #f8fafc;
    border-top: 1px solid rgba(15,23,42,0.06);
    border-bottom: 1px solid rgba(15,23,42,0.06);
}

.auth-gate .why-section__header {
    text-align: center;
    margin-bottom: 56px;
}

.auth-gate .why-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 18px;
    background: #fff;
    border: 1px solid rgba(79,70,229,0.2);
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #4f46e5;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(79,70,229,0.08);
}

.auth-gate .why-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #0f172a !important;
    line-height: 1.1;
}

.auth-gate .why-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.auth-gate .why-card {
    background: #fff;
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 4px 16px rgba(15,23,42,0.04);
    transition: transform 0.28s cubic-bezier(0.16,1,0.3,1), box-shadow 0.28s, border-color 0.28s;
    cursor: default;
}

.auth-gate .why-card:hover {
    transform: translateY(-5px);
    border-color: rgba(79,70,229,0.12);
    box-shadow: 0 4px 16px rgba(15,23,42,0.06), 0 16px 40px rgba(15,23,42,0.09);
}

.auth-gate .why-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    flex-shrink: 0;
}

.auth-gate .why-card h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a !important;
    margin-bottom: 8px;
}

.auth-gate .why-card p {
    font-size: 0.8438rem;
    color: #64748b;
    line-height: 1.6;
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
    .auth-gate .hero {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 56px;
        min-height: unset;
    }
    .auth-gate .hero__text, .auth-gate .hero__text p { max-width: 100%; }
    .auth-gate .hero__image { width: 100%; max-width: 620px; }
    .auth-gate .features-row__inner { grid-template-columns: 1fr; gap: 16px; }
    .auth-gate .why-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .auth-gate .hero { padding: 40px 20px 60px; }
    .auth-gate .hero__text h1 { font-size: 2.2rem; }
    .auth-gate .hero__ctas { flex-direction: column; align-items: stretch; }
    .auth-card { padding: 32px 22px; border-radius: 20px; }
    .auth-gate .landing-footer__inner { flex-direction: column; gap: 16px; text-align: center; }
    .auth-gate .social-proof__logos { gap: 32px; flex-wrap: wrap; }
    .auth-gate .why-cards { grid-template-columns: 1fr; }
    .auth-gate .why-heading { font-size: 1.75rem; }
}
