/* ==========================================================================
   LANDING PAGE — modern "3D" public home (landing-section only).
   Self-contained: paints its own dark backdrop so user themes can't break it.
   ========================================================================== */

.landing3d {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    border-radius: 12px;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(94, 234, 212, 0.14), transparent 60%),
        radial-gradient(900px 500px at -10% 30%, rgba(125, 211, 252, 0.12), transparent 55%),
        linear-gradient(150deg, #0f2027 0%, #1b3a47 55%, #2c5364 100%);
    color: #f2f7f9;
}

/* ---- Floating gradient orbs (decorative depth layer) ---- */
.l3d-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}
.l3d-orb-a { width: 420px; height: 420px; top: -120px; right: -80px;  background: radial-gradient(circle, #14b8a6, transparent 70%); animation: l3dDrift 16s ease-in-out infinite alternate; }
.l3d-orb-b { width: 340px; height: 340px; top: 480px;  left: -140px;  background: radial-gradient(circle, #0ea5e9, transparent 70%); animation: l3dDrift 22s ease-in-out infinite alternate-reverse; }
.l3d-orb-c { width: 280px; height: 280px; top: 1050px; right: 10%;    background: radial-gradient(circle, #6366f1, transparent 70%); animation: l3dDrift 19s ease-in-out infinite alternate; }
@keyframes l3dDrift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(40px, 60px, 0) scale(1.15); }
}

.landing3d > section, .landing3d > footer { position: relative; z-index: 1; }

/* ---- Hero ---- */
.l3d-hero {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
    padding: 60px 6% 50px;
    perspective: 1200px;
}
.l3d-hero-copy { flex: 1.2; min-width: 300px; }

.l3d-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.3px;
    color: #8ff5e2;
    background: rgba(20, 184, 166, 0.14);
    border: 1px solid rgba(94, 234, 212, 0.35);
    margin-bottom: 18px;
}

.l3d-hero-copy h1 {
    font-size: clamp(32px, 4.2vw, 52px);
    line-height: 1.12;
    margin: 0 0 18px;
    color: #ffffff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.l3d-grad-text {
    background: linear-gradient(90deg, #5eead4, #7dd3fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.l3d-lead {
    font-size: 17px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
    max-width: 560px;
    margin-bottom: 26px;
}

.l3d-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.l3d-btn-primary, .l3d-btn-ghost {
    padding: 13px 26px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.l3d-btn-primary {
    border: none;
    color: #06231f;
    background: linear-gradient(135deg, #5eead4 0%, #38bdf8 100%);
    box-shadow: 0 10px 25px -8px rgba(56, 189, 248, 0.55), 0 3px 8px rgba(0, 0, 0, 0.3);
}
.l3d-btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 32px -8px rgba(56, 189, 248, 0.65), 0 5px 12px rgba(0, 0, 0, 0.35); }
.l3d-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    color: #ffffff;
}
.l3d-btn-ghost:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-3px); }

.l3d-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.l3d-stats div { display: flex; flex-direction: column; }
.l3d-stats strong { font-size: 26px; color: #ffffff; }
.l3d-stats span { font-size: 13px; color: rgba(255, 255, 255, 0.78); }

/* ---- Auth card (floating, tilted) ---- */
.l3d-auth-wrap { flex: 1; min-width: 300px; max-width: 430px; }
.l3d-auth-card {
    transform: rotateY(-6deg) rotateX(2deg);
    transform-style: preserve-3d;
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.55),
        0 12px 28px -12px rgba(14, 165, 233, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.25);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    animation: l3dFloat 7s ease-in-out infinite;
}
.l3d-auth-card:hover, .l3d-auth-card:focus-within {
    transform: rotateY(0deg) rotateX(0deg) translateY(-4px);
    animation-play-state: paused;
}
@keyframes l3dFloat {
    0%, 100% { margin-top: 0; }
    50%      { margin-top: -10px; }
}

/* ---- Section headings ---- */
.l3d-section-title {
    text-align: center;
    font-size: clamp(24px, 3vw, 34px);
    color: #ffffff;
    margin: 0 0 8px;
}
.l3d-section-sub {
    text-align: center;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 34px;
}

/* ---- Feature cards ---- */
.l3d-features { padding: 30px 6% 20px; }
.l3d-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    perspective: 1400px;
}
.l3d-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 14px;
    padding: 26px 24px;
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}
.l3d-card:hover {
    transform: rotateX(4deg) rotateY(-4deg) translateY(-8px) scale(1.02);
    box-shadow: 0 28px 50px -18px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(94, 234, 212, 0.45);
}
.l3d-card-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e0f7f3, #dbeffb);
    box-shadow: inset 0 0 0 1px rgba(44, 83, 100, 0.12), 0 6px 14px -6px rgba(44, 83, 100, 0.35);
    margin-bottom: 14px;
    transform: translateZ(24px);
}
.l3d-card h3 { color: #1d2b36; font-size: 18px; margin: 0 0 8px; }
.l3d-card p { color: #3c4653; font-size: 14.5px; line-height: 1.6; margin: 0; }

/* ---- About / editable welcome block ---- */
.l3d-about { padding: 30px 6%; }
.l3d-flat-card { max-width: 900px; margin: 0 auto; box-shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.55); }

/* ---- FAQ ---- */
.l3d-faq { padding: 10px 6% 40px; max-width: 900px; margin: 0 auto; width: 100%; }
.l3d-faq .l3d-section-title { margin-bottom: 24px; }
.l3d-faq-item {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}
.l3d-faq-item[open] { box-shadow: 0 18px 36px -16px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(94, 234, 212, 0.4); }
.l3d-faq-item summary {
    cursor: pointer;
    padding: 16px 20px;
    font-weight: bold;
    font-size: 15px;
    color: #1d2b36;
    list-style: none;
    position: relative;
}
.l3d-faq-item summary::-webkit-details-marker { display: none; }
.l3d-faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #2c5364;
    transition: transform 0.2s ease;
}
.l3d-faq-item[open] summary::after { content: '–'; }
.l3d-faq-item p { padding: 0 20px 16px; margin: 0; color: #3c4653; font-size: 14.5px; line-height: 1.65; }
.l3d-faq-item a { color: #17607a; font-weight: bold; }

/* ---- Footer ---- */
.l3d-footer {
    text-align: center;
    padding: 26px 6% 34px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.l3d-footer nav { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 10px; }
.l3d-footer a { color: #9fe8db; font-weight: bold; font-size: 14px; text-decoration: none; }
.l3d-footer a:hover { color: #ffffff; text-decoration: underline; }
.l3d-footer p { font-size: 13px; color: rgba(255, 255, 255, 0.75); margin: 0; }

/* ---- Theme overrides guard ----
   additional.css themes (e.g. body.theme-dark, body.theme-future) force h3/p/span/a
   to white with !important across the whole app. The landing's feature and FAQ cards
   are always light surfaces on the landing's own dark backdrop, so re-assert dark
   text here with higher specificity — otherwise dark-theme users get white-on-white. */
.landing3d .l3d-card h3,
.landing3d .l3d-faq-item summary { color: #1d2b36 !important; }
.landing3d .l3d-card p,
.landing3d .l3d-faq-item p { color: #3c4653 !important; }
.landing3d .l3d-faq-item a { color: #17607a !important; }

/* The reverse guard: light themes (beach/blue/ultramodern) force dark heading and
   paragraph colours app-wide, which would vanish on the landing's dark backdrop. */
.landing3d .l3d-hero-copy h1,
.landing3d .l3d-section-title { color: #ffffff !important; }
.landing3d .l3d-lead,
.landing3d .l3d-section-sub { color: rgba(255, 255, 255, 0.87) !important; }
.landing3d .l3d-footer p { color: rgba(255, 255, 255, 0.78) !important; }
.landing3d .l3d-footer a { color: #9fe8db !important; }
.landing3d .l3d-footer a:hover { color: #ffffff !important; }
/* Extra-specific so the dark themes' span rule can't flatten the gradient headline. */
.landing3d .l3d-hero .l3d-hero-copy .l3d-grad-text { color: transparent !important; }

/* Same guard for the hero buttons — themes repaint all <button> backgrounds. */
.landing3d .l3d-btn-primary {
    background: linear-gradient(135deg, #5eead4 0%, #38bdf8 100%) !important;
    color: #06231f !important;
}
.landing3d .l3d-btn-ghost {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}
.landing3d .l3d-btn-ghost:hover { background: rgba(255, 255, 255, 0.16) !important; }

/* ---- Responsive & accessibility ---- */
@media (max-width: 900px) {
    .l3d-hero { padding: 36px 5% 30px; gap: 26px; }
    .l3d-auth-wrap { max-width: none; }
    .l3d-auth-card { transform: none; animation: none; }
}
@media (prefers-reduced-motion: reduce) {
    .l3d-orb, .l3d-auth-card { animation: none !important; }
    .l3d-card, .l3d-btn-primary, .l3d-btn-ghost, .l3d-auth-card { transition: none !important; }
    .l3d-card:hover { transform: none; }
}
