/* ============================================================
   NEXORA TECHNOLOGIES — Design System / Foundation
   Luxury electronics flagship — dark, cinematic, precise.
   ============================================================ */

:root {
  /* --- Color: matte black / deep navy / electric blue / titanium --- */
  --bg-0: #04060c;
  --bg-1: #070b14;
  --bg-2: #0b111f;
  --bg-3: #101830;

  --ink: #eef2fa;
  --ink-2: #a7b1c6;
  --ink-3: #66718a;

  --line: rgba(158, 180, 224, .12);
  --line-2: rgba(158, 180, 224, .22);

  --accent: #2e6bff;
  --accent-2: #5d8dff;
  --accent-deep: #1e49c8;
  --cyan: #3cc5ff;
  --titanium: #c9cfdd;

  --glass: rgba(9, 14, 27, .58);
  --glass-2: rgba(13, 19, 36, .72);

  --good: #34d3a2;
  --warn: #ffb454;
  --danger: #ff6473;

  --grad-accent: linear-gradient(120deg, #2e6bff, #3cc5ff);
  --grad-text: linear-gradient(105deg, #ffffff 20%, #9db8ff 60%, #3cc5ff 100%);

  /* --- Type --- */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  /* --- Geometry --- */
  --wrap: 1240px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;

  /* --- Motion: luxury easing --- */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.33, 1, .68, 1);
  --dur: .65s;

  --shadow-1: 0 10px 40px rgba(2, 6, 18, .55);
  --shadow-2: 0 24px 80px rgba(2, 6, 18, .65);
  --glow-accent: 0 0 0 1px rgba(70, 120, 255, .35), 0 8px 40px rgba(46, 107, 255, .35);

  --head-h: 74px;
}

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

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

::selection { background: rgba(46, 107, 255, .45); color: #fff; }

/* Scrollbar — titanium rail */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: #1c2740;
  border-radius: 99px;
  border: 2px solid var(--bg-0);
}
::-webkit-scrollbar-thumb:hover { background: #2a3a61; }

/* Focus — accessible, luxury blue ring */
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============ Ambient background system ============ */
.bg-stage {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(46, 107, 255, .14), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(30, 73, 200, .10), transparent 55%),
    radial-gradient(1000px 800px at 50% 120%, rgba(60, 197, 255, .07), transparent 60%),
    var(--bg-0);
}
.bg-stage::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("../Images/backgrounds/grid.webp");
  background-size: 900px;
  opacity: .05;
  mix-blend-mode: screen;
}
.bg-stage::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("../Images/backgrounds/noise.webp");
  background-size: 420px;
  opacity: .05;
  mix-blend-mode: overlay;
}

/* ============ Layout ============ */
.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}
.wrap-wide { width: min(1400px, calc(100% - 40px)); margin-inline: auto; }

section { position: relative; }
.sec { padding: clamp(72px, 9vw, 130px) 0; }
.sec-tight { padding: clamp(48px, 6vw, 84px) 0; }

/* Section headers */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-2);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px;
  background: var(--grad-accent); box-shadow: 0 0 12px var(--accent);
}

.sec-head { margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head.center { text-align: center; }
.sec-head.center .eyebrow::after {
  content: ""; width: 26px; height: 1px;
  background: var(--grad-accent); box-shadow: 0 0 12px var(--accent);
}
.sec-head.split {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.015em;
}
.h-xl { font-size: clamp(40px, 6.4vw, 78px); }
.h-lg { font-size: clamp(30px, 4.2vw, 52px); }
.h-md { font-size: clamp(24px, 3vw, 36px); }
.h-sm { font-size: clamp(19px, 2.2vw, 24px); }

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  color: var(--ink-2);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.7;
  max-width: 62ch;
}
.sec-head.center .lead { margin-inline: auto; }
.sec-head .h-lg + .lead, .sec-head .h-xl + .lead { margin-top: 18px; }
.sec-head .eyebrow { margin-bottom: 18px; }

.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }

/* ============ Reveal-on-scroll engine ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-44px); }
[data-reveal="right"] { transform: translateX(44px); }
[data-reveal="scale"] { transform: scale(.92); }
[data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ============ Keyframes ============ */
@keyframes nxFloat {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50%      { transform: translateY(-16px) rotate(var(--rot, 0deg)); }
}
@keyframes nxFloatSoft {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
@keyframes nxMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes nxShimmer {
  from { background-position: -600px 0; }
  to   { background-position: 600px 0; }
}
@keyframes nxPulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.06); }
}
@keyframes nxSpin {
  to { transform: rotate(360deg); }
}
@keyframes nxDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 900px 600px; }
}
@keyframes nxGradShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes nxRise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes nxWordIn {
  from { opacity: 0; transform: translateY(110%) rotate(4deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes nxBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes nxTickerGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(60,197,255,.0); }
  50%      { box-shadow: 0 0 24px 0 rgba(60,197,255,.35); }
}

/* Utility animation hooks */
.floaty { animation: nxFloatSoft 6s ease-in-out infinite; }

/* ============ Skeleton / shimmer ============ */
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(158, 180, 224, .07);
  border-radius: var(--r-md);
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(158,180,224,.09) 50%, transparent 70%);
  background-size: 600px 100%;
  animation: nxShimmer 1.4s linear infinite;
}

/* ============ Light section support (Apple ecosystem) ============ */
.sec-light {
  background: linear-gradient(180deg, #eef1f7 0%, #e2e8f4 100%);
  color: #0c1222;
}
.sec-light .eyebrow { color: var(--accent-deep); }
.sec-light .lead { color: #4c5670; }
.sec-light .muted { color: #4c5670; }
.sec-light .dim { color: #8590a8; }

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
