/* Kaama Legal — custom styles (used alongside Tailwind utilities) */
:root {
  --primary: #6b0f1a;
  --primary-2: #8d1b2b;
  --accent: #b8924a;
  --gold: #e1c17a;
  --ink: #151313;
  --muted: #665f5c;
  --paper: #fbfaf8;
  --soft: #f5f0eb;
  --line: #e8ded6;
  --dark: #0d0909;
  --shadow: 0 18px 48px rgba(28, 20, 18, 0.08);
  --shadow-strong: 0 28px 70px rgba(28, 20, 18, 0.13);
  --font: 'Fustat', Arial, Helvetica, sans-serif;
}

body, button, input, textarea, select { font-family: var(--font); }

html { scroll-behavior: smooth; }
html, body { min-width: 320px; overflow-x: hidden; }
body { line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body :is(h1, h2, h3, h4) { text-wrap: balance; font-weight: 600; line-height: 1.18; }
body p { color: #5d5552; margin: 0 0 18px; line-height: 1.76; }
body a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Layout helpers */
.container-site { width: min(1180px, 100% - 40px); margin-inline: auto; }
.nav-container { width: min(1280px, 100% - 40px); margin-inline: auto; }
.article-layout { width: min(1320px, 100% - 40px); }
.section { padding: 96px 0; }
.section-title { font-size: clamp(28px, 3vw, 42px); letter-spacing: 0; }
.kicker {
  display: inline-block;
  color: var(--accent);
  letter-spacing: 1.7px;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
}
.label {
  display: block;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 850;
}
@media (max-width: 640px) {
  .container-site, .nav-container, .article-layout { width: calc(100% - 32px); }
  .section { padding: 78px 0; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 3px;
  font-weight: 700;
  will-change: transform;
  transition: transform 0.18s, background-color 0.18s, color 0.18s, border-color 0.18s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); border: 1px solid var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); }
.btn-secondary { color: #fff; border: 1px solid rgba(255, 255, 255, 0.68); }
.btn-secondary:hover { color: var(--ink); background: #fff; }
.btn-outline { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline-light { border: 1px solid rgba(255, 255, 255, 0.35); background: transparent; color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--ink); }
.btn-white { background: #fff; border: 1px solid #fff; color: var(--primary); }
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 20px;
  border: 0;
  border-radius: 3px;
  background: var(--primary);
  color: #fff;
  font-weight: 850;
  transition: background-color 0.18s, transform 0.18s;
}
.btn-submit:hover { background: var(--primary-2); transform: translateY(-2px); }
.text-link {
  display: inline-flex;
  width: fit-content;
  color: #fff;
  border-bottom: 1px solid;
  font-weight: 700;
}
.text-link.muted { color: rgba(255, 255, 255, 0.72); }
@media (max-width: 640px) {
  .btn, .btn-submit { width: 100%; }
}

/* Navbar */
.navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(107, 15, 26, 0.08);
  box-shadow: 0 12px 35px rgba(24, 18, 16, 0.05);
}
.navbar.is-scrolled { box-shadow: 0 14px 40px rgba(24, 18, 16, 0.1); }
.nav-desktop { display: flex; }
.site-logo-image { height: 48px; width: auto; max-width: clamp(190px, 24vw, 285px); object-fit: contain; }
.nav-link, .dropdown-title {
  position: relative;
  color: #261f1f;
  font-size: 18px;
  font-weight: 500;
  transition: color 0.18s;
}
.nav-link:hover, .nav-link.active, .dropdown-title:hover { color: var(--primary); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  height: 2px;
  width: 0;
  background: var(--primary);
  transition: width 0.2s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.dropdown { position: relative; padding: 20px 0; cursor: pointer; }
.dropdown-menu {
  position: absolute;
  top: 62px;
  left: -18px;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: var(--shadow-strong);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s, transform 0.18s;
}
.dropdown:hover .dropdown-menu, .dropdown.open .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.dropdown-menu a { padding: 10px 18px; color: var(--ink); font-size: 18px; font-weight: 500; }
.dropdown-menu a:hover { color: var(--primary); background: #f8f2ee; }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; cursor: pointer; z-index: 1002; }
.hamburger span { width: 26px; height: 2px; background: var(--ink); transition: transform 0.2s, opacity 0.2s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
@media (max-width: 1100px) { .nav-desktop { gap: 16px; } }
@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 640px) {
  .site-logo-image { height: 42px; max-width: min(220px, 68vw); }
}
.mobile-overlay { position: fixed; inset: 0; z-index: 998; background: rgba(0, 0, 0, 0.45); display: none; }
.mobile-overlay.show { display: block; }
.mobile-menu {
  position: fixed;
  inset: 0 -100% 0 auto;
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  width: min(420px, 100%);
  min-height: 100vh;
  padding: 72px 32px;
  background: rgba(13, 9, 9, 0.98);
  color: #fff;
  transition: right 0.28s;
}
.mobile-menu.show { right: 0; }
.mobile-menu a, .mobile-dropdown > span { color: #fff; font-size: 24px; }
.mobile-menu a:hover { color: var(--accent); }
.mobile-dropdown { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; }
.mobile-dropdown a { padding-left: 18px; font-size: 16px; color: rgba(255, 255, 255, 0.72); }
.close-btn { position: absolute; top: 22px; right: 24px; font-size: 28px; cursor: pointer; color: #fff; }
@media (max-width: 640px) { .mobile-menu { width: 100%; } }

/* Home hero */
.hero-clean { position: relative; overflow: hidden; min-height: 94vh; background: var(--dark); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.52)),
    linear-gradient(90deg, rgba(107, 15, 26, 0.58), transparent 58%);
}
.hero-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1240px, 100% - 40px);
  min-height: 94vh;
  margin: 0 auto;
  padding: 132px 0 84px;
}
.hero-center h1 { color: #fff; max-width: 900px; margin-bottom: 22px; font-size: clamp(34px, 5vw, 60px); line-height: 1.12; }
.hero-center p { color: rgba(255, 255, 255, 0.82); text-align: justify; max-width: 740px; font-size: 18px; line-height: 1.8; }
@media (max-width: 640px) {
  .hero-clean, .hero-center { min-height: 88vh; }
  .hero-center { width: calc(100% - 32px); padding-top: 108px; }
  .hero-center p { font-size: 16px; }
}

/* Page hero (inner pages) */
.page-hero {
  padding: 136px 0 78px;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(13, 9, 9, 0.96), rgba(107, 15, 26, 0.76)),
    url("https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=1600&q=70") center / cover;
}
.page-hero h1 { margin-bottom: 12px; font-size: clamp(30px, 4vw, 48px); }
.page-hero p { color: rgba(255, 255, 255, 0.78); max-width: 720px; margin: 0 auto; font-size: 18px; }
.page-hero.contact-hero {
  background:
    linear-gradient(90deg, rgba(13, 9, 9, 0.96), rgba(107, 15, 26, 0.78)),
    url("https://images.unsplash.com/photo-1521791136064-7986c2920216?auto=format&fit=crop&w=1600&q=70") center / cover;
}
.page-hero.insight-hero {
  background:
    linear-gradient(90deg, rgba(13, 9, 9, 0.94), rgba(107, 15, 26, 0.72)),
    url("https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=1600&q=70") center / cover;
}
@media (max-width: 640px) {
  .page-hero { padding: 126px 0 70px; }
  .page-hero p { font-size: 16px; }
}

/* Detail hero (practice + article) */
.detail-hero { position: relative; overflow: hidden; display: flex; align-items: flex-end; min-height: 560px; background: var(--dark); }
.detail-hero-bg { position: absolute; inset: 0; background-position: center; background-size: cover; opacity: 0.72; }
.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 9, 9, 0.92), rgba(13, 9, 9, 0.48), rgba(107, 15, 26, 0.28)),
    linear-gradient(transparent, rgba(13, 9, 9, 0.88));
}
.detail-hero-content { position: relative; z-index: 2; color: #fff; padding: 150px 0 76px; }
.detail-hero-content h1 { max-width: 900px; margin-bottom: 18px; font-size: clamp(32px, 4.6vw, 56px); }
.detail-hero-content p { color: rgba(255, 255, 255, 0.82); max-width: 780px; font-size: 18px; }
@media (max-width: 640px) { .detail-hero { min-height: 500px; } }
.detail-sidebar { position: sticky; top: 104px; }
@media (max-width: 1100px) { .detail-sidebar { position: static; } }

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-strong); border-color: rgba(107, 15, 26, 0.2); }
.practice-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 330px;
  border-radius: 6px;
  background: #1a1414;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow);
  transform: translateZ(0);
  transition: transform 0.18s, box-shadow 0.18s;
}
.practice-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-strong); }
.practice-bg { position: absolute; inset: 0; background-position: center; background-size: cover; opacity: 0.72; }
.practice-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  color: #fff;
  background: linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.86));
}
.practice-content h3 { margin-bottom: 10px; font-size: 23px; }
.practice-content p { color: rgba(255, 255, 255, 0.8); }
@media (max-width: 640px) { .practice-card { min-height: 280px; } }

/* Tags */
.tag {
  display: inline-block;
  border: 1px solid var(--line);
  color: var(--primary);
  background: #f7efe8;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 800;
}
.tag-dark { color: rgba(255, 255, 255, 0.86); background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); }
.tag-dark:hover { color: var(--primary); background: #fff; }

/* Team */
.team-placeholder {
  display: grid;
  place-items: center;
  min-height: 260px;
  background:
    radial-gradient(circle at 50% 36%, rgba(225, 193, 122, 0.24), transparent 28%),
    linear-gradient(135deg, #f7efe8, #fff 58%, #efe1d5);
}
.team-placeholder span {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(107, 15, 26, 0.18);
  color: var(--primary);
  font-size: 42px;
  font-weight: 700;
  box-shadow: 0 18px 44px rgba(60, 34, 25, 0.12);
}
.team-image { aspect-ratio: 4 / 4.6; background-position: center; background-size: cover; overflow: hidden; }
@media (max-width: 640px) { .team-image { aspect-ratio: 4 / 3.6; } }
.team-feature-section { position: relative; overflow: hidden; background: linear-gradient(90deg, #f7f1eb 0% 50%, #130d0d 50% 100%); }
@media (max-width: 1100px) { .team-feature-section { background: var(--dark); } }
.team-stack { position: relative; width: min(500px, 100%); height: 450px; }
.team-stack-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: 78%;
  min-height: 370px;
  padding: 0;
  overflow: hidden;
  text-align: left;
  color: inherit;
  cursor: pointer;
  background: #fff;
  border: 1px solid rgba(107, 15, 26, 0.12);
  border-radius: 8px;
  box-shadow: 0 32px 80px rgba(30, 20, 18, 0.16);
  transition: transform 0.22s, box-shadow 0.22s;
}
.team-stack:hover .team-stack-card { box-shadow: 0 38px 95px rgba(30, 20, 18, 0.2); }
.stack-card-0 { z-index: 4; top: 50px; left: 0; }
.stack-card-1 { z-index: 3; top: 20px; left: 86px; transform: rotate(3deg) scale(0.96); }
.stack-card-2 { z-index: 2; top: 72px; left: 142px; transform: rotate(-3deg) scale(0.92); }
.stack-card-3 { z-index: 1; top: 118px; left: 210px; transform: rotate(5deg) scale(0.86); }
.team-stack:hover .stack-card-0 { transform: translate(-8px, -8px); }
.team-stack:hover .stack-card-1 { transform: translate(10px, -18px) rotate(4deg) scale(0.96); }
.team-stack:hover .stack-card-2 { transform: translate(22px, 10px) rotate(-4deg) scale(0.92); }
.team-stack:hover .stack-card-3 { transform: translate(34px, 22px) rotate(6deg) scale(0.86); }
.team-stack-image { height: 220px; background-position: center; background-size: cover; }
.team-stack-image.team-placeholder { min-height: 220px; }
@media (max-width: 640px) {
  .team-stack { display: grid; gap: 16px; width: 100%; height: auto; }
  .team-stack-card { position: relative; inset: auto; width: 100%; min-height: auto; transform: none !important; }
}

/* Forms */
.field {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
}
textarea.field { min-height: 120px; resize: vertical; }
.field-dark { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); color: #fff; }
.field-dark::placeholder { color: rgba(255, 255, 255, 0.55); }
.career-form .field { min-height: 48px; border-color: #ded3cb; border-radius: 4px; padding: 13px 14px; line-height: 1.45; }
.career-form textarea.field { min-height: 130px; }
.career-form .field:focus { outline: none; border-color: rgba(107, 15, 26, 0.45); box-shadow: 0 0 0 3px rgba(107, 15, 26, 0.08); }

/* Tabs */
.insight-tabs { display: flex; gap: 12px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 42px; }
.insight-tab {
  padding: 0 4px 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--muted);
  font-weight: 850;
  text-transform: capitalize;
}
.insight-tab:hover, .insight-tab.active { color: var(--primary); }
.insight-tab.active { border-bottom-color: var(--primary); }
.career-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
}
.career-tab {
  min-width: 132px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-weight: 850;
  transition: background-color 0.18s, color 0.18s;
}
.career-tab.active, .career-tab:hover { background: var(--primary); color: #fff; }
@media (max-width: 640px) {
  .career-tabs { display: flex; width: 100%; }
  .career-tab { flex: 1; min-width: 0; }
}

/* Articles */
.article-content section + section { margin-top: 34px; }
.article-content p { font-size: 17px; line-height: 1.85; text-align: justify; }
.article-content p + p, .article-content ul + p, .article-content p + ul { margin-top: 14px; }
.article-list { list-style: disc; margin: 14px 0 0 22px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.article-list li + li { margin-top: 6px; }

/* Justice Project Nepal */
.bru-hero-overlay {
  background:
    linear-gradient(90deg, rgba(8, 7, 7, 0.94), rgba(8, 7, 7, 0.52), rgba(107, 15, 26, 0.16)),
    linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.78));
}
.bru-impact-panel { background: linear-gradient(135deg, rgba(107, 15, 26, 0.94), rgba(55, 19, 22, 0.98)); }
.bru-list li { position: relative; padding: 18px 18px 18px 46px; }
.bru-list li::before { content: ""; position: absolute; top: 24px; left: 18px; width: 10px; height: 10px; background: var(--accent); }

/* Reveal on scroll */
.reveal-text { opacity: 0; transform: translateY(18px); transition: opacity 0.5s, transform 0.5s; }
.reveal-text.is-visible { opacity: 1; transform: translateY(0); }

/* Floating social buttons */
.social-floating { position: fixed; right: 22px; bottom: 22px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.social-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s, filter 0.18s;
}
.social-btn:hover { transform: translateY(-3px); filter: brightness(1.08); }
.social-btn svg { width: 18px; height: 18px; fill: currentColor; }
.whatsapp { background: #25d366; }
.facebook { background: #1877f2; }
.instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.linkedin { background: #0a66c2; }
.call { background: var(--primary); }
@media (max-width: 640px) {
  .social-floating { position: static; flex-direction: row; justify-content: center; width: 100%; padding: 18px 0; background: var(--paper); }
  .social-btn { width: 42px; height: 42px; }
}

/* Disclaimer modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
}
.modal-backdrop.show { display: flex; }
.modal {
  width: min(760px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 34px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.modal h2 { color: var(--primary); margin-bottom: 14px; font-size: 30px; }
.modal p, .modal li { color: #514947; font-size: 14px; line-height: 1.65; }
.modal ul { list-style: disc; max-height: 320px; overflow: auto; padding-left: 20px; margin-bottom: 1em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.modal-actions button { min-height: 44px; padding: 11px 22px; border-radius: 3px; font-weight: 850; }
.modal-secondary { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.modal-agree { border: 0; background: var(--primary); color: #fff; }
.modal-agree:hover { background: var(--primary-2); }
@media (max-width: 640px) {
  .modal { padding: 26px; }
  .modal-actions { flex-direction: column; align-items: stretch; }
}

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