/* ==========================================================================
   GreenPay Services - Base
   Design tokens, reset, typography and global utilities.
   Load order: base.css > layout.css > components.css > pages/*.css
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  color-scheme: dark;

  --c-bg: #040a1c;
  --c-bg-alt: #071230;
  --c-surface: rgba(19, 40, 86, 0.42);
  --c-surface-solid: #0b1738;
  --c-border: rgba(110, 168, 255, 0.18);
  --c-border-strong: rgba(110, 168, 255, 0.42);
  --c-text: #dfe9ff;
  --c-muted: #9db0d6;
  --c-heading: #ffffff;
  --c-grid: rgba(90, 150, 255, 0.075);
  --c-header: rgba(4, 10, 28, 0.78);
  --c-field: rgba(3, 9, 26, 0.6);
  --c-accent-text: #6ef2a0;
  --c-link: #5cc8ff;

  --c-blue: #0a7cff;
  --c-cyan: #2ad4ff;
  --c-green: #25c05a;
  --c-navy: #0a1f52;
  --c-danger: #ff6b7d;

  --grad-brand: linear-gradient(100deg, #25c05a 0%, #2ad4ff 52%, #0a7cff 100%);
  --grad-blue: linear-gradient(135deg, #1a8cff 0%, #0457d6 100%);
  --shadow-card: 0 20px 50px -30px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 16px 44px -16px rgba(10, 124, 255, 0.65);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", var(--font-body);
  --font-headline: "Oswald", "Arial Narrow", sans-serif;
  --font-script: "Great Vibes", "Segoe Script", cursive;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --container: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="light"] {
  color-scheme: light;

  --c-bg: #ffffff;
  --c-bg-alt: #eff5ff;
  --c-surface: rgba(255, 255, 255, 0.82);
  --c-surface-solid: #ffffff;
  --c-border: rgba(10, 74, 170, 0.14);
  --c-border-strong: rgba(10, 124, 255, 0.45);
  --c-text: #1e2d4f;
  --c-muted: #53648a;
  --c-heading: #0a1f52;
  --c-grid: rgba(10, 100, 220, 0.065);
  --c-header: rgba(255, 255, 255, 0.84);
  --c-field: #ffffff;
  --c-accent-text: #12813a;
  --c-link: #0561d1;
  --c-danger: #c4263c;

  --shadow-card: 0 22px 48px -32px rgba(10, 45, 110, 0.4);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--c-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

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

[hidden] {
  display: none !important;
}

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

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  color: var(--c-heading);
  font-family: var(--font-display);
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1rem;
}

/* ---------- Layout utilities ---------- */
.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: clamp(64px, 8vw, 112px);
}

.section--alt {
  background: var(--c-bg-alt);
}

.section--grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--c-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 76%);
}

.section > .container {
  position: relative;
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}

.section-head p {
  color: var(--c-muted);
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--c-accent-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 14px 3px rgba(37, 192, 90, 0.8);
}

.gradient-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--c-blue);
  color: #fff;
  font-weight: 600;
}

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

/* ---------- Scroll reveal (enabled only when JavaScript runs) ---------- */
.js [data-reveal] {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}

/* ---------- Motion preferences ---------- */
@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;
  }

  .js [data-reveal] {
    opacity: 1;
    translate: 0 0;
  }
}
