/* ==========================================================================
   LoanKendra.in — Design Tokens
   Palette pulled from the logo (navy pillars + orange roof) and extended
   with the "big bank" red used sparingly for trust badges & urgency.
   ========================================================================== */
:root {
  /* "navy" is kept as a variable/class name for backwards-compatibility with the
     markup, but it now carries a warm rust-brown tone instead of blue — this is
     the site's dark/secondary accent, used for headings, dark backgrounds, etc.
     Orange remains the bright primary accent used for CTAs and highlights. */
  --navy: #a8380f;
  --navy-dark: #5c1d08;
  --navy-tint: #fbe4d5;

  --orange: #f5821f;
  --orange-dark: #d96a10;
  --orange-tint: #fef1e4;

  --red: #d62828;
  --red-dark: #a81f1f;
  --red-tint: #fdeaea;

  --white: #ffffff;
  --bg: #fef9f5;
  --ink: #2a1a10;
  --ink-soft: #75604f;
  --border: #f2ded0;

  --font-display: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --shadow-card: 0 10px 30px -12px rgba(90, 40, 10, 0.18);
  --shadow-lift: 0 18px 40px -14px rgba(90, 40, 10, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  margin: 0;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
}

.hidden { display: none !important; }

/* Form fields — guaranteed readable regardless of any utility-class issue --
   (belt-and-suspenders: these plain rules always apply, even if a Tailwind
   utility class fails to generate for any reason) */
input,
select,
textarea {
  color: var(--ink);
  background-color: var(--white);
}
select option {
  color: var(--ink);
  background-color: var(--white);
}

/* Skip link / focus visibility ------------------------------------------ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* Utility gradients ------------------------------------------------------ */
.bg-brand-gradient {
  background: linear-gradient(135deg, var(--orange) 0%, var(--navy) 45%, var(--navy-dark) 100%);
}

.bg-warm-gradient {
  background: linear-gradient(120deg, var(--orange) 0%, var(--red) 130%);
}

.text-gradient {
  background: linear-gradient(90deg, var(--orange) 0%, var(--red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Rupee-mark divider (signature element) --------------------------------
   A recurring hairline used across the page: navy + orange, echoing the
   handshake icon's two-tone identity instead of a generic gradient bar. */
.brand-divider {
  height: 4px;
  width: 64px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy) 50%, var(--orange) 50%, var(--orange) 100%);
}

/* Cards ------------------------------------------------------------------ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

/* Trust badge pill --------------------------------------------------------*/
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Range sliders (EMI calculator) ------------------------------------------*/
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--navy-tint);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background: var(--orange);
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  margin-top: -8px;
}
input[type="range"]::-moz-range-thumb {
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background: var(--orange);
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--navy-tint);
}

/* ------------------------------------------------------------------------
   EMI calculator v2 (Stashfin-style layout: amount box, tenure chips)
   ------------------------------------------------------------------------ */
.emi-amount-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--navy-tint);
  border-radius: 14px;
  padding: 10px 16px;
  background: var(--bg);
}
.emi-amount-box:focus-within {
  border-color: var(--navy);
}
.emi-amount-box input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy-dark);
  width: 100%;
}
.emi-rupee {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  font-size: 1.1rem;
}

.tenure-chip {
  border: 1.5px solid var(--navy-tint);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 12px;
  padding: 10px 0;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tenure-chip:hover {
  border-color: var(--orange);
}
.tenure-chip-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.emi-edit-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--orange-dark);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.emi-edit-link:hover {
  text-decoration: underline;
}

/* Reduced motion ----------------------------------------------------------*/
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Marquee for partner bank strip ------------------------------------------*/
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* Sticky mobile CTA bar ----------------------------------------------------*/
.mobile-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
}
@media (min-width: 768px) {
  .mobile-cta { display: none; }
}

/* WhatsApp floating button — sticky on all devices, pulsing ring ----------*/
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 90px;
  z-index: 45;
}
@media (min-width: 768px) {
  .whatsapp-float { bottom: 24px; }
}
.whatsapp-float .wa-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #25D366;
  animation: wa-pulse 2.2s ease-out infinite;
}
@keyframes wa-pulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float .wa-ring { animation: none; display: none; }
}

/* Founder / office section ------------------------------------------------*/
.founder-photo {
  width: 100%;
  max-width: 240px;
  border-radius: 20px;
  object-fit: cover;
  object-position: top center;
  aspect-ratio: 3/4;
  background: var(--navy-tint);
  box-shadow: var(--shadow-lift);
  border: 3px solid var(--orange-tint);
}
.office-photo {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  aspect-ratio: 16/10;
  box-shadow: var(--shadow-card);
}
.avatar-photo {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center 18%;
  flex-shrink: 0;
  border: 2.5px solid var(--orange-tint);
}
.banner-photo {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

/* Any photo the user can click to enlarge ---------------------------------*/
.lightbox-trigger {
  cursor: zoom-in;
}
.lightbox-trigger:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* Fullscreen image modal ---------------------------------------------------*/
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 10, 4, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.lightbox-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-modal-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 14px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.lightbox-close:hover {
  background: var(--orange);
}

/* Logo — bigger & crisp -----------------------------------------------------*/
.brand-logo {
  height: 3.25rem;
  width: auto;
  object-fit: contain;
  /* image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges; */
}
@media (min-width: 640px) {
  .brand-logo { height: 3.9rem; }
}

/* ------------------------------------------------------------------------
   EMI calculator v3 — no sliders: amount input + tenure chips only
   ------------------------------------------------------------------------ */
.tenure-chip {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  margin: 0;
  border: 1.5px solid var(--navy-tint);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 12px;
  padding: 12px 0;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tenure-chip:hover {
  border-color: var(--orange);
}
.tenure-chip:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
.tenure-chip-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* ------------------------------------------------------------------------
   HERO ANIMATIONS — fade/slide-in, gradient sweep, glow, floating badge
   ------------------------------------------------------------------------ */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(14px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 130, 31, 0.55), 0 10px 25px -8px rgba(245,130,31,0.5); }
  50%      { box-shadow: 0 0 0 10px rgba(245, 130, 31, 0), 0 10px 25px -8px rgba(245,130,31,0.5); }
}
@keyframes gradientSweep {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes heroBgPan {
  0%   { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

.hero-animated-bg {
  background-size: 180% 180%;
  animation: heroBgPan 18s ease-in-out infinite alternate;
}

.hero-badge {
  animation: heroFadeUp 0.7s ease-out both, badgeFloat 3.2s ease-in-out 0.9s infinite;
}
.hero-title {
  animation: heroFadeUp 0.75s ease-out 0.12s both;
}
.hero-title-gradient {
  background: linear-gradient(90deg, #ffffff 0%, #ffe4c4 30%, #ffffff 60%, #ffd199 80%, #ffffff 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientSweep 5s linear infinite;
  display: inline-block;
}
.hero-copy {
  animation: heroFadeUp 0.8s ease-out 0.22s both;
}
.hero-ctas {
  animation: heroFadeUp 0.8s ease-out 0.32s both;
}
.hero-stats {
  animation: heroFadeUp 0.8s ease-out 0.42s both;
}
.hero-card {
  animation: heroPopIn 0.8s ease-out 0.3s both;
}
.hero-cta-glow {
  animation: glowPulse 2.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero-animated-bg,
  .hero-badge, .hero-title, .hero-title-gradient, .hero-copy,
  .hero-ctas, .hero-stats, .hero-card, .hero-cta-glow {
    animation: none !important;
  }
}
