/* ============================================================
   FISPAY — Foundations (Color + Type)
   Source: FiSPAY Corporate Identity Manual v1.1 (April 2026)
   ============================================================ */

/* ------------ Webfonts (self-hosted from /fonts) ------------ */
@font-face { font-family: "Georama"; src: url("/fonts/georama-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Georama"; src: url("/fonts/georama-medium.woff2") format("woff2");  font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Georama"; src: url("/fonts/georama-semibold.woff2") format("woff2");font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Georama"; src: url("/fonts/georama-bold.woff2") format("woff2");    font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Georama"; src: url("/fonts/georama-extrabold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Georama"; src: url("/fonts/georama-black.woff2") format("woff2");   font-weight: 900; font-style: normal; font-display: swap; }

/* Condensed cut — used for the wordmark & display */
@font-face { font-family: "Georama Condensed"; src: url("/fonts/georama-condensed-regular.woff2") format("woff2");  font-weight: 400; font-display: swap; }
@font-face { font-family: "Georama Condensed"; src: url("/fonts/georama-condensed-medium.woff2") format("woff2");   font-weight: 500; font-display: swap; }
@font-face { font-family: "Georama Condensed"; src: url("/fonts/georama-condensed-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Georama Condensed"; src: url("/fonts/georama-condensed-bold.woff2") format("woff2");     font-weight: 700; font-display: swap; }
@font-face { font-family: "Georama Condensed"; src: url("/fonts/georama-condensed-black.woff2") format("woff2");    font-weight: 900; font-display: swap; }

@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-light.woff2") format("woff2");     font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-regular.woff2") format("woff2");   font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-italic.woff2") format("woff2");    font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-medium.woff2") format("woff2");    font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-semibold.woff2") format("woff2");  font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-bold.woff2") format("woff2");      font-weight: 700; font-style: normal; font-display: swap; }

/* Daniel's homepage (v4): Archivo Condensed for everything, Inter Bold only for the arrow. */
@font-face { font-family: "Archivo Condensed"; src: url("/fonts/archivo-condensed-light.woff2") format("woff2");     font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo Condensed"; src: url("/fonts/archivo-condensed-medium.woff2") format("woff2");    font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo Condensed"; src: url("/fonts/archivo-condensed-bold.woff2") format("woff2");      font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo Condensed"; src: url("/fonts/archivo-condensed-extrabold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-bold-arrow.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* ====================== COLOR SYSTEM ====================== */
  /* Brand core (from manual §04) */
  --fispay-midnight:       #121A3A;  /* Primary. Master logotype, backgrounds, headings, anchors. */
  --fispay-magenta:        #B51F75;  /* Accent. Primary actions, active states, selected emphasis. */
  --fispay-soft-mist:      #EEF1F7;  /* Neutral. Cards, panels, dashboards surfaces. */
  --fispay-ink:            #2D3345;  /* Support. Body text, tables, dividers. */

  /* Extended midnight scale — derived for UI depth */
  --midnight-950:          #0A1028;
  --midnight-900:          #121A3A; /* = brand midnight */
  --midnight-800:          #1B2450;
  --midnight-700:          #242F66;
  --midnight-600:          #344180;
  --midnight-500:          #4A5799;
  --midnight-300:          #8B93B8;
  --midnight-100:          #D6DAE8;

  /* Extended magenta scale — selected emphasis ramp */
  --magenta-900:           #7A0F4E;
  --magenta-800:           #9A1363;
  --magenta-700:           #B51F75; /* = brand magenta */
  --magenta-600:           #C72A87;
  --magenta-500:           #D54A9C;
  --magenta-300:           #EAA1CB;
  --magenta-100:           #F7DCEA;

  /* Neutral / surface ramp */
  --white:                 #FFFFFF;
  --mist-50:               #F7F9FC;
  --mist-100:              #EEF1F7; /* = brand soft-mist */
  --mist-200:              #DEE3EE;
  --mist-300:              #C8CFDF;
  --mist-400:              #A4ADC3;
  --ink-600:               #2D3345; /* = brand ink */
  --ink-500:               #444B60;
  --ink-400:               #5E6579;
  --surface-warm:          #E0DCDA; /* page grey of Daniel's JPEG: sampled #DDD9D8, lifted so brand magenta holds 4.51:1 */
  --surface-card:          #EEECEB; /* lighter card grey of the JPEG, about 55 % surface + 45 % white */

  /* Semantic status — practical, merchant-centric */
  --status-success:        #167B5C;
  --status-success-soft:   #DCF1E8;
  --status-warning:        #B87900;
  --status-warning-soft:   #FBEFD2;
  --status-danger:         #B42343;
  --status-danger-soft:    #F8DDE3;
  --status-info:           #2049B8;
  --status-info-soft:      #DCE6F8;

  /* Semantic roles — use these in UI, not raw brand tokens */
  --fg-1:                  var(--midnight-900);  /* Primary text, headings */
  --fg-2:                  var(--ink-600);       /* Body text */
  --fg-3:                  var(--ink-400);       /* Captions, metadata */
  --fg-on-dark:            var(--white);
  --fg-on-accent:          var(--white);

  --bg-base:               var(--surface-warm);
  --bg-subtle:             var(--mist-50);
  --bg-surface:            var(--mist-100);       /* panels, cards */
  --bg-raised:             var(--white);
  --bg-inverse:            var(--midnight-900);   /* dashboard nav, dark hero */

  --border-subtle:         var(--mist-200);
  --border-strong:         var(--mist-300);
  --border-inverse:        var(--midnight-800);

  --accent:                var(--magenta-700);
  --accent-hover:          var(--magenta-800);
  --accent-press:          var(--magenta-900);
  --accent-soft:           var(--magenta-100);

  /* Sampled from Daniel's PSD, 5 Nov 2026 - white text holds 4.5:1 on each. */
  --magenta-vivid:         #E5007E;
  --magenta-deep:          #A00053;
  --indigo-950:            #101042;
  --indigo-900:            #20205C;
  --indigo-850:            #26224E;
  --indigo-700:            #2C2C7F;

  --focus-ring:            #5A7BE6;   /* accessible blue on both light and brand surfaces */

  /* ====================== TYPE SYSTEM ======================= */
  --font-display:          "Georama Condensed", "Georama", system-ui, sans-serif; /* wordmark / big display */
  --font-heading:          "Georama", system-ui, sans-serif;                      /* H1–H4 */
  --font-body:             "DM Sans", "Aptos", system-ui, sans-serif;              /* body, UI */
  --font-archivo:          "Archivo Condensed", "Georama Condensed", system-ui, sans-serif; /* homepage, header, footer */
  --font-arrow:            "Inter", system-ui, sans-serif;                        /* the arrow glyph only */
  --font-mono:             ui-monospace, "SF Mono", Menlo, Consolas, monospace;    /* code, IDs */

  /* Scale — merchant interfaces prioritize legibility over density */
  --text-xs:    12px;   /* caption, metadata (manual floor 8–10pt print) */
  --text-sm:    14px;   /* body small, labels */
  --text-md:    16px;   /* body default */
  --text-lg:    18px;   /* body large / subhead */
  --text-xl:    22px;   /* H4 */
  --text-2xl:   28px;   /* H3 */
  --text-3xl:   34px;   /* H2 */
  --text-4xl:   44px;   /* H1 (within 40–52pt display range) */
  --text-5xl:   56px;   /* Display / hero */
  --text-6xl:   72px;   /* Marketing hero cover */

  --lh-tight:   1.08;
  --lh-snug:    1.2;
  --lh-body:    1.5;
  --lh-loose:   1.65;

  --tracking-display: -0.02em;
  --tracking-heading: -0.01em;
  --tracking-body:     0;
  --tracking-label:    0.02em;
  --tracking-caps:     0.08em;

  /* ==================== SPACING / RADIUS ==================== */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;   /* default card / input */
  --radius-lg: 14px;   /* hero cards */
  --radius-xl: 20px;   /* illustrative blocks */
  --radius-pill: 999px;

  /* Shadows — restrained, operational, never glowy */
  --shadow-xs: 0 1px 2px rgba(18, 26, 58, 0.06);
  --shadow-sm: 0 2px 6px rgba(18, 26, 58, 0.06), 0 1px 2px rgba(18, 26, 58, 0.04);
  --shadow-md: 0 8px 20px rgba(18, 26, 58, 0.08), 0 2px 6px rgba(18, 26, 58, 0.05);
  --shadow-lg: 0 20px 40px rgba(18, 26, 58, 0.12), 0 6px 12px rgba(18, 26, 58, 0.06);
  --shadow-focus: 0 0 0 3px rgba(90, 123, 230, 0.35);

  --duration-fast: 120ms;
  --duration-med:  200ms;
  --duration-slow: 320ms;
  --ease-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
  --ease-emphasis: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ====================== SEMANTIC TEXT STYLES ======================= */
html, body {
  font-family: var(--font-body);
  color: var(--fg-2);
  background: var(--bg-base);
  font-size: var(--text-md);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--text-4xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-heading);
  color: var(--fg-1);
  margin: 0;
}
h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-3xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-heading);
  color: var(--fg-1);
  margin: 0;
}
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-2xl);
  line-height: var(--lh-snug);
  color: var(--fg-1);
  margin: 0;
}
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: var(--lh-snug);
  color: var(--fg-1);
  margin: 0;
}

p {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--lh-body);
  color: var(--fg-2);
  margin: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.94em;
  background: var(--bg-surface);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  color: var(--fg-1);
}

/* Every <img> carries width/height attributes (layout-shift guard, tests
   require them). They act as specified dimensions: once a rule clamps one
   axis (max-width), the other would keep the attribute value and distort —
   `height: auto` returns it to the attribute-derived aspect ratio. */
img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
