/* ==========================================================================
   FinTech Express — Reset, base typography, layout primitives, utilities
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

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

img {
  height: auto;
}

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

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

ul,
ol {
  padding: 0;
  list-style: none;
}

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

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5.2vw, var(--fs-5xl)); }
h2 { font-size: clamp(1.75rem, 3.6vw, var(--fs-3xl)); }
h3 { font-size: clamp(1.25rem, 2.2vw, var(--fs-xl)); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }

p {
  text-wrap: pretty;
}

::selection {
  background: var(--accent-400);
  color: var(--brand-950);
}

:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

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

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

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: calc(var(--section-y) * 0.6);
}

.section--alt {
  background: var(--bg-alt);
}

.section--surface {
  background: var(--surface);
}

.section--dark {
  background: var(--brand-950);
  color: #fff;
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: #fff;
}

.stack > * + * {
  margin-top: var(--sp-4);
}

.grid {
  display: grid;
  gap: var(--sp-6);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px) {
  .grid--3,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}

.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

/* --------------------------------------------------------------------------
   Section headings
   -------------------------------------------------------------------------- */

.section-head {
  max-width: 680px;
  margin-bottom: var(--sp-10);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.section-head__text {
  max-width: 640px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: var(--sp-3);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-400);
}

.eyebrow--center {
  justify-content: center;
}

.section--dark .eyebrow {
  color: var(--brand-300);
}

.section-head p {
  margin-top: var(--sp-4);
  color: var(--muted);
  font-size: var(--fs-lg);
}

.section--dark .section-head p {
  color: rgba(255, 255, 255, 0.72);
}

.accent-text {
  color: var(--brand-500);
}

.section--dark .accent-text {
  color: var(--accent-400);
}

/* Hand-drawn style underline on an accented word */
.underline-accent {
  position: relative;
  display: inline-block;
}

.underline-accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.28em;
  background: var(--accent-400);
  opacity: 0.5;
  border-radius: var(--r-full);
  z-index: -1;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  z-index: var(--z-toast);
  padding: var(--sp-3) var(--sp-5);
  background: var(--brand-950);
  color: #fff;
  border-radius: var(--r-md);
  font-weight: 600;
  transition: top var(--t-base) var(--ease);
}

.skip-link:focus {
  top: var(--sp-4);
}

.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.text-lead { font-size: var(--fs-lg); color: var(--muted); }
.text-sm { font-size: var(--fs-sm); }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mt-10 { margin-top: var(--sp-10); }
.mb-0 { margin-bottom: 0; }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }

.full-width { width: 100%; }
.hide { display: none !important; }

@media (max-width: 860px) {
  .hide-md { display: none !important; }
}

@media (max-width: 560px) {
  .hide-sm { display: none !important; }
}

@media (min-width: 861px) {
  .show-md { display: none !important; }
}

/* Reveal-on-scroll, progressively enhanced by app.js */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-slow) var(--ease-out),
    transform var(--t-slow) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

html.no-js .reveal,
.no-reveal .reveal {
  opacity: 1;
  transform: none;
}
