/* ==========================================================================
   Vale Bank — Design System
   Foundation: tokens, reset, typography, components, site chrome
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand — corporate blue */
  --navy-950: #061426;
  --navy-900: #081b33;
  --navy-800: #0b2344;
  --navy-700: #103061;
  --navy-600: #173f7c;

  --blue-700: #1642b8;
  --blue-600: #1b51d8;
  --blue-500: #2563eb;
  --blue-400: #5b8def;
  --blue-200: #bcd2fa;
  --blue-100: #dbe8ff;
  --blue-50: #eef4ff;

  /* Ink & surfaces */
  --ink-900: #0c1b2e;
  --ink-800: #17263d;
  --ink-700: #2b3a52;
  --ink-600: #46566f;
  --ink-500: #64748b;
  --ink-400: #8a98ac;
  --ink-300: #aab5c5;

  --white: #ffffff;
  --canvas: #f5f7fb;
  --canvas-2: #f9fbfe;
  --line: #e2e8f1;
  --line-soft: #edf1f7;

  /* Semantic */
  --green-700: #067647;
  --green-600: #0b8a5c;
  --green-500: #12b76a;
  --green-50: #e9f9f2;
  --red-600: #d92d20;
  --red-50: #fef0ef;
  --amber-600: #b45309;
  --amber-500: #f79009;
  --amber-50: #fff7e6;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Manrope", var(--font-sans);

  /* Radii */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-2xl: 24px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(12, 27, 46, 0.05);
  --shadow-sm: 0 1px 3px rgba(12, 27, 46, 0.07), 0 1px 2px rgba(12, 27, 46, 0.04);
  --shadow-md: 0 10px 28px -8px rgba(12, 27, 46, 0.14), 0 2px 6px rgba(12, 27, 46, 0.04);
  --shadow-lg: 0 28px 64px -18px rgba(12, 27, 46, 0.24), 0 6px 16px rgba(12, 27, 46, 0.05);
  --shadow-blue: 0 10px 22px -10px rgba(27, 81, 216, 0.55);

  /* Layout */
  --container: 1180px;
  --header-h: 76px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fast: 160ms;
  --med: 260ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd {
  margin: 0;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ink-900);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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

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

a {
  color: var(--blue-600);
  text-decoration: none;
}

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

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

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

::selection {
  background: var(--blue-100);
  color: var(--navy-900);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

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

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

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.container--wide {
  max-width: 1280px;
}

.section {
  padding-block: 96px;
}

.section--tight {
  padding-block: 72px;
}

.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: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--navy-900);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--r-sm);
  font-size: 14px;
  transition: top var(--fast) var(--ease);
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Type utilities ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

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

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

.section-head--center .eyebrow::before {
  display: none;
}

.section-title {
  margin-top: 14px;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-sub {
  margin-top: 16px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-600);
}

.text-blue { color: var(--blue-600); }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.logo__mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex: none;
  box-shadow: 0 5px 12px -4px rgba(8, 27, 51, 0.45);
}

.logo__bank {
  font-weight: 500;
  color: var(--ink-400);
  letter-spacing: -0.01em;
}

.logo--light {
  color: #fff;
}

.logo--light .logo__bank {
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Buttons ---------- */
.btn {
  --btn-h: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: var(--btn-h);
  padding: 0 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  color: var(--ink-900);
  background: transparent;
  white-space: nowrap;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease),
    border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease),
    transform var(--fast) var(--ease);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn--primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: var(--shadow-blue);
}

.btn--primary:hover {
  background: var(--blue-700);
  box-shadow: 0 12px 26px -10px rgba(22, 66, 184, 0.6);
}

.btn--secondary {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink-800);
  box-shadow: var(--shadow-xs);
}

.btn--secondary:hover {
  border-color: #cfd8e5;
  background: var(--canvas-2);
}

.btn--ghost {
  color: var(--ink-700);
}

.btn--ghost:hover {
  background: var(--blue-50);
  color: var(--blue-700);
}

.btn--navy {
  background: var(--navy-900);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(6, 20, 38, 0.7);
}

.btn--navy:hover { background: var(--navy-800); }

.btn--white {
  background: #fff;
  color: var(--navy-900);
  box-shadow: var(--shadow-md);
}

.btn--white:hover { background: #f3f7ff; }

.btn--outline-light {
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--sm {
  --btn-h: 38px;
  padding: 0 14px;
  font-size: 13.5px;
  border-radius: var(--r-sm);
}

.btn--lg {
  --btn-h: 52px;
  padding: 0 26px;
  font-size: 15px;
  border-radius: var(--r-md);
}

.btn--block {
  width: 100%;
}

.btn .btn__arrow {
  transition: transform var(--fast) var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

.btn--icon {
  width: var(--btn-h);
  padding: 0;
}

/* ---------- Text link ---------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--blue-600);
}

.link-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform var(--fast) var(--ease);
}

.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.chip svg { width: 12px; height: 12px; }

.chip--green { background: var(--green-50); color: var(--green-600); }
.chip--red { background: var(--red-50); color: var(--red-600); }
.chip--amber { background: var(--amber-50); color: var(--amber-600); }
.chip--blue { background: var(--blue-50); color: var(--blue-700); }
.chip--neutral { background: var(--line-soft); color: var(--ink-600); }

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-500);
  flex: none;
}

/* ---------- Forms ---------- */
.field {
  display: grid;
  gap: 8px;
}

.field__label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-800);
}

.field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.field__control > svg {
  position: absolute;
  left: 15px;
  width: 18px;
  height: 18px;
  color: var(--ink-400);
  pointer-events: none;
}

.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink-900);
  font-size: 14.5px;
  line-height: 1;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.input::placeholder { color: var(--ink-300); }

.input:hover { border-color: #cfd8e5; }

.input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.field__control > svg + .input { padding-left: 44px; }

.field__hint {
  font-size: 12.5px;
  color: var(--ink-500);
}

.field__error {
  font-size: 12.5px;
  color: var(--red-600);
}

.input-group-btn {
  position: absolute;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  color: var(--ink-500);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.input-group-btn:hover {
  background: var(--line-soft);
  color: var(--ink-800);
}

.input-group-btn svg { width: 19px; height: 19px; }

/* Shared select + form grid primitives (used by auth and app pages) */
.select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 48px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink-900);
  font-family: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.select:hover { border-color: #cfd8e5; }

.select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.select-wrap > svg {
  position: absolute;
  right: 14px;
  width: 16px;
  height: 16px;
  color: var(--ink-400);
  pointer-events: none;
}

.form-grid {
  display: grid;
  gap: 16px;
}

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

.field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field__label-row .link-arrow { font-size: 12px; }

.field__optional {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-400);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-600);
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--blue-600);
  cursor: pointer;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ---------- Icon tile ---------- */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue-600);
  flex: none;
}

.icon-tile svg { width: 22px; height: 22px; }

.icon-tile--green { background: var(--green-50); color: var(--green-600); }
.icon-tile--amber { background: var(--amber-50); color: var(--amber-600); }
.icon-tile--navy { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* ---------- Avatars ---------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-700);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  flex: none;
}

.avatar--navy {
  background: linear-gradient(140deg, var(--navy-700), var(--navy-900));
  color: #fff;
}

.avatar--sm { width: 32px; height: 32px; font-size: 11.5px; }
.avatar--lg { width: 48px; height: 48px; font-size: 15px; }

/* ---------- Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  transition: border-color var(--med) var(--ease), box-shadow var(--med) var(--ease),
    background var(--med) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 24px -18px rgba(12, 27, 46, 0.25);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 100%;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-600);
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.nav-link:hover {
  color: var(--ink-900);
  background: var(--blue-50);
}

.nav-link svg { width: 14px; height: 14px; color: var(--ink-400); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.site-header__signin {
  padding: 9px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-700);
  border-radius: var(--r-sm);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.site-header__signin:hover {
  background: var(--blue-50);
  color: var(--blue-700);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border-radius: var(--r-sm);
  color: var(--ink-800);
  align-items: center;
  justify-content: center;
}

.menu-toggle:hover { background: var(--blue-50); }
.menu-toggle svg { width: 23px; height: 23px; }

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 14px 24px 22px;
}

.mobile-menu.is-open { display: block; }

.mobile-menu a.mobile-menu__link {
  display: block;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink-800);
}

.mobile-menu__actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

/* ---------- Site footer ---------- */
.site-footer {
  position: relative;
  background:
    radial-gradient(700px 340px at 82% -10%, rgba(27, 81, 216, 0.28), transparent 65%),
    linear-gradient(180deg, var(--navy-950), #050f1e);
  color: #b6c3d6;
  padding-top: 72px;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 70%);
  pointer-events: none;
}

.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.7fr repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 56px;
}

.footer-brand p {
  margin-top: 20px;
  max-width: 300px;
  font-size: 14px;
  line-height: 1.7;
  color: #8ea1bc;
}

.footer-social {
  display: flex;
  gap: 9px;
  margin-top: 24px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a9b8cd;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease),
    border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-2px);
}

.footer-social svg { width: 16px; height: 16px; }

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #6f84a3;
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: #b6c3d6;
  transition: color var(--fast) var(--ease);
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: #7d90ab;
}

.footer-bottom__links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer-bottom__links a { color: #7d90ab; }
.footer-bottom__links a:hover { color: #fff; }

.footer-disclaimer {
  position: relative;
  margin-top: -4px;
  padding-bottom: 22px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #7d90ab;
  max-width: 900px;
}

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

[hidden] {
  display: none !important;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }

/* ---------- Responsive chrome ---------- */
@media (max-width: 1100px) {
  .site-nav { gap: 0; margin-left: 0; }
  .nav-link { padding-inline: 10px; font-size: 14px; }
  .site-header__inner { gap: 24px; }
}

@media (max-width: 960px) {
  .site-nav,
  .site-header__actions { display: none; }
  .menu-toggle { display: inline-flex; }
  .footer-grid {
    grid-template-columns: 1.4fr repeat(2, 1fr);
    row-gap: 44px;
  }
}

@media (max-width: 720px) {
  .section { padding-block: 68px; }
  .section--tight { padding-block: 52px; }
  .container { padding-inline: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-brand { grid-column: auto; }
}
