/* =====================================================================
   NexMacro global theme
   Paste into: Elementor > Custom Code (location: <head>) inside <style>,
   or Appearance > Customize > Additional CSS.
   Every section widget is wrapped in .nx-w and carries its own scoped CSS;
   this file sets the shared base, tokens and the reset that protects the
   widgets from theme / Elementor kit styles.
   ===================================================================== */

:root {
  --nx-bg: #0C0C0C;
  --nx-bg-2: #0F0F0E;
  --nx-bg-3: #151514;
  --nx-line: #1E1D1C;
  --nx-line-2: #2A2927;
  --nx-ink: #F2F0EB;
  --nx-ink-2: #D8D5CF;
  --nx-mute: #A9A59E;
  --nx-mute-2: #8F8B84;
  --nx-mute-3: #6F6B66;
  --nx-paper: #F4F2ED;
  --nx-paper-ink: #141413;
  --nx-amber: #FFB347;
  --nx-amber-deep: #D6781E;
  --nx-green: #4FBE78;
  --nx-red: #E4493D;
  --nx-violet: #5544C0;
  --nx-sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nx-serif: 'Instrument Serif', Georgia, serif;
  --nx-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { scroll-behavior: smooth; }
body {
  background: var(--nx-bg);
  color: var(--nx-ink);
  font-family: var(--nx-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(255, 179, 71, .32); color: #FFFFFF; }

/* Hide the theme's page title on pages built from NexMacro widgets */
body:has(.nx-w) .page-header,
body:has(.nx-w) .entry-title { display: none; }

/* Elementor wrappers around NexMacro widgets: no gaps, no padding, full width */
.elementor-widget:has(.nx-w) { margin: 0 !important; width: 100% !important; max-width: 100% !important; --widgets-spacing: 0px; }
.elementor-widget:has(.nx-w) > .elementor-widget-container { margin: 0 !important; padding: 0 !important; }
.e-con:has(> .elementor-widget .nx-w),
.e-con:has(> .e-con-inner > .elementor-widget .nx-w) {
  --padding-top: 0px; --padding-bottom: 0px; --padding-left: 0px; --padding-right: 0px;
  --gap: 0px; --row-gap: 0px; --column-gap: 0px; --widgets-spacing: 0px; --content-width: 100%;
  padding: 0 !important; gap: 0 !important;
}
.e-con:has(> .elementor-widget .nx-w) > .e-con-inner,
.e-con:has(> .e-con-inner > .elementor-widget .nx-w) > .e-con-inner { padding: 0 !important; gap: 0 !important; max-width: 100% !important; }
.elementor-section:has(.nx-w) > .elementor-container { max-width: 100% !important; }
.elementor-section:has(.nx-w) .elementor-column > .elementor-widget-wrap { padding: 0 !important; }
/* No borders, outlines or shadows from the theme or Elementor kit on the boxes around NexMacro sections
   (left alone inside the Elementor editor, so its own editing outlines still show) */
body:not(.elementor-editor-active) :is(.elementor-widget, .e-con, .elementor-section, .elementor-column):has(.nx-w),
body:not(.elementor-editor-active) .elementor-widget:has(.nx-w) > .elementor-widget-container,
body:not(.elementor-editor-active) .e-con:has(.nx-w) > .e-con-inner,
body:not(.elementor-editor-active) .elementor-column:has(.nx-w) > .elementor-widget-wrap,
html body .nx-w { border: 0 !important; outline: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
html body .nx-w::before,
html body .nx-w::after { content: none; }

/* ---------------------------------------------------------------------
   Widget sandbox
   Rolls everything inside a widget back to browser defaults, so theme,
   Hello reset and Elementor kit styles (button colours, link colours,
   heading sizes, image max-width...) can't leak in. Each widget's own
   scoped CSS and inline styles then apply on top, exactly as designed.
   SVG is left alone so its drawing attributes keep working.
   --------------------------------------------------------------------- */
html body .nx-w {
  display: block;
  position: relative;
  margin: 0; padding: 0;
  font-family: var(--nx-sans);
  font-size: 16px; font-weight: 400; font-style: normal;
  line-height: normal; letter-spacing: normal; word-spacing: normal;
  text-transform: none; text-align: left; text-decoration: none;
  color: var(--nx-ink);
  -webkit-font-smoothing: antialiased;
}
html body .nx-w *:not(svg, svg *, img, video, canvas, iframe, .nx-express, .nx-express *),
html body .nx-w *:not(svg, svg *, img, video, canvas, iframe, .nx-express, .nx-express *):hover,
html body .nx-w *:not(svg, svg *, img, video, canvas, iframe, .nx-express, .nx-express *):focus,
html body .nx-w *:not(svg, svg *, img, video, canvas, iframe, .nx-express, .nx-express *):active,
html body .nx-w *:not(svg, svg *, img, video, canvas, iframe, .nx-express, .nx-express *):visited,
html body .nx-w *:not(svg, svg *, img, video, canvas, iframe, .nx-express, .nx-express *):focus-visible {
  all: revert;
}
/* Images keep their width/height attributes; only undo what themes add */
html body .nx-w :is(img, video, canvas, iframe) {
  max-width: none; border: 0; border-radius: 0; box-shadow: none; margin: 0; padding: 0; opacity: 1; filter: none; transition: none;
}
html body .nx-w svg { overflow: visible; }
html body .nx-w template,
html body .nx-w script,
html body .nx-w style { display: none !important; }

/* Shield sections from theme decorations: theme ::before/::after ornaments, click-focus boxes and
   generic tab styling (each section's own pseudo-elements and keyboard focus rings still apply) */
html body .nx-w *:not(.nx-express *)::before,
html body .nx-w *:not(.nx-express *)::after { content: none; }
html body .nx-w *:not(:focus-visible):not([style*="outline"]):not(.nx-express *) { outline: 0 !important; }
html body .nx-w [role="tab"],
html body .nx-w [role="tabpanel"] { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background-image: none !important; }
html body .nx-w [role="tab"] { background-color: transparent !important; }
html body .nx-w [role="tablist"] { border-top: 0 !important; border-left: 0 !important; border-right: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; }

/* Express checkout (Stripe Apple Pay / Google Pay, PayPal): buttons drawn by the payment plugins */
html body .nx-w .nx-express { display: flex; flex-direction: column; gap: 10px; }
html body .nx-w .nx-express:empty { display: none; }
html body .nx-w .nx-express iframe { max-width: 100%; }
/* WooCommerce's own add-to-cart form stays on the page for the payment plugins, but out of sight:
   the buy box above already picks the finish and quantity */
html body .nx-w .nx-xform form.cart { margin: 0 !important; padding: 0 !important; }
html body .nx-w .nx-xform :is(table.variations, .single_variation, .woocommerce-variation, .quantity, .single_add_to_cart_button, .reset_variations, .stock, .price) {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important;
}
html body .nx-w .nx-xform .woocommerce-variation-add-to-cart { display: block !important; }
/* Checkout: express buttons sit at the top of the details column */
body.woocommerce-checkout .nx-co-express { display: flex; flex-direction: column; gap: 10px; margin: 0 0 24px; }
body.woocommerce-checkout .nx-co-express:empty { display: none; }

/* Shared focus ring for keyboard users */
html body .nx-w.nx-w :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--nx-amber); outline-offset: 3px; }

/* Home intro: the header strip stays black as part of the opening shot (no grey bar),
   clears as the letterbox opens, then the header fades in when the intro ends */
@keyframes nx-hdr-in { from { opacity: 0; visibility: hidden; } to { opacity: 1; visibility: visible; } }
@keyframes nx-hdr-cover { from { opacity: 1; visibility: visible; } to { opacity: 0; visibility: hidden; } }
html:has(#nx-home-hero) .nx-hdr > .nx-bar { animation: nx-hdr-in .9s ease 4.6s both; }
html:has(#nx-home-hero) .nx-hdr::after { content: ""; position: absolute; inset: 0; z-index: 5; background: #000000; pointer-events: none; animation: nx-hdr-cover 1.1s cubic-bezier(.7, 0, .2, 1) 3.5s both; }
html.nx-skip-intro:has(#nx-home-hero) .nx-hdr > .nx-bar { animation: none; }
html.nx-skip-intro:has(#nx-home-hero) .nx-hdr::after { animation: none; display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html:has(#nx-home-hero) .nx-hdr > .nx-bar { animation: none; }
  html:has(#nx-home-hero) .nx-hdr::after { animation: none; display: none; }
}
