/* NEXORA — base: tokens, type, layout primitives, nav, buttons, intro */

:root {
  /* Ground — onyx with a faint cool bias toward platinum */
  --bg: #08080a;
  --bg-2: #0d0d11;
  --surface: #131318;
  --surface-2: #1a1a21;
  --glass: rgba(20, 20, 26, 0.55);
  --line: rgba(216, 220, 226, 0.09);
  --line-2: rgba(216, 220, 226, 0.18);

  /* Text */
  --text: #edebe5;
  --text-2: #b4b5bb;
  --text-3: #80828b;
  --on-accent: #04152b;

  /* Accent — electric blue with platinum/chrome */
  --accent: #4a9eff;
  --accent-hi: #a8d1ff;
  --accent-lo: #1e5fa8;
  --plat: #d8dce2;
  --silver: #9ea4ae;
  --metal: linear-gradient(115deg, #1e5fa8 0%, #a8d1ff 24%, #4a9eff 42%, #e9ecf0 64%, #9ea4ae 82%, #d8dce2 100%);
  --metal-soft: linear-gradient(135deg, rgba(168, 209, 255, 0.55), rgba(74, 158, 255, 0.18) 40%, rgba(216, 220, 226, 0.35) 75%, rgba(158, 164, 174, 0.12));
  --glow: 0 0 0 1px rgba(74, 158, 255, 0.25), 0 18px 60px -20px rgba(74, 158, 255, 0.35);

  /* Type */
  --f-display: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --f-wide: "Michroma", "Eurostile", "Segoe UI", system-ui, sans-serif;
  --f-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, "Courier New", monospace;

  --t-xs: 0.75rem;
  --t-s: 0.875rem;
  --t-m: 1rem;
  --t-l: 1.125rem;
  --t-xl: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  --t-2xl: clamp(2.25rem, 1.4rem + 3.4vw, 4.5rem);

  /* Shape + space */
  --r-s: 6px;
  --r-m: 16px;
  --r-l: 28px;
  --r-pill: 999px;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
  --slide-pad: clamp(88px, 12vw, 168px);
  --nav-h: 72px;

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--t-m);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.is-locked { overflow: hidden; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: rgba(74, 158, 255, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  border-radius: var(--r-pill);
  transition: top 0.2s var(--ease);
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

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

/* ---------- Layout primitives ---------- */

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.slide {
  position: relative;
  padding-block: var(--slide-pad);
  isolation: isolate;
}
.slide + .slide { border-top: 1px solid var(--line); }

.slide__head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 84px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-wide);
  font-size: 0.6875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.eyebrow__idx { color: var(--text-3); }
.eyebrow::after {
  content: "";
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--t-2xl);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
  font-optical-sizing: auto;
}
.title em,
.metal-text {
  font-style: italic;
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  color: var(--text-2);
  font-size: var(--t-l);
  max-width: 46ch;
  text-wrap: pretty;
}

.wide {
  font-family: var(--f-wide);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-size: var(--t-xs);
  color: var(--text-2);
  line-height: 1.3;
  white-space: nowrap;
}
.chip--accent { border-color: rgba(74, 158, 255, 0.45); color: var(--accent-hi); }
.chip--sample {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  border-style: dashed;
  color: var(--silver);
}

.note {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--text-3);
}
.note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--silver); }

/* Metallic hairline border on any element: add .metal-border */
.metal-border {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card-bg, var(--surface)), var(--card-bg, var(--surface))) padding-box,
    var(--metal-soft) border-box;
}

/* ---------- Buttons ---------- */

.btn {
  --h: 54px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: var(--h);
  padding: 0 28px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), color 0.25s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(0.98); }

.btn--accent {
  color: var(--on-accent);
  background: var(--metal);
  background-size: 180% 100%;
  box-shadow: 0 10px 40px -12px rgba(74, 158, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn--accent::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.65) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease);
}
.btn--accent:hover::after { transform: translateX(120%); }
.btn--accent:hover { box-shadow: 0 16px 50px -12px rgba(74, 158, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.5); }

.btn--ghost {
  --card-bg: rgba(10, 10, 13, 0.6);
  color: var(--text);
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    var(--metal-soft) border-box;
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { --card-bg: rgba(14, 22, 38, 0.85); color: var(--accent-hi); }

.btn--sm { --h: 42px; padding: 0 20px; font-size: 0.875rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-hi);
  font-weight: 600;
  font-size: 0.9375rem;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  color: var(--text);
  background: rgba(14, 14, 18, 0.6);
  transition: border-color 0.3s, color 0.3s, transform 0.3s var(--ease);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent-hi); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }

/* ---------- Brand mark ---------- */

.mark { width: 30px; height: 30px; flex: none; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-wide);
  font-size: 0.875rem;
  letter-spacing: 0.34em;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background 0.4s, border-color 0.4s, transform 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--nav-h);
}
.nav__links { display: flex; gap: clamp(18px, 2.2vw, 34px); }
.nav__links a {
  position: relative;
  font-size: 0.875rem;
  color: var(--text-2);
  transition: color 0.25s;
  padding-block: 6px;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--metal);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav__links a:hover,
.nav__links a[aria-current="true"] { color: var(--text); }
.nav__links a:hover::after,
.nav__links a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }

.nav__actions { display: flex; align-items: center; gap: 12px; }
.nav__toggle {
  display: none;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  place-items: center;
}
.nav__toggle span {
  display: block; width: 18px; height: 1.5px; background: var(--text);
  box-shadow: 0 -6px 0 var(--text), 0 6px 0 var(--text);
  transition: box-shadow 0.3s, transform 0.3s;
}
.nav__toggle[aria-expanded="true"] span { box-shadow: none; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after {
  content: ""; display: block; width: 18px; height: 1.5px; background: var(--text); transform: rotate(-90deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(6, 6, 8, 0.96);
  backdrop-filter: blur(20px);
  padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 24px) var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.menu a {
  font-family: var(--f-display);
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: 1.2;
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
}
.menu .btn { margin-top: 24px; align-self: flex-start; }

/* Slide rail (desktop) */
.rail {
  position: fixed;
  right: clamp(14px, 1.6vw, 28px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}
.rail__count {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  color: var(--text-3);
  writing-mode: vertical-rl;
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}
.rail__count b { color: var(--accent-hi); font-weight: 500; }
.rail a {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--line-2);
  transition: width 0.4s var(--ease), background 0.3s;
}
.rail a[aria-current="true"] { width: 34px; background: var(--metal); }
.rail a span {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translate(6px, -50%);
  font-size: 0.75rem;
  white-space: nowrap;
  color: var(--text-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.3s var(--ease);
}
.rail a:hover span,
.rail a:focus-visible span { opacity: 1; transform: translate(0, -50%); }
.rail a::before { content: ""; position: absolute; inset: -8px -4px; }

/* ---------- Intro ---------- */

.intro { display: none; }
.js .intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: radial-gradient(60% 50% at 50% 50%, #121015 0%, #050506 70%);
  transition: clip-path 1.1s var(--ease-io), opacity 0.6s 0.7s;
  clip-path: circle(150% at 50% 50%);
}
.intro__stage { display: grid; justify-items: center; gap: 26px; }
.intro__mark {
  width: 88px; height: 88px;
  filter: drop-shadow(0 0 22px rgba(74, 158, 255, 0.55));
  animation: introMark 1.4s var(--ease) both;
}
.intro__word {
  font-family: var(--f-wide);
  font-size: clamp(1.5rem, 5vw, 2.75rem);
  letter-spacing: 0.5em;
  padding-left: 0.5em;
  display: flex;
  background: var(--metal);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 2.2s 0.9s var(--ease) both;
}
.intro__word span { display: inline-block; animation: letterIn 0.9s var(--ease) both; }
.intro__line {
  width: min(280px, 60vw);
  height: 1px;
  background: var(--metal);
  transform-origin: center;
  animation: lineIn 1.2s 1s var(--ease) both;
}
.intro__skip {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--text-3);
  padding: 10px 16px;
}
.intro__skip:hover { color: var(--accent-hi); }
.intro-done .intro { clip-path: circle(0% at 50% 50%); opacity: 0; pointer-events: none; }

@keyframes introMark {
  0% { opacity: 0; transform: scale(0.4) rotate(-45deg); filter: drop-shadow(0 0 0 rgba(74, 158, 255, 0)); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes letterIn {
  from { opacity: 0; transform: translateY(0.6em); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes sheen { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes lineIn { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* ---------- Scroll-driven slide entry (horizontal wipe) ---------- */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .slide__inner {
      animation: slideWipe linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}
@keyframes slideWipe {
  from { clip-path: inset(-10% -10% -10% 28%); transform: translateX(5%); opacity: 0.2; }
  to { clip-path: inset(-10% -10% -10% -10%); transform: none; opacity: 1; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__toggle { display: grid; }
  .nav__actions .btn { display: none; }
  .rail { display: none; }
}
@media (max-width: 860px) {
  .slide__head { grid-template-columns: 1fr; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Icons ---------- */
.i { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.6; }
.i, .svc__icon, .caps svg, .node button svg, .contact__list svg, .learn svg {
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Keep the hidden attribute authoritative over component display rules (the page also runs outside the artifact wrapper) */
[hidden] { display: none !important; }
