/*
  Design bank component library.

  Every visual value comes from a custom property. A system sets those properties
  in its own spec.css (systems/<name>/spec.css) and adds its own components there
  with an x- prefix. Nothing in this file is brand specific: the defaults below are
  neutral and exist only so a missing value is visible, never as a design choice.

  Contract: a system spec must set every property in the :root block below.
*/

:root {
  /* Colour roles */
  --c-bg: #ffffff;
  --c-surface: #ffffff;
  --c-surface-2: #f4f4f4;
  --c-inverse: #111111;
  --c-on-inverse: #ffffff;
  --c-fg: #111111;
  --c-fg-2: #333333;
  --c-muted: #666666;
  --c-border: #dddddd;
  --c-accent: #111111;
  --c-on-accent: #ffffff;
  --c-accent-hover: #000000;
  --c-link: #111111;
  --c-focus: 0 0 0 2px #111111;

  /* Type families */
  --f-display: system-ui, sans-serif;
  --f-body: system-ui, sans-serif;
  --f-mono: ui-monospace, monospace;
  --f-features: normal;

  /* Type roles: size, weight, line height, tracking, case */
  --t-display-size: 64px; --t-display-weight: 600; --t-display-lh: 1.05; --t-display-track: -0.02em;
  --t-h2-size: 40px; --t-h2-weight: 600; --t-h2-lh: 1.1; --t-h2-track: -0.01em;
  --t-h3-size: 22px; --t-h3-weight: 600; --t-h3-lh: 1.25; --t-h3-track: 0em;
  --t-lead-size: 20px; --t-lead-weight: 400; --t-lead-lh: 1.5;
  --t-body-size: 16px; --t-body-weight: 400; --t-body-lh: 1.5;
  --t-small-size: 14px; --t-small-weight: 400; --t-small-lh: 1.45;
  --t-label-size: 12px; --t-label-weight: 600; --t-label-track: 0.08em; --t-label-case: uppercase; --t-label-font: var(--f-body);
  --t-button-size: 15px; --t-button-weight: 500; --t-button-track: 0em; --t-button-case: none;
  --t-nav-size: 15px; --t-nav-weight: 500;

  /* Layout and spacing */
  --s-container: 1200px;
  --s-gutter: 24px;
  --s-section: 96px;
  --s-section-sm: 64px;
  --s-stack: 24px;       /* space between heading and body inside a block */
  --s-grid-gap: 24px;
  --s-list-gap: 12px;

  /* Shape and depth */
  --r-sm: 4px; --r-md: 8px; --r-lg: 16px; --r-pill: 9999px;
  --shadow-1: none;
  --shadow-2: none;
  --border-w: 1px;

  /* Components */
  --nav-height: 72px; --nav-bg: var(--c-bg); --nav-border: var(--c-border); --nav-radius: 0; --nav-inset: 0px;
  --btn-height: 44px; --btn-pad-x: 20px; --btn-radius: var(--r-sm);
  --btn-primary-bg: var(--c-accent); --btn-primary-fg: var(--c-on-accent); --btn-primary-border: transparent; --btn-primary-hover-bg: var(--c-accent-hover);
  --btn-secondary-bg: transparent; --btn-secondary-fg: var(--c-fg); --btn-secondary-border: var(--c-fg); --btn-secondary-hover-bg: var(--c-surface-2);
  --btn-hover-transform: none; --btn-active-transform: none; --btn-transition: 150ms ease;
  --card-bg: var(--c-surface); --card-border: var(--c-border); --card-radius: var(--r-md); --card-pad: 28px; --card-shadow: none; --card-media-radius: 0;
  --tag-bg: var(--c-surface-2); --tag-fg: var(--c-fg); --tag-radius: var(--r-pill); --tag-pad: 4px 12px;
  --field-bg: var(--c-surface); --field-border: var(--c-border); --field-radius: var(--r-sm); --field-height: 44px;
  --list-marker-colour: var(--c-accent); --list-divider: none;
  --quote-size: 32px; --quote-font: var(--f-display); --quote-weight: 400; --quote-lh: 1.3;
  --stat-size: 56px; --stat-weight: 600; --stat-colour: var(--c-fg); --stat-font: var(--f-display);
  --cta-bg: var(--c-inverse); --cta-fg: var(--c-on-inverse); --cta-radius: var(--r-lg);
  --footer-bg: var(--c-bg); --footer-fg: var(--c-muted); --footer-border: var(--c-border);
  --media-radius: var(--r-lg); --media-shadow: none;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--c-bg); color: var(--c-fg-2); font-family: var(--f-body); font-size: var(--t-body-size); font-weight: var(--t-body-weight); line-height: var(--t-body-lh); font-feature-settings: var(--f-features); }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--c-link); }
:focus-visible { outline: none; box-shadow: var(--c-focus); }
h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

.c-container { width: min(100% - 2 * var(--s-gutter), var(--s-container)); margin-inline: auto; }
.c-section { padding-block: var(--s-section); }
.c-section.is-sm { padding-block: var(--s-section-sm); }
.c-section.is-surface { background: var(--c-surface-2); }
.c-section.is-inverse { background: var(--c-inverse); color: var(--c-on-inverse); }
.c-section.is-inverse :is(h1, h2, h3) { color: var(--c-on-inverse); }
.c-stack > * + * { margin-top: var(--s-stack); }

/* Type roles */
.c-display { font-family: var(--f-display); font-size: var(--t-display-size); font-weight: var(--t-display-weight); line-height: var(--t-display-lh); letter-spacing: var(--t-display-track); color: var(--c-fg); text-wrap: balance; }
.c-h2 { font-family: var(--f-display); font-size: var(--t-h2-size); font-weight: var(--t-h2-weight); line-height: var(--t-h2-lh); letter-spacing: var(--t-h2-track); color: var(--c-fg); text-wrap: balance; }
.c-h3 { font-family: var(--f-display); font-size: var(--t-h3-size); font-weight: var(--t-h3-weight); line-height: var(--t-h3-lh); letter-spacing: var(--t-h3-track); color: var(--c-fg); }
.c-lead { font-size: var(--t-lead-size); font-weight: var(--t-lead-weight); line-height: var(--t-lead-lh); }
.c-small { font-size: var(--t-small-size); font-weight: var(--t-small-weight); line-height: var(--t-small-lh); }
.c-muted { color: var(--c-muted); }
.c-label { font-family: var(--t-label-font); font-size: var(--t-label-size); font-weight: var(--t-label-weight); letter-spacing: var(--t-label-track); text-transform: var(--t-label-case); color: var(--c-muted); }

/* Nav */
.c-nav { position: relative; z-index: 5; }
.c-nav__bar { display: flex; align-items: center; gap: 32px; min-height: var(--nav-height); background: var(--nav-bg); border-bottom: var(--border-w) solid var(--nav-border); }
.c-nav[data-style="floating"] { padding-top: var(--nav-inset); }
.c-nav[data-style="floating"] .c-nav__bar { border: 0; border-radius: var(--nav-radius); padding-inline: 24px; box-shadow: var(--shadow-1); }
.c-nav__brand { font-family: var(--f-display); font-weight: var(--t-h3-weight); font-size: 20px; color: var(--c-fg); text-decoration: none; letter-spacing: var(--t-h3-track); }
.c-nav__links { display: flex; gap: 28px; list-style: none; padding: 0; margin: 0 auto 0 0; }
.c-nav__links a { color: var(--c-fg-2); text-decoration: none; font-size: var(--t-nav-size); font-weight: var(--t-nav-weight); }
.c-nav__actions { display: flex; gap: 12px; margin-left: auto; }
@media (max-width: 900px) { .c-nav__links, .c-nav__actions .is-desktop { display: none; } }

/* Buttons */
.c-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--btn-height); padding: 0 var(--btn-pad-x); border-radius: var(--btn-radius); border: var(--border-w) solid transparent; font-family: var(--f-body); font-size: var(--t-button-size); font-weight: var(--t-button-weight); letter-spacing: var(--t-button-track); text-transform: var(--t-button-case); text-decoration: none; cursor: pointer; transition: background var(--btn-transition), transform var(--btn-transition), color var(--btn-transition); }
.c-btn:hover { transform: var(--btn-hover-transform); }
.c-btn:active { transform: var(--btn-active-transform); }
.c-btn--primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); border-color: var(--btn-primary-border); }
.c-btn--primary:hover { background: var(--btn-primary-hover-bg); }
.c-btn--secondary { background: var(--btn-secondary-bg); color: var(--btn-secondary-fg); border-color: var(--btn-secondary-border); }
.c-btn--secondary:hover { background: var(--btn-secondary-hover-bg); }
.c-btn--link { padding: 0; min-height: auto; background: none; color: var(--c-link); text-decoration: underline; text-underline-offset: 0.2em; }
.c-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.c-hero { padding-block: var(--s-section-sm) var(--s-section); }
.c-hero__inner { display: grid; gap: 48px; align-items: center; }
.c-hero[data-layout="split"] .c-hero__inner { grid-template-columns: 1fr; }
@media (min-width: 960px) { .c-hero[data-layout="split"] .c-hero__inner { grid-template-columns: 1.1fr 1fr; } }
.c-hero[data-layout="centred"] .c-hero__inner { text-align: center; justify-items: center; }
.c-hero[data-layout="centred"] .c-buttons { justify-content: center; }
.c-hero__media { border-radius: var(--media-radius); box-shadow: var(--media-shadow); overflow: hidden; }

/* Cards */
.c-grid { display: grid; gap: var(--s-grid-gap); grid-template-columns: 1fr; }
@media (min-width: 720px) { .c-grid.is-2, .c-grid.is-3, .c-grid.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .c-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .c-grid.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.c-card { background: var(--card-bg); border: var(--border-w) solid var(--card-border); border-radius: var(--card-radius); padding: var(--card-pad); box-shadow: var(--card-shadow); display: grid; gap: 12px; align-content: start; overflow: hidden; }
.c-card__media { margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 8px; border-radius: var(--card-media-radius); overflow: hidden; }

/* Tag */
.c-tag { display: inline-flex; align-items: center; padding: var(--tag-pad); border-radius: var(--tag-radius); background: var(--tag-bg); color: var(--tag-fg); font-size: var(--t-small-size); font-weight: var(--t-button-weight); }

/* Lists */
.c-list { list-style: none; padding: 0; display: grid; gap: var(--s-list-gap); }
.c-list > li { position: relative; padding-left: 1.75em; }
.c-list[data-marker="none"] > li { padding-left: 0; }
.c-list[data-marker="dot"] > li::before { content: ""; position: absolute; left: 0.2em; top: 0.6em; width: 0.45em; height: 0.45em; border-radius: 50%; background: var(--list-marker-colour); }
.c-list[data-marker="dash"] > li::before { content: "\2013"; position: absolute; left: 0; color: var(--list-marker-colour); }
.c-list[data-marker="check"] > li::before { content: ""; position: absolute; left: 0.1em; top: 0.35em; width: 0.9em; height: 0.5em; border-left: 2px solid var(--list-marker-colour); border-bottom: 2px solid var(--list-marker-colour); transform: rotate(-45deg) scale(0.8); }
.c-list[data-marker="number"] { counter-reset: n; }
.c-list[data-marker="number"] > li::before { counter-increment: n; content: counter(n, decimal-leading-zero); position: absolute; left: 0; font-family: var(--f-mono); font-size: 0.8em; color: var(--list-marker-colour); top: 0.15em; }
.c-list[data-divider] > li { padding-block: var(--s-list-gap); border-top: var(--list-divider); }
.c-list[data-divider] { gap: 0; }

/* Stats */
.c-stat__n { font-family: var(--stat-font); font-size: var(--stat-size); font-weight: var(--stat-weight); line-height: 1; letter-spacing: var(--t-display-track); color: var(--stat-colour); }
.c-stat__l { margin-top: 8px; color: var(--c-fg-2); }

/* Quote */
.c-quote blockquote p { font-family: var(--quote-font); font-size: var(--quote-size); font-weight: var(--quote-weight); line-height: var(--quote-lh); color: var(--c-fg); }
.c-quote figcaption { margin-top: 24px; }

/* Pricing */
.c-price { display: grid; gap: 16px; }
.c-price__n { font-family: var(--f-display); font-size: var(--t-h2-size); font-weight: var(--t-h2-weight); letter-spacing: var(--t-h2-track); color: var(--c-fg); line-height: 1; }

/* FAQ */
.c-faq details { border-top: var(--border-w) solid var(--c-border); padding-block: 20px; }
.c-faq details:last-child { border-bottom: var(--border-w) solid var(--c-border); }
.c-faq summary { cursor: pointer; list-style: none; font-family: var(--f-display); font-size: var(--t-h3-size); font-weight: var(--t-h3-weight); color: var(--c-fg); display: flex; justify-content: space-between; gap: 16px; }
.c-faq summary::-webkit-details-marker { display: none; }
.c-faq summary::after { content: "+"; font-family: var(--f-body); color: var(--c-muted); }
.c-faq details[open] summary::after { content: "\2212"; }
.c-faq details p { margin-top: 12px; max-width: 70ch; }

/* Form */
.c-field { display: grid; gap: 6px; font-size: var(--t-small-size); color: var(--c-fg); font-weight: var(--t-button-weight); }
.c-field input { font: inherit; font-weight: 400; min-height: var(--field-height); padding: 0 14px; background: var(--field-bg); border: var(--border-w) solid var(--field-border); border-radius: var(--field-radius); color: var(--c-fg); }

/* CTA band */
.c-cta { background: var(--cta-bg); color: var(--cta-fg); border-radius: var(--cta-radius); padding: clamp(40px, 6vw, 88px); display: grid; gap: 24px; }
.c-cta :is(.c-h2, .c-display) { color: var(--cta-fg); }

/* Footer */
.c-footer { background: var(--footer-bg); color: var(--footer-fg); border-top: var(--border-w) solid var(--footer-border); padding-block: 64px 40px; font-size: var(--t-small-size); }
.c-footer a { color: inherit; text-decoration: none; }
.c-footer__cols { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.c-footer__cols ul { list-style: none; padding: 0; display: grid; gap: 10px; margin-top: 12px; }
.c-footer h3 { font-size: var(--t-small-size); color: var(--c-fg); font-weight: var(--t-button-weight); }
.c-footer.is-inverse h3 { color: var(--c-on-inverse); }

/* Image placeholder: only for content images the brand would supply */
.c-ph { aspect-ratio: var(--ph-ratio, 4 / 3); background: var(--c-surface-2); border-radius: var(--media-radius); display: grid; place-items: center; color: var(--c-muted); font-size: var(--t-small-size); }

/* Bank tag */
.bank-tag { position: fixed; right: 12px; bottom: 12px; z-index: 50; background: #111; color: #fff; font: 500 12px/1.4 system-ui, sans-serif; padding: 8px 12px; border-radius: 8px; text-decoration: none; }
