/* Nexora: restrained type, functional accents and editorial proportions. */
.nx-film-label { top: 1rem; bottom: auto; height: auto; width: fit-content; }
.nx-quote-banner { background-image: url('./assets/optimized/luna-real.jpg'); background-position: center 67%; }
.nx-equipment-photo { display: flex; flex-direction: column; justify-content: center; background: #090c11; }
.nx-equipment-photo img { width: 100%; height: auto; max-height: 570px; object-fit: contain; padding: 1.5rem; }
.nx-project-feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4vw; align-items: center; }
.nx-p1s-frame { position: relative; background: #05070a; overflow: hidden; border-radius: 4px; }
.nx-p1s-frame video { display: block; width: 100%; aspect-ratio: 16/10; object-fit: contain; }
.nx-p1s-frame .nx-video-toggle { bottom: 1rem; right: 1rem; }
.nx-review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5vw; }
.nx-review-grid form { display: grid; gap: 1.2rem; }
.nx-review-empty { border-top: 1px solid var(--line); padding: 2rem 0; }
.nx-review-empty > span { font: 6rem/1 Georgia, serif; color: var(--blue); }
.nx-review-empty h3 { font-size: 1.8rem; }
.nx-channel-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.nx-channel { display: grid; gap: .7rem; border: 1px solid var(--line); padding: 1.5rem; text-decoration: none; overflow-wrap: anywhere; }
.nx-channel:hover { border-color: var(--blue); }
.nx-channel span { font-size: .7rem; letter-spacing: .1em; color: var(--muted); }
.nx-channel strong { font-size: 1.05rem; }
.nx-channel small { color: var(--muted); }
@media (max-width: 760px) {
  .nx-project-feature, .nx-review-grid, .nx-channel-grid { grid-template-columns: 1fr; }
  .nx-quote-banner { background-position: 40% 65%; }
}

/* Mantiene el fondo de fabricación fijo mientras se recorren sus historias. */
.nx-engineering-layout { min-height: calc(var(--stage-height) * 3); }
.nx-engineering-visual { position: sticky; top: 96px; align-self: flex-start; }

@media (max-width: 760px) {
  .nx-engineering-layout { min-height: calc(var(--stage-height) * 3); }
  .nx-engineering-visual { position: sticky; top: 82px; height: var(--stage-height); }
}

/* El movimiento reducido desactiva el zoom, no la lectura visual de la sección. */
@media (prefers-reduced-motion: reduce) {
  .nx-engineering-visual { position: sticky; top: 96px; height: var(--stage-height); }
  .nx-engineering-content { margin-top: calc(-1 * var(--stage-height)); }
  .nx-engineering-visual video { transform: none; }
}

/* Fallback visual: evita que un cuadro oscuro del MP4 deje la sección vacía. */
.nx-engineering-visual {
  background: #05070a url('./assets/optimized/hotend-poster.jpg') center / cover no-repeat;
}
.nx-engineering-visual video {
  background: transparent;
  opacity: .86;
}

/* La animación global con transform anulaba position: sticky en esta historia. */
.page { animation: nx-page-fade .45s ease both; }
@keyframes nx-page-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Fondo fijo real durante toda la historia; solo el contenido editorial avanza. */
.nx-engineering-layout.is-story-fixed { padding-top: var(--stage-height); }
.nx-engineering-layout.is-story-fixed .nx-engineering-visual {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100dvh;
  z-index: 0;
}
.nx-engineering-layout.is-story-fixed .nx-engineering-content { margin-top: calc(-1 * var(--stage-height)); }
@media (max-width: 760px) {
  .nx-engineering-layout.is-story-fixed { padding-top: var(--stage-height); }
  .nx-engineering-layout.is-story-fixed .nx-engineering-visual { top: 0; height: 100dvh; }
}
.nx-engineering { background: #05070a; color: #f4f6fa; }
.nx-engineering-layout { --stage-height: calc(100svh - 96px); position: relative; isolation: isolate; }
.nx-engineering-visual { position: sticky; top: 96px; height: var(--stage-height); margin: 0; overflow: hidden; background: #05070a; z-index: 0; }
.nx-engineering-visual video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 35% center; transform: scale(calc(1 + var(--story-progress, 0) * .035)); }
.nx-engineering-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5,7,10,.06) 15%, rgba(5,7,10,.35) 42%, rgba(5,7,10,.87) 72%, #05070a 100%), linear-gradient(0deg, rgba(5,7,10,.9), transparent 25%, transparent 80%, rgba(5,7,10,.55)); }
.nx-engineering-signature { position: absolute; top: 2rem; left: 4vw; font-size: .9rem; font-weight: 600; letter-spacing: .16em; }
.nx-engineering-signature span { display: block; margin-top: .35rem; font: .58rem/1.5 Arial, sans-serif; letter-spacing: .12em; color: #a8b5c7; }
.nx-engineering-visual figcaption { position: absolute; bottom: 1.7rem; left: 4vw; max-width: 45%; margin: 0; font: .65rem/1.6 Arial, sans-serif; color: #b9c4d5; }
.nx-engineering-visual .nx-video-toggle { right: 4vw; bottom: 1.7rem; z-index: 4; background: rgba(7,15,30,.85); }
.nx-engineering-content { position: relative; z-index: 1; margin-top: calc(-1 * var(--stage-height)); pointer-events: none; }
.nx-story-attribution { display: none; }
.nx-story-panel { min-height: var(--stage-height); display: flex; align-items: center; padding: 6rem 5vw 7rem 54%; box-sizing: border-box; }
.nx-story-panel > div { width: 100%; max-width: 570px; }
.nx-story-panel a { pointer-events: auto; }
.nx-engineering-heading h2, .nx-engineering-steps h3 { color: #fff; font-weight: 500; font-size: clamp(2rem, 3.7vw, 4.4rem); line-height: 1.1; letter-spacing: -.035em; margin: 1.4rem 0; }
.nx-engineering-heading p, .nx-engineering-steps p { color: #d1d9e4; font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.7; max-width: 460px; }
.nx-engineering .eyebrow, .nx-story-number { color: #78d9fb; font: 500 .72rem/1.5 Arial, sans-serif; letter-spacing: .1em; }
.nx-engineering .nx-story-detail { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #64748b66; font-size: .75rem; color: #aebdd0; }
.nx-story-scroll { display: block; margin-top: 2.8rem; color: #b9c4d5; font: .6rem/1.5 Arial, sans-serif; letter-spacing: .13em; }
.nx-story-scroll span { margin-left: .8rem; font-size: 1rem; }
.nx-engineering-steps .button { margin-top: 1.6rem; }
.nx-film-frame .nx-video-toggle { bottom: 1rem; right: 1rem; z-index: 4; }
.nx-engineering-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: #293343; }
.nx-engineering-progress span { display: block; height: 100%; background: #00aeef; transform-origin: left; transform: scaleX(var(--story-progress, 0)); }
@media (max-width: 760px) {
  .nx-story-panel { min-height: max(650px, var(--stage-height)); padding: 8rem 7vw 7rem; align-items: center; }
  .nx-engineering-visual video { object-position: 40% center; }
  .nx-engineering-shade { background: linear-gradient(0deg, rgba(5,7,10,.92), rgba(5,7,10,.7) 35%, rgba(5,7,10,.66) 75%, rgba(5,7,10,.45)); }
  .nx-engineering-heading h2, .nx-engineering-steps h3 { font-size: clamp(2rem, 8.3vw, 3.5rem); }
  .nx-engineering-visual figcaption { display: none; }
  .nx-story-attribution { display: block; margin: 0; padding: 1rem 7vw 5rem; font-size: .65rem; color: #b9c4d5; }
  .nx-engineering-visual .nx-video-toggle { font-size: .7rem; padding: .55rem .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .nx-engineering-visual { position: relative; top: auto; height: min(65svh, 650px); }
  .nx-engineering-visual video { transform: none; }
  .nx-engineering-content { margin-top: 0; }
  .nx-story-panel { min-height: 0; padding: 3rem 7vw; }
  .nx-story-panel > div { max-width: 760px; margin: auto; }
  .nx-engineering-progress { display: none; }
}
:root { --radius: 6px; font-family: Arial, "Segoe UI", sans-serif; }
body { line-height: 1.65; }
h1, h2, h3 { font-family: "Segoe UI", Arial, sans-serif; font-weight: 600; letter-spacing: -.025em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 3.3vw, 3rem); }
h3 { font-weight: 600; }
.eyebrow { font: 600 .73rem/1.4 Arial, sans-serif; letter-spacing: .08em; }
.site-header { height: 96px; box-shadow: none; background: #fff; }
.brand { width: 190px; height: 86px; }
.brand img { width: 190px; height: 82px; border-radius: 0; }
.brand picture { display: block; }
.primary-nav a { font-weight: 500; font-size: .9rem; padding-block: .6rem; }
.primary-nav a[aria-current="page"] { color: inherit; box-shadow: inset 0 -2px var(--blue); }
.cart-button, .menu-button { border-radius: 5px; font-weight: 600; }
.button { border-radius: 4px; font-weight: 600; padding: .85rem 1.2rem; box-shadow: none; transition: background .2s, border-color .2s; }
.button:hover { transform: none; }
.button-primary { background: #006e97; color: white; box-shadow: none; }
.button-primary:hover { background: #005777; }
.button-dark { background: #17191f; }
.nx-text-link { font-weight: 600; border-color: var(--line); }
.nx-text-link:hover { border-color: var(--blue); }
.nx-hero, .nx-hero-content { min-height: min(760px, calc(100svh - 96px)); }
.nx-hero-content { padding: 5.5rem max(4vw, calc((100vw - 1180px) / 2)) 5rem; }
.nx-hero-content h1 { max-width: 810px; font-size: clamp(3rem, 5.8vw, 5.3rem); font-weight: 500; letter-spacing: -.045em; line-height: 1.08; }
.nx-hero-content h1 em { color: #fff; font-style: normal; font-weight: 350; }
.nx-hero-content p { max-width: 510px; font-size: 1.1rem; line-height: 1.7; color: #e0e7f4; }
.nx-hero-content .eyebrow { color: #81dcff; margin-bottom: 1.3rem; }
.nx-live-mark { font: .65rem/1.4 Arial, sans-serif; letter-spacing: .13em; }
.nx-live-mark::before { display: none; }
.nx-scroll-note { margin-top: 2.5rem; font-weight: 400; }
.nx-hero-caption { display: none; }
.nx-marquee { background: var(--white); border-bottom: 1px solid var(--line); color: var(--muted); white-space: normal; padding: 1.1rem 4vw; font: 400 .82rem/1.6 Arial, sans-serif; letter-spacing: 0; }
.nx-marquee div { width: min(1180px, 100%); margin: auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; animation: none; }
.nx-marquee a { text-decoration: none; }
.nx-marquee a:hover { text-decoration: underline; }
.nx-marquee span { margin: 0; color: var(--line); }
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.nx-section-head { margin-bottom: 2rem; }
.nx-section-head h2, .nx-intro h2, .nx-workshop-copy h2, .nx-film-copy h2 { font-size: clamp(2rem, 3.5vw, 3.3rem); font-weight: 500; line-height: 1.16; letter-spacing: -.035em; }
.nx-service-grid { display: block; border: 0; border-top: 1px solid var(--line); background: transparent; }
.nx-service-card { display: grid; grid-template-columns: 65px 1fr 44px; gap: 1.5rem; min-height: 0; padding: 1.7rem 0; background: transparent; border-bottom: 1px solid var(--line); align-items: start; }
.nx-service-card > div { display: grid; grid-template-columns: 1fr 1.25fr; gap: 2rem; align-items: center; }
.nx-service-card h3 { margin: 0; font-size: 1.55rem; line-height: 1.25; letter-spacing: -.02em; }
.nx-service-card h3 br { display: none; }
.nx-service-card p { max-width: 460px; margin: 0; font-size: .95rem; }
.nx-service-card > a { width: 40px; height: 40px; border-radius: 4px; color: var(--ink); background: transparent; border: 1px solid var(--line); align-self: center; }
.nx-service-card:hover { transform: none; box-shadow: none; background: transparent; color: var(--ink); }
.nx-service-card:hover h3 { color: var(--ink); }
.nx-service-card:hover p { color: var(--muted); }
.nx-process { background: #10223a; }
.nx-process-step h3 { font-size: 1.5rem; font-weight: 500; }
.nx-quote-banner { min-height: 450px; padding-block: 4rem; }
.nx-quote-content h2 { max-width: 820px; font-size: clamp(2.5rem, 4.6vw, 4.2rem); font-weight: 500; letter-spacing: -.035em; }
.nx-quote-content h2 em { color: white; }
.nx-quote-content .button { margin-top: 1.5rem; }
.nx-product-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.nx-product-tile img { aspect-ratio: 3/4; border-radius: 3px; object-fit: cover; }
.nx-product-tile:not(:first-child) { padding-top: 0; }
.nx-product-tile:hover img { transform: none; }
.nx-product-tile h3 { font-size: 1.2rem; line-height: 1.4; }
.nx-product-tile span { font: 500 .75rem/1.4 Arial, sans-serif; letter-spacing: .03em; }
.card, .wizard { box-shadow: none; }
.route-hero { background: #242831; padding-block: 3.5rem; }
.route-hero h1 { font-size: clamp(2.3rem, 4.8vw, 4rem); font-weight: 500; }
.route-hero p { font-size: 1rem; }
.nx-faq-list summary { font-weight: 600; }
.nx-material-buttons button { font-weight: 600; }
.nx-last-call h2 { font-weight: 500; }
@media (prefers-color-scheme: dark) {
  .site-header { background: #17191f; }
  /* Preserve the original white artwork; screen blends its black background
     into the header without redrawing the registered brand or adding a halo. */
  .brand picture { mix-blend-mode: screen; }
  .button-primary { background: #006e97; }
  .button-primary:hover { background: #005777; }
  .nx-service-card, .nx-service-card:hover { background: transparent; }
  .nx-service-card > a { background: transparent; color: var(--ink); }
}
@media (max-width: 980px) { .primary-nav { top: 96px; } }
@media (max-width: 760px) {
  .brand, .brand img { width: 125px; }
  .brand img { height: 75px; }
  .site-header { padding-inline: 4vw; gap: .65rem; }
  .nx-hero, .nx-hero-content, .nx-hero-media { min-height: 660px; }
  .nx-hero-content { padding: 5.5rem 5vw 5rem; }
  .nx-hero-content h1 { font-size: clamp(2.8rem, 10vw, 4.3rem); }
  .nx-marquee div { display: grid; grid-template-columns: 1fr 1fr; font-size: .75rem; }
  .nx-marquee span { display: none; }
  .nx-service-card { grid-template-columns: 26px 1fr 38px; gap: .8rem; }
  .nx-service-card > div { grid-template-columns: 1fr; gap: .5rem; }
  .nx-service-card h3 { font-size: 1.3rem; }
  .nx-product-strip { grid-template-columns: 1fr; }
  .nx-product-tile:not(:first-child) { padding-top: 0; }
  .nx-product-tile img { max-height: 420px; object-fit: cover; }
}

/* Graphite brand finish. Blue remains an accent; large surfaces stay neutral
   so the experience reads as a real industrial brand instead of a template. */
.auth-stage-shade {
  background: linear-gradient(90deg, rgba(12,14,18,.94), rgba(23,25,31,.72) 48%, rgba(23,25,31,.88)), linear-gradient(0deg, rgba(8,9,12,.44), transparent 45%);
}
.nx-hero::before {
  background: radial-gradient(circle at 72% 40%, rgba(0,174,239,.12), transparent 28%), linear-gradient(115deg, rgba(23,25,31,.98) 0%, rgba(23,25,31,.82) 40%, rgba(23,25,31,.3) 75%, rgba(23,25,31,.7) 100%);
}
.nx-hero-media::after { background: linear-gradient(90deg, rgba(23,25,31,.34), transparent 45%, rgba(23,25,31,.48)); }
.nx-film-label { background: rgba(23,25,31,.9); }
.nx-quote-overlay { background: linear-gradient(90deg, rgba(23,25,31,.96), rgba(23,25,31,.72) 55%, rgba(23,25,31,.25)); }
.nx-process-media, .nx-process { background: #17191f; }
.nx-process-video, .nx-software-card { background: #1f2228; }
.nx-software-card img { background: #17191f; }
.nx-channel:hover { border-color: var(--magenta); }
.nx-process-video::after { background: linear-gradient(0deg, rgba(23,25,31,.94), transparent 65%); }
.nx-engineering-shade { background: linear-gradient(90deg, rgba(5,7,10,.1) 15%, rgba(18,20,24,.42) 42%, rgba(18,20,24,.9) 72%, #05070a 100%), linear-gradient(0deg, rgba(5,7,10,.9), transparent 25%, transparent 80%, rgba(5,7,10,.55)); }

@media (prefers-color-scheme: dark) {
  :root {
    --white: #0f1115;
    --surface: #191c21;
    --ink: #f0f1f3;
    --muted: #adb1b8;
    --line: #353941;
    --shadow: 0 18px 48px rgba(0,0,0,.32);
  }
  body { background: #0f1115; }
  .site-header { background: rgba(23,25,31,.97); border-color: #353941; }
  .primary-nav { background: #1b1e24; }
  .card, .wizard, .metric, table, .cart-panel, .nx-service-card { background: #191c21; }
  .nx-film, .nx-products { background: #14161a; }
  .nx-channel { background: #15171b; }
  .nx-channel:hover { border-color: var(--magenta); }
  .brand picture { mix-blend-mode: normal; }
  .brand img { border-radius: 0; }
}

/* Mobile polish: preserve the editorial layout without letting the chrome
   consume the viewport or create sideways scrolling on narrow phones. */
html, body { overflow-x: hidden; }
@media (max-width: 650px) {
  .site-header {
    height: 82px;
    min-height: 82px;
    padding: 0 1rem;
    gap: .5rem;
  }
  .brand, .brand img { width: 112px; }
  .brand { height: 68px; }
  .brand img { height: 64px; object-fit: contain; }
  .menu-button { min-height: 42px; padding: .55rem .7rem; font-size: .88rem; }
  .cart-button { min-height: 42px; padding: .55rem .65rem; white-space: nowrap; }
  .cart-button::before { font-size: .82rem; }
  .cart-button span { min-width: 1.35rem; height: 1.35rem; margin-left: .2rem; }
  .primary-nav { top: 82px; padding: .75rem 1rem 1rem; }
  .primary-nav a { padding: .85rem .25rem; font-size: 1rem; }
  .shell { width: min(100% - 2rem, 1180px); }
  .section { padding-block: 3.5rem; }
  .section-tight { padding-block: 2rem; }
  .nx-hero, .nx-hero-media, .nx-hero-content { min-height: min(740px, calc(100svh - 82px)); }
  .nx-hero-content { padding: 6.2rem 1rem 4rem; }
  .nx-hero-content h1 { font-size: clamp(2.7rem, 14vw, 4.6rem); }
  .nx-hero-content p { font-size: 1rem; }
  .nx-live-mark { top: 1rem; right: 1rem; font-size: .58rem; }
  .nx-hero-bottom { right: 1rem; bottom: 1rem; }
  .nx-video-toggle { right: .8rem; bottom: .8rem; min-height: 40px; padding: .55rem .75rem; font-size: .78rem; }
  .nx-film-frame, .nx-film-video { min-height: 285px; }
  .nx-channel-grid { gap: .75rem; margin-block: 1.5rem; }
  .nx-channel { min-height: 142px; padding: 1rem; gap: .45rem; }
  .nx-channel strong { font-size: 1rem; }
  .nx-channel small { font-size: .9rem; }
  .nx-process-media-grid { gap: .75rem; }
  .nx-process-video, .nx-process-video video { min-height: 250px; }
  .nx-software-card img { min-height: 220px; max-height: 280px; }
  .nx-software-card > div { padding: 1.25rem; }
  .nx-p1s-frame video { min-height: 235px; object-fit: cover; }
  .nx-engineering-layout { --stage-height: min(72svh, 620px); }
  .nx-engineering-visual { top: 82px; }
  .nx-story-panel { min-height: max(600px, var(--stage-height)); padding: 6rem 1rem 5rem; }
  .nx-engineering-content { margin-top: calc(-1 * var(--stage-height)); }
  .nx-engineering-visual .nx-video-toggle { right: 1rem; bottom: 1rem; }
  .nx-project-feature { gap: 2rem; }
  .nx-last-call .shell { width: min(100% - 2rem, 1180px); }
  .button-row .button { width: 100%; }
  .site-footer { padding: 2.5rem 1rem; }
}

/* Scroll story stability: the fabrication video remains fixed behind the copy. */
.nx-engineering-layout { min-height: calc(var(--stage-height) * 3); }
.nx-engineering-visual { position: sticky; top: 96px; align-self: flex-start; }
@media (max-width: 760px) {
  .nx-engineering-layout { min-height: calc(var(--stage-height) * 3); }
  .nx-engineering-visual { position: sticky; top: 82px; height: var(--stage-height); }
}
@media (prefers-reduced-motion: reduce) {
  .nx-engineering-visual { position: sticky; top: 96px; height: var(--stage-height); }
  .nx-engineering-content { margin-top: calc(-1 * var(--stage-height)); }
  .nx-engineering-visual video { transform: none; }
}
