/* Olympus Banking Gateway — static site design system.
 *
 * The same system as the owner app (src/index.css), set for reading: Apple's
 * grouped-background model, where the page is a soft grey ground and content
 * sits on raised white cells with a gentle shadow; the platform's system face
 * with size-specific tracking; one blue for actions; a translucent header
 * that lets the page scroll beneath it. No decoration that is not carrying
 * information, and no gradients.
 *
 * 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 near 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: #f5f5f7;
  --surface: #ffffff;
  --surface-sunken: #ececf1;
  --ink: #1d1d1f;
  --ink-muted: #5b5b60;
  --ink-faint: #636366;
  --line: #d8d8dd;
  --line-strong: #c6c6c8;
  --accent: #0071e3;
  --accent-ink: #ffffff;
  --accent-soft: #e8f1fc;
  --tint: #0066cc;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-strong: rgba(118, 118, 128, 0.2);
  --material: rgba(245, 245, 247, 0.72);
  --material-edge: rgba(0, 0, 0, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.06);
  --credit: #1b7232;
  --debit: #c4001a;

  --page-max-width: 1120px;
  --gutter: 32px;
  --radius: 22px;
  --radius-sm: 12px;

  --font-sans:
    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', 'Inter',
    system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

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

  --paper: #000000;
  --surface: #1c1c1e;
  --surface-sunken: #2c2c2e;
  --ink: #f5f5f7;
  --ink-muted: #aeaeb2;
  --ink-faint: #98989f;
  --line: #38383a;
  --line-strong: #48484a;
  --accent: #0071e3;
  --accent-ink: #ffffff;
  --accent-soft: #0b2540;
  --tint: #0a84ff;
  --fill: rgba(118, 118, 128, 0.24);
  --fill-strong: rgba(118, 118, 128, 0.36);
  --material: rgba(22, 22, 24, 0.72);
  --material-edge: rgba(255, 255, 255, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  --credit: #30d158;
  --debit: #ff6961;
}

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

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

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
}

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

/* Headings tighten as they grow: negative tracking and short leading on
 * display sizes, near-zero on body sizes. */
h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
  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 */

/* A translucent bar: the page scrolls beneath it and stays faintly visible. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 0.5px solid var(--material-edge);
  background: var(--material);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

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

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

/* The Olympus mark: a column capital on the accent, as in the app sidebar. */
.brand-glyph {
  position: relative;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 7px;
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M5.5 9.5h13M7 10v8M12 10v8M17 10v8M4.5 20h15'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
}

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

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

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

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

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

/* FR/EN is a segmented control; the theme toggle a quiet filled pill. */
.lang-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: 9px;
  background: var(--fill);
}

.lang-switch button {
  min-height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition:
    color 150ms ease,
    background-color 150ms ease;
}

.lang-switch button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.theme-toggle {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--tint);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.theme-toggle:hover {
  background: var(--fill-strong);
}

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

/* Press feedback lands on pointer-down and is immediate; release eases back. */
.action,
.action-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 240ms cubic-bezier(0.2, 0.9, 0.3, 1),
    background-color 150ms ease,
    filter 150ms ease;
}

.action:active,
.action-quiet:active {
  transform: scale(0.97);
  transition-duration: 100ms;
}

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

.action:hover {
  filter: brightness(1.1);
}

.action-quiet {
  background: var(--fill);
  color: var(--tint);
}

.action-quiet:hover {
  background: var(--fill-strong);
}

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

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

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

.hero h1 {
  max-width: 14ch;
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

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

.hero-copy {
  max-width: 44ch;
  margin: 26px 0 0;
  color: var(--ink-muted);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.45;
}

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

.hero-note {
  margin: 20px 0 0;
  color: var(--ink-faint);
  font-size: 13px;
  letter-spacing: 0;
}

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

/* A stylised, non-interactive picture of the owner app. 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-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ledger-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 20px;
}

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

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

.ledger-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 12px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
}

.ledger-summary div {
  padding: 14px 16px;
}

.ledger-summary dt {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
}

.ledger-summary dd {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ledger-day {
  padding: 18px 20px 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.ledger-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 20px;
  padding: 11px 20px 11px 0;
  border-top: 0.5px 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: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.ledger-amount {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

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

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

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

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

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: min(calc(100% - (var(--gutter) * 2)), var(--page-max-width));
  margin-inline: auto;
}

.principle {
  padding: 34px 32px 38px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.principle-index {
  color: var(--tint);
  font-size: 13px;
  font-weight: 600;
}

.principle h2 {
  margin: 14px 0 10px;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.12;
}

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

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

.section {
  padding: 112px 0;
}

/* A section that follows a visually open one drops its own top padding
 * instead of carrying an inline style in the markup. */
.section-flush-top {
  padding-top: 0;
}

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

.section-head h2 {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

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

.micro-label {
  margin: 0 0 12px;
  color: var(--tint);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step {
  padding: 30px 28px 34px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--tint);
  font-size: 14px;
  font-weight: 700;
}

.step h3 {
  margin: 20px 0 8px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

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

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

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

.doc-card {
  display: flex;
  min-height: 220px;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 240ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.doc-card:hover {
  transform: translateY(-2px);
}

.doc-card:active {
  transform: scale(0.985);
  transition-duration: 100ms;
}

.doc-card h3 {
  margin: 0 0 10px;
  font-size: 26px;
  letter-spacing: -0.025em;
}

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

.doc-card-link {
  margin-top: 24px;
  color: var(--tint);
  font-size: 16px;
  font-weight: 600;
}

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

.site-footer {
  border-top: 0.5px solid var(--line);
  padding: 44px 0 56px;
}

.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: 13px;
  font-weight: 600;
}

.footer-contact {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 600;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 13px;
}

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

.legal-hero {
  padding: 72px 0 40px;
}

.legal-hero h1 {
  max-width: 18ch;
  margin: 12px 0 16px;
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

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

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

.document-aside {
  position: sticky;
  top: 80px;
  align-self: start;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 15px;
}

.legal-layout > * {
  min-width: 0;
}

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

.document-aside .aside-label {
  margin: 20px 0 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

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

/* The document reads as one raised sheet, sections divided by hairlines. */
.legal-document {
  max-width: 72ch;
  padding: 8px 36px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notice {
  margin: 28px 0 8px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 16px;
}

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

.legal-document .notice + section {
  border-top: 0;
}

.legal-document h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.025em;
}

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

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

.legal-document a,
.document-aside p a,
.document-aside a,
.footer-contact a {
  color: var(--tint);
  text-decoration: none;
}

.legal-document a:hover,
.document-aside a:hover,
.footer-contact a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

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

.callback-card {
  width: min(100%, 620px);
  padding: clamp(28px, 5vw, 52px);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.callback-card h1 {
  margin: 14px 0;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

/* ------------------------------------------------------ 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: 56px 0 72px;
  }

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

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

  .document-aside {
    position: static;
  }

  .section {
    padding: 80px 0;
  }
}

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

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

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

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

  .principle {
    padding: 28px 24px 30px;
  }

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

  .legal-document {
    padding: 4px 20px 8px;
  }

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

/* Reduced transparency: the header turns solid. */
@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

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

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

  .action:active,
  .action-quiet:active,
  .doc-card:active,
  .doc-card:hover {
    transform: none;
  }
}
