/*
 * nr-hero — modern dark-gradient product hero.
 * Latitude/Vultr-style: sharp 6px corners, mono-typed eyebrow, bold
 * headline with negative letter-spacing, single accent green, restrained
 * motion (pulsing badge dot only).
 */

.nr-hero {
    --h-radius:     6px;
    --h-radius-sm:  4px;
    --h-ink:        #ffffff;
    --h-ink-soft:   rgba(255, 255, 255, 0.72);
    --h-line:       rgba(255, 255, 255, 0.10);
    --h-bg-deep:    #0a1626;
    --h-bg-mid:     #0f2541;
    --h-bg-edge:    #0c3a5d;

    position: relative;
    overflow: hidden;
    color: var(--h-ink);
    background: linear-gradient(135deg, var(--h-bg-deep) 0%, var(--h-bg-mid) 55%, var(--h-bg-edge) 100%);
    /* Full-bleed: break out of any constrained container by margin-inline
       calc that pushes the hero edge-to-edge of the viewport. */
    margin: 0 calc(50% - 50vw);
    width: 100vw;
    max-width: none;
    isolation: isolate;
    font-family: var(--masterfont, "sofia-pro", system-ui, sans-serif);
}
/* Inner content remains constrained for readability */
.nr-hero__inner {
    max-width: 1320px;
    margin: 0 auto;
}
.nr-hero.is-light {
    --h-ink:      #0f1c2e;
    --h-ink-soft: #5b6b7a;
    --h-line:     rgba(15, 28, 46, 0.10);
    background: linear-gradient(135deg, #f7fafc 0%, #eef3f7 100%);
}

/* ── Per-theme gradient variants ──────────────────────────────────
   Each product surface gets its own dominant tint so the visual
   recall differs per page (Latitude/Vultr style — bare metal feels
   different from cloud, gpu, etc.). Topbar stays #050f1c so the
   gradient transitions feel intentional. */
.nr-hero--bare-metal {
    background:
        radial-gradient(ellipse at 12% 20%, rgba(20, 187, 96, 0.18), transparent 55%),
        linear-gradient(135deg, #060f1c 0%, #0e2540 50%, #0c3a5d 100%);
}
.nr-hero--cloud {
    background:
        radial-gradient(ellipse at 88% 30%, rgba(82, 167, 255, 0.22), transparent 55%),
        linear-gradient(135deg, #061826 0%, #0a2a47 55%, #114775 100%);
}
.nr-hero--gpu {
    background:
        radial-gradient(ellipse at 78% 18%, rgba(232, 67, 92, 0.18), transparent 55%),
        radial-gradient(ellipse at 18% 88%, rgba(20, 187, 96, 0.12), transparent 55%),
        linear-gradient(135deg, #0a0a1f 0%, #1a0a2e 55%, #2c0c44 100%);
}
.nr-hero--pricing {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(20, 187, 96, 0.20), transparent 60%),
        linear-gradient(180deg, #050f1c 0%, #0a1626 60%, #0f2541 100%);
}
.nr-hero--colocation {
    background:
        radial-gradient(ellipse at 20% 80%, rgba(139, 111, 71, 0.18), transparent 55%),
        linear-gradient(135deg, #0a1626 0%, #182a3d 50%, #2a3140 100%);
}
.nr-hero--network {
    background:
        radial-gradient(ellipse at 80% 50%, rgba(6, 170, 166, 0.22), transparent 55%),
        radial-gradient(ellipse at 20% 50%, rgba(82, 167, 255, 0.14), transparent 55%),
        linear-gradient(135deg, #051f30 0%, #093345 60%, #0f4757 100%);
}
.nr-hero--industry {
    background:
        radial-gradient(ellipse at 50% 100%, rgba(20, 187, 96, 0.16), transparent 55%),
        linear-gradient(135deg, #060f1c 0%, #0c2840 60%, #0f3050 100%);
}

/* Theme-tinted accent on the eyebrow-dot + status-dot for visual cohesion */
.nr-hero--gpu .nr-hero__eyebrow-dot,
.nr-hero--gpu .nr-hero__badge-dot,
.nr-hero--gpu .nr-hero__status-dot { background: #e8435c; }
.nr-hero--gpu .nr-hero__status-tag { color: #ff7a8a; }
.nr-hero--gpu .nr-hero__status-spark { color: #e8435c; }
.nr-hero--cloud .nr-hero__eyebrow-dot,
.nr-hero--cloud .nr-hero__status-dot { background: #52a7ff; }
.nr-hero--cloud .nr-hero__status-tag { color: #82c0ff; }
.nr-hero--cloud .nr-hero__status-spark { color: #52a7ff; }
.nr-hero--network .nr-hero__eyebrow-dot,
.nr-hero--network .nr-hero__status-dot { background: #06aaa6; box-shadow: 0 0 0 4px rgba(6, 170, 166, 0.20); }
.nr-hero--network .nr-hero__status-tag { color: #4dd5d2; }
.nr-hero--network .nr-hero__status-spark { color: #06aaa6; }

/* ── Background layers ────────────────────────────────────────────── */
.nr-hero__bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.nr-hero__bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at top right, rgba(0, 0, 0, 0.7), transparent 70%);
}
.nr-hero.is-light .nr-hero__bg-grid {
    background-image:
        linear-gradient(rgba(15, 28, 46, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 28, 46, 0.05) 1px, transparent 1px);
}
.nr-hero__bg-orb {
    position: absolute;
    width: 560px; height: 560px;
    border-radius: 50%;
    top: -180px; right: -160px;
    background: radial-gradient(circle at 30% 30%,
        rgba(20, 187, 96, 0.30),
        rgba(20, 187, 96, 0.06) 50%,
        transparent 70%);
    filter: blur(8px);
}
.nr-hero__bg-orb--2 {
    top: auto; bottom: -200px; right: auto; left: -120px;
    width: 420px; height: 420px;
    background: radial-gradient(circle at 50% 50%,
        rgba(82, 167, 255, 0.18),
        rgba(82, 167, 255, 0.04) 50%,
        transparent 70%);
}

/* ── Logo-shape SVG pattern ──────────────────────────────────────── */
/* Tessellated isometric cubes echoing the brand mark. Sits inside the
   gradient at low opacity, tinted to whichever theme the page uses. */
.nr-hero__bg-logo-pattern {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    color: rgba(255, 255, 255, 0.16);
    opacity: 0.85;
    mix-blend-mode: screen;
}
.nr-hero.is-light .nr-hero__bg-logo-pattern { color: rgba(15, 28, 46, 0.08); mix-blend-mode: multiply; }

/* ── Brand mark diagonal blend ──────────────────────────────────── */
/* The "N" mark scaled enormous, anchored top-left, rotated diagonally.
   Bleeds toward the lower-right of the hero. Kept under the menu and
   above the orb for visual layering, but well below the headline. */
.nr-hero__bg-mark {
    position: absolute;
    top: -8%;
    left: -4%;
    width: clamp(420px, 56vw, 820px);
    height: auto;
    opacity: 0.13;
    transform: rotate(-22deg);
    transform-origin: top left;
    mix-blend-mode: screen;
    filter: blur(0.4px); /* almost imperceptible — softens the edges */
    pointer-events: none;
    /* Mask the mark so it fades into the gradient toward bottom-right */
    -webkit-mask-image: linear-gradient(135deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0.15) 100%);
            mask-image: linear-gradient(135deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0.15) 100%);
}
.nr-hero.is-light .nr-hero__bg-mark { opacity: 0.10; mix-blend-mode: multiply; }
@media (max-width: 880px) {
    .nr-hero__bg-mark { opacity: 0.09; width: clamp(320px, 80vw, 560px); top: -6%; left: -10%; }
}
/* Per-theme accent — pull the saturation slightly toward the page hue
   so the mark doesn't feel like a foreign object. */
.nr-hero--gpu .nr-hero__bg-mark      { filter: blur(0.4px) hue-rotate(-30deg) saturate(0.85); opacity: 0.11; }
.nr-hero--cloud .nr-hero__bg-mark    { filter: blur(0.4px) hue-rotate(10deg)  saturate(1.05); opacity: 0.14; }
.nr-hero--network .nr-hero__bg-mark  { filter: blur(0.4px) hue-rotate(-10deg) saturate(1.05); opacity: 0.14; }
.nr-hero--pricing .nr-hero__bg-mark  { opacity: 0.16; } /* pricing hero is text-heavy, mark can breathe more */
.nr-hero--colocation .nr-hero__bg-mark { filter: blur(0.4px) saturate(0.7); opacity: 0.10; }

/* ── Diagonal light streaks ──────────────────────────────────────── */
.nr-hero__bg-streak {
    position: absolute;
    width: 140%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(20, 187, 96, 0.55), transparent);
    transform: rotate(-12deg);
    pointer-events: none;
    opacity: 0.45;
    animation: nr-hero-streak 9s linear infinite;
}
.nr-hero__bg-streak--1 { top: 22%; left: -20%; animation-delay: 0s; }
.nr-hero__bg-streak--2 {
    top: 68%; left: -30%;
    background: linear-gradient(90deg, transparent, rgba(82, 167, 255, 0.45), transparent);
    animation-delay: 4.5s;
    animation-duration: 11s;
}
@keyframes nr-hero-streak {
    0%   { transform: translateX(-15%) rotate(-12deg); opacity: 0; }
    20%  { opacity: 0.6; }
    80%  { opacity: 0.6; }
    100% { transform: translateX(35%)  rotate(-12deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .nr-hero__bg-streak { animation: none; opacity: 0.25; }
}

/* ── Content + media split ────────────────────────────────────────── */
.nr-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    /* Vertical sizing tuned to fit topbar + main nav + hero inside a
     * standard 1080p browser (~970px usable). Was 40-72 / 360-540 +
     * 280px status panel + up to 240px CLI reserve = could push past
     * 800px. New ceiling targets ~640-700px rendered hero. */
    padding: clamp(28px, 3.6vw, 52px) clamp(28px, 5vw, 64px);
    min-height: clamp(300px, 42vh, 440px);
}
.nr-hero.is-center .nr-hero__inner   { grid-template-columns: 1fr; }
.nr-hero.is-center .nr-hero__content { text-align: center; max-width: 720px; margin: 0 auto; }
.nr-hero.is-center .nr-hero__ctas    { justify-content: center; }
.nr-hero.is-center .nr-hero__media   { display: none; }

/* When no image, content takes full width */
.nr-hero__inner:not(:has(.nr-hero__media)) { grid-template-columns: 1fr; }

/* Mid-width: text+image both shown, but tighter horizontal padding +
   smaller image so they don't overlap the menu/eyebrow. */
@media (max-width: 1100px) {
    .nr-hero__inner { gap: 24px; padding: 48px 28px; }
    .nr-hero__headline { font-size: clamp(28px, 4vw, 44px); }
    .nr-hero__media img { max-height: 360px; object-fit: contain; }
}
@media (max-width: 880px) {
    .nr-hero__inner   { grid-template-columns: 1fr; padding: 40px 24px; }
    .nr-hero__media   { order: -1; }
    .nr-hero__media img { max-height: 220px; object-fit: contain; }
    .nr-hero__headline { font-size: clamp(26px, 6vw, 36px); }
}
@media (max-width: 540px) {
    .nr-hero__inner   { padding: 32px 18px; }
    .nr-hero__media img { max-height: 160px; }
}

.nr-hero__content { max-width: 620px; }

/* ── Eyebrow ───────────────────────────────────────────────────────── */
.nr-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 6px 12px 6px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--h-ink-soft);
    background: var(--h-line);
    border: 1px solid var(--h-line);
    border-radius: var(--h-radius-sm);
    backdrop-filter: blur(4px);
}
/* Eyebrow dot culled — chip alone reads cleaner now that we have CLI + status
 * panel + badge already carrying live-signal weight. Kept in markup for rollback. */
.nr-hero__eyebrow-dot { display: none; }
.nr-hero__eyebrow { gap: 0; padding-left: 12px; }

/* ── Headline + sub ────────────────────────────────────────────────── */
.nr-hero__headline {
    font-size: clamp(36px, 5.5vw, 64px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.05;
    margin: 0 0 18px;
    color: var(--h-ink);
}
.nr-hero__sub {
    font-size: clamp(15px, 1.4vw, 19px);
    line-height: 1.55;
    color: var(--h-ink-soft);
    margin: 0 0 28px;
    max-width: 580px;
}

/* ── CTAs ──────────────────────────────────────────────────────────── */
.nr-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.nr-hero .nr-btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--h-ink);
    border-color: rgba(255, 255, 255, 0.18);
}
.nr-hero .nr-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.30);
    color: var(--h-ink);
}
.nr-hero.is-light .nr-btn--ghost {
    background: transparent;
    color: var(--h-ink);
    border-color: rgba(15, 28, 46, 0.18);
}

/* ── Trust badge ───────────────────────────────────────────────────── */
.nr-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 24px 0 0;
    font-size: 13px;
    color: var(--h-ink-soft);
}
.nr-hero__badge-dot {
    width: 8px; height: 8px;
    background: var(--primary, #14bb60);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(20, 187, 96, 0.20);
    animation: nr-hero-pulse 2s ease-in-out infinite;
}
@keyframes nr-hero-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(20, 187, 96, 0.20); }
    50%      { box-shadow: 0 0 0 9px rgba(20, 187, 96, 0.04); }
}

/* ── Media (image) ─────────────────────────────────────────────────── */
.nr-hero__media {
    display: flex;
    align-items: center;
    justify-content: center;
}
.nr-hero__media img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--h-radius);
    /* If the existing brand image has its own background, respect it.
       The hero gradient sits behind, so transparent PNGs blend in. */
}

/* ── Reduced motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .nr-hero__badge-dot { animation: none !important; }
}

/* ── Floating live-status panel ──────────────────────────────────── */
/* Sits over the hero image (bottom-right). Mono-typed numbers, soft
   backdrop-blur, brand-green pulsing dot. Infrastructure aesthetic. */
.nr-hero__media { position: relative; }
.nr-hero__status {
    position: absolute;
    right: 8px;
    bottom: 16px;
    width: min(280px, 78%);
    background: rgba(15, 28, 46, 0.78);
    backdrop-filter: blur(12px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--h-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.5;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.40);
    z-index: 2;
}
.nr-hero__status-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--masterfont, "sofia-pro", system-ui, sans-serif);
}
.nr-hero__status-bar strong {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--h-ink-soft);
}
.nr-hero__status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary, #14bb60);
    box-shadow: 0 0 0 4px rgba(20, 187, 96, 0.18);
    animation: nr-hero-pulse 2s ease-in-out infinite;
}
.nr-hero__status-tag {
    font-size: 11px;
    color: var(--primary, #14bb60);
    font-weight: 600;
    margin-left: auto;
}
.nr-hero__status-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.nr-hero__status-list li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: var(--h-ink-soft);
}
.nr-hero__status-list strong {
    color: var(--h-ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: color 280ms ease-out;
}
.nr-hero__status-list strong.is-tick { color: var(--primary, #14bb60); }

/* Sparkline footer — subtle network-trace flourish */
.nr-hero__status-spark {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--primary, #14bb60);
    opacity: 0.85;
}
.nr-hero__status-spark svg { display: block; }
.nr-hero__status-spark polyline {
    stroke-dasharray: 280;
    stroke-dashoffset: 280;
    animation: nr-hero-sparkdraw 2.4s ease-out 0.2s forwards;
}
@keyframes nr-hero-sparkdraw {
    to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .nr-hero__status-spark polyline { animation: none; stroke-dashoffset: 0; }
}

/* Solo status: no image, panel becomes the right-column centerpiece */
.nr-hero__media--solo {
    align-items: center;
    justify-content: center;
    min-height: 220px;
}
.nr-hero__status--solo {
    position: static;
    width: min(360px, 100%);
    padding: 14px 16px;
    font-size: 12px;
}
.nr-hero__status--solo .nr-hero__status-list li { padding: 4px 0; }

@media (max-width: 880px) {
    .nr-hero__status {
        position: static;
        width: auto;
        margin-top: 14px;
    }
}

/* ── CLI snippet (bottom-left ambient motif) ─────────────────────── */
/* Sits at the bottom of the hero inner. Reserve bottom padding generous
 * enough to clear the FULLY-TYPED CLI height, so it never punches up
 * into the trust badge once the typing animation finishes. */
.nr-hero__inner:has(.nr-hero__cli) { padding-bottom: clamp(150px, 12vw, 190px); }
.nr-hero__cli {
    position: absolute;
    left: clamp(20px, 4vw, 64px);
    bottom: clamp(16px, 2vw, 24px);
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 10px 14px;
    pointer-events: none;
    z-index: 1;
    max-width: clamp(280px, 36vw, 420px);
    /* Cap height so an over-long CLI block never reaches the badge above */
    max-height: clamp(160px, 16vw, 210px);
    overflow: hidden;
    white-space: pre;
    backdrop-filter: blur(4px);
}
@media (max-width: 880px) {
    .nr-hero__cli { display: none; }
    .nr-hero__inner:has(.nr-hero__cli) { padding-bottom: 40px; }
}

/* Animated typing CLI: blinking cursor at the end of typed-in content */
.nr-hero__cli--anim::after {
    content: "▌";
    color: var(--primary, #14bb60);
    animation: nr-hero-blink 1.05s steps(1) infinite;
    margin-left: 2px;
}
.nr-hero__cli--anim.is-done::after { display: none; }
@keyframes nr-hero-blink {
    0%, 50%   { opacity: 1; }
    51%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .nr-hero__cli--anim::after { animation: none; opacity: 0.5; }
}
