/* =========================================================================
   Nexora Trading — foundation: tokens, reset, typography, layout
   Author: Makers Creative Agency
   ========================================================================= */

:root {
  /* --- Brand colours (Nexora Trading Branding guideline) ---------------- */
  --nx-orange:        #ff6000;   /* Nexora Orange   — primary */
  --nx-orange-300:    #ff8033;   /* primary accent  */
  --nx-orange-100:    #ffe1ce;   /* primary accent  */
  --nx-navy:          #1d2331;   /* Nexora Navy     — primary */
  --nx-navy-400:      #4a4f5a;   /* primary accent  */
  --nx-navy-200:      #a5a7ad;   /* primary accent  */
  --nx-blue:          #0b109f;   /* Electric Blue   — secondary */
  --nx-blue-400:      #2721f7;   /* secondary accent */
  --nx-cyan:          #83e7ff;   /* secondary accent */
  --nx-yellow:        #ffd608;   /* Vibrant Yellow  — secondary */
  --nx-yellow-300:    #ffe66b;   /* secondary accent */
  --nx-cream:         #fefce1;   /* secondary accent */
  --nx-black:         #000000;   /* Pure Black      — secondary */
  --nx-grey-800:      #333333;   /* secondary accent */
  --nx-grey-500:      #999999;   /* secondary accent */

  /* --- Semantic roles --------------------------------------------------- */
  --color-primary:    var(--nx-orange);
  --color-secondary:  var(--nx-blue);
  --color-background: var(--nx-black);
  --color-surface:    #0a0c12;
  --color-surface-2:  var(--nx-navy);
  --color-line:       rgba(254, 252, 225, 0.12);
  --color-line-soft:  rgba(254, 252, 225, 0.07);
  --color-text:       #f4f2e6;
  --color-text-strong:var(--nx-cream);
  --color-muted:      var(--nx-navy-200);
  --color-faint:      var(--nx-grey-500);

  /* --- Type ------------------------------------------------------------- */
  --font-sans:    "Delight", "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Brigends Expanded", "Archivo", "Outfit", sans-serif;

  /* Fluid from 320px up — every step is legible on the smallest phone
     before it is allowed to grow. */
  --step--1: clamp(0.78rem, 0.75rem + 0.15vw, 0.875rem);
  --step-0:  clamp(0.94rem, 0.9rem + 0.2vw, 1.05rem);
  --step-1:  clamp(1.05rem, 0.98rem + 0.35vw, 1.35rem);
  --step-2:  clamp(1.28rem, 1.12rem + 0.78vw, 1.9rem);
  --step-3:  clamp(1.65rem, 1.3rem + 1.75vw, 3rem);
  --step-4:  clamp(2.05rem, 1.45rem + 3vw, 4.6rem);
  --step-5:  clamp(2.5rem, 1.4rem + 5.4vw, 7rem);

  /* --- Space & rhythm --------------------------------------------------- */
  --gutter: clamp(1.15rem, 5vw, 3.5rem);
  --shell: 1440px;
  --section-y: clamp(3.5rem, 8.5vw, 10rem);
  --radius: 4px;
  --radius-lg: 10px;

  /* --- Motion ----------------------------------------------------------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 260ms;
  --dur: 520ms;
  --dur-slow: 900ms;

  --header-h: 62px;
  --tap: 46px;              /* minimum comfortable touch target */
}

@media (min-width: 941px) {
  :root { --header-h: 76px; }
}

/* -------------------------------------------------------------- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

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

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

:focus-visible {
  outline: 2px solid var(--nx-orange-300);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--nx-orange); color: #fff; }

/* --------------------------------------------------------- typography ---- */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--color-text-strong);
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); letter-spacing: -0.015em; }

p { text-wrap: pretty; }

.display {
  font-size: var(--step-5);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.font-display {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.005em;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nx-orange);
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.75em;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
  flex: none;
}
.eyebrow--plain::before { display: none; }
.eyebrow--muted { color: var(--color-muted); }

.lead {
  font-size: var(--step-1);
  font-weight: 300;
  line-height: 1.55;
  color: var(--color-muted);
  letter-spacing: -0.01em;
}

.measure    { max-width: 62ch; }
.measure-sm { max-width: 46ch; }

/* Nothing may push the page sideways on a small screen. */
h1, h2, h3, h4, p, a, li, span, dd, dt { overflow-wrap: break-word; }

.muted  { color: var(--color-muted); }
.accent { color: var(--nx-orange); }

/* ------------------------------------------------------------- layout ---- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 980px; }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(2.75rem, 6vw, 6rem); }
.section--flush-top { padding-top: 0; }

.section-head {
  display: grid;
  gap: clamp(0.9rem, 3vw, 3rem);
  grid-template-columns: 1fr;
  align-items: end;
  margin-bottom: clamp(1.75rem, 5vw, 4.5rem);
}
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}
.section-head h2 { margin-top: 0.6rem; }

.rule { height: 1px; background: var(--color-line-soft); border: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--nx-orange);
  color: #fff;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ------------------------------------------------------------- motion ---- */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

[data-reveal="fade"] { transform: none; }
[data-reveal="left"]  { transform: translate3d(-32px, 0, 0); }
[data-reveal="scale"] { transform: scale(1.04); }

/* Line-by-line heading reveal */
.reveal-lines .line {
  display: block;
  /* The mask hides the line vertically while it animates in. `clip` plus a
     clip-margin keeps overhanging glyphs (G, f, italics, the final period)
     from ever being shaved off at the edges; `hidden` is the fallback. */
  overflow: hidden;
  overflow: clip;
  overflow-clip-margin: 0.16em;
  padding-block: 0.02em;
}
.reveal-lines .line > span {
  display: block;
  transform: translate3d(0, 108%, 0);
  transition: transform 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.reveal-lines.is-visible .line > span { transform: none; }
.no-js .reveal-lines .line > span { transform: none; }

/* On phones the copy must be allowed to wrap naturally, so the per-line
   mask is dropped and the whole heading fades up as one block instead. */
@media (max-width: 700px) {
  .reveal-lines .line { display: inline; overflow: visible; }
  .reveal-lines .line > span { display: inline; transform: none; transition: none; }
  .reveal-lines {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
  }
  .reveal-lines.is-visible { opacity: 1; transform: none; }
  .no-js .reveal-lines { opacity: 1; transform: none; }
}

/* Everything must still be visible and navigable without JavaScript. */
.no-js [data-reveal] { opacity: 1; transform: none; }
.no-js .brand-hero__media img { opacity: 1; transform: none; }
.no-js .media__zoom img { transform: none; }
.no-js .menu-toggle { display: none !important; }
.no-js .mobile-menu { display: none !important; }
.no-js .masthead__nav { display: block !important; }
@media (max-width: 940px) {
  .no-js .masthead__inner { flex-wrap: wrap; row-gap: 0.6rem; }
  .no-js .masthead__nav { width: 100%; margin-left: 0; order: 3; }
  .no-js .masthead__nav ul { flex-wrap: wrap; gap: 0.5rem 1.1rem; }
  .no-js .masthead__cta { display: inline-flex; }
}

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