/* ═══════════════════════════════════════════════════════════════════════════
   JANA JAGRUTHI E-PAPER — GLOBAL STYLESHEET
   Font: Poppins (Google Fonts) | Theme: Forest Palette
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ────────────────────────────────────────────────────────── */
:root {
  --deep-forest:  #022E24;
  --moss-shadow:  #1F4D3A;
  --eucalyptus:   #4F8F75;
  --sage-mist:    #9FC382;
  --pale-lichen:  #F7F1EC;
  --glass-bg:     rgba(31, 77, 58, 0.4);
  --glass-border: rgba(159, 195, 130, 0.2);
  --glass-blur:   blur(16px);
  --transition:   all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm:    0 2px 8px rgba(2, 46, 36, 0.3);
  --shadow-md:    0 8px 24px rgba(2, 46, 36, 0.4);
  --shadow-lg:    0 20px 48px rgba(2, 46, 36, 0.5);
  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --radius-xl:    32px;
}

[data-theme="light"] {
  --deep-forest:  #F7F1EC;
  --moss-shadow:  #E8E0D5;
  --eucalyptus:   #4F8F75;
  --sage-mist:    #2E6B52;
  --pale-lichen:  #022E24;
  --glass-bg:     rgba(232, 224, 213, 0.6);
  --glass-border: rgba(46, 107, 82, 0.2);
}

/* ── Poppins: ENFORCED GLOBALLY ──────────────────────────────────────────── */
* {
  font-family: 'Poppins', sans-serif !important;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html, button, input, select, textarea,
h1, h2, h3, h4, h5, h6, p, span, a, label, code {
  font-family: 'Poppins', sans-serif;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--deep-forest);
  color: var(--pale-lichen);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--sage-mist);
  text-decoration: none;
  transition: var(--transition);
}
a:hover { color: var(--pale-lichen); }

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--deep-forest); }
::-webkit-scrollbar-thumb { background: var(--eucalyptus); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--sage-mist); }

/* ── Glassmorphism Cards ─────────────────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.glass-card-sm {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--eucalyptus);
  color: var(--pale-lichen);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(79, 143, 117, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary:hover {
  background: var(--sage-mist);
  color: var(--deep-forest);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(159, 195, 130, 0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-danger {
  background: rgba(220, 53, 69, 0.15);
  color: #ff6b7a;
  border: 1px solid rgba(220, 53, 69, 0.3);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.btn-danger:hover {
  background: rgba(220, 53, 69, 0.3);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--pale-lichen);
  border: 1px solid var(--glass-border);
  font-weight: 400;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.btn-ghost:hover {
  background: var(--glass-bg);
  border-color: var(--eucalyptus);
}

/* ── Form Elements ───────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sage-mist);
  letter-spacing: 0.02em;
}

.form-input {
  background: rgba(2, 46, 36, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--pale-lichen);
  font-size: 0.95rem;
  font-weight: 400;
  padding: 0.75rem 1rem;
  transition: var(--transition);
  outline: none;
  width: 100%;
}
.form-input:focus {
  border-color: var(--eucalyptus);
  box-shadow: 0 0 0 3px rgba(79, 143, 117, 0.15);
  background: rgba(31, 77, 58, 0.4);
}
.form-input::placeholder { color: rgba(247, 241, 236, 0.4); }

/* ── Toast Notifications ─────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--pale-lichen);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.875rem 1.25rem;
  min-width: 280px;
  max-width: 380px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: all;
  animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast.toast-exit {
  animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.toast.success { border-left: 3px solid var(--sage-mist); }
.toast.error   { border-left: 3px solid #ff6b7a; }
.toast.info    { border-left: 3px solid var(--eucalyptus); }

@keyframes toastSlideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes toastSlideOut {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

/* ── Skeleton Loaders ────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(31, 77, 58, 0.3) 25%,
    rgba(79, 143, 117, 0.2) 50%,
    rgba(31, 77, 58, 0.3) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.data-table th {
  font-weight: 500;
  color: var(--sage-mist);
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.data-table td {
  font-weight: 400;
  color: var(--pale-lichen);
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(159, 195, 130, 0.08);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(31, 77, 58, 0.3);
}

/* ── Drag & Drop Zone ────────────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(2, 46, 36, 0.3);
}
.drop-zone.dragover,
.drop-zone:hover {
  border-color: var(--eucalyptus);
  background: rgba(79, 143, 117, 0.1);
}

/* ── Progress Bar ────────────────────────────────────────────────────────── */
.progress-bar-wrap {
  background: rgba(2, 46, 36, 0.5);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--eucalyptus), var(--sage-mist));
  border-radius: 99px;
  transition: width 0.3s ease;
}

/* ── Badge ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
}
.badge-green {
  background: rgba(159, 195, 130, 0.15);
  color: var(--sage-mist);
  border: 1px solid rgba(159, 195, 130, 0.3);
}
.badge-gray {
  background: rgba(247, 241, 236, 0.1);
  color: rgba(247, 241, 236, 0.6);
  border: 1px solid rgba(247, 241, 236, 0.15);
}

/* ============================================================================
   VIEWER CHROME (matches the e-paper screenshot)
   ========================================================================== */

/* ── Top header bar (founder/co-founder) ───────────────────────────────── */
.viewer-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  padding: 1rem 1rem 0.6rem;     /* extra top padding so founder names sit lower */
  text-align: center;
  background: linear-gradient(
    180deg,
    rgba(2, 46, 36, 0.92) 0%,
    rgba(2, 46, 36, 0.78) 70%,
    rgba(2, 46, 36, 0.0)  100%
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}
.viewer-header-line {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--pale-lichen);
  line-height: 1.4;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}
.viewer-header-sub {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.78;
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.viewer-header .founder-name {
  color: #FFD54F;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
@media (max-width: 640px) {
  .viewer-header { padding: 0.35rem 0.5rem 0.3rem; }
  .viewer-header-line { font-size: 0.62rem; letter-spacing: 0.03em; line-height: 1.25; }
  .viewer-header-sub  { font-size: 0.55rem; margin-top: 1px; }
}

/* ── Watermark (diagonal, 5% opacity) ──────────────────────────────────── */
.watermark {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(3rem, 12vw, 9rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #ffffff;
  opacity: 0.05;
  transform: rotate(-28deg);
  pointer-events: none;
  z-index: 60;
  white-space: nowrap;
  user-select: none;
}

/* ── Side nav arrows ───────────────────────────────────────────────────── */
.nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--pale-lichen);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 120;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}
.nav-arrow:hover {
  background: rgba(79,143,117,0.85);
  transform: translateY(-50%) scale(1.05);
}
.nav-arrow.left  { left: 0.85rem; }
.nav-arrow.right { right: 0.85rem; }
.nav-arrow.is-disabled,
.nav-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* On desktop, push the right arrow inside of the social-icon column */
@media (min-width: 641px) {
  .nav-arrow.right { right: 4rem; }
}

@media (max-width: 640px) {
  .nav-arrow { width: 38px; height: 38px; }
  .nav-arrow.left  { left: 0.4rem; }
  .nav-arrow.right { right: 0.4rem; }
}

/* ── Floating right-side social icons (brand-coloured pills) ───────────── */
.social-icons {
  position: fixed;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 100;
}
.social-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  opacity: 0.45;               /* very translucent so they don't dominate */
}
.social-icon-btn:hover {
  transform: scale(1.08) translateX(-2px);
  box-shadow: var(--shadow-lg);
  color: #ffffff;
  opacity: 1;                  /* full opacity on hover */
}
.social-icon-btn.whatsapp  { background: #25D366; }
.social-icon-btn.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.social-icon-btn.facebook  { background: #1877F2; }

/* When social-icon-btn is reused inline (e.g. on home page), don't shadow */
.social-icon-btn[style*="position:static"] { box-shadow: none; }

/* ── Page counter (bottom-center pill) ─────────────────────────────────── */
.page-counter {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 0.45rem 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--pale-lichen);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

/* ── Mute toggle (bottom-right) ────────────────────────────────────────── */
.mute-toggle {
  position: fixed;
  bottom: 1rem;
  right: 0.85rem;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
  color: var(--pale-lichen);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}
.mute-toggle:hover { background: rgba(79,143,117,0.85); }
.mute-toggle.is-muted { opacity: 0.55; }

/* ── Theme toggle (shared base for all pages) ──────────────────────────── */
.theme-toggle {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 99px;
  padding: 0.4rem 0.875rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--pale-lichen);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.theme-toggle:hover { border-color: var(--eucalyptus); }

/* In-viewer theme toggle position */
.viewer-theme-toggle {
  position: fixed;
  top: 4.5rem;
  left: 0.85rem;
  z-index: 100;
}

/* ── User-select none (viewer security) ──────────────────────────────────── */
.no-select {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

/* ── Transitions ─────────────────────────────────────────────────────────── */
.fade-in {
  animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 46, 36, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
.modal-box {
  background: var(--moss-shadow);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

/* ── Bandwidth toggle (bottom-left, repositioned) ──────────────────────── */
.bandwidth-toggle {
  position: fixed;
  bottom: 1rem;
  left: 0.85rem;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 99px;
  padding: 0.45rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(247, 241, 236, 0.85);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}
.bandwidth-toggle:hover { background: rgba(79,143,117,0.85); }
.bandwidth-toggle.is-active { background: var(--eucalyptus); color: #fff; }

/* ── Responsive Utilities ────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }

  /* Mobile: social icons stack VERTICALLY in the top-right corner.
     Smaller and more transparent so they don't dominate the reading area. */
  .social-icons {
    flex-direction: column;     /* vertical stack */
    top: 64px;                  /* sits just below the founder header */
    right: 0.35rem;
    transform: none;            /* override the desktop translateY(-50%) */
    gap: 0.35rem;
    z-index: 115;
  }
  .social-icon-btn {
    width: 26px;
    height: 26px;
    opacity: 0.35;              /* even more translucent on mobile */
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  }
  .social-icon-btn:hover,
  .social-icon-btn:active {
    opacity: 1;
  }
  .social-icon-btn svg {
    width: 13px;
    height: 13px;
  }

  /* Mobile: nav arrows shrink and fade so they don't block the text when zoomed */
  .nav-arrow {
    width: 30px;
    height: 30px;
    opacity: 0.3;               /* almost invisible until tapped */
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  }
  .nav-arrow:hover,
  .nav-arrow:active {
    opacity: 1;
  }
  .nav-arrow svg {
    width: 16px;
    height: 16px;
  }
  .nav-arrow.left  { left: 0.3rem; }
  .nav-arrow.right { right: 0.3rem; }
}

@media (min-width: 641px) {
  .hide-desktop { display: none !important; }
}
