:root {
  --primary: #0c4d39;
  --primary-deep: #083426;
  --secondary: #f7c948;
  --accent: #eaf7f2;
  --text: #1f2a2d;
  --subtle: #6a7675;
  --card: #ffffff;
  --shadow: rgba(11, 49, 41, 0.15);
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-family);
  background: linear-gradient(180deg, #f7fdfb 0%, #eef8f4 100%);
  color: var(--text);
}

body[data-lang='hi'] { --font-family: 'Noto Sans Devanagari', 'Mangal', sans-serif; }
body[data-lang='or'] { --font-family: 'Noto Sans Oriya', 'Lohit Odia', sans-serif; }
body[data-lang='bn'] { --font-family: 'Noto Sans Bengali', 'Hind Siliguri', sans-serif; }
body[data-lang='sa'] { --font-family: 'Noto Sans Ol Chiki', 'Noto Sans', sans-serif; }
body[data-lang='en'] { --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(12, 77, 57, 0.08);
}

.topbar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 220px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 1.08rem;
  letter-spacing: 0.04em;
}

.brand-text span {
  font-size: 0.76rem;
  color: var(--subtle);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: var(--primary-deep);
  font-size: 0.92rem;
  font-weight: 600;
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(12, 77, 57, 0.08);
  color: var(--primary);
}

.lang-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 160px;
}

.lang-btn {
  background: #edf6f2;
  border: 1px solid rgba(12, 77, 57, 0.1);
  color: var(--primary-deep);
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
}

.lang-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 18px rgba(12, 77, 57, 0.2);
}

.ticker {
  background: #082f26;
  color: #eefef7;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ticker-track {
  display: inline-block;
  padding-left: 100%;
  animation: ticker-scroll 25s linear infinite;
  font-weight: 600;
  letter-spacing: 0.04em;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: 1rem 0 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(12, 77, 57, 0.08);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.section-title,
.page-hero h1 {
  margin: 1rem 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.08;
  color: var(--primary-deep);
}

.hero-copy p,
.page-hero p,
.info-card p,
.pillars p,
.translator-panel p,
.contact-box p,
.murmu-article p {
  color: var(--subtle);
  font-size: 1.03rem;
  line-height: 1.7;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.primary-btn,
.secondary-btn,
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.action-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #155f49 100%);
  color: white;
  box-shadow: 0 12px 20px rgba(12, 77, 57, 0.18);
}

.secondary-btn {
  background: white;
  color: var(--primary);
  border: 1px solid rgba(12, 77, 57, 0.12);
}

.primary-btn:hover,
.secondary-btn:hover,
.action-btn:hover {
  transform: translateY(-2px);
}

.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.script-badge {
  width: min(100%, 460px);
  aspect-ratio: 1;
  background: linear-gradient(145deg, rgba(12,77,57,0.95), rgba(27,128,96,0.82));
  border-radius: 30px;
  box-shadow: 0 30px 45px rgba(12, 77, 57, 0.22);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.script-badge::before,
.script-badge::after {
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
}

.script-badge::after {
  inset: 28%;
  border-style: dashed;
}

.script-badge-text {
  font-size: clamp(2.6rem, 5vw, 5rem);
  color: white;
  letter-spacing: 0.15em;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.section {
  padding: 1.2rem 0 1rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1rem;
  gap: 1rem;
}

.section-title {
  font-size: clamp(1.7rem, 2.5vw, 2.6rem);
  margin: 0;
}

.pillars,
.gallery-grid,
.epaper-grid,
.contact-grid,
.murmu-grid,
.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.reference-heading {
  align-items: start;
}

.reference-intro {
  max-width: 720px;
  color: var(--subtle);
  font-size: 1rem;
  line-height: 1.7;
}

.reference-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  max-width: 330px;
}

.reference-stats span {
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(12, 77, 57, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--subtle);
  font-size: 0.78rem;
  white-space: nowrap;
}

.reference-stats strong {
  color: var(--primary);
  font-size: 1rem;
}

.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
}

.alphabet-card,
.phrase-card,
.vocabulary-card {
  border: 1px solid rgba(46, 125, 50, 0.22);
  border-radius: 14px;
  background: linear-gradient(155deg, #f8fff8 0%, #eaf5ea 100%);
  box-shadow: 0 12px 24px rgba(11, 49, 41, 0.08);
}

.alphabet-card,
.numeral-card {
  position: relative;
  padding: 0.75rem 0.35rem 0.65rem;
  text-align: center;
  overflow: hidden;
  border-color: rgba(46, 125, 50, 0.22);
  border-radius: 14px;
  background: linear-gradient(155deg, #f8fff8, #eaf5ea);
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: reference-rise 500ms both;
  animation-delay: calc(var(--card-index) * 24ms);
}

.alphabet-card::before,
.numeral-card::before {
  display: none;
}

.alphabet-card:hover,
.numeral-card:hover,
.phrase-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 22px rgba(46, 125, 50, 0.14);
}

.alphabet-number {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  color: #9aa8a4;
  font-size: 0.7rem;
  font-weight: 700;
}

.alphabet-letter {
  display: block;
  margin: 0.25rem 0 0.15rem;
  color: #1b5e20;
  font-family: 'Noto Sans Ol Chiki', 'Noto Sans', sans-serif;
  font-size: 2.15rem;
  line-height: 1;
}

.alphabet-roman {
  color: var(--primary-deep);
  font-size: 0.95rem;
  font-weight: 800;
}

.alphabet-sound,
.alphabet-example {
  display: block;
  margin-top: 0.25rem;
  color: var(--subtle);
  font-size: 0.68rem;
  line-height: 1.4;
}

.alphabet-example {
  color: var(--primary-deep);
  font-family: 'Noto Sans Ol Chiki', 'Noto Sans', sans-serif;
}

.reference-subheading {
  margin: 1.5rem 0 0.75rem;
}

.reference-subheading h3 {
  margin: 0.55rem 0 0;
  color: var(--primary-deep);
}

.numeral-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.65rem;
}

.numeral-card {
  min-height: 0;
}

.numeral-symbol {
  display: block;
  color: #1b5e20;
  font-family: 'Noto Sans Ol Chiki', 'Noto Sans', sans-serif;
  font-size: 1.9rem;
  line-height: 1;
}

.numeral-name {
  display: block;
  margin-top: 0.35rem;
  color: var(--subtle);
  font-size: 0.7rem;
}

.phrase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.phrase-card {
  padding: 1rem;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: reference-rise 500ms both;
  animation-delay: calc(var(--card-index) * 45ms);
}

.phrase-english {
  color: var(--primary-deep);
  font-weight: 800;
}

.phrase-olchiki {
  display: block;
  margin: 0.65rem 0 0.45rem;
  color: var(--primary);
  font-family: 'Noto Sans Ol Chiki', 'Noto Sans', sans-serif;
  font-size: 1.35rem;
}

.phrase-translations {
  color: var(--subtle);
  font-size: 0.75rem;
  line-height: 1.55;
}

.vocabulary-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.9rem;
}

.vocabulary-card {
  padding: 0.9rem;
}

.vocabulary-card h3 {
  margin: 0 0 0.55rem;
  color: var(--primary-deep);
}

.vocabulary-card p {
  margin: 0.3rem 0;
  color: var(--subtle);
  font-size: 0.88rem;
  line-height: 1.35;
}

.vocabulary-card strong {
  color: var(--text);
}

@keyframes reference-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.info-card,
.gallery-item,
.epaper-item,
.contact-box,
.doc-card,
.document-card,
.translator-panel,
.chat-card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: 0 14px 28px var(--shadow);
  border: 1px solid rgba(12, 77, 57, 0.06);
}

.info-card,
.gallery-item,
.epaper-item,
.doc-card,
.document-card {
  padding: 1.2rem;
}

.info-card h3,
.gallery-item h3,
.doc-card h3,
.document-card h3,
.contact-box h3,
.translator-panel h3,
.chat-card h3 {
  margin: 0.8rem 0 0.55rem;
  font-size: 1.25rem;
  color: var(--primary-deep);
}

.info-card span,
.gallery-item span,
.epaper-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(12, 77, 57, 0.08);
  color: var(--primary);
  font-weight: 800;
}

.slider-wrap {
  position: relative;
  margin-top: 1.5rem;
}

.slider {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  min-height: 310px;
}

.slide {
  display: none;
  background: linear-gradient(135deg, rgba(12,77,57,0.08), rgba(247,201,73,0.15));
  border-radius: 28px;
  overflow: hidden;
  min-height: 310px;
}

.slide.active { display: grid; grid-template-columns: 1.1fr 0.9fr; }

.slide-copy {
  padding: 2rem;
}

.slide-copy h3 {
  margin: 0 0 0.8rem;
  font-size: 2rem;
  color: var(--primary-deep);
}

.slide-copy p {
  color: var(--subtle);
  line-height: 1.7;
}

.slide-visual {
  background: linear-gradient(135deg, #0d5846 0%, #228a68 100%);
  position: relative;
  min-height: 310px;
}

.slide-visual::before {
  content: "ᱚᱞᱪᱤᱠᱤ";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(2rem, 5vw, 4rem);
  color: rgba(255,255,255,0.78);
  font-weight: 800;
}

.slider-controls {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(12, 77, 57, 0.18);
  cursor: pointer;
}

.slider-dot.active {
  width: 30px;
  border-radius: 999px;
  background: var(--primary);
}

.slogan-band {
  margin: 2rem 0 1rem;
  padding: 2.2rem 1.4rem;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(247,201,73,0.18), rgba(12,77,57,0.08));
  text-align: center;
}

.slogan-band h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 2.4rem);
  color: var(--primary-deep);
}

.page-hero {
  background: linear-gradient(135deg, rgba(12,77,57,0.04), rgba(247,201,73,0.12));
  padding: 2.2rem 1.5rem;
  border-radius: 30px;
  margin: 1rem 0 2rem;
}

.page-hero h1 { margin-top: 0.25rem; }

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-item .img-box {
  height: 180px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0d5846, #50b38c);
  display: grid;
  place-items: center;
  color: white;
  font-size: 2.4rem;
  font-weight: 800;
}

.footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  color: var(--subtle);
  text-align: center;
}

.contact-grid {
  grid-template-columns: 1fr 1fr;
}

.contact-box,
.translator-panel,
.chat-card {
  padding: 1.5rem;
}

.contact-form {
  display: grid;
  gap: 0.8rem;
}

.contact-form input,
.contact-form textarea,
.translator-panel select,
.translator-panel textarea,
.chat-input {
  width: 100%;
  border: 1px solid rgba(12,77,57,0.12);
  border-radius: 14px;
  font: inherit;
  background: #f7faf9;
  color: var(--text);
}
.contact-form textarea,
.chat-input {
  min-height: 120px;
  resize: vertical;
}

.translator-panel {
  margin-top: 1.5rem;
}

.translator-panel .translator-notice {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-left: 5px solid var(--primary);
  border-radius: 8px;
  background: var(--accent);
  color: var(--primary-deep);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
}

.translator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.translate-result {
  margin-top: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(12,77,57,0.06), rgba(247,201,73,0.1));
  border: 1px solid rgba(12,77,57,0.08);
  border-radius: 18px;
  color: var(--primary-deep);
  min-height: 80px;
  display: flex;
  align-items: center;
}

.chatbot {
  --chat-edge: max(18px, env(safe-area-inset-right));
  position: fixed;
  right: 18px;
  bottom: 18px;
  right: var(--chat-edge);
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(380px, calc(100vw - (var(--chat-edge) * 2)));
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chatbot.is-collapsed .chat-card {
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
  transform: translateY(22px) scale(0.94);
  visibility: hidden;
}

.chat-toggle {
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  padding: 0.8rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-end;
  box-shadow: 0 14px 26px rgba(12, 77, 57, 0.25);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 180ms ease;
}

.chat-toggle:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 32px rgba(12, 77, 57, 0.3);
}

.chat-card {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  max-height: min(720px, calc(100dvh - 24px));
  overflow: auto;
  box-sizing: border-box;
  padding: 1rem;
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
  transform-origin: bottom right;
  will-change: opacity, transform, filter;
  transition: opacity 280ms cubic-bezier(0.22, 1, 0.36, 1), transform 420ms cubic-bezier(0.22, 1, 0.36, 1), filter 280ms ease, visibility 420ms;
}

.chat-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.chat-heading h3 {
  margin-top: 0;
}

.chat-close {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--primary-deep);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.chat-log {
  background: #f5faf8;
  border: 1px solid rgba(12,77,57,0.08);
  border-radius: 18px;
  padding: 0.8rem;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.bubble {
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 85%;
}

.bubble.user {
  background: var(--primary);
  color: white;
  margin-left: auto;
}

.bubble.bot {
  background: #8b1a1a;
  color: var(--primary-deep);
.alphabet-card:nth-child(3n + 2)::before,
.numeral-card:nth-child(3n + 2)::before {
  background: #c28b24;
}
.alphabet-card:nth-child(3n)::before,
.numeral-card:nth-child(3n)::before {
  background: #3d6f8f;
  border: 1px solid rgba(12,77,57,0.08);
}

.bubble.lexicon-bubble {
  padding: 0.35rem;
  box-shadow: 0 12px 22px rgba(139, 26, 26, 0.14);
  border: 0;
}

  color: #8b1a1a;
  width: min(100%, 230px);
  padding: 0.7rem 0.75rem;
  border: 1px solid #e1b36d;
  border-radius: 10px;
.numeral-card {
  border-color: #c8a882;
  background: linear-gradient(155deg, #fffdf8, #fff5e4);
}
  background: #fffaf1;
  color: #3e3b37;
  box-shadow: 0 12px 22px rgba(139, 26, 26, 0.14);
}

.lexicon-title {
  color: #8b1a1a;
  margin-bottom: 0.7rem;
  color: #3a3733;
}

.lexicon-row,
.lexicon-category {
  display: block;
  margin-top: 0.35rem;
}

.lexicon-category {
  color: #5e5a54;
}

.chat-more {
  display: inline;
  margin-left: 0.3rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.chat-source {
  display: block;
  margin-top: 0.55rem;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
}

.chat-form {
  display: flex;
  gap: 0.6rem;
}

.chat-form input {
  flex: 1;
  border: 1px solid rgba(12,77,57,0.12);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  font: inherit;
}

.chat-form button {
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  padding: 0.8rem 1rem;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 980px) {
  .topbar,
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .pillars,
  .gallery-grid,
  .epaper-grid,
  .contact-grid,
  .translator-grid,
  .murmu-grid,
  .learn-grid,
  .slide.active {
    grid-template-columns: 1fr;
  }

  .lang-switcher {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .main-nav {
    justify-content: flex-start;
  }

  .topbar {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 2.2rem;
  }

  .chatbot {
    --chat-edge: max(10px, env(safe-area-inset-right));
    right: 10px;
    bottom: 10px;
    right: var(--chat-edge);
    bottom: max(10px, env(safe-area-inset-bottom));
    width: min(350px, calc(100vw - (var(--chat-edge) * 2)));
  }

  .chat-card {
    padding: 0.75rem;
  }

  .chat-form {
    align-items: stretch;
  }

  .chat-form input {
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .chat-form {
    flex-direction: column;
  }

  .chat-form button {
    width: 100%;
  }

  .chat-log {
    max-height: min(220px, 32dvh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-card,
  .chat-toggle {
    transition: none;
  }
}
