/* ============================================================
   MedRudra website — shared styles (base, nav, footer)
   Design source: "Medrudra website redesign" handoff bundle.
   Brand red: #8B0000 · Ink: #1A1A1A · Warm bg: #FDF9F8
   Fonts: Bricolage Grotesque (display) · Instrument Sans (UI)
   ============================================================ */

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  color: #1A1A1A;
}

a { color: #8B0000; text-decoration: none; }
a:hover { color: #660000; }

img { max-width: 100%; }

/* ---- motion ------------------------------------------------ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 0, 0, .35); }
  50%      { box-shadow: 0 0 0 10px rgba(139, 0, 0, 0); }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@keyframes floatB {
  0%, 100% { transform: translateY(-6px); }
  50%      { transform: translateY(9px); }
}

/* Scroll-linked reveal; browsers without animation-timeline just show it. */
.rv {
  animation: reveal .8s cubic-bezier(.16, 1, .3, 1) both;
  animation-timeline: view();
  animation-range: entry 0% entry 42%;
}
@supports not (animation-timeline: view()) {
  .rv { animation: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .rv, .rvl, .rvr, .zoom { opacity: 1 !important; }
}

/* ---- shared page elements ---------------------------------- */

/* Faded red dot-grid overlay used behind every hero */
.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(139, 0, 0, .09) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, black, transparent 70%);
  mask-image: linear-gradient(180deg, black, transparent 70%);
}

/* Pill badge with pulsing dot ("Talk to us", "Get the apps", …) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(139, 0, 0, .25);
  background: rgba(139, 0, 0, .06);
  color: #8B0000;
  font: 600 12.5px 'Instrument Sans', sans-serif;
  padding: 8px 16px;
  border-radius: 99px;
  animation: fadeUp .7s ease both;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #8B0000;
  animation: pulseRed 2.2s infinite;
}

/* Red→warm-red gradient text */
.grad {
  background: linear-gradient(90deg, #8B0000, #C43B2B);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Section eyebrow (letter-spaced red caps) */
.kicker {
  font: 600 12px 'Instrument Sans', sans-serif;
  letter-spacing: .16em;
  color: #8B0000;
}

/* ---- nav --------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(26, 26, 26, .08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 28px;
}

.nav-brand { display: flex; align-items: center; gap: 10px; color: inherit; }
.nav-brand img { height: 34px; width: auto; display: block; }

/* Wordmark next to the icon (the brand SVG is the mark only) */
.brand-word {
  font: 800 21px 'Bricolage Grotesque', sans-serif;
  letter-spacing: -.02em;
  color: #1E3A5F;
  line-height: 1;
}
.brand-word b { color: #8B0000; font-weight: inherit; }
.brand-word--sm { font-size: 17px; }

.nav-links {
  display: flex;
  gap: 30px;
  font: 500 14px 'Instrument Sans', sans-serif;
}
.nav-links a { color: #4B4B4B; }
.nav-links a:hover { color: #8B0000; }
.nav-links a.active { color: #8B0000; font-weight: 600; }

.nav-cta {
  background: #8B0000;
  color: #fff;
  font: 600 14px 'Instrument Sans', sans-serif;
  padding: 10px 22px;
  border-radius: 99px;
  box-shadow: 0 6px 18px rgba(139, 0, 0, .3);
  white-space: nowrap;
}
.nav-cta:hover { color: #fff; background: #660000; }

.nav-dl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1.5px solid rgba(139, 0, 0, .35);
  color: #8B0000;
  font: 600 14px 'Instrument Sans', sans-serif;
  padding: 9px 18px;
  border-radius: 99px;
  margin-right: 10px;
  white-space: nowrap;
  background: #fff;
}
.nav-dl:hover { border-color: #8B0000; background: #FDF6F5; color: #8B0000; }
.nav-dl svg { display: block; }
@media (max-width: 820px) { .nav-dl { display: none; } }

/* Mobile menu (the prototype is desktop-only; this keeps links reachable on phones) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  margin-left: 4px;
  cursor: pointer;
  color: #1A1A1A;
}
.nav-toggle svg { display: block; }

.nav-menu {
  display: none;
  flex-direction: column;
  border-top: 1px solid rgba(26, 26, 26, .08);
  background: #fff;
  padding: 6px 28px 14px;
}
.nav-menu a {
  padding: 12px 0;
  font: 500 15px 'Instrument Sans', sans-serif;
  color: #4B4B4B;
  border-bottom: 1px solid rgba(26, 26, 26, .05);
}
.nav-menu a:last-child { border-bottom: none; }
.nav-menu a.active { color: #8B0000; font-weight: 600; }
.nav.open .nav-menu { display: flex; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-inner { padding: 12px 20px; }
}

/* ---- footer ------------------------------------------------ */

.footer {
  border-top: 1px solid rgba(26, 26, 26, .08);
  background: #FDF9F8;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 34px 28px;
  gap: 24px;
}

.footer-brand-row { display: flex; align-items: center; gap: 8px; }
.footer-brand img { height: 28px; width: auto; display: block; }

.footer-tag {
  font: 600 10.5px 'Instrument Sans', sans-serif;
  letter-spacing: .14em;
  color: #8B0000;
  margin-top: 10px;
}

.footer-sub {
  font: 400 12.5px 'Instrument Sans', sans-serif;
  color: #8B8B8B;
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
  font: 500 14px 'Instrument Sans', sans-serif;
}

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 18px; padding: 28px 20px; }
}
