/* ═══════════════════════════════════════════════
   LogicNest — Landing Page Styles
   ═══════════════════════════════════════════════ */

:root {
    --bg: #050709;
    --bg-elevated: #0a0e15;
    --bg-card: #0e1219;
    --bg-card-hover: #131921;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text: #e4e8ee;
    --text-muted: #5e6577;
    --text-dim: #3a4050;
    --accent: #00e09e;
    --accent-dim: rgba(0, 224, 158, 0.08);
    --accent-glow: rgba(0, 224, 158, 0.15);
    --font-display: 'Sora', system-ui, sans-serif;
    --font-body: 'Outfit', system-ui, sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ── Container ── */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ═══════════════════════════════════════════════
   Navigation
   ═══════════════════════════════════════════════ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 24px;
    transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background: rgba(5, 7, 9, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: var(--border);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--text);
    transition: opacity 0.2s;
}

.nav-logo:hover { opacity: 0.8; }
.nav-logo span { color: var(--accent); }

.nav-right {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: color 0.2s;
    letter-spacing: 0.01em;
}

.nav-link:hover { color: var(--text); }

.lang-btn {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.lang-btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.lang-indicator {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-muted);
    transition: transform 0.3s var(--ease), opacity 0.3s;
}

.mobile-toggle.active span:first-child {
    transform: translateY(6.5px) rotate(45deg);
}

.mobile-toggle.active span:last-child {
    transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(5, 7, 9, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 99;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s var(--ease), opacity 0.3s;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-link {
    font-size: 1.125rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.mobile-link:hover { color: var(--text); }

.mobile-lang-btn {
    align-self: flex-start;
    margin-top: 8px;
}

/* ═══════════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════════ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 24px 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}

.hero-orb-1 {
    width: 600px;
    height: 600px;
    top: -10%;
    right: -5%;
    background: radial-gradient(circle, rgba(0, 224, 158, 0.12), transparent 70%);
    animation: orbFloat1 25s ease-in-out infinite;
}

.hero-orb-2 {
    width: 500px;
    height: 500px;
    bottom: -10%;
    left: -10%;
    background: radial-gradient(circle, rgba(56, 130, 246, 0.08), transparent 70%);
    animation: orbFloat2 30s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 30px) scale(1.05); }
    66% { transform: translate(20px, -20px) scale(0.95); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40% { transform: translate(30px, -40px) scale(1.08); }
    70% { transform: translate(-20px, 20px) scale(0.96); }
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 720px;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease) 0.2s forwards;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease) 0.35s forwards;
}

.hero-title span {
    color: var(--accent);
    font-weight: 300;
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 300;
    color: var(--text);
    opacity: 0.85;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease) 0.5s forwards;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.7;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease) 0.65s forwards;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--bg);
    background: var(--accent);
    padding: 14px 32px;
    border-radius: 8px;
    transition: transform 0.2s var(--ease), box-shadow 0.3s, filter 0.2s;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease) 0.8s forwards;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
    filter: brightness(1.1);
}

.hero-cta:active {
    transform: translateY(0);
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 1s var(--ease) 1.2s forwards;
}

.hero-scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.2); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ═══════════════════════════════════════════════
   Sections (shared)
   ═══════════════════════════════════════════════ */

.section {
    padding: 120px 0;
    position: relative;
}

.section--dark {
    background: var(--bg-elevated);
}

.section--dark::before,
.section--dark::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.section--dark::before { top: 0; }
.section--dark::after { bottom: 0; }

.section-header {
    margin-bottom: 64px;
}

.section-label {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
}

/* ═══════════════════════════════════════════════
   Services
   ═══════════════════════════════════════════════ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.service-card {
    background: var(--bg);
    padding: 40px 32px;
    transition: background 0.3s;
}

.service-card:hover {
    background: var(--bg-card);
}

.service-icon {
    width: 40px;
    height: 40px;
    color: var(--accent);
    margin-bottom: 24px;
    transition: transform 0.3s var(--ease);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-card h3 {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.service-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ═══════════════════════════════════════════════
   Tech Stack
   ═══════════════════════════════════════════════ */

.stack-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stack-tag {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 8px;
    transition: border-color 0.3s, background 0.3s, color 0.3s, transform 0.2s var(--ease);
    cursor: default;
}

.stack-tag:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════
   Why Us
   ═══════════════════════════════════════════════ */

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.why-card {
    position: relative;
}

.why-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-style: italic;
    color: var(--accent);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: 16px;
    transition: opacity 0.3s;
}

.why-card:hover .why-number {
    opacity: 0.4;
}

.why-card h3 {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.why-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ═══════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════ */

.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text);
}

.footer-logo span { color: var(--accent); }

.footer-email {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ═══════════════════════════════════════════════
   Reveal Animation
   ═══════════════════════════════════════════════ */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.services-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.services-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.services-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.services-grid .reveal:nth-child(5) { transition-delay: 0.32s; }
.services-grid .reveal:nth-child(6) { transition-delay: 0.4s; }

.why-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.why-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

/* ═══════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════ */

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .why-grid .why-card:last-child {
        grid-column: span 2;
        max-width: 480px;
    }
}

@media (max-width: 680px) {
    .nav-right {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .section {
        padding: 80px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 28px 24px;
    }

    .why-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .why-grid .why-card:last-child {
        grid-column: auto;
        max-width: none;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .stack-tag {
        font-size: 0.8125rem;
        padding: 8px 16px;
    }
}
