/* Spend — marketing site
   Deliberately single-theme: this is the brand surface, the same dark world as
   the product's landing and sign-in pages, so the site and the software read as
   one thing. Palette and type stack are inherited from the app's cosmic.css. */

:root {
  --void:      #070A0C;
  --deep:      #0B1116;
  --panel:     #101C22;
  --panel-hi:  #14242B;
  --line:      #1E2E36;
  --line-warm: #2A2119;
  --ink:       #DEE8EA;
  --ink-dim:   #93A9B0;
  --ink-faint: #5F767D;
  --sodium:    #E8973F;
  --sodium-hi: #FFC98A;
  --sodium-lo: #8A5A28;
  --ion:       #5FB8C4;
  --halpha:    #C8503F;
  --verdant:   #4E9E6A;

  /* One typeface throughout. Futura carries the whole site so the wordmark,
     the headings and the running text are unmistakably the same voice. */
  --font-display: Futura, "Futura PT", "Century Gothic", "URW Gothic",
                  "Avenir Next", "Trebuchet MS", sans-serif;
  --font-body: var(--font-display);
  --font-mono: var(--font-display);

  --shell: 1180px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

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

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

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.02rem;
  /* Geometric faces need more air than a serif at running-text size — the
     round letterforms close up otherwise. Extra leading and a touch of
     tracking keep longer paragraphs comfortable. */
  line-height: 1.75;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 100;
  background: var(--sodium);
  color: var(--void);
  padding: 0.5rem 0.9rem;
  font-family: var(--font-display);
  text-decoration: none;
}

/* ---------- Wordmark ---------- */

.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 10, 12, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 66px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav__links a:hover { color: var(--ink); }
@media (max-width: 800px) { .nav__links { display: none; } }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid var(--sodium);
  background: var(--sodium);
  color: var(--void);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--sodium-hi); border-color: var(--sodium-hi); }

.btn--ghost {
  background: transparent;
  color: var(--ink-dim);
  border-color: var(--line);
}
.btn--ghost:hover {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--sodium-lo);
}

/* ---------- Starfield ---------- */

#starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Section furniture ---------- */

section { position: relative; }

.band {
  padding-block: clamp(4.5rem, 10vw, 8rem);
  border-top: 1px solid var(--line);
}
.band--deep { background: var(--deep); }

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--sodium);
  margin: 0 0 1rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.005em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
}

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  color: var(--ink-dim);
  max-width: 60ch;
  margin: 0;
}

.section-head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(5rem, 13vw, 9.5rem) clamp(4rem, 9vw, 7rem);
}
.hero__inner { position: relative; z-index: 1; }

.hero__lockup {
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.6vw, 3.15rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  max-width: 19ch;
  margin-bottom: 1.5rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--sodium);
}

.hero__lede { margin-bottom: 2.25rem; max-width: 54ch; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

/* ---------- UAE origin badge ---------- */

.origin {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 1rem 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
}
.origin__bars { display: flex; align-items: stretch; height: 22px; width: 17px; flex: none; }
.origin__bars > i { display: block; width: 5px; background: var(--halpha); }
.origin__stack { display: grid; grid-template-rows: repeat(3, 1fr); width: 12px; }
.origin__stack > i { display: block; width: 100%; }
.origin__stack > i:nth-child(1) { background: var(--verdant); }
.origin__stack > i:nth-child(2) { background: #D7DEE0; }
.origin__stack > i:nth-child(3) { background: #0A0E10; box-shadow: inset 0 0 0 1px var(--line); }
.origin__text { display: grid; gap: 0.15rem; }
.origin__lead {
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  line-height: 1.2;
}
.origin__sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.2;
}

/* ---------- USPs: the four things that set Spend apart ----------
   Deliberately heavier than the general capability grid further down. These
   are the arguments, not the feature list, so they get more room, a warmer
   surface and an accent rule to lift them off the page. */

.usps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}
@media (max-width: 780px) { .usps { grid-template-columns: 1fr; } }

.usp {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--sodium);
  border-radius: 3px;
  padding: clamp(1.6rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.usp:hover {
  background: var(--panel-hi);
  border-color: var(--line);
  border-top-color: var(--sodium-hi);
  transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) { .usp:hover { transform: none; } }

.usp__tag {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.64rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ion);
}

.usp h3 {
  font-size: clamp(1.15rem, 2.1vw, 1.42rem);
  line-height: 1.2;
  margin: 0;
}

.usp p { margin: 0; color: var(--ink-dim); font-size: 0.95rem; line-height: 1.65; }

/* The line that says why it matters, rather than what it is. */
.usp__point {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--sodium-hi);
  font-size: 0.87rem;
  line-height: 1.5;
}

/* The UAE card carries the flag bars instead of a category label. */
.usp__flag {
  display: inline-flex;
  align-items: stretch;
  height: 18px;
  width: 14px;
  flex: none;
  margin-right: 0.5rem;
  vertical-align: -3px;
}
.usp__flag > i { display: block; width: 4px; background: var(--halpha); }
.usp__flag span { display: grid; grid-template-rows: repeat(3, 1fr); width: 10px; }
.usp__flag span > i { display: block; width: 100%; }
.usp__flag span > i:nth-child(1) { background: var(--verdant); }
.usp__flag span > i:nth-child(2) { background: #D7DEE0; }
.usp__flag span > i:nth-child(3) { background: #0A0E10; box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Problem: contrast pair ---------- */

.contrast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
@media (max-width: 720px) { .contrast { grid-template-columns: 1fr; } }

.contrast__side { background: var(--void); padding: clamp(1.5rem, 3vw, 2.25rem); }
.contrast__side--after { background: var(--panel); }

.contrast__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  margin: 0 0 1.1rem;
}
.contrast__side--before .contrast__label { color: var(--halpha); }
.contrast__side--after .contrast__label { color: var(--verdant); }

.contrast ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.contrast li {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.6rem;
  align-items: start;
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.5;
}
.contrast li::before {
  content: "";
  width: 7px; height: 7px;
  margin-top: 0.55rem;
  border-radius: 50%;
}
.contrast__side--before li::before { background: var(--halpha); }
.contrast__side--after li::before { background: var(--verdant); }

/* ---------- Lifecycle: numbered because it IS a sequence ---------- */

.stages { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.stage {
  background: var(--void);
  display: grid;
  grid-template-columns: 5.5rem 15rem 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 3vw, 2.1rem) 0;
  align-items: start;
  transition: background 0.2s ease;
}
.stage:hover { background: var(--deep); }
@media (max-width: 860px) {
  .stage { grid-template-columns: 3.5rem 1fr; }
  .stage__body { grid-column: 2; }
}

.stage__num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  color: var(--sodium);
  padding-top: 0.25rem;
}
.stage__name { padding-top: 0; }
.stage__body { color: var(--ink-dim); font-size: 0.96rem; margin: 0; }
.stage__body strong { color: var(--ink); font-weight: 400; }

/* ---------- Capability grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.cell {
  background: var(--void);
  padding: clamp(1.4rem, 2.6vw, 1.9rem);
  transition: background 0.2s ease;
}
.cell:hover { background: var(--panel); }
.cell p { color: var(--ink-dim); font-size: 0.93rem; margin: 0; line-height: 1.55; }

.cell__tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ion);
  display: block;
  margin-bottom: 0.7rem;
}

/* ---------- Principles (self-hosted story) ---------- */

.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2.5rem; }
.principle { border-top: 2px solid var(--sodium); padding-top: 1.2rem; }
.principle p { color: var(--ink-dim); font-size: 0.95rem; margin: 0; }

/* ---------- About ---------- */

.about { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }

.about p { color: var(--ink-dim); max-width: 58ch; }
.about p + p { margin-top: 1.1rem; }

.facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.fact { background: var(--panel); padding: 1.1rem 1.3rem; }
.fact__k {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 0.3rem;
}
.fact__v { font-family: var(--font-display); font-size: 0.98rem; color: var(--ink); }

/* ---------- Contact ---------- */

.contact { text-align: center; }
.contact h2 { margin-inline: auto; max-width: 18ch; }
.contact .lede { margin-inline: auto; margin-bottom: 2rem; }
.contact__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
.contact__note {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); padding-block: 2.75rem; }
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer__meta { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--ink-faint); text-transform: uppercase; }
.footer a { color: var(--ink-dim); text-decoration: none; }
.footer a:hover { color: var(--ink); }
