/* Reset, typography, layout primitives and shared components. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: var(--w-regular);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

svg {
  display: block;
}

strong {
  font-weight: var(--w-strong);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

:lang(bn) {
  letter-spacing: 0;
  line-height: 1.7;
}

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

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: var(--w-strong);
}

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

/* Lenis (smooth scroll) */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* ---------- layout ---------- */
.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-y);
}

.section__head {
  display: grid;
  gap: var(--s2);
  max-width: 46rem;
  margin: 0 auto var(--s8);
}

.section__head--center {
  justify-items: center;
  text-align: center;
}

/* ---------- type ---------- */
.display {
  font-size: var(--fs-display);
  font-weight: var(--w-strong);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.h2 {
  font-size: var(--fs-h2);
  font-weight: var(--w-strong);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h3 {
  font-size: var(--fs-h3);
  font-weight: var(--w-strong);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.h4 {
  font-size: var(--fs-h4);
  font-weight: var(--w-strong);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}

/* ---------- small components ---------- */
.i {
  flex: none;
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
}

.eyebrow,
.chip--lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: var(--fs-sm);
  font-weight: var(--w-strong);
  line-height: 1;
  color: var(--text-2);
}

.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: var(--w-strong);
  line-height: 1;
  white-space: nowrap;
}

.chip .i {
  width: 14px;
  height: 14px;
}

.chip--ok {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.chip--warn {
  background: var(--warn-soft);
  color: var(--warn-ink);
}

.chip--neutral {
  background: var(--surface-2);
  color: var(--text-2);
}

.icon-chip {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-xs);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-2);
  transition: background-color 0.3s, color 0.3s;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.card--lg {
  border-radius: var(--r-lg);
}

/* category / icon tile: tinted square, icon in the category colour */
.cat {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--r-xs);
  color: var(--c, var(--accent));
  isolation: isolate;
}

.cat::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--c, var(--accent));
  opacity: 0.14;
}

.cat .i {
  width: 18px;
  height: 18px;
}

.dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: var(--w-strong);
}

.avatar--sm {
  width: 32px;
  height: 32px;
  font-size: var(--fs-xs);
}

/* ---------- buttons ---------- */
.btn {
  --h: 48px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  height: var(--h);
  padding: 0 8px 0 24px;
  border-radius: var(--r-pill);
  font-size: 1rem;
  font-weight: var(--w-strong);
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.3s, box-shadow 0.5s var(--ease), border-color 0.3s;
}

.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}

.btn--primary:hover {
  box-shadow: 0 12px 28px -12px rgba(14, 17, 22, 0.5);
}

.btn--ghost {
  padding: 0 24px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.btn--ghost:hover {
  box-shadow: var(--shadow);
  border-color: var(--text-3);
}

.btn--sm {
  --h: 40px;
  gap: 12px;
  padding: 0 6px 0 16px;
  font-size: 0.9375rem;
}

.btn__arrow {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--btn-arrow-bg);
  overflow: hidden;
}

.btn--sm .btn__arrow {
  width: 28px;
  height: 28px;
}

.btn__arrow .i {
  grid-area: 1 / 1;
  width: 16px;
  height: 16px;
  transition: transform 0.55s var(--ease);
}

.btn__arrow .i:last-child {
  transform: translateX(-32px);
}

.btn:hover .btn__arrow .i:first-child,
.btn:focus-visible .btn__arrow .i:first-child {
  transform: translateX(32px);
}

.btn:hover .btn__arrow .i:last-child,
.btn:focus-visible .btn__arrow .i:last-child {
  transform: translateX(0);
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}
