:root {
    --bg-deep: #070f1a;
    --bg-mid: #0f1f35;
    --brand-dark: #11263e;
    --brand-blue: #0253f4;
    --brand-glow: #3b82ff;
    --text: #eef3fa;
    --text-muted: #9aadc4;
    --font: "Vazir", "Manrope", system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: var(--font);
    font-optical-sizing: auto;
    color: var(--text);
    background: var(--bg-deep);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.page {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 1.25rem 2.5rem;
    isolation: isolate;
}

.bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(2, 83, 244, 0.18), transparent 55%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(17, 38, 62, 0.85), transparent 50%),
        linear-gradient(165deg, var(--bg-deep) 0%, var(--bg-mid) 45%, var(--brand-dark) 100%);
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.07;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
    animation: grid-drift 28s linear infinite;
}

.bg-doodles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.12;
    background-image: url("/assets/img/landing-doodles.svg?v=4");
    background-size: 880px 880px;
    background-repeat: repeat;
    mask-image: radial-gradient(ellipse 92% 86% at 50% 45%, black 12%, transparent 78%);
    animation: doodle-drift 110s linear infinite;
}

.bg-iot {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black 10%, transparent 72%);
}

.iot-chart {
    position: absolute;
    opacity: 0.12;
}

.iot-chart-a {
    width: min(300px, 40vw);
    top: 7%;
    left: 2%;
    animation: iot-drift-a 26s ease-in-out infinite;
}

.iot-chart-b {
    width: min(240px, 34vw);
    bottom: 10%;
    right: 3%;
    animation: iot-drift-b 30s ease-in-out infinite;
}

.iot-chart-c {
    width: min(260px, 36vw);
    top: 58%;
    right: 2%;
    opacity: 0.11;
    animation: iot-drift-a 33s ease-in-out infinite reverse;
}

.iot-chart-d {
    width: min(180px, 26vw);
    top: 24%;
    left: 38%;
    opacity: 0.1;
    animation: iot-drift-b 27s ease-in-out infinite reverse;
}

.iot-chart-e {
    width: min(200px, 28vw);
    bottom: 30%;
    left: 22%;
    opacity: 0.1;
    animation: iot-drift-a 29s ease-in-out infinite;
}

.iot-server {
    position: absolute;
    width: min(72px, 14vw);
    color: rgba(59, 130, 255, 0.55);
    opacity: 0.22;
}

.iot-server-a {
    top: 26%;
    right: 9%;
    animation: iot-drift-b 22s ease-in-out infinite reverse;
}

.iot-server-b {
    width: min(58px, 12vw);
    bottom: 36%;
    left: 12%;
    opacity: 0.18;
    animation: iot-drift-a 28s ease-in-out infinite;
}

.iot-server-c {
    width: min(50px, 11vw);
    top: 6%;
    right: 34%;
    opacity: 0.16;
    animation: iot-drift-b 31s ease-in-out infinite;
}

.iot-float {
    position: absolute;
    color: rgba(197, 214, 238, 0.85);
    opacity: 0.1;
}

.iot-wifi {
    width: min(56px, 12vw);
    top: 9%;
    left: 16%;
    animation: iot-drift-a 24s ease-in-out infinite reverse;
}

.iot-spark {
    width: min(52px, 11vw);
    bottom: 14%;
    right: 24%;
    color: rgba(59, 130, 255, 0.7);
    animation: iot-drift-b 28s ease-in-out infinite;
}

.iot-bot {
    width: min(50px, 11vw);
    top: 64%;
    left: 6%;
    animation: iot-drift-a 32s ease-in-out infinite;
}

.iot-chip {
    width: min(48px, 10vw);
    top: 40%;
    left: 3%;
    animation: iot-drift-b 26s ease-in-out infinite reverse;
}

.iot-nodes {
    width: min(58px, 12vw);
    top: 16%;
    right: 26%;
    animation: iot-drift-a 34s ease-in-out infinite reverse;
}

.iot-gauge {
    width: min(54px, 11vw);
    bottom: 22%;
    right: 38%;
    animation: iot-drift-b 25s ease-in-out infinite reverse;
}

.iot-ant {
    width: min(46px, 10vw);
    top: 46%;
    right: 6%;
    animation: iot-drift-a 30s ease-in-out infinite reverse;
}

.iot-cloud {
    width: min(58px, 12vw);
    top: 72%;
    left: 36%;
    animation: iot-drift-b 36s ease-in-out infinite;
}

.iot-thermo {
    width: min(42px, 9vw);
    top: 32%;
    right: 42%;
    animation: iot-drift-a 21s ease-in-out infinite;
}

.server-led {
    color: #5eead4;
    opacity: 0.9;
    animation: status-blink 2s ease-in-out infinite;
}

.server-led-dim {
    animation-delay: 0.7s;
    opacity: 0.45;
}

.chart-grid-line {
    stroke: rgba(143, 163, 191, 0.25);
    stroke-width: 1;
}

.chart-line {
    stroke: var(--brand-glow);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke-dasharray: 400;
    animation: chart-draw 8s ease-in-out infinite;
}

.chart-dot {
    fill: var(--brand-glow);
    animation: chart-dot-pulse 8s ease-in-out infinite;
}

.chart-bar {
    fill: rgba(59, 130, 255, 0.5);
    transform-origin: bottom;
    animation: bar-pulse 4s ease-in-out infinite;
}

.chart-bar:nth-child(2) { animation-delay: 0.15s; }
.chart-bar:nth-child(3) { animation-delay: 0.3s; }
.chart-bar:nth-child(4) { animation-delay: 0.45s; }
.chart-bar:nth-child(5) { animation-delay: 0.6s; }
.chart-bar:nth-child(6) { animation-delay: 0.75s; }

.lcd {
    position: absolute;
    min-width: 7rem;
    padding: 0.5rem 0.7rem;
    border-radius: 0.35rem;
    background: rgba(7, 15, 26, 0.55);
    border: 1px solid rgba(59, 130, 255, 0.18);
    backdrop-filter: blur(6px);
    font-family: ui-monospace, "Cascadia Code", monospace;
    opacity: 0.28;
    animation: lcd-flicker 9s ease-in-out infinite, iot-drift-a 20s ease-in-out infinite;
}

.lcd-a { top: 13%; right: 5%; }
.lcd-b { bottom: 16%; left: 4%; animation-delay: 1.2s, 2s; }
.lcd-c { top: 44%; right: 15%; animation-delay: 2.4s, 4s; }
.lcd-d { top: 71%; right: 7%; animation-delay: 3s, 5s; }
.lcd-e { top: 31%; left: 8%; animation-delay: 1.8s, 3.4s; }
.lcd-f { bottom: 28%; right: 22%; animation-delay: 0.6s, 1.4s; }
.lcd-g { top: 6%; left: 28%; animation-delay: 2.8s, 4.6s; }
.lcd-h { bottom: 6%; left: 34%; animation-delay: 3.6s, 1.1s; }
.lcd-i { top: 54%; left: 18%; animation-delay: 1.4s, 5.2s; }
.lcd-status-2 { top: 5%; right: 26%; animation-delay: 0.4s, 2.8s; }
.lcd-status-3 { top: 37%; right: 2%; animation-delay: 2.1s, 0.8s; }
.lcd-status-4 { bottom: 8%; right: 34%; animation-delay: 3.3s, 4.2s; }
.lcd-status-5 { top: 66%; left: 3%; animation-delay: 1.1s, 3.8s; }

.lcd-label {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.lcd-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.lcd-unit {
    font-size: 0.7rem;
    margin-left: 0.15rem;
    color: var(--brand-glow);
}

.lcd-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #5eead4;
}

.lcd-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #5eead4;
    box-shadow: 0 0 6px #5eead4;
    animation: status-blink 1.6s ease-in-out infinite;
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}

.orb-a {
    width: 300px;
    height: 300px;
    top: 12%;
    left: -70px;
    background: rgba(2, 83, 244, 0.14);
    animation: orb-float 16s ease-in-out infinite;
}

.orb-b {
    width: 260px;
    height: 260px;
    bottom: 6%;
    right: -50px;
    background: rgba(3, 85, 243, 0.1);
    animation: orb-float 20s ease-in-out infinite reverse;
}

.hero {
    width: min(600px, 100%);
    text-align: center;
    animation: hero-in 0.75s ease-out both;
}

.landing-lang {
    position: fixed;
    top: max(1.1rem, env(safe-area-inset-top, 0px));
    right: max(1.1rem, env(safe-area-inset-right, 0px));
    left: auto;
    z-index: 20;
    margin: 0;
}

.landing-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 3.15rem;
    padding-block: 0.45rem;
    padding-inline: 0.55rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(7, 15, 26, 0.78);
    color: #eef3fa;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(12px);
}

.landing-lang-btn:hover,
.landing-lang-btn:focus-visible {
    border-color: rgba(59, 130, 255, 0.85);
    background: rgba(2, 83, 244, 0.32);
    outline: none;
}

.landing-lang-flag {
    display: block;
    width: 2.45rem;
    height: 1.65rem;
    border-radius: 0.32rem;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
    flex-shrink: 0;
}

html[dir="rtl"] h1,
html[dir="rtl"] .lede {
    letter-spacing: 0;
}

html[dir="rtl"] .cta {
    text-align: start;
}

.brand {
    margin-bottom: 1.5rem;
}

.logo-wrap {
    position: relative;
    width: min(148px, 42vw);
    margin: 0 auto 1.15rem;
    aspect-ratio: 1;
}

.logo-glow {
    position: absolute;
    inset: -4%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(2, 83, 244, 0.4) 0%, transparent 68%);
    filter: blur(18px);
    animation: glow-pulse 3.4s ease-in-out infinite;
}

.logo-plate {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.35),
        0 14px 40px rgba(2, 83, 244, 0.28),
        0 4px 16px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: logo-float 5s ease-in-out infinite;
}

.logo {
    width: 86%;
    height: 86%;
    object-fit: contain;
}

.brand-name {
    font-weight: 800;
    font-size: clamp(2rem, 6vw, 2.75rem);
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: #fff;
}

.brand-product {
    margin-top: 0.4rem;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--brand-glow);
}

h1 {
    font-weight: 700;
    font-size: clamp(1.25rem, 3.2vw, 1.65rem);
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin: 0 auto 0.75rem;
    max-width: 20em;
    color: var(--text);
}

.lede {
    font-weight: 400;
    font-size: clamp(0.95rem, 2.4vw, 1.05rem);
    line-height: 1.6;
    letter-spacing: 0;
    color: var(--text-muted);
    max-width: 32rem;
    margin: 0 auto 1.85rem;
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-width: min(230px, 100%);
    padding: 0.9rem 1.2rem;
    text-decoration: none;
    border-radius: 0.6rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.cta:hover {
    transform: translateY(-2px);
}

.cta-label {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.cta-hint {
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0;
    opacity: 0.88;
}

.cta-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-blue), #1a6bff 55%, var(--brand-glow));
    box-shadow: 0 10px 28px rgba(2, 83, 244, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-primary:hover {
    box-shadow: 0 14px 34px rgba(2, 83, 244, 0.42);
}

.cta-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(143, 163, 191, 0.32);
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(59, 130, 255, 0.4);
}

.footer {
    margin-top: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.45rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(143, 163, 191, 0.7);
}

.footer-credit {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
}

.footer-label {
    color: rgba(143, 163, 191, 0.55);
}

.footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.footer a:hover {
    color: var(--brand-glow);
}

.footer-dot {
    opacity: 0.45;
}

.client-shell {
    width: min(460px, 100%);
    text-align: center;
    animation: hero-in 0.7s ease-out both;
}

.client-shell h1 {
    max-width: none;
    margin-bottom: 0.7rem;
}

.client-shell .lede {
    margin-bottom: 1.5rem;
}

.client-shell .back {
    display: inline-block;
    color: var(--brand-glow);
    text-decoration: none;
    font-weight: 600;
}

.client-shell .back:hover {
    text-decoration: underline;
}

@keyframes hero-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(0.96); }
    50% { opacity: 0.9; transform: scale(1.05); }
}

@keyframes orb-float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(16px, -12px); }
}

@keyframes grid-drift {
    from { transform: translateY(0); }
    to { transform: translateY(48px); }
}

@keyframes chart-draw {
    0% { stroke-dashoffset: 400; opacity: 0.25; }
    40% { stroke-dashoffset: 0; opacity: 0.7; }
    80% { stroke-dashoffset: 0; opacity: 0.7; }
    100% { stroke-dashoffset: -50; opacity: 0.25; }
}

@keyframes chart-dot-pulse {
    0%, 35% { opacity: 0; }
    45%, 75% { opacity: 0.8; }
    100% { opacity: 0; }
}

@keyframes bar-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.88); }
    50% { opacity: 0.55; transform: scaleY(1); }
}

@keyframes iot-drift-a {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10px, -6px); }
}

@keyframes iot-drift-b {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-8px, 8px); }
}

@keyframes doodle-drift {
    from { background-position: 0 0; }
    to { background-position: 880px 520px; }
}

@keyframes lcd-flicker {
    0%, 92%, 100% { opacity: 0.28; }
    93% { opacity: 0.2; }
    94% { opacity: 0.28; }
}

@keyframes status-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@media (max-width: 640px) {
    .bg-doodles { opacity: 0.09; background-size: 640px 640px; }
    .iot-chart-a,
    .iot-chart-b,
    .iot-server { opacity: 0.08; }
    .iot-chart-c,
    .iot-chart-d,
    .iot-chart-e,
    .iot-server-c { display: none; }
    .iot-float { opacity: 0.1; }
    .iot-bot,
    .iot-nodes,
    .iot-cloud,
    .iot-thermo { display: none; }
    .lcd { opacity: 0.18; transform: scale(0.85); }
    .lcd-a { top: 14%; right: 2%; }
    .lcd-b { bottom: 18%; left: 2%; }
    .lcd-c { top: 38%; right: 3%; }
    .lcd-d,
    .lcd-e,
    .lcd-f,
    .lcd-g,
    .lcd-h,
    .lcd-i,
    .lcd-status-3,
    .lcd-status-4,
    .lcd-status-5 { display: none; }
    .lcd-status-2 { top: 8%; right: 4%; }
    .iot-server-a { top: 22%; right: 4%; }
    .iot-server-b { bottom: 28%; left: 4%; }
    .iot-wifi { top: 8%; left: 6%; }
    .iot-spark { bottom: 12%; right: 8%; }
    .iot-chip { top: 36%; left: 3%; }
    .iot-gauge { bottom: 24%; right: 10%; }
    .iot-ant { top: 48%; right: 4%; }

    .cta {
        width: 100%;
        align-items: center;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* The PNG logos are 15:16, not square: keep their shape inside fixed square boxes. */
img[src*="Lsense/logo-"] {
  object-fit: contain;
}
