/* ============================================================
   IDF Bangladesh — Base
   Reset, base typography, layout primitives, accessibility floor.
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Offset in-page anchors so the fixed header never covers a heading */
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
img { font-style: italic; }              /* alt text stays readable if an image fails */
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

/* --- Headings --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-snug);
  color: var(--forest);
  text-wrap: balance;
}
h1 { font-size: var(--fs-900); line-height: var(--lh-tight); font-weight: 700; }
h2 { font-size: var(--fs-800); }
h3 { font-size: var(--fs-700); }
h4 { font-size: var(--fs-600); }

p { max-width: 68ch; }

/* --- Links --- */
a { color: var(--forest); text-decoration-color: var(--gold-40); text-underline-offset: .18em; transition: color var(--t-fast) var(--ease-silk); }
a:hover { color: var(--saffron); }

/* --- Selection --- */
::selection { background: var(--forest); color: var(--cream); }

/* ============================================================
   Accessibility floor — non-negotiable
   ============================================================ */

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--gold-rule);
  outline-offset: 3px;
  border-radius: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 1000;
  background: var(--forest);
  color: var(--cream);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top var(--t-fast) var(--ease-silk);
}
.skip-link:focus { top: var(--sp-4); color: var(--cream); }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

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

.section { padding-block: clamp(var(--sp-8), 8vw, var(--sp-10)); }
.section--forest { background: var(--forest); color: var(--cream); }
.section--forest h1, .section--forest h2, .section--forest h3, .section--forest h4 { color: var(--white); }
.section--cream-d { background: var(--cream-d); }

/* Gold hairline — the restrained premium accent, used sparingly */
.rule-gold { width: 56px; height: 2px; border: 0; background: var(--gold-rule); margin: 0; }

/* ============================================================
   Scroll reveal — progressive enhancement.
   .reveal is applied inline; main.js adds .is-in when visible.
   With no JS, or reduced motion, content is always visible.
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity .72s var(--ease-silk), transform .72s var(--ease-silk); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal--img { transform: translateY(36px) scale(.94); }   /* images rise + settle from a slight zoom */
.js .reveal--img.is-in { transform: none; }
[data-reveal-stagger] > * { transition-delay: calc(var(--i, 0) * 90ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal--img { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* --- Small utilities --- */
.u-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.u-mt-0 { margin-top: 0; }
.u-center { text-align: center; }
.no-scroll { overflow: hidden; }
