/* =========================
   NMRec Homepage Design System
   Harmonized with current landing page
   ========================= */

:root {
    --nmrec-dark: #030b1a;
    --nmrec-navy: #1e2d40;
    --nmrec-deep: #101a26;
    --nmrec-orange: #bf6956;
    --nmrec-orange-dark: #a64f3c;
    --nmrec-light: #101a26;
    --nmrec-white: #f4f1eb;
    --nmrec-paper: #f7f7f5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--nmrec-white);
    color: var(--nmrec-navy);
    text-rendering: optimizeLegibility;
}

::selection { background: var(--nmrec-orange); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--nmrec-deep); }
::-webkit-scrollbar-thumb { background: var(--nmrec-navy); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--nmrec-orange); }

/* Unified width: same visual body as the landing page */
.nm-container,
.max-w-7xl {
    width: min(calc(100% - 2rem), 80rem) !important;
    max-width: 80rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (min-width: 768px) {
    .nm-container,
    .max-w-7xl { width: min(calc(100% - 4rem), 80rem) !important; }
}

@media (min-width: 1280px) {
    .nm-container,
    .max-w-7xl { width: min(calc(100% - 6rem), 80rem) !important; }
}

section { scroll-margin-top: 7rem; }

/* Hero spacing: same spatial logic as the landing page.
   Background stays full-bleed. Content sits inside max-w-7xl with real side padding. */
.nm-hero > .max-w-7xl {
    width: 100% !important;
    max-width: 80rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}
@media (min-width: 640px) {
    .nm-hero > .max-w-7xl {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}
@media (min-width: 1024px) {
    .nm-hero > .max-w-7xl {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
}
@media (max-width: 380px) {
    .nm-hero > .max-w-7xl {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}


/* Section rhythm copied from landing page */
.nm-section,
.py-20,
.py-24,
.py-28,
.py-32,
.py-40,
.py-48 {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
}

@media (max-width: 768px) {
    .nm-section,
    .py-20,
    .py-24,
    .py-28,
    .py-32,
    .py-40,
    .py-48 {
        padding-top: 4.5rem !important;
        padding-bottom: 4.5rem !important;
    }
}

/* Typography */
h1, h2, h3, h4 { letter-spacing: -0.045em; }
h1 { font-weight: 700; }
h2, h3 { font-weight: 700; }
p { letter-spacing: -0.01em; }

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* Landing grid and glass language */
.animated-grid {
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 10%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 10%, transparent 70%);
}

.glass-dark,
.nm-glass-dark {
    background: rgba(16, 26, 38, 0.42);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass,
.nm-glass-light {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Navbar, identical logic to landing page */
.nav-container {
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    padding: 1rem 1.5rem;
}
.nav-scrolled {
    margin-top: 1rem;
    border-radius: 9999px;
    background: rgba(16, 26, 38, 0.95) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    width: calc(100% - 2rem) !important;
    max-width: 80rem !important;
}

/* Premium cards */
.nm-card,
.nm-card-light,
.product-card {
    background: #fff;
    color: var(--nmrec-navy);
    border: 1px solid rgba(30, 45, 64, 0.10);
    box-shadow: 0 18px 50px rgba(16, 26, 38, 0.08);
}
.nm-card-dark {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}
.nm-card,
.nm-card-light,
.nm-card-dark,
.product-card {
    border-radius: 2rem;
}

.nm-soft-card {
    background: #f7f7f5;
    border: 1px solid rgba(30, 45, 64, 0.10);
    border-radius: 2.5rem;
    box-shadow: 0 12px 40px rgba(16, 26, 38, 0.06);
}

/* Buttons */
.nm-btn-primary,
.btn-primary,
a.btn-primary,
button.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: var(--nmrec-orange) !important;
    color: #fff !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    transition: all 0.25s ease;
    box-shadow: 0 14px 35px rgba(191, 105, 86, 0.22);
}
.nm-btn-primary:hover,
.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover {
    background: var(--nmrec-orange-dark) !important;
    transform: translateY(-1px);
}
.nm-btn-secondary,
.btn-secondary,
a.btn-secondary,
button.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #fff !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    transition: all 0.25s ease;
}
.nm-btn-secondary:hover,
.btn-secondary:hover,
a.btn-secondary:hover,
button.btn-secondary:hover {
    background: #fff !important;
    color: var(--nmrec-navy) !important;
}

/* Product carousel */
.hide-scrollbar { scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.product-card {
    min-height: 330px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s ease, border-color 0.5s ease;
    overflow: hidden;
    position: relative;
}
.product-card::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -70px;
    top: -70px;
    border-radius: 999px;
    background: rgba(191, 105, 86, 0.08);
    filter: blur(6px);
    transition: all 0.5s ease;
}
.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(191, 105, 86, 0.32);
    box-shadow: 0 26px 70px rgba(16, 26, 38, 0.12);
}
.product-card:hover::after { transform: scale(1.4); background: rgba(191, 105, 86, 0.12); }
.product-header-push, .reveal-data { position: relative; z-index: 2; }

/* Number cards from landing page */
.number-cut {
    position: absolute;
    bottom: -35px;
    left: 20px;
    font-size: 130px;
    font-weight: 800;
    line-height: 1;
    color: rgba(16, 26, 38, 0.04);
    z-index: 1;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.adv-card:hover .number-cut {
    color: rgba(247, 158, 92, 0.15);
    transform: translateY(-10px);
}

/* Visual bars used in technology section */
.aniso-left {
    left: calc(50% - 75px);
    height: 72px;
    background: linear-gradient(to top, var(--nmrec-orange), rgba(191,105,86,0.35));
    box-shadow: 0 0 25px rgba(191,105,86,0.30);
}
.aniso-right {
    right: calc(50% - 75px);
    height: 132px;
    background: linear-gradient(to top, var(--nmrec-orange), rgba(191,105,86,0.35));
    box-shadow: 0 0 25px rgba(191,105,86,0.30);
}

/* Dark sections */
.bg-nmrec-dark,
.bg-nmrec-navy { color: #fff; }
.bg-nmrec-dark p,
.bg-nmrec-navy p { color: rgba(255,255,255,0.68); }

/* Hero tuning */
.hero-panel { transform: translateY(0); }
@media (min-width: 1024px) {
    .hero-panel { transform: translateY(2rem); }
}

@media (max-width: 640px) {
    .nav-scrolled { width: calc(100% - 1rem) !important; }
    .product-card { min-height: 300px; padding: 1.5rem; }
    .number-cut { font-size: 96px; }
}

/* Homepage technology RDC peaks, safe override */
#tecnologia .aniso-left,
#tecnologia .aniso-right {
    position: absolute !important;
    bottom: 0 !important;
    display: block !important;
    width: 12px !important;
    height: 90px !important;
    border-radius: 6px 6px 0 0 !important;
    background: rgba(191, 105, 86, 0.35) !important;
    box-shadow: none !important;
    z-index: 20 !important;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
#tecnologia .aniso-left { left: calc(50% - 30px) !important; }
#tecnologia .aniso-right { right: calc(50% - 30px) !important; }
#tecnologia .group:hover .aniso-left {
    left: calc(50% - 70px) !important;
    height: 130px !important;
    background: var(--nmrec-orange) !important;
    box-shadow: 0 0 22px rgba(191, 105, 86, 0.55) !important;
}
#tecnologia .group:hover .aniso-right {
    right: calc(50% - 70px) !important;
    height: 130px !important;
    background: var(--nmrec-orange) !important;
    box-shadow: 0 0 22px rgba(191, 105, 86, 0.55) !important;
}
