/* ==========================================================================
   SmartSchool — Landing page (hero 3D, particles, parallax, marquee)
   ========================================================================== */

.landing { position: relative; overflow-x: hidden; }

/* ------------------------------------------------------------- Particles */
#particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .55;
}

.aurora {
    position: fixed;
    inset: -30% -10% auto -10%;
    height: 120vh;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(38% 42% at 22% 26%, rgba(99,102,241,.42), transparent 66%),
        radial-gradient(34% 38% at 78% 18%, rgba(6,182,212,.36), transparent 66%),
        radial-gradient(40% 44% at 52% 78%, rgba(236,72,153,.26), transparent 68%);
    filter: blur(30px);
    animation: auroraDrift 24s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
    0% { transform: translate3d(-3%, -2%, 0) scale(1); }
    50% { transform: translate3d(3%, 2%, 0) scale(1.09); }
    100% { transform: translate3d(-2%, 3%, 0) scale(1.03); }
}

/* --------------------------------------------------------------- Nav bar */
.landing-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem clamp(1rem, 4vw, 3.2rem);
    background: color-mix(in srgb, var(--bg-0) 72%, transparent);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border-bottom: 1px solid var(--border);
}
.landing-nav .nav-links { display: flex; gap: .3rem; align-items: center; }
.landing-nav .nav-links a {
    padding: .48rem .85rem;
    border-radius: 10px;
    font-size: .87rem;
    font-weight: 650;
    color: var(--text-2);
    transition: all .24s var(--ease);
}
.landing-nav .nav-links a:hover { background: var(--surface-hover); color: var(--text); }

.burger { display: none; }

/* ------------------------------------------------------------------ Hero */
.hero {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 3rem;
    align-items: center;
    padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3.2rem) clamp(2rem, 5vw, 4rem);
    max-width: 1420px;
    margin: 0 auto;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .95rem .4rem .5rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 1.3rem;
    animation: floatY 4.6s ease-in-out infinite;
}
.hero-pill .dot-live {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(16,185,129,.2);
    animation: livePulse 2s infinite;
    margin-inline-start: .35rem;
}
@keyframes livePulse {
    0%,100% { box-shadow: 0 0 0 3px rgba(16,185,129,.24); }
    50% { box-shadow: 0 0 0 9px rgba(16,185,129,0); }
}

.hero h1 {
    font-size: clamp(2.05rem, 5.2vw, 3.6rem);
    line-height: 1.38;
    letter-spacing: -.025em;
    margin-bottom: 1.1rem;
    font-weight: 900;
}

.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span {
    display: inline-block;
    animation: riseIn .95s var(--ease) both;
}
.hero h1 .line:nth-child(1) > span { animation-delay: .06s; }
.hero h1 .line:nth-child(2) > span { animation-delay: .2s; }
.hero h1 .line:nth-child(3) > span { animation-delay: .34s; }

@keyframes riseIn { from { opacity: 0; transform: translateY(102%) rotate(3deg); } to { opacity: 1; transform: none; } }

.hero-lead {
    font-size: clamp(.95rem, 1.6vw, 1.1rem);
    color: var(--text-2);
    max-width: 560px;
    margin-bottom: 1.8rem;
    animation: fadeUp .9s var(--ease) .45s both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.hero-cta {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    animation: fadeUp .9s var(--ease) .58s both;
}

.hero-stats {
    display: flex;
    gap: clamp(1rem, 3vw, 2.4rem);
    flex-wrap: wrap;
    animation: fadeUp .9s var(--ease) .7s both;
}
.hero-stats .hs strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -.02em;
    background: var(--brand-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.4;
}
.hero-stats .hs span { font-size: .78rem; color: var(--text-3); }

/* ------------------------------------------------------ 3D hero visual */
.hero-visual {
    position: relative;
    perspective: 1500px;
    min-height: 440px;
    display: grid;
    place-items: center;
    animation: fadeUp 1s var(--ease) .3s both;
}

.orbit-stage {
    position: relative;
    width: min(430px, 88%);
    aspect-ratio: 1;
    transform-style: preserve-3d;
    animation: stageSpin 26s linear infinite;
}
@keyframes stageSpin {
    from { transform: rotateX(14deg) rotateY(0deg); }
    to { transform: rotateX(14deg) rotateY(360deg); }
}
.orbit-stage:hover { animation-play-state: paused; }

.orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed var(--border-strong);
    transform-style: preserve-3d;
}
.orbit-ring.r1 { transform: rotateX(72deg) scale(1); }
.orbit-ring.r2 { transform: rotateX(72deg) rotateY(60deg) scale(.78); }
.orbit-ring.r3 { transform: rotateX(72deg) rotateY(-60deg) scale(.56); }

.orbit-core {
    position: absolute;
    inset: 30%;
    border-radius: 50%;
    background: var(--brand-grad);
    box-shadow: 0 0 70px 12px rgba(99,102,241,.5), inset 0 0 40px rgba(255,255,255,.22);
    display: grid;
    place-items: center;
    color: #fff;
    animation: corePulse 4.4s ease-in-out infinite;
}
@keyframes corePulse {
    0%,100% { transform: scale(1); box-shadow: 0 0 60px 10px rgba(99,102,241,.45); }
    50% { transform: scale(1.07); box-shadow: 0 0 90px 20px rgba(6,182,212,.55); }
}
.orbit-core svg { width: 46%; height: 46%; }

.orbit-node {
    position: absolute;
    width: 62px; height: 62px;
    border-radius: 18px;
    background: var(--surface-solid);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-2);
    display: grid;
    place-items: center;
    color: var(--brand-2);
    transform-style: preserve-3d;
    transition: transform .4s var(--ease);
}
.orbit-node:hover { transform: scale(1.16) translateZ(40px); }
.orbit-node.n1 { top: -6%; left: 44%; }
.orbit-node.n2 { top: 30%; right: -10%; }
.orbit-node.n3 { bottom: 6%; left: 12%; }
.orbit-node.n4 { bottom: -8%; right: 24%; }
.orbit-node.n5 { top: 42%; left: -12%; }
.orbit-node.n6 { top: 4%; right: 4%; }

.orbit-node .n-label {
    position: absolute;
    bottom: -24px;
    font-size: .68rem;
    color: var(--text-3);
    white-space: nowrap;
    font-weight: 700;
}

/* Floating glass cards over the visual */
.float-card {
    position: absolute;
    padding: .7rem .95rem;
    border-radius: 16px;
    background: var(--surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-3);
    font-size: .78rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    z-index: 5;
    white-space: nowrap;
}
.float-card.f1 { top: 4%; right: 2%; animation: floatA 6.4s ease-in-out infinite; }
.float-card.f2 { bottom: 12%; left: 0; animation: floatB 7.6s ease-in-out infinite; }
.float-card.f3 { bottom: 42%; right: -2%; animation: floatA 8.6s ease-in-out infinite reverse; }

@keyframes floatA { 0%,100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(-15px) rotate(1.4deg); } }
@keyframes floatB { 0%,100% { transform: translateY(0) rotate(1.4deg); } 50% { transform: translateY(14px) rotate(-1.2deg); } }

/* ------------------------------------------------------------ Marquee */
.marquee {
    position: relative;
    z-index: 2;
    overflow: hidden;
    padding: 1rem 0;
    border-block: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-1) 60%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    font-size: .88rem;
    color: var(--text-3);
    white-space: nowrap;
}

/* ------------------------------------------------------------ Sections */
.section {
    position: relative;
    z-index: 2;
    padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 3.2rem);
    max-width: 1420px;
    margin: 0 auto;
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(2rem, 4vw, 3.2rem); }
.section-head .kicker {
    display: inline-block;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand-2);
    margin-bottom: .7rem;
}
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); margin-bottom: .7rem; }
.section-head p { font-size: 1rem; }

/* Feature grid with 3D tilt */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
    gap: 1.15rem;
    perspective: 1400px;
}

.feature {
    position: relative;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    transform-style: preserve-3d;
    transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
    overflow: hidden;
}
.feature::before {
    content: "";
    position: absolute;
    width: 220px; height: 220px;
    top: -110px; inset-inline-end: -80px;
    border-radius: 50%;
    background: var(--brand-grad-soft);
    filter: blur(34px);
    opacity: 0;
    transition: opacity .6s var(--ease);
}
.feature:hover::before { opacity: 1; }
.feature:hover { border-color: var(--border-strong); box-shadow: var(--shadow-3); }

.feature-icon {
    width: 52px; height: 52px;
    border-radius: 16px;
    display: grid; place-items: center;
    background: var(--brand-grad);
    color: #fff;
    margin-bottom: 1rem;
    box-shadow: 0 14px 30px -14px rgba(99,102,241,1);
    transform: translateZ(30px);
}
.feature h3 { font-size: 1.08rem; margin-bottom: .45rem; transform: translateZ(18px); }
.feature p { font-size: .86rem; margin-bottom: .8rem; transform: translateZ(10px); }
.feature ul { margin: 0; padding-inline-start: 1.15rem; font-size: .82rem; color: var(--text-3); }
.feature ul li { margin-bottom: .28rem; }

/* Roles showcase */
.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.role-card {
    text-align: center;
    padding: 1.6rem 1.1rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
    transform-style: preserve-3d;
}
.role-card:hover { transform: translateY(-8px) rotateX(6deg); border-color: var(--brand-2); box-shadow: var(--shadow-3); }
.role-card .role-ico {
    width: 62px; height: 62px;
    margin: 0 auto .85rem;
    border-radius: 20px;
    display: grid; place-items: center;
    background: var(--brand-grad-soft);
    border: 1px solid var(--border);
    color: var(--brand-2);
    transition: transform .5s var(--ease-bounce);
}
.role-card:hover .role-ico { transform: scale(1.14) rotate(-7deg); }
.role-card h4 { margin-bottom: .35rem; }
.role-card p { font-size: .82rem; margin: 0; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; counter-reset: step; }
.step {
    position: relative;
    padding: 1.6rem 1.2rem 1.2rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform .45s var(--ease), border-color .45s var(--ease);
}
.step:hover { transform: translateY(-6px); border-color: var(--brand-2); }
.step::before {
    counter-increment: step;
    content: counter(step, persian);
    position: absolute;
    top: -20px;
    inset-inline-start: 1.2rem;
    width: 42px; height: 42px;
    border-radius: 14px;
    display: grid; place-items: center;
    background: var(--brand-grad);
    color: #fff;
    font-weight: 900;
    font-size: 1.05rem;
    box-shadow: 0 12px 26px -12px rgba(99,102,241,1);
}
.step h4 { margin-top: .5rem; }
.step p { font-size: .85rem; margin: 0; }

/* AI showcase */
.ai-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.2rem;
    align-items: center;
}
.ai-demo {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    background: var(--surface-solid);
    overflow: hidden;
    box-shadow: var(--shadow-3);
    transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
    transition: transform .7s var(--ease);
}
.ai-demo:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
.ai-demo-head {
    display: flex; align-items: center; gap: .55rem;
    padding: .7rem .95rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-size: .8rem;
    font-weight: 700;
}
.ai-demo-body { padding: 1rem; display: flex; flex-direction: column; gap: .7rem; min-height: 300px; }
.ai-demo-body .bubble { font-size: .83rem; }

.typing-line {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-inline-end: 2px solid var(--brand-2);
    animation: typing 4.5s steps(46) infinite, caret .8s step-end infinite;
    max-width: 100%;
}
@keyframes typing { 0% { width: 0; } 55% { width: 100%; } 90% { width: 100%; } 100% { width: 0; } }
@keyframes caret { 50% { border-color: transparent; } }

/* Pricing */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.price {
    position: relative;
    padding: 1.8rem 1.4rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.price:hover { transform: translateY(-8px); box-shadow: var(--shadow-3); }
.price.featured {
    border-color: transparent;
    background: var(--surface-solid);
    box-shadow: var(--shadow-glow);
    transform: scale(1.03);
}
.price.featured::before {
    content: "";
    position: absolute; inset: -1px;
    border-radius: inherit;
    padding: 1.6px;
    background: var(--brand-grad);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    pointer-events: none;
}
.price .price-tag { font-size: 2rem; font-weight: 900; letter-spacing: -.02em; margin: .6rem 0 .3rem; }
.price ul { list-style: none; padding: 0; margin: 1rem 0 1.3rem; font-size: .85rem; }
.price ul li { display: flex; gap: .5rem; align-items: flex-start; margin-bottom: .5rem; color: var(--text-2); }
.price ul li svg { flex: none; margin-top: .28rem; color: var(--success); }

/* FAQ */
.faq { max-width: 830px; margin: 0 auto; }
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: .7rem;
    background: var(--surface);
    overflow: hidden;
    transition: border-color .3s var(--ease);
}
.faq-item.open { border-color: var(--brand-2); }
.faq-q {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.15rem;
    background: transparent;
    border: 0;
    color: var(--text);
    font-family: inherit;
    font-size: .94rem;
    font-weight: 700;
    cursor: pointer;
    text-align: right;
}
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .45s var(--ease), padding .45s var(--ease);
    padding: 0 1.15rem;
    color: var(--text-2);
    font-size: .88rem;
}
.faq-item.open .faq-a { max-height: 420px; padding: 0 1.15rem 1.1rem; }
.faq-chev { transition: transform .4s var(--ease); flex: none; color: var(--brand-2); }
.faq-item.open .faq-chev { transform: rotate(180deg); }

/* CTA band */
.cta-band {
    position: relative;
    margin: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 3.2rem);
    padding: clamp(2.4rem, 5vw, 4rem) clamp(1.4rem, 4vw, 3.4rem);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(6,182,212,.14), rgba(236,72,153,.16));
    border: 1px solid var(--border-strong);
    text-align: center;
    overflow: hidden;
    max-width: 1360px;
    margin-inline: auto;
    z-index: 2;
}
.cta-band::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 300px at 50% 0%, rgba(139,92,246,.3), transparent 70%);
    pointer-events: none;
}

/* Footer */
.landing-footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border);
    padding: 2.5rem clamp(1rem, 4vw, 3.2rem) 1.6rem;
    background: color-mix(in srgb, var(--bg-1) 55%, transparent);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 2rem;
    max-width: 1360px;
    margin: 0 auto 1.8rem;
}
.footer-grid h5 { font-size: .88rem; margin-bottom: .7rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; font-size: .84rem; }
.footer-grid ul li { margin-bottom: .42rem; }
.footer-grid ul a { color: var(--text-3); }
.footer-grid ul a:hover { color: var(--brand-2); }
.footer-bottom {
    max-width: 1360px;
    margin: 0 auto;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    font-size: .78rem;
    color: var(--text-3);
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0; inset-inline-start: 0;
    height: 3px;
    background: var(--brand-grad);
    z-index: 200;
    width: 0;
    transition: width .12s linear;
    box-shadow: 0 0 14px rgba(99,102,241,.9);
}

/* ------------------------------------------------------------ Responsive */
@media (max-width: 1080px) {
    .hero { grid-template-columns: 1fr; gap: 2rem; }
    .hero-visual { min-height: 380px; order: -1; }
    .ai-showcase { grid-template-columns: 1fr; gap: 1.6rem; }
    .ai-demo { transform: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .landing-nav .nav-links { display: none; }
    .burger { display: grid; }
    .landing-nav .nav-links.open {
        display: flex;
        position: absolute;
        top: 100%; inset-inline: 0;
        flex-direction: column;
        align-items: stretch;
        padding: .8rem;
        background: var(--surface-solid);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-3);
    }
    .float-card { display: none; }
    .hero-stats { gap: 1.2rem; }
    .hero-stats .hs strong { font-size: 1.3rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
    .price.featured { transform: none; }
}

@media print {
    .landing-nav, .cta-band, #particle-canvas, .aurora, .marquee { display: none !important; }
}
