/* =========================================================
   RealCash — base reset, typography, layout primitives
   ========================================================= */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-base);
    font-size: var(--fz-md);
    line-height: var(--lh-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body::before {
    /* subtle ambient gradient — barely visible warm tone */
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(1200px 600px at 90% -10%, rgba(124, 58, 237, 0.05), transparent 60%),
        radial-gradient(900px 500px at -10% 20%, rgba(244, 63, 94, 0.04), transparent 55%);
}

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dt, dd, figure {
    margin: 0;
    padding: 0;
}

ul, ol { list-style: none; }

img, svg, video {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--d-fast) var(--ease-out);
}

a:hover { color: var(--color-primary-dark); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--r-xs);
}

button {
    font: inherit;
    cursor: pointer;
    border: 0;
    background: transparent;
    color: inherit;
}

input, select, textarea { font: inherit; }

::selection {
    background: var(--color-primary-tint);
    color: var(--color-primary-darker);
}

/* ---- Typography scale ---- */
h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(28px, 4vw + 8px, 44px);
    line-height: var(--lh-tight);
    letter-spacing: -0.02em;
    color: var(--color-text);
}

h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(22px, 2.5vw + 6px, 32px);
    line-height: var(--lh-snug);
    letter-spacing: -0.015em;
    color: var(--color-text);
}

h3 {
    font-weight: 700;
    font-size: clamp(18px, 1.5vw + 6px, 22px);
    line-height: var(--lh-snug);
    letter-spacing: -0.01em;
    color: var(--color-text);
}

h4 {
    font-weight: 700;
    font-size: var(--fz-lg);
    line-height: var(--lh-snug);
    color: var(--color-text);
}

p { line-height: var(--lh-relaxed); color: var(--color-text-muted); }

small, .text-sm { font-size: var(--fz-sm); }
.text-xs { font-size: var(--fz-xs); }
.text-muted { color: var(--color-text-soft); }
.text-strong { color: var(--color-text); font-weight: 600; }

strong, b { font-weight: 700; color: var(--color-text); }

/* ---- Container — single source of width ---- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

.container--narrow {
    max-width: 800px;
}

.container--wide {
    max-width: 1320px;
}

/* ---- Section spacing ---- */
.section {
    padding-block: clamp(40px, 6vw, 80px);
}

.section--tight {
    padding-block: clamp(24px, 4vw, 48px);
}

.section--first {
    padding-top: clamp(32px, 4vw, 56px);
}

/* ---- Visually hidden (a11y) ---- */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* ---- Skip link ---- */
.skip-link {
    position: absolute;
    top: -40px; left: 8px;
    background: var(--color-primary);
    color: var(--color-text-on-primary);
    padding: 8px 14px;
    border-radius: var(--r-sm);
    z-index: 10000;
    font-weight: 600;
}

.skip-link:focus { top: 8px; color: var(--color-text-on-primary); }
