/* =============================================================================
   base.css — reset, typography, layout primitives
   Shuhari Finance Pvt. Ltd. See CLAUDE.md §7–8.
   ========================================================================== */

/* ---- Modern reset -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

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

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

a { color: var(--color-teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Headings ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--color-navy);
  line-height: var(--lh-tight);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: var(--fw-bold); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { line-height: var(--lh-body); }
p, ul, ol { text-wrap: pretty; }

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

ul, ol { padding-left: 1.25rem; }
li { margin-block: 0.25rem; }

/* ---- Layout primitives --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: clamp(var(--space-7), 5vw, var(--space-10)); }
.section--alt { background: var(--color-bg-alt); }
.section--tint { background: var(--color-teal-tint); }
.section--navy { background: var(--color-navy); color: #fff; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: #fff; }

.section-head { max-width: 760px; margin-bottom: var(--space-6); }
.section-head--center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-teal-dark);
  margin-bottom: var(--space-2);
}
.lead { font-size: var(--fs-lead); color: var(--color-muted); }

/* ---- Utility ------------------------------------------------------------- */
.grid { display: grid; gap: var(--space-4); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.flow > * + * { margin-top: var(--space-3); }
.flow-lg > * + * { margin-top: var(--space-5); }
.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Accessible skip link */
.skip-link {
  position: absolute; left: var(--space-3); top: -100px;
  background: var(--color-navy); color: #fff;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  z-index: var(--z-overlay); transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-3); text-decoration: none; }

/* Visible focus state everywhere */
:focus-visible {
  outline: 3px solid var(--color-teal);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (max-width: 768px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
