/* Index Page Styles - Themeable Landing Page */

/* Base layout keeps existing structure, colors come from `index-themes.css` variables.
   Theme variables are applied via `#landingRoot[data-landing-theme]`.
*/

#landingRoot {
    font-family: var(--lp-font-sans);
    color: var(--lp-text);
}

#landingRoot .hero-title,
#landingRoot .section-title,
#landingRoot .portal-title,
#landingRoot .feature-title,
#landingRoot .stat-number {
    color: var(--lp-text);
}

#landingRoot .hero-subtitle,
#landingRoot .section-subtitle,
#landingRoot .portal-description,
#landingRoot .feature-description,
#landingRoot .stat-label {
    color: var(--lp-muted);
}

/* Particle Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--lp-particles-bg);
}

/* Ensure particles are visible and pronounced */
#particles-js canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, color-mix(in srgb, var(--lp-primary) 35%, transparent) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 15s ease-in-out infinite;
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, color-mix(in srgb, var(--lp-secondary) 28%, transparent) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 20s ease-in-out infinite reverse;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: var(--lp-font-display);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.75rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
}

.gradient-text {
    background: var(--lp-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    padding-bottom: 0.1em;
    animation: shimmerText 3s ease-in-out infinite;
    background-size: 200% auto;
}

@keyframes shimmerText {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 640px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 1rem 2rem;
    border-radius: var(--lp-radius-md);
    font-weight: 800;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease, border-color 0.28s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-hero:focus {
    outline: none;
    box-shadow: var(--lp-focus);
}

.btn-hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-hero:hover::before {
    width: 320px;
    height: 320px;
}

.btn-hero-primary {
    background: var(--lp-btn-bg);
    color: var(--lp-btn-text);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--lp-shadow-md);
}

.btn-hero-secondary {
    background: var(--lp-btn-outline-bg);
    color: var(--lp-text);
    border: 1px solid var(--lp-btn-outline-border);
    text-decoration: none;
}

.btn-hero-secondary:hover {
    transform: translateY(-3px);
    box-shadow: var(--lp-shadow-md);
    color: var(--lp-text);
}

.btn-text, .btn-icon {
    position: relative;
    z-index: 1;
}

.btn-icon {
    transition: transform 0.3s ease;
}

.btn-hero:hover .btn-icon {
    transform: translateX(5px);
}

.hero-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: nowrap;
    animation: fadeInUp 1s ease-out 0.3s both;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--lp-surface);
    border-radius: var(--lp-radius-lg);
    box-shadow: var(--lp-shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    border: 1px solid var(--lp-border);
    flex-shrink: 0;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--lp-shadow-lg);
    background: var(--lp-surface-2);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--lp-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-content {
    text-align: left;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.25rem;
    white-space: nowrap;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: color-mix(in srgb, var(--lp-text) 18%, transparent);
    flex-shrink: 0;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 600px;
    animation: fadeInRight 1s ease-out;
}

.floating-card {
    position: absolute;
    background: var(--lp-surface);
    padding: 1rem 1.5rem;
    border-radius: var(--lp-radius-md);
    box-shadow: var(--lp-shadow-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    color: var(--lp-text);
    animation: float 3s ease-in-out infinite;
    z-index: 10;
    backdrop-filter: blur(14px);
    border: 1px solid var(--lp-border);
}

.floating-card i {
    font-size: 1.5rem;
    background: var(--lp-icon-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.card-2 {
    top: 45%;
    right: -30%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 10%;
    left: 15%;
    animation-delay: 2s;
}

.hero-illustration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    z-index: 1;
}

.illustration-circle {
    position: absolute;
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: var(--lp-gradient);
    opacity: 0.14;
    animation-delay: 0s;
}

.circle-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--lp-secondary) 0%, var(--lp-primary) 100%);
    opacity: 0.12;
    top: 50px;
    left: 50px;
    animation-delay: 1s;
}

.circle-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--lp-accent) 0%, var(--lp-secondary) 100%);
    opacity: 0.10;
    top: 100px;
    left: 100px;
    animation-delay: 2s;
}

.illustration-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    background: var(--lp-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rotate 20s linear infinite;
    z-index: 5;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.28));
}

/* Modern Alerts */
.alert-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--lp-radius-lg);
    border: 1px solid var(--lp-border);
    box-shadow: var(--lp-shadow-md);
    backdrop-filter: blur(14px);
    background: var(--lp-surface);
}

.alert-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-success .alert-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.alert-danger .alert-icon {
    background: linear-gradient(135deg, #fb7185 0%, #ef4444 100%);
    color: white;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--lp-text);
}

.alert-message {
    font-size: 0.95rem;
    opacity: 0.9;
    color: var(--lp-muted);
}

/* Portals Section */
.portals-section {
    position: relative;
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--lp-bg) 0%, var(--lp-bg2) 100%);
}

.portals-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--lp-gradient-soft);
    opacity: 1;
    pointer-events: none;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: var(--lp-font-display);
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    max-width: 650px;
    margin: 0 auto;
}

.portals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.portal-card {
    position: relative;
    background: var(--lp-surface);
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    border-radius: var(--lp-radius-xl);
    padding: 3rem;
    box-shadow: var(--lp-shadow-lg);
    transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease, border-color 0.35s ease;
    overflow: hidden;
    border: 1px solid var(--lp-border);
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--lp-gradient);
    opacity: 0.85;
}

.portal-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--lp-shadow-lg);
    background: var(--lp-surface-2);
    border-color: color-mix(in srgb, var(--lp-border) 60%, transparent);
}

.portal-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, color-mix(in srgb, var(--lp-primary) 18%, transparent) 0%, transparent 70%);
    opacity: 0.65;
    pointer-events: none;
}

.portal-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--lp-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.portal-card:hover .portal-icon {
    transform: scale(1.08) rotate(-4deg);
}

.portal-title {
    font-size: 1.75rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.portal-description {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.portal-features {
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--lp-border) 55%, transparent);
    transition: transform 0.3s ease;
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item:hover {
    transform: translateX(5px);
}

.feature-item i {
    color: color-mix(in srgb, var(--lp-secondary) 68%, white);
    font-size: 1.1rem;
}

.feature-item span {
    font-size: 0.95rem;
    color: var(--lp-muted);
    font-weight: 600;
}

.portal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-portal {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: var(--lp-radius-md);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease, border-color 0.28s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-portal:focus {
    outline: none;
    box-shadow: var(--lp-focus);
}

.btn-portal::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-portal:hover::before {
    width: 320px;
    height: 320px;
}

.btn-portal-primary,
.btn-portal-success {
    background: var(--lp-gradient);
    color: var(--lp-btn-text);
    box-shadow: var(--lp-shadow-md);
}

.btn-portal-primary:hover,
.btn-portal-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--lp-shadow-lg);
    color: var(--lp-btn-text);
    text-decoration: none;
}

.btn-portal-outline {
    background: var(--lp-btn-outline-bg);
    color: var(--lp-text);
    border: 1px solid var(--lp-btn-outline-border);
}

.btn-portal-outline:hover {
    transform: translateY(-2px);
    box-shadow: var(--lp-shadow-md);
    color: var(--lp-text);
    text-decoration: none;
}

.btn-portal i, .btn-portal span {
    position: relative;
    z-index: 1;
}

/* Features Section */
.features-section {
    position: relative;
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--lp-bg2) 0%, var(--lp-bg) 100%);
}

.features-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--lp-gradient-soft);
    opacity: 0.9;
    pointer-events: none;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.feature-card {
    background: var(--lp-surface);
    padding: 2.5rem;
    border-radius: var(--lp-radius-lg);
    box-shadow: var(--lp-shadow-md);
    transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
    border: 1px solid var(--lp-border);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(14px);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.6s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--lp-shadow-lg);
    background: var(--lp-surface-2);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.9rem;
    margin-bottom: 1.75rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--lp-gradient);
    box-shadow: var(--lp-shadow-md);
}

.feature-card:hover .feature-icon {
    transform: scale(1.12) rotate(-6deg);
}

/* keep existing classes used by markup */
.icon-blue,
.icon-purple,
.icon-green,
.icon-orange,
.icon-pink,
.icon-cyan {
    background: var(--lp-gradient);
}

.feature-title {
    font-size: 1.35rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.feature-description {
    font-size: 0.98rem;
    line-height: 1.8;
}

/* Modal Modern - keep existing but theme-aware */
.modal-modern {
    border-radius: 24px;
    border: 1px solid var(--lp-border);
    box-shadow: var(--lp-shadow-lg);
}

.modal-modern .modal-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-modern .modal-title {
    font-weight: 800;
    color: #111827;
}

.modal-modern .modal-body {
    padding: 2rem;
}

.modal-modern .modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.form-control-modern {
    padding: 0.875rem 1rem;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control-modern:focus {
    border-color: color-mix(in srgb, var(--lp-primary) 70%, white);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--lp-primary) 22%, transparent);
}

.alert-info-modern {
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.25);
    color: #0f172a;
    border-radius: 12px;
}

.btn-modern {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-stats {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 992px) {
    .hero-section .container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-visual {
        height: 400px;
    }

    .portals-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-hero {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        align-items: stretch;
    }

    .stat-item {
        width: 100%;
    }

    .stat-divider {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .portal-card {
        padding: 2rem;
    }

    .portal-actions {
        flex-direction: column;
    }

    .btn-portal {
        width: 100%;
    }

    .feature-card {
        padding: 2rem;
    }

    .btn-hero {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .btn-portal {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
    }

    .feature-title {
        font-size: 1.1rem;
    }

    .feature-description {
        font-size: 0.9rem;
    }
}
