/* Argos Banking Gateway — static site design system.
 *
 * A light-first, flat "paper ledger" system: off-white ground, near-black
 * ink, hairline rules, one cool accent, and no decoration that is not
 * carrying information. Deliberately free of gradients and drop shadows —
 * depth is expressed with borders and background steps only, which keeps the
 * two themes trivially consistent and the CSS auditable.
 *
 * The dark palette is not a separate design: it swaps the same token set.
 * `data-theme` and its storage key are shared with the owner SPA
 * (apps/portal/src/lib/theme.ts), so a theme chosen here survives into /app.
 *
 * Bilingual content lives twice in the markup, tagged `data-lang="fr|en"`.
 * The inactive copy is hidden by the `data-site-lang` rules at the bottom of
 * this file, so the page reads correctly with JavaScript disabled (the HTML
 * ships with `data-site-lang="fr"` already set).
 */

:root {
  color-scheme: light;

  --paper: #faf9f6;
  --surface: #ffffff;
  --surface-sunken: #f2f1ea;
  --ink: #16181d;
  --ink-muted: #575d6b;
  --ink-faint: #63697a;
  --line: #e4e1d8;
  --line-strong: #cbc7ba;
  --accent: #1f4bd8;
  --accent-ink: #ffffff;
  --accent-soft: #edf1ff;
  --credit: #0f7a3d;
  --debit: #b3261e;

  --page-max-width: 1180px;
  --gutter: 32px;
  --radius: 14px;
  --radius-sm: 8px;

  --font-sans:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}

html[data-theme='dark'] {
  color-scheme: dark;

  --paper: #0b0c0e;
  --surface: #131519;
  --surface-sunken: #0f1114;
  --ink: #f1f2f5;
  --ink-muted: #a2a8b4;
  --ink-faint: #8a91a0;
  --line: #24272e;
  --line-strong: #383c45;
  --accent: #8aa4ff;
  --accent-ink: #0b0c0e;
  --accent-soft: #171d31;
  --credit: #3ddc84;
  --debit: #ff6b60;
}

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

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(calc(100% - (var(--gutter) * 2)), var(--page-max-width));
  margin-inline: auto;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-glyph {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
}

.brand-glyph::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: '';
  transform: translate(-50%, -50%);
}

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

.site-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 14px;
  text-decoration: none;
  transition:
    color 150ms ease,
    background-color 150ms ease;
}

.site-nav a:hover {
  background: var(--surface-sunken);
  color: var(--ink);
}

.site-nav a[aria-current='page'] {
  color: var(--ink);
  font-weight: 500;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Segmented FR/EN control and the theme toggle share one quiet chrome
 * treatment so neither competes with the primary call to action. */
.lang-switch {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.lang-switch button {
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-faint);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    color 150ms ease,
    background-color 150ms ease;
}

.lang-switch button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--paper);
}

.theme-toggle {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition:
    color 150ms ease,
    border-color 150ms ease;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

/* --------------------------------------------------------------- actions */

.action,
.action-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.action {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.action:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.action-quiet {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.action-quiet:hover {
  border-color: var(--ink);
  background: var(--surface-sunken);
}

.action-sm {
  min-height: 36px;
  padding: 0 15px;
  font-size: 14px;
}

/* ----------------------------------------------------------------- hero */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 26px;
  padding: 6px 13px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

.signal-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--credit);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  align-items: center;
  gap: 72px;
  padding: 96px 0 104px;
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 1.03;
}

.hero h1 .accent {
  color: var(--ink-faint);
}

.hero-copy {
  max-width: 46ch;
  margin: 28px 0 0;
  color: var(--ink-muted);
  font-size: clamp(16px, 1.4vw, 18.5px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-note {
  margin: 22px 0 0;
  color: var(--ink-faint);
  font-size: 13.5px;
}

/* ------------------------------------------------- hero ledger illustration */

/* A stylised, non-interactive picture of the owner portal. The rows carry no
 * real account data — the figure is captioned as an illustration in both
 * languages and marked aria-hidden, so it is decoration for assistive
 * technology and never reads as a record of anything. */
.ledger {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.ledger-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-sunken);
}

.ledger-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}

.ledger-bar span:last-child {
  margin-left: auto;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.ledger-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.ledger-summary div {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.ledger-summary div:last-child {
  border-right: 0;
}

.ledger-summary dt {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ledger-summary dd {
  margin: 7px 0 0;
  font-family: var(--font-mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.ledger-day {
  padding: 15px 18px 7px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ledger-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 18px;
  border-top: 1px solid var(--line);
}

.ledger-row:first-of-type {
  border-top: 0;
}

.ledger-label {
  flex: 1 1 auto;
  min-width: 0;
}

.ledger-label b {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-label span {
  display: block;
  color: var(--ink-faint);
  font-size: 12.5px;
}

.ledger-amount {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.ledger-amount.is-credit {
  color: var(--credit);
}

.ledger-amount.is-debit {
  color: var(--debit);
}

.figure-caption {
  margin: 14px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
  text-align: right;
}

/* -------------------------------------------------------------- principles */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principle {
  padding: 44px 40px 48px;
  border-right: 1px solid var(--line);
}

.principle:last-child {
  border-right: 0;
}

.principle-index {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.principle h2 {
  margin: 26px 0 12px;
  font-size: clamp(22px, 2.4vw, 28px);
}

.principle p {
  max-width: 34ch;
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
}

/* -------------------------------------------------------------------- steps */

.section {
  padding: 104px 0;
}

.section-head {
  max-width: 40ch;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.1;
}

.section-head p {
  margin: 18px 0 0;
  color: var(--ink-muted);
  font-size: 17px;
}

.micro-label {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}

.step {
  padding: 34px 30px 38px;
  background: var(--surface);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
}

.step h3 {
  margin: 22px 0 10px;
  font-size: 19px;
}

.step p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
}

/* -------------------------------------------------------------- legal cards */

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.doc-card {
  display: flex;
  min-height: 230px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  flex-direction: column;
  justify-content: space-between;
  transition:
    border-color 150ms ease,
    background-color 150ms ease;
}

.doc-card:hover {
  border-color: var(--ink);
  background: var(--surface-sunken);
}

.doc-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.doc-card p {
  max-width: 42ch;
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
}

.doc-card-link {
  margin-top: 26px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}

/* ------------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 52px 0 60px;
}

.site-footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
}

.footer-label {
  margin: 0;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-contact {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
  font-size: clamp(17px, 2vw, 22px);
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 13px;
}

/* ------------------------------------------------------------ legal pages */

.legal-hero {
  padding: 76px 0 44px;
  border-bottom: 1px solid var(--line);
}

.legal-hero h1 {
  max-width: 18ch;
  margin: 16px 0 18px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.05;
}

.document-meta {
  margin: 0;
  color: var(--ink-faint);
  font-size: 13px;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(200px, 0.32fr) minmax(0, 1fr);
  gap: 64px;
  padding: 56px 0 100px;
}

.document-aside {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
}

.document-aside p {
  overflow-wrap: anywhere;
  color: var(--ink-muted);
}

.document-aside .aside-label {
  margin: 22px 0 4px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.document-aside .aside-label:first-child {
  margin-top: 0;
}

.legal-document {
  max-width: 72ch;
}

.notice {
  margin: 0 0 44px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 16px;
}

.legal-document section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.legal-document h2 {
  margin: 0 0 16px;
  font-size: clamp(21px, 2.4vw, 27px);
}

.legal-document p,
.legal-document li {
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.75;
}

.legal-document ul {
  padding-left: 20px;
}

.legal-document a,
.document-aside a,
.footer-contact a {
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

/* ---------------------------------------------------- banking callback page */

.callback-shell {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.callback-card {
  width: min(100%, 680px);
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.callback-card h1 {
  margin: 16px 0;
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1.05;
}

.callback-card > p {
  color: var(--ink-muted);
  font-size: 16px;
}

/* ------------------------------------------------------ language switching */

/* The page ships with data-site-lang="fr" on <html>, so the correct copy is
 * shown before site.js runs and stays correct if it never runs at all. */
html[data-site-lang='fr'] [data-lang='en'],
html[data-site-lang='en'] [data-lang='fr'] {
  display: none;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 52px;
    padding: 64px 0 76px;
  }

  .principles,
  .steps {
    grid-template-columns: 1fr;
  }

  .principle {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .principle:last-child {
    border-bottom: 0;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .document-aside {
    position: static;
  }

  .section {
    padding: 72px 0;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 18px;
  }

  .site-header-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
  }

  /* The eyebrow wraps to two lines on a phone, where a full pill radius
   * reads as a misshapen blob; a rounded rectangle wraps cleanly. */
  .eyebrow {
    align-items: flex-start;
    border-radius: var(--radius-sm);
    font-size: 12px;
  }

  .eyebrow .signal-dot {
    margin-top: 6px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: -12px;
  }

  .brand span:last-child {
    display: none;
  }

  .principle {
    padding: 34px 24px 38px;
  }

  .legal-grid {
    grid-template-columns: 1fr;
  }

  .ledger-summary {
    grid-template-columns: 1fr;
  }

  .ledger-summary div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ledger-summary div:last-child {
    border-bottom: 0;
  }

  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
