/* ==========================================================================
   ORINA - theme.css
   Brand direction: Ultramarine Ledger
   Contains: tokens, reset, base typography, buttons, section shell, utilities
   Nothing page-specific lives here. Page layout belongs in style.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {

  /* --- Neutrals: the site's actual body ------------------------------- */
  --paper:        #F7F6F2;   /* page background - warm, never pure white */
  --surface:      #FFFFFF;   /* cards, elevated panels */
  --surface-sunk: #F1EFE9;   /* inset blocks, alternating rows */
  --ink:          #0B0B0D;   /* headlines, full-bleed dark sections */
  --ink-2:        #16171A;   /* secondary dark block, footer */
  --slate:        #62697A;   /* body text on paper */
  --muted:        #9198A6;   /* captions, meta, disabled */
  --rule:         #E3E1DA;   /* hairline borders */
  --rule-strong:  #CFCCC2;   /* emphasised dividers */

  /* --- Accent: used with discipline ----------------------------------- */
  --accent:       #2340E8;
  --accent-deep:  #1B33BD;
  --accent-wash:  #E9ECFF;

  /* --- Data palette: charts and scores only, never decoration --------- */
  --pos:          #1C7A5E;
  --warn:         #B8791A;
  --neg:          #C0392B;

  /* --- On dark sections ----------------------------------------------- */
  --on-ink:       #F7F6F2;
  --on-ink-soft:  #8D93A1;
  --on-ink-rule:  rgba(247, 246, 242, 0.14);

  /* --- Typefaces ------------------------------------------------------- */
  --f-display: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --f-body:    'Inter', system-ui, -apple-system, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* --- Type scale: fluid, no breakpoint jumps -------------------------- */
  --fs-display-xl: clamp(3rem, 8.4vw, 8.25rem);
  --fs-display:    clamp(2.4rem, 5.4vw, 5rem);
  --fs-h2:         clamp(1.9rem, 3.6vw, 3.2rem);
  --fs-h3:         clamp(1.15rem, 1.7vw, 1.5rem);
  --fs-lead:       clamp(1.05rem, 1.45vw, 1.3rem);
  --fs-body:       1.0625rem;
  --fs-sm:         0.9375rem;
  --fs-xs:         0.8125rem;
  --fs-micro:      0.6875rem;

  /* --- Spacing --------------------------------------------------------- */
  --sp-section: clamp(4.5rem, 9vw, 8.5rem);
  --gutter:     clamp(1.25rem, 4vw, 3.5rem);
  --maxw:       1360px;
  --measure:    68ch;

  /* --- Motion ---------------------------------------------------------- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur:  0.55s;
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}

ul[class], ol[class] { list-style: none; }

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; width: 100%; }

/* --------------------------------------------------------------------------
   3. BASE TYPOGRAPHY
   -------------------------------------------------------------------------- */
body {
  background: var(--paper);
  color: var(--slate);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  text-wrap: balance;
}

h1 { font-size: var(--fs-display-xl); letter-spacing: -0.05em; line-height: 0.93; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.04em; line-height: 0.98; }
h3 { font-size: var(--fs-h3); letter-spacing: -0.025em; line-height: 1.15; }

p { text-wrap: pretty; }

strong { font-weight: 500; color: var(--ink); }

/* Numerals and data always set in mono with tabular figures.
   This single rule is what makes the site read as a financial firm. */
.num {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

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

/* --------------------------------------------------------------------------
   4. LAYOUT SHELL
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--sp-section); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

/* Full-bleed dark blocks. The contrast between paper and ink is where
   the boldness comes from - light base does not mean uniformly light. */
.section--ink { background: var(--ink); color: var(--on-ink-soft); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--on-ink); }
.section--ink strong { color: var(--on-ink); }

/* Every dark surface, not only .section--ink. Missing one of these makes
   bold text render near-black on a near-black background. */
.site-foot strong,
.viz--ink strong,
.less strong,
.mega--ink strong { color: var(--on-ink); }
.section--sunk { background: var(--surface-sunk); }

.lede {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--slate);
  max-width: 54ch;
  letter-spacing: -0.011em;
}
.section--ink .lede { color: var(--on-ink-soft); }

.measure { max-width: var(--measure); }

/* --------------------------------------------------------------------------
   5. SECTION HEADERS
   -------------------------------------------------------------------------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
  flex: none;
}
.section--ink .eyebrow { color: var(--on-ink); opacity: 0.75; }

.sec-head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }

.sec-head--split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .sec-head--split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}

/* --------------------------------------------------------------------------
   6. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  padding: 1.1rem 1.7rem;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease);
}

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); }

.btn--ghost { color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); }

.btn--on-ink { color: var(--on-ink); border-color: var(--on-ink-rule); }
.btn--on-ink:hover { border-color: var(--on-ink); background: rgba(247,246,242,0.06); }

/* Text link with a rule that draws itself on hover */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--accent);
  padding-bottom: 2px;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s var(--ease);
}
.tlink:hover { background-size: 100% 1px; }

/* --------------------------------------------------------------------------
   7. UTILITIES
   -------------------------------------------------------------------------- */
.accent { color: var(--accent); }
.rule { height: 1px; background: var(--rule); border: 0; }
.section--ink .rule { background: var(--on-ink-rule); }

.tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-wash);
  padding: 0.45rem 0.7rem;
  border-radius: 2px;
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 3px;
}
.skip-link:focus { top: 1rem; }

/* --------------------------------------------------------------------------
   8. FOCUS - visible, never removed
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.section--ink :focus-visible { outline-color: var(--on-ink); }

/* --------------------------------------------------------------------------
   9. SCROLL REVEAL
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

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