/* ==========================================================================
   RESET & BASE — Modern CSS Reset + FinSmartHub Base Styles
   ========================================================================== */

/* ── Box Sizing ────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Document ──────────────────────────────────────────────────────────── */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--text-body);
  background-color: var(--bg-body);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Headings ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  color: var(--text-heading);
  letter-spacing: var(--ls-tight);
}

h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); }
h4, .h4 { font-size: var(--fs-h4); }
h5, .h5 { font-size: var(--fs-h5); }
h6, .h6 { font-size: var(--fs-h6); }

/* ── Typography ────────────────────────────────────────────────────────── */
p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

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

a:hover {
  color: var(--text-link-hover);
}

strong, b {
  font-weight: var(--fw-semibold);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--fs-caption);
}

/* ── Lists ─────────────────────────────────────────────────────────────── */
ul, ol {
  list-style: none;
}

/* ── Images & Media ────────────────────────────────────────────────────── */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  border: 0;
}

figure {
  margin: 0;
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: var(--border);
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-50);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

label {
  display: block;
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-medium);
  color: var(--text-heading);
  margin-bottom: var(--space-2);
}

::placeholder {
  color: var(--color-gray-400);
  opacity: 1;
}

/* ── Tables ────────────────────────────────────────────────────────────── */
table {
  border-collapse: collapse;
  width: 100%;
}

/* ── Misc ──────────────────────────────────────────────────────────────── */
hr {
  border: none;
  border-top: var(--border);
  margin: var(--space-8) 0;
}

blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-6);
  font-style: italic;
  color: var(--text-muted);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: var(--color-gray-100);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

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

/* ── Screen Reader Only ────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
