/* ============================================================
   Mook Badhir Vikas Trust — Custom Stylesheet
   mookbadhir@gmail.com
   ============================================================ */

/* ── CSS Variables ── */
:root {
  --pearl:    #F8F5F0;
  --charcoal: #2A2A2A;
  --oxblood:  #4A151C;
  --brass:    #A88961;
  --taupe:    #D6CFC4;
  --white:    #FFFFFF;
  --radius:   2px;
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--brass) var(--pearl);
}

body { overflow-x: hidden; }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar        { width: 6px; }
::-webkit-scrollbar-track  { background: var(--pearl); }
::-webkit-scrollbar-thumb  { background: var(--brass); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--oxblood); }

/* ── Glassmorphism Nav ── */
.glass-nav {
  background: rgba(248, 245, 240, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(168, 137, 97, 0.15);
}

/* ── Nav Links ── */
.nav-link {
  position: relative;
  transition: color var(--transition);
  color: rgba(42,42,42,0.7);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--brass);
  transition: width var(--transition);
}
.nav-link:hover { color: var(--brass); }
.nav-link:hover::after { width: 100%; }

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ── Bento Cards (ecosystem) ── */
.bento-card {
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(168,137,97,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}
.bento-card:hover               { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(74,21,28,0.12); }
.bento-card:hover::before       { opacity: 1; }

/* ── Gallery Items ── */
.gallery-item {
  transition: opacity 0.25s ease, transform 0.25s ease;
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery-item:hover { box-shadow: 0 16px 40px rgba(42,42,42,0.1); }

.img-placeholder {
  background: linear-gradient(135deg, var(--taupe) 0%, var(--pearl) 100%);
  min-height: 192px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Gallery Tabs ── */
.gallery-tab {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(42,42,42,0.5);
  padding: 6px 16px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  outline: none;
}
.gallery-tab:hover    { color: var(--oxblood); }
.gallery-tab.active-tab {
  color: var(--oxblood);
  border-bottom-color: var(--brass);
}

/* ── Skill Cards ── */
.skill-card {
  background: var(--white);
  border: 1px solid rgba(42,42,42,0.08);
  padding: 2.5rem;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.skill-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(42,42,42,0.08); }
.skill-card .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 5rem;
  font-weight: 700;
  color: var(--taupe);
  line-height: 1;
  margin-bottom: 0.75rem;
  user-select: none;
}

/* ── Donation Cards ── */
.donate-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(168,137,97,0.2);
  padding: 2rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.donate-card:hover {
  transform: translateY(-8px);
  border-color: var(--brass);
  box-shadow: 0 24px 48px rgba(0,0,0,0.2);
}
.donate-badge {
  display: inline-block;
  background: rgba(168,137,97,0.15);
  color: var(--brass);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  width: fit-content;
}

/* ── Form Fields ── */
.form-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(42,42,42,0.6);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-input {
  width: 100%;
  background: var(--white);
  border: 1px solid rgba(42,42,42,0.18);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--charcoal);
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: var(--oxblood);
  box-shadow: 0 0 0 3px rgba(74,21,28,0.07);
}
.form-input.border-red-400   { border-color: #f87171; }
.form-input.border-green-500 { border-color: #22c55e; }

.err-msg {
  font-size: 0.7rem;
  color: #ef4444;
  margin-top: 4px;
}

/* ── Modal ── */
.animate-modal {
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);     }
}

/* ── Utility: hide scrollbar in scroll containers ── */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Responsive tweaks ── */
@media (max-width: 640px) {
  .skill-card .num { font-size: 3.5rem; }
}

/* ── Revolving Orbit Section ── */
.orbit-section {
  position: relative;
  background: url('orbit_bg.png') no-repeat center center;
  background-size: cover;
  overflow: hidden;
}
.orbit-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}
.orbit-wrapper {
  position: relative;
  width: 100%;
  height: 650px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.orbit-nucleus {
  position: absolute;
  width: 120px;
  height: 120px;
  background: rgba(74, 21, 28, 0.95);
  border: 2px solid var(--brass);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--pearl);
  box-shadow: 0 0 35px rgba(168, 137, 97, 0.4);
  z-index: 30;
  text-align: center;
  transition: transform var(--transition);
}
.orbit-nucleus:hover {
  transform: scale(1.05);
  box-shadow: 0 0 50px rgba(168, 137, 97, 0.7);
}
.orbit-ring {
  position: absolute;
  border: 1.5px dashed rgba(251, 191, 36, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.25), inset 0 0 8px rgba(251, 191, 36, 0.25);
  transition: border-color var(--transition), box-shadow var(--transition);
  pointer-events: none;
}
.orbit-ring:hover {
  border-color: rgba(251, 191, 36, 0.95);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.55), inset 0 0 16px rgba(251, 191, 36, 0.55);
}
.orbit-node {
  position: absolute;
  width: 50px;
  height: 50px;
  background: rgba(42, 42, 42, 0.95);
  border: 1.5px solid var(--brass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition), color var(--transition);
  z-index: 25;
  pointer-events: auto;
}
.orbit-node:hover {
  background: var(--brass);
  color: var(--white);
  transform: scale(1.2);
  box-shadow: 0 0 25px rgba(168, 137, 97, 0.8);
}
.orbit-node.active-node {
  background: var(--oxblood);
  border-color: var(--pearl);
  color: var(--pearl);
  box-shadow: 0 0 30px rgba(214, 207, 196, 0.6);
}

/* Orbit Rotations */
.orbit-ring-1 { width: 240px; height: 240px; animation: rotate-clockwise 28s linear infinite; }
.orbit-ring-2 { width: 360px; height: 360px; animation: rotate-clockwise 38s linear infinite; }
.orbit-ring-3 { width: 480px; height: 480px; animation: rotate-clockwise 48s linear infinite; }
.orbit-ring-4 { width: 600px; height: 600px; animation: rotate-clockwise 58s linear infinite; }
.orbit-ring-5 { width: 720px; height: 720px; animation: rotate-clockwise 68s linear infinite; }

.orbit-ring-1 .orbit-node { top: -25px; animation: rotate-counter 28s linear infinite; }
.orbit-ring-2 .orbit-node { top: -25px; animation: rotate-counter 38s linear infinite; }
.orbit-ring-3 .orbit-node { top: -25px; animation: rotate-counter 48s linear infinite; }
.orbit-ring-4 .orbit-node { top: -25px; animation: rotate-counter 58s linear infinite; }
.orbit-ring-5 .orbit-node { top: -25px; animation: rotate-counter 68s linear infinite; }

/* Pause when hovering over the overall orbit wrapper */
.orbit-wrapper:hover .orbit-ring,
.orbit-wrapper:hover .orbit-node {
  animation-play-state: paused !important;
}

/* Animations */
@keyframes rotate-clockwise {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes rotate-counter {
  from { transform: rotate(360deg); }
  to   { transform: rotate(0deg); }
}

/* Orbit Info Card Container */
.orbit-info-container {
  max-width: 600px;
  margin: 60px auto 40px;
  z-index: 20;
  position: relative;
}
.orbit-info-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(168, 137, 97, 0.25);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mobile responsive fallback layout */
@media (max-width: 1024px) {
  .orbit-wrapper { display: none; }
  .orbit-info-container { margin-top: 20px; }
  .mobile-orbit-grid { display: grid !important; }
}

/* ── Learn a Sign Widget ── */
.sign-card {
  background: var(--white);
  border: 1px solid rgba(42, 42, 42, 0.08);
  padding: 1.5rem;
  border-radius: 2px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.sign-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(42, 42, 42, 0.06);
  border-color: var(--brass);
}
.sign-illustration {
  height: 120px;
  background: var(--pearl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(168, 137, 97, 0.1);
}
.sign-svg {
  width: 70px;
  height: 70px;
  fill: none;
  stroke: var(--oxblood);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--transition), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.sign-card:hover .sign-svg {
  stroke: var(--brass);
  transform: scale(1.12);
}

/* ── Interactive Range Slider ── */
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(214, 207, 196, 0.2);
  outline: none;
  transition: background 0.3s;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brass);
  border: 2px solid var(--pearl);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, background 0.2s;
}
.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--pearl);
}
.range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brass);
  border: 2px solid var(--pearl);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, background 0.2s;
}
.range-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: var(--pearl);
}

/* ── Accessibility Panel ── */
.access-panel {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 100;
}
.access-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--oxblood);
  color: var(--pearl);
  border: 1px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
}
.access-btn:hover {
  transform: scale(1.08);
  background: var(--brass);
}
.access-menu {
  position: absolute;
  bottom: 60px;
  left: 0;
  width: 240px;
  background: var(--pearl);
  border: 1px solid var(--brass);
  border-radius: 4px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform-origin: bottom left;
}
.access-menu.hidden {
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  pointer-events: none;
}

/* Accessibility Body classes */
body.large-text {
  font-size: 112.5%;
}
body.large-text h1 { font-size: 1.15em; }
body.large-text h2 { font-size: 1.15em; }
body.large-text p { font-size: 1.05em; }
body.large-text a, body.large-text button { font-size: 1.05em; }

body.high-contrast {
  background-color: #000000 !important;
  color: #ffffff !important;
}
body.high-contrast nav,
body.high-contrast footer,
body.high-contrast section,
body.high-contrast div,
body.high-contrast blockquote,
body.high-contrast .sign-card,
body.high-contrast .skill-card,
body.high-contrast .bento-card,
body.high-contrast .gallery-item {
  background-color: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}
body.high-contrast a,
body.high-contrast button,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast cite,
body.high-contrast span,
body.high-contrast svg {
  color: #ffff00 !important;
  stroke: #ffff00 !important;
}
body.high-contrast input,
body.high-contrast textarea,
body.high-contrast select {
  background-color: #000000 !important;
  color: #ffffff !important;
  border: 1px solid #ffffff !important;
}

