/* ═══════════════════════════════════════════════════════
   NARRA DIGILABS — Forest Floor Design System v2.0
   Global stylesheet for www.narra.work
   ═══════════════════════════════════════════════════════ */

/* ─── Design Tokens ────────────────────────────────── */
:root {
    --ff-bg: #0d1f0f;
    --ff-bg-subtle: #1a3a1e;
    --ff-card: rgba(26, 58, 30, 0.4);
    --ff-card-hover: rgba(26, 58, 30, 0.6);
    --ff-border: rgba(74, 222, 128, 0.15);
    --ff-border-subtle: rgba(255, 255, 255, 0.05);
    --ff-text: #F9FAFB;
    --ff-text-muted: #9ca3af;
    --ff-accent: #4ade80;
    --ff-accent-dim: rgba(74, 222, 128, 0.1);
    --ff-accent-glow: rgba(74, 222, 128, 0.3);
    --ff-danger: #f87171;
    --ff-warning: #fbbf24;
    --ff-font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --ff-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --ff-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ff-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    --ff-radius: 16px;
    --ff-radius-sm: 10px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    background-color: var(--ff-bg);
    background-image: radial-gradient(circle at 15% 0%, rgba(26, 58, 30, 0.3) 0%, transparent 60%);
    color: var(--ff-text);
    font-family: var(--ff-font-ui);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; cursor: pointer; transition: var(--ff-transition); }
button { cursor: pointer; font-family: var(--ff-font-ui); }
img { max-width: 100%; height: auto; display: block; }

.hidden { display: none !important; }

/* ─── Typography ───────────────────────────────────── */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.1rem; }

h1 span, h2 span { color: var(--ff-accent); }

.mono {
    font-family: var(--ff-font-mono);
    font-variant-numeric: tabular-nums;
}

/* ─── Layout ───────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
    position: relative;
}

.text-center { text-align: center; }

.page-main {
    padding-top: 10rem !important;
}

/* ─── Glass Card ───────────────────────────────────── */
.glass-card, .glass.exp-card, .glass {
    background: var(--ff-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--ff-border);
    border-radius: var(--ff-radius);
    padding: 2rem;
    transition: var(--ff-transition);
    display: block;
}

.glass-card:hover, .glass.exp-card:hover, .glass:hover {
    border-color: rgba(74, 222, 128, 0.25);
    background: var(--ff-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

/* ─── Buttons ──────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    border-radius: var(--ff-radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    outline: none;
    transition: var(--ff-transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--ff-accent);
    color: var(--ff-bg);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary:hover {
    box-shadow: 0 0 24px var(--ff-accent-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--ff-accent);
    color: var(--ff-accent);
}

.btn-secondary:hover {
    background: var(--ff-accent-dim);
    transform: translateY(-1px);
}

.btn-ghost {
    background: var(--ff-card);
    color: var(--ff-text-muted);
    border: 1px solid var(--ff-border-subtle);
}

.btn-ghost:hover {
    border-color: var(--ff-border);
    color: var(--ff-text);
    background: var(--ff-card-hover);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
}

/* ─── Header ───────────────────────────────────────── */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--ff-transition);
}

header.scrolled {
    padding: 0.5rem 0;
    background: rgba(13, 31, 15, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--ff-border-subtle);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.logo img {
    height: 36px;
    width: 36px;
    filter: drop-shadow(0 0 8px var(--ff-accent-glow));
    transition: var(--ff-transition);
}

.logo:hover img {
    filter: drop-shadow(0 0 14px var(--ff-accent));
    transform: scale(1.05);
}

.nav-container {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0 auto;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--ff-text-muted);
    font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--ff-accent);
}

/* Dropdown */
.dropdown { position: relative; }

.dropdown-content {
    position: absolute;
    top: 100%;
    left: -1rem;
    background: rgba(13, 31, 15, 0.95);
    min-width: 220px;
    border: 1px solid var(--ff-border);
    border-radius: var(--ff-radius-sm);
    backdrop-filter: blur(20px);
    z-index: 1050;
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 0.6rem 1.25rem;
    font-size: 0.88rem;
    color: var(--ff-text-muted);
}

.dropdown-content a:hover {
    background: var(--ff-accent-dim);
    color: var(--ff-accent);
}

/* Social links */
.social-links {
    display: flex;
    gap: 1.25rem;
    margin-left: 1.5rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--ff-border-subtle);
}

.social-links a {
    font-size: 1.1rem;
    color: var(--ff-text-muted);
}

.social-links a:hover {
    color: var(--ff-accent);
    transform: translateY(-2px);
}

/* Nav portal button */
.nav-portal-btn {
    display: inline-block;
    margin-left: 1.5rem;
    padding: 0.5rem 1rem;
    background: var(--ff-accent-dim);
    color: var(--ff-accent);
    border: 1px solid rgba(74, 222, 128, 0.25);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-portal-btn:hover {
    background: rgba(74, 222, 128, 0.2);
    border-color: var(--ff-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--ff-accent-glow);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    cursor: pointer;
    z-index: 1100;
    position: relative;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--ff-accent);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-overlay.active { display: block; opacity: 1; pointer-events: auto; }

/* ─── Status Badge ─────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    background: var(--ff-accent-dim);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 100px;
    font-size: 0.82rem;
    color: var(--ff-accent);
    margin-bottom: 2rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: var(--ff-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--ff-accent);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ─── Hero ─────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(74, 222, 128, 0.03), transparent 70%);
}

.hero-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    position: relative;
}

.hero-content {
    width: 100%;
    animation: fadeUp 0.8s ease both;
}

.hero-content h1 { animation: fadeUp 0.8s 0.15s ease both; }
.hero-content p {
    font-size: 1.15rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
    color: var(--ff-text-muted);
    animation: fadeUp 0.8s 0.3s ease both;
}

.hero-actions {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
    animation: fadeUp 0.8s 0.45s ease both;
}

/* Hero divider */
.hero-divider {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-divider span {
    font-size: 0.72rem;
    color: var(--ff-text-muted);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.hero-divider::before,
.hero-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ff-border);
}

/* Service chips */
.services-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    animation: fadeIn 1s 0.6s ease both;
}

.service-chip {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--ff-card);
    border: 1px solid var(--ff-border-subtle);
    border-radius: var(--ff-radius-sm);
    padding: 1.25rem;
    text-align: center;
    transition: var(--ff-transition);
    min-height: 100px;
}

.service-chip:hover {
    border-color: var(--ff-accent);
    transform: translateY(-3px);
    background: var(--ff-accent-dim);
}

.service-chip .chip-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.service-chip strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.service-chip p {
    font-size: 0.75rem;
    color: var(--ff-text-muted);
    margin: 0;
}

/* ─── Background Trees ─────────────────────────────── */
.narra-bg-tree {
    position: absolute;
    background-image: url('assets/logo.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
    filter: grayscale(1) brightness(2);
    will-change: transform;
    contain: strict;
}

.tree-1 { top: 50%; right: -5%; width: 500px; height: 500px; transform: translateY(-50%); }
.tree-2 { top: 20%; left: -8%; width: 350px; height: 350px; opacity: 0.02; }
.tree-3 { bottom: -10%; right: 20%; width: 300px; height: 300px; opacity: 0.015; }

/* ─── CTA Section ──────────────────────────────────── */
.cta-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 3.5rem;
    text-align: center;
    border: 1px solid rgba(74, 222, 128, 0.2);
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.04) 0%, transparent 50%);
}

.cta-section h2 { margin-bottom: 1.25rem; }
.cta-section p {
    color: var(--ff-text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Footer ───────────────────────────────────────── */
footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--ff-border-subtle);
    text-align: center;
    color: var(--ff-text-muted);
    font-size: 0.88rem;
}

.footer-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 8px var(--ff-accent-glow));
    opacity: 0.6;
    transition: var(--ff-transition);
}

.footer-logo:hover img {
    opacity: 1;
    filter: drop-shadow(0 0 14px var(--ff-accent));
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-social a {
    font-size: 1.2rem;
    color: var(--ff-text-muted);
}

.footer-social a:hover {
    color: var(--ff-accent);
    transform: scale(1.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--ff-text-muted);
    font-size: 0.82rem;
}

.footer-links a:hover { color: var(--ff-accent); }

/* ─── Skeleton Shimmer ─────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg,
        rgba(26, 58, 30, 0.3) 25%,
        rgba(26, 58, 30, 0.5) 50%,
        rgba(26, 58, 30, 0.3) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--ff-radius-sm);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ─── Animations ───────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* ─── Profile Dropdown (shared by hub) ─────────────── */
.profile-dropdown { position: relative; display: none; z-index: 9999; }
.profile-toggle { background: transparent; border: none; outline: none; display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem; color: var(--ff-text); cursor: pointer; }
.profile-avatar { width: 40px; height: 40px; font-size: 1rem; background: var(--ff-accent-dim); color: var(--ff-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.profile-menu { position: absolute; right: 0; top: 120%; background: rgba(13, 31, 15, 0.95); backdrop-filter: blur(20px); border: 1px solid var(--ff-border); border-radius: var(--ff-radius-sm); min-width: 200px; list-style: none; padding: 0.5rem 0; box-shadow: var(--ff-shadow); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: all 0.25s ease; }
.profile-menu.active { opacity: 1; pointer-events: auto; transform: translateY(0); }
.profile-menu .profile-name { padding: 0.7rem 1.2rem; border-bottom: 1px solid var(--ff-border-subtle); margin-bottom: 0.4rem; font-weight: 700; font-size: 0.82rem; color: var(--ff-accent); }
.profile-menu a { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 1.2rem; font-size: 0.82rem; color: var(--ff-text); }
.profile-menu a:hover { background: var(--ff-accent-dim); }

/* ─── Select Options ───────────────────────────────── */
select option {
    background-color: var(--ff-bg);
    color: var(--ff-text);
}

/* ─── Responsive ───────────────────────────────────── */
@media (max-width: 968px) {
    .section { padding: 5rem 0; }
    .menu-toggle { display: flex; }

    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 380px;
        height: 100vh;
        background: rgba(13, 31, 15, 0.97);
        backdrop-filter: blur(24px);
        flex-direction: column;
        justify-content: center;
        padding: 3rem 2rem;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--ff-border-subtle);
        z-index: 1001;
    }

    .nav-container.active { right: 0; }

    .nav-links {
        flex-direction: column;
        gap: 1.75rem;
        align-items: flex-start;
        margin-bottom: 2.5rem;
    }

    .nav-links a { font-size: 1.3rem; }

    .dropdown-content {
        position: static;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        border: none;
        border-left: 2px solid var(--ff-border-subtle);
        background: transparent;
        backdrop-filter: none;
        padding: 0.75rem 0 0.5rem 1.25rem;
        margin-top: 0.75rem;
        border-radius: 0;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        box-shadow: none;
    }

    .dropdown-content a { font-size: 1.1rem; padding: 0; }

    .social-links {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        gap: 1.5rem;
    }

    .social-links a { font-size: 1.5rem; }

    .hero-inner { padding: 6rem 1.5rem 3rem; }
    .hero { text-align: center; }
    .hero-content p { margin-left: auto; margin-right: auto; }
    .hero-actions { flex-direction: column; }
    .btn { width: 100%; text-align: center; justify-content: center; }

    .services-preview { grid-template-columns: repeat(2, 1fr) !important; }
    .hero-divider { margin-top: 2rem; }
    .page-main { padding-top: 8rem !important; }
}

@media (max-width: 600px) {
    .container { padding: 0 1.25rem; }
    .hero-inner { padding: 5.5rem 1rem 2.5rem; }
    .page-main { padding-top: 6.5rem !important; }
}

@media (max-width: 480px) {
    .services-preview { grid-template-columns: 1fr !important; }
    .glass-card { padding: 1.5rem; }
    .cta-section { padding: 2.5rem 1.5rem; }
}
