/* ==========================================================================
   Ranjit Abraham theme — component styles
   Color system mirrors the original design tokens (HSL CSS variables).
   Dark theme is the default look (matches the original site's dark hero).
   ========================================================================== */

:root,
.dark {
  --background: 222 47% 7%;
  --foreground: 210 40% 98%;
  --card: 222 47% 9%;
  --card-foreground: 210 40% 98%;
  --primary: 221 83% 60%;
  --primary-foreground: 0 0% 100%;
  --secondary: 217 33% 17%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217 33% 15%;
  --muted-foreground: 215 20% 65%;
  --accent: 173 80% 45%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 63% 31%;
  --border: 217 33% 20%;
  --input: 217 33% 20%;
  --ring: 221 83% 60%;
  --radius: 0.75rem;

  --brand: 221 83% 60%;
  --brand-accent: 173 80% 45%;
  --brand-dark: 222 47% 11%;
  --brand-darker: 222 47% 7%;
}

* { border-color: hsl(var(--border)); }

html { scroll-behavior: smooth; }

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-inter, 'Inter'), system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-poppins, 'Poppins'), system-ui, sans-serif;
}

a { color: inherit; }

/* Utility color classes bridging Tailwind config tokens used in templates */
.bg-background { background-color: hsl(var(--background)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-muted { background-color: hsl(var(--muted)); }
.bg-primary { background-color: hsl(var(--primary)); }
.bg-accent { background-color: hsl(var(--accent)); }
.text-foreground { color: hsl(var(--foreground)); }
.text-muted { color: hsl(var(--muted-foreground)); }
.text-primary { color: hsl(var(--primary)); }
.text-accent { color: hsl(var(--accent)); }
.text-primary-foreground { color: hsl(var(--primary-foreground)); }
.border-border { border-color: hsl(var(--border)); }
.border-primary { border-color: hsl(var(--primary)); }
.bg-brand-dark { background-color: hsl(var(--brand-dark)); }
.bg-brand-darker { background-color: hsl(var(--brand-darker)); }
.from-brand-darker { --tw-gradient-from: hsl(var(--brand-darker)); }
.via-brand-dark { --tw-gradient-via: hsl(var(--brand-dark)); }

/* ---------- Buttons ---------- */
.ra-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius);
  padding: 0.65rem 1.5rem;
  font-weight: 600;
  font-size: 0.925rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ra-btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.ra-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.ra-btn-outline {
  border: 1px solid hsl(var(--border));
  background-color: transparent;
  color: hsl(var(--foreground));
}
.ra-btn-outline:hover { background-color: hsl(var(--muted)); }

/* ---------- Cards ---------- */
.ra-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 8px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.ra-card:hover { border-color: hsl(var(--primary) / 0.5); }

/* ---------- Inputs ---------- */
.ra-input {
  width: 100%;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  font-size: 0.925rem;
}
.ra-input:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.2);
}

/* ---------- Filter buttons ---------- */
.ra-filter-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  background: transparent;
  color: hsl(var(--muted-foreground));
}
.ra-filter-btn.is-active,
.ra-filter-btn:hover {
  background-color: hsl(var(--primary));
  border-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ---------- Accordions ---------- */
.ra-accordion-trigger { cursor: pointer; }
.ra-accordion-icon { transition: transform 0.25s ease; }
.ra-accordion-trigger.is-open .ra-accordion-icon { transform: rotate(180deg); }

/* ---------- Modal ---------- */
.ra-modal.is-open { display: flex !important; }
.ra-modal-panel { animation: ra-modal-in 0.2s ease; }
@keyframes ra-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Navbar scrolled state ---------- */
#ra-navbar.is-scrolled {
  background-color: hsl(var(--background) / 0.85);
  backdrop-filter: blur(12px);
  border-color: hsl(var(--border));
}

/* ---------- Prose (blog content, privacy/terms pages) ---------- */
.prose { color: hsl(var(--foreground)); line-height: 1.75; }
.prose h2 { font-family: var(--font-poppins, 'Poppins'); font-weight: 700; font-size: 1.5rem; margin-top: 2rem; margin-bottom: 1rem; }
.prose h3 { font-family: var(--font-poppins, 'Poppins'); font-weight: 600; font-size: 1.25rem; margin-top: 1.5rem; margin-bottom: 0.75rem; }
.prose p { margin-bottom: 1.1rem; color: hsl(var(--muted-foreground)); }
.prose ul, .prose ol { margin: 1rem 0 1.25rem 1.25rem; color: hsl(var(--muted-foreground)); }
.prose li { margin-bottom: 0.4rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose a { color: hsl(var(--primary)); text-decoration: underline; }
.prose strong { color: hsl(var(--foreground)); font-weight: 600; }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; }
.prose blockquote { border-left: 3px solid hsl(var(--primary)); padding-left: 1rem; font-style: italic; color: hsl(var(--muted-foreground)); }
.prose code { background: hsl(var(--muted)); padding: 0.15rem 0.4rem; border-radius: 0.3rem; font-size: 0.875em; }

/* ---------- Pagination ---------- */
.pagination-item .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  font-size: 0.875rem;
}
.pagination-item .page-numbers.current { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: hsl(var(--primary)); }

/* ---------- WordPress core alignment/caption support ---------- */
.alignwide { margin-left: -5%; margin-right: -5%; max-width: 110%; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.wp-caption-text { font-size: 0.8rem; color: hsl(var(--muted-foreground)); text-align: center; margin-top: 0.5rem; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); overflow: hidden; height: 1px; width: 1px; }
