/* ============================================================
   TRXSEND — brand layer
   Design tokens + page chrome shared by landing / auth / legal.
   Load this FIRST, then the page-specific sheet.
   ============================================================ */

/* ---------- Unbounded, self-hosted, variable 300–800 ---------- */
@font-face {
  font-family: 'Unbounded';
  src: url('font/unbounded-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Unbounded';
  src: url('font/unbounded-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  /* Unbounded is a display face: headings, numbers, UI chrome only. */
  --font: 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Neutral stack for anything longer than a couple of lines. */
  --font-read: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --black: #000;
  --white: #fff;
  --amber: #ffae00;
  --orange: #ff7700;
  --red: #ff5858;
  --red-deep: #ff0000;

  --ink-70: rgba(255, 255, 255, 0.7);
  --ink-50: rgba(255, 255, 255, 0.5);
  --ink-30: rgba(255, 255, 255, 0.3);
  --hair: rgba(255, 255, 255, 0.15);
  --veil: rgba(255, 255, 255, 0.05);
  --veil-2: rgba(255, 255, 255, 0.08);

  --on-white-70: rgba(0, 0, 0, 0.7);
  --on-white-hair: rgba(0, 0, 0, 0.12);

  --ease: cubic-bezier(0.215, 0.61, 0.355, 1);
  --dur: 0.6s;
  --dur-fast: 0.28s;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-2xl: 40px;
  --r-pill: 999px;

  --shell: 1400px;
  --gutter: 64px;
  --header-h: 84px;

  /* Fluid type — one scale, no per-breakpoint font-size overrides. */
  --t-fine: 13px;
  --t-body: 14px;
  --t-lead: clamp(14px, 1.15vw, 16px);
  --t-card: clamp(18px, 1.5vw, 21px);
  --t-section: clamp(26px, 3.4vw, 44px);
  --t-hero: clamp(30px, 5vw, 68px);
  --t-display: clamp(32px, 4.2vw, 56px);
}

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

html {
  scroll-behavior: smooth;
  /* Anchors land below the fixed header instead of under it. */
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

::selection {
  background: var(--orange);
  color: var(--black);
}

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

@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;
  }
}

/* ---------- shell ---------- */
.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}

.smooth {
  transition: all var(--dur) var(--ease);
}

.hide-mobile {
  display: inline;
}

/* ---------- film grain ---------- */
.noise {
  position: fixed;
  inset: 0;
  background: url('img/noise.png');
  opacity: 0.3;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: soft-light;
}

/* ---------- the glow field ----------
   The one bold move in this design: a bank of enormous, heavily
   blurred colour discs bleeding off-canvas. Everything else stays
   quiet so this reads as deliberate rather than decorative.        */
.glow-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.glow {
  position: absolute;
  display: block;
  border-radius: 50%;
  transition: background var(--dur) var(--ease);
}

/* Sized in vmax so the discs stay proportional to the viewport — fixed
   pixel diameters flooded the whole screen on laptops and vanished on
   ultrawides. */
.glow-a {
  top: -110vmax;
  left: -78vmax;
  width: 146vmax;
  height: 146vmax;
  background: var(--amber);
  filter: blur(200px);
  opacity: 0.55;
}

.glow-b {
  top: 8vmax;
  right: -92vmax;
  width: 146vmax;
  height: 146vmax;
  background: var(--red-deep);
  filter: blur(300px);
  opacity: 0.5;
}

.glow-c {
  top: 46vmax;
  right: -28vmax;
  width: 104vmax;
  height: 104vmax;
  background: var(--white);
  filter: blur(200px);
  mix-blend-mode: plus-lighter;
  opacity: 0.28;
}

/* Scrim: the glow is the drama, but body copy still has to be legible
   on top of it. Darkens the bottom edge where the hero type sits. */
.glow-field::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 42%, rgba(0, 0, 0, 0) 78%);
}

/* ---------- header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  padding: 28px 0;
  transition: background var(--dur) var(--ease),
              backdrop-filter var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              padding var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}

/* Once the page scrolls past the black hero the header sits over white
   cards — without this it would be white-on-white and disappear. */
.header.stuck {
  padding: 16px 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: var(--hair);
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  font-family: var(--font);
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
  color: var(--white);
  text-transform: lowercase;
  text-decoration: none;
  letter-spacing: 0.01em;
  /* Inline, not flex: a flex gap would space out the <b> and the mark
     would read as three words. */
  display: inline-block;
  white-space: nowrap;
}

/* The X carries the accent — the whole brand mark in one glyph. */
.logo b {
  font-weight: 500;
  color: var(--orange);
}

.header-nav {
  display: flex;
  gap: 40px;
}

.header-nav a {
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 300;
  color: var(--white);
  text-decoration: none;
  text-transform: lowercase;
  transition: all var(--dur) var(--ease);
  position: relative;
}

/* Weight shift, not colour shift — the hover cue the landing already used. */
.header-nav a:hover {
  font-weight: 500;
}

.header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* ---------- buttons ---------- */
.btn-outline,
.btn-primary {
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 300;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--white);
  transition: all var(--dur) var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: lowercase;
  cursor: pointer;
  white-space: nowrap;
}

.btn-outline {
  color: var(--white);
  background: transparent;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--black);
}

.btn-primary {
  color: var(--black);
  background: var(--white);
}

.btn-primary:hover {
  background: transparent;
  color: var(--white);
}

.btn-primary.large,
.btn-outline.large {
  padding: 13px 26px;
  border-radius: var(--r-md);
}

/* ---------- mobile nav ---------- */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hair);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--dur) var(--ease);
}

.nav-toggle:hover {
  border-color: var(--white);
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  transition: all var(--dur-fast) var(--ease);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: all var(--dur-fast) var(--ease);
}

.nav-toggle span::before {
  top: -5px;
}

.nav-toggle span::after {
  top: 5px;
}

.nav-open .nav-toggle span {
  background: transparent;
}

.nav-open .nav-toggle span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-open .nav-toggle span::after {
  top: 0;
  transform: rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}

.nav-open .mobile-nav {
  opacity: 1;
  visibility: visible;
}

.mobile-nav a {
  font-family: var(--font);
  font-size: clamp(24px, 8vw, 40px);
  font-weight: 300;
  color: var(--white);
  text-decoration: none;
  text-transform: lowercase;
  padding: 10px 0;
  border-bottom: 1px solid var(--hair);
  transition: all var(--dur) var(--ease);
}

.mobile-nav a:not(.mobile-nav-cta):hover,
.mobile-nav a:not(.mobile-nav-cta):focus-visible {
  font-weight: 700;
  padding-left: 12px;
}

/* The colour has to be restated: `.mobile-nav a` (0,1,1) outranks
   `.btn-primary` (0,1,0), which left white text on a white button. */
.mobile-nav .mobile-nav-cta {
  border-bottom: none;
  margin-top: 24px;
  font-size: var(--t-body);
  align-self: flex-start;
  color: var(--black);
  padding: 13px 26px;
}

.mobile-nav .mobile-nav-cta:hover {
  background: transparent;
  color: var(--white);
}

/* ---------- section header ---------- */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  margin-bottom: 56px;
}

.section-title {
  font-family: var(--font);
  font-size: var(--t-section);
  font-weight: 700;
  background: linear-gradient(90deg, #fff 0%, var(--orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 22ch;
  /* Even line lengths instead of a single orphaned word on line two. */
  text-wrap: balance;
}

.section-subtitle {
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 300;
  color: var(--ink-70);
  line-height: 1.6;
  max-width: 52ch;
  text-wrap: balance;
}

/* ---------- footer ---------- */
.footer {
  padding: 128px var(--gutter) 48px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--hair);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 400px;
}

.footer-desc {
  font-family: var(--font);
  font-size: var(--t-fine);
  font-weight: 300;
  color: var(--ink-70);
  line-height: 1.6;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--veil);
  padding: 12px 24px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hair);
  text-decoration: none;
  transition: all var(--dur) var(--ease);
  width: fit-content;
}

.footer-email:hover {
  background: var(--veil-2);
  border-color: var(--white);
}

.footer-email span {
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 300;
  color: var(--white);
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-title {
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 500;
  color: var(--white);
  margin-bottom: 6px;
}

.footer-col a {
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 300;
  color: var(--ink-70);
  text-decoration: none;
  transition: all var(--dur) var(--ease);
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: var(--shell);
  margin: 0 auto;
  padding-top: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-bottom span {
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 300;
  color: var(--ink-70);
}

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  padding: 20px;
  transform: translateY(120%);
  transition: transform var(--dur) var(--ease);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--white);
  padding: 20px 32px;
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cookie-content p {
  font-family: var(--font);
  font-size: var(--t-fine);
  font-weight: 300;
  color: var(--black);
  flex: 1;
  line-height: 1.5;
}

.cookie-btn {
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 500;
  color: var(--white);
  background: var(--black);
  border: none;
  padding: 11px 26px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease);
  text-transform: lowercase;
  white-space: nowrap;
}

.cookie-btn:hover {
  transform: scale(1.05);
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --gutter: 32px;
    --header-h: 72px;
  }

  .header-nav {
    display: none;
  }

  /* Only drop the secondary button on pages that actually have a
     burger to fall back on — legal pages keep both. */
  .header-inner:has(.nav-toggle) .btn-outline {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hide-mobile {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    gap: 48px;
  }

  .footer-links {
    gap: 40px;
    flex-wrap: wrap;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 24px;
  }

  /* vmax discs are enormous relative to a phone's width — pull them
     back so the hero copy keeps its contrast. */
  .glow-a { opacity: 0.4; }
  .glow-b { opacity: 0.34; }
  .glow-c { opacity: 0.16; }

  .logo {
    font-size: 16px;
  }

  .btn-outline,
  .btn-primary {
    padding: 8px 14px;
    font-size: var(--t-fine);
  }

  .section-header {
    margin-bottom: 40px;
  }

  .footer-links {
    flex-direction: column;
    gap: 32px;
  }

  .cookie-content {
    padding: 20px 24px;
  }
}
