/* ===================== AccessBridge — Base ===================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  background: var(--navy-900);
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  background: var(--navy-900);
  color: var(--white);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
}

p { margin: 0; }

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

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

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

a { color: var(--cyan-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* [hidden] must always win over component display rules */
[hidden] { display: none !important; }

/* Skip link */
.skip-link {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -140%);
  top: var(--space-2);
  background: var(--cyan);
  color: var(--navy-950);
  font-weight: 700;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: transform var(--duration-base) var(--ease-out);
}
.skip-link:focus {
  transform: translate(-50%, 0);
}

/* Focus visibility */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--cyan-strong);
  outline-offset: 2px;
  border-radius: 6px;
}
.icon-btn:focus-visible,
.play-btn:focus-visible {
  outline-offset: 3px;
}

/* Bilingual content toggling — only the active language stays in the a11y tree */
[data-active-lang="en"] [lang="np"]:not([data-lang-btn]) { display: none !important; }
[data-active-lang="np"] [lang="en"]:not([data-lang-btn]) { display: none !important; }
[lang="np"] { font-family: var(--font-np); }

/* Live region utility (visually hidden but announced) */
.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;
}

/* Screens */
.screen { display: none; }
.screen.is-active { display: block; animation: screen-in var(--duration-slow) var(--ease-out); }
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.visually-off { opacity: 0; }
