*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
  background-color: var(--nafos-bg-deep, #050505);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  background: transparent;
  color: var(--text-color, #ffffff);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
}

button, input, select, textarea, span, p, a, label, legend, summary, small {
  font-family: inherit;
}

/* Fixed wallpaper layer — sits behind all page content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--nafos-bg-deep, #050505);
  background-image: url("./assets/images/8k background-main store - desk.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  pointer-events: none;
}

@media (max-width: 767px) {
  body::before {
    background-image: url("./assets/images/8k background-main store - mobile.jpeg");
  }
}

main {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  background: transparent;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

/* ===== NFS POPUP — LEAD CAPTURE ===== */
.nfs-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.nfs-popup--visible {
  display: flex;
}

.nfs-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nfs-popup__card {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: 48px 40px;
  max-width: 460px;
  width: 92%;
  text-align: center;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: nfs-popup-fade-in 0.4s ease;
}

.nfs-popup__close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 28px;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.nfs-popup__close:hover {
  color: #fff;
}

.nfs-popup__logo {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px auto;
  display: block;
  opacity: 0.9;
}

.nfs-popup__eyebrow {
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  letter-spacing: 5px;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 24px 0;
}

.nfs-popup__title {
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin: 0 0 6px 0;
}

.nfs-popup__version {
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  letter-spacing: 3px;
  margin: 0 0 32px 0;
}

.nfs-popup__description {
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 32px 0;
}

.nfs-popup__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nfs-popup__input {
  width: 100%;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: all 0.3s;
}

.nfs-popup__input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.nfs-popup__submit {
  width: 100%;
  padding: 17px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s;
}

.nfs-popup__submit:hover {
  opacity: 0.85;
}

.nfs-popup__submit:active {
  transform: scale(0.97);
}

.nfs-popup__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.nfs-popup__dismiss {
  display: inline-block;
  margin-top: 22px;
  background: none;
  border: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.25);
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.5px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.3s;
}

.nfs-popup__dismiss:hover {
  color: rgba(255, 255, 255, 0.55);
}

.nfs-popup__success {
  display: none;
  margin-top: 24px;
  animation: nfs-popup-fade-in 0.4s ease;
}

.nfs-popup__success--visible {
  display: block;
}

.nfs-popup__success-title {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.nfs-popup__success-text {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  margin: 0;
}

@keyframes nfs-popup-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.nfs-loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ── Nafos Fit Black — CEO-targeted section headings only ── */
.nafos-hero__title,
.nfs-hero__title,
.nafos-hero__headline,
.nafos-lead__title,
.nafos-lead__headline,
.nafos-product__title,
.nfs-product-title,
.nafos-showcase__title,
.nafos-glass-features__main-title-text,
.nafos-glass-features__title,
.live-demo-card__title,
.nafos-product__demo-heading,
.fgm-heading,
.nafos-hiw__title,
.nafos-hiw__heading,
.nafos-video__title,
.nafos-nbtt__heading {
  font-family: var(--nfs-font-fit) !important;
}

/* ── Operation Headless: LIVE DEMO section UI polish ── */
.live-demo-card__title,
.nafos-product__demo-heading,
.fgm-heading {
  font-size: clamp(32px, 6vw, 64px) !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
  letter-spacing: -0.02em !important;
}

.live-demo-window__title,
.nfs-window-title,
.demo-header-text,
.nafos-grid-modal__heading {
  font-size: clamp(14px, 2vw, 20px) !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  white-space: nowrap !important;
}

/* ── Operation Headless: How It Works title scaling ── */
.nafos-hiw__title,
.nafos-hiw__heading {
  font-size: clamp(32px, 5vw, 64px) !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 24px !important;
}

/* ── Operation Headless: Back to Top (Final CTA) heading scaling ── */
.nafos-nbtt__heading,
.nfs-nbtt__heading,
.back-to-top__title {
  font-family: var(--nfs-font-fit) !important;
  font-size: clamp(32px, 5.5vw, 64px) !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 20px !important;
  text-align: center !important;
  color: #ffffff !important;
}

/* ── Operation Headless: Live Demos window title typography ── */
.nafos-showcase__title,
.nfs-showcase__title,
.live-demos__title,
.window-demo__heading,
.nafos-product__demo-heading,
.nafos-grid-modal__heading {
  font-family: var(--nfs-font-fit) !important;
  font-size: clamp(26px, 4.5vw, 48px) !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  letter-spacing: -0.01em !important;
  margin-bottom: 1px !important;
  color: #ffffff !important;
}

/* ── Operation Headless: Main hero title typography ── */
.nafos-hero__glass-panel h1,
.nafos-hero__title,
.nfs-hero__title,
.nafos-hero__headline {
  font-family: var(--nfs-font-fit) !important;
  font-size: clamp(34px, 6vw, 68px) !important;
  line-height: 1.05 !important;
  text-transform: uppercase !important;
  letter-spacing: -0.00em !important;
  margin-bottom: -23px !important;
  text-align: left !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  width: 100% !important;
  display: block !important;
}

@media (max-width: 768px) {
  .nafos-hero__glass-panel h1,
  .nafos-hero__title,
  .nfs-hero__title,
  .nafos-hero__headline {
    font-size: 36px !important;
    line-height: 1.1 !important;
    text-align: center !important;
  }

  .nafos-hero__glass-panel {
    padding: 32px 24px !important;
  }
}

/* ── Operation Headless: Homepage carousel typography ── */
.nafos-carousel__title,
.nfs-carousel__title,
.carousel__heading {
  font-family: var(--nfs-font-fit) !important;
  font-size: clamp(34px, 5vw, 64px) !important;
  line-height: 0.7 !important;
  text-transform: uppercase !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 16px !important;
  text-align: center !important;
}

.nafos-carousel-card__title,
.nfs-carousel-card__title,
.nafos-carousel__card-title,
.carousel-item__title {
  font-family: var(--nfs-font-fit) !important;
  font-size: clamp(24px, 2.8vw, 49px) !important;
  line-height: 0.9 !important;
  text-transform: uppercase !important;
  letter-spacing: -0.01em !important;
  margin-bottom: -5px !important;
  color: #ffffff !important;
}

@media (max-width: 768px) {
  .nafos-carousel-card__title,
  .nfs-carousel-card__title,
  .nafos-carousel__card-title,
  .carousel-item__title {
    font-size: 39px !important;
    line-height: 1.1 !important;
    margin-bottom: -5px !important;
  }
}

/* ==========================================================================
   NAFOS LEAD CAPTURE: DESKTOP EDIT PANEL (min-width: 769px)
   ========================================================================== */
@media (min-width: 769px) {
  .nafos-lead__title,
  .nafos-lead__headline,
  .nfs-lead-capture__title {
    font-family: var(--nfs-font-fit) !important;
    font-size: 54px !important;
    line-height: 1.1 !important;
    text-transform: uppercase !important;
    letter-spacing: -0.02em !important;
    margin-bottom: -25px !important;
    text-align: left !important;
  }

  .nafos-lead__form-heading,
  .nafos-lead__form-title,
  .nfs-lead-capture__form-title,
  .unlock-access__title {
    font-family: var(--nfs-font-fit) !important;
    font-size: 39px !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    letter-spacing: -0.01em !important;
    margin-bottom: -10px !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
}

/* ==========================================================================
   NAFOS LEAD CAPTURE: MOBILE EDIT PANEL (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .nafos-lead__title,
  .nafos-lead__headline,
  .nfs-lead-capture__title {
    font-family: var(--nfs-font-fit) !important;
    font-size: 36px !important;
    line-height: 1.15 !important;
    margin-bottom: -20px !important;
    text-align: CENTER !important;
  }

  .nafos-lead__form-heading,
  .nafos-lead__form-title,
  .nfs-lead-capture__form-title,
  .unlock-access__title {
    font-family: var(--nfs-font-fit) !important;
    font-size: 36px !important;
    line-height: 1.2 !important;
    margin-bottom: -5px !important;
    text-align: center !important;
    white-space: normal !important;
  }
}
