/* Homepage — marketing site for manimaheshpharma.com root.
   Deliberately a different palette from the ordering app (styles.css):
   vibrant pharma blue + lime, on cool neutrals, vs. the app's muted
   moss/amber on warm paper. Typography stays Fraunces + Inter to keep
   one brand voice across the marketing site and the app. */

:root {
  --ink: #0f1a2e;
  --ink-soft: #48546b;
  --paper: #f6f8fc;
  --panel: #ffffff;
  --panel-alt: #eef2fa;
  --line: #dde4f1;
  --line-strong: #c3ccdf;

  --blue-900: #0b1f4d;
  --blue-700: #1d4ed8;
  --blue-600: #2b5fe6;
  --blue-500: #4472ea;
  --blue-50: #eaf0fe;

  --lime-600: #65a30d;
  --lime-500: #84cc16;
  --lime-400: #a3e635;
  --lime-50: #f2fbe3;

  --muted: #64748b;
  --white: #ffffff;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;
  --shadow: 0 10px 30px rgba(11, 31, 77, 0.09), 0 2px 6px rgba(11, 31, 77, 0.06);
  --shadow-lg: 0 28px 64px rgba(11, 31, 77, 0.16), 0 4px 12px rgba(11, 31, 77, 0.07);

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
.home {
  display: block;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.home h1, .home h2, .home h3 { margin: 0; color: var(--ink); font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
.home p { margin: 0; color: var(--ink-soft); }
.home a { color: var(--blue-700); text-decoration: none; }
/* Higher specificity than the ".home a" rule above, so button/link-styled
   anchors (.btn-*, .home-nav-cta) keep their own text color instead of
   silently inheriting the plain-link blue — which on .btn-primary/.home-nav-cta
   (both blue backgrounds) made the label invisible: blue text on blue. */
.home .btn-primary, .home .home-nav-cta { color: var(--white); }
.home .btn-accent, .home .btn-outline { color: var(--blue-900); }
.home img { max-width: 100%; display: block; }
.home strong { font-weight: 700; color: var(--ink); }

.home-shell { max-width: 1180px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)); }

/* ---------- Nav ---------- */
.home-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 248, 252, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.home-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; }
.home-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.home-brand img { width: 38px; height: 38px; flex: 0 0 38px; object-fit: contain; }
.home-brand-name { font-family: var(--font-display); font-weight: 650; font-size: 1.12rem; color: var(--blue-900); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-nav-links { display: flex; align-items: center; gap: 28px; }
.home-nav-links a {
  position: relative;
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 600;
  padding-bottom: 4px;
  transition: color .18s ease;
}
.home-nav-links a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--lime-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.home-nav-links a:hover { color: var(--blue-700); }
.home-nav-links a:hover::after { transform: scaleX(1); }
.home-nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--blue-700);
  color: var(--white);
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.28);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.home-nav-cta:hover { background: var(--blue-600); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(29, 78, 216, 0.34); }
.home-nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 76px 0 88px; }
.hero::before {
  content: '';
  position: absolute; inset: -20% -10% auto -10%;
  height: 560px;
  background: radial-gradient(ellipse at 82% 10%, rgba(29, 78, 216, 0.14), transparent 60%),
              radial-gradient(ellipse at 8% 30%, rgba(132, 204, 22, 0.14), transparent 55%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@keyframes hero-fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.hero-eyebrow, .hero h1, .hero-lede, .hero-actions, .hero-facts, .hero-visual {
  animation: hero-fade-up .7s cubic-bezier(.22,.61,.36,1) both;
}
.hero-eyebrow { animation-delay: .02s; }
.hero h1 { animation-delay: .08s; }
.hero-lede { animation-delay: .16s; }
.hero-actions { animation-delay: .24s; }
.hero-facts { animation-delay: .32s; }
.hero-visual { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow, .hero h1, .hero-lede, .hero-actions, .hero-facts, .hero-visual { animation: none; }
}
.hero-eyebrow {
  display: inline-flex; align-items: flex-start; gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 14px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.hero-eyebrow::before { content: ''; flex: none; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--lime-500); }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.35rem); margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--blue-700); }
/* ".home p" (class+type, specificity 0,1,1) would otherwise beat this
   single-class rule's margin-bottom and silently zero it — qualify with
   the ".hero" ancestor (0,2,0) so the margin actually applies. */
.hero .hero-lede { max-width: 46ch; font-size: 1.08rem; line-height: 1.65; margin-bottom: 40px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 26px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue-700); color: var(--white); box-shadow: 0 10px 24px rgba(29, 78, 216, 0.3); }
.btn-primary:hover { background: var(--blue-600); box-shadow: 0 14px 30px rgba(29, 78, 216, 0.38); }
.btn-accent { background: var(--lime-500); color: var(--blue-900); box-shadow: 0 10px 24px rgba(132, 204, 22, 0.32); }
.btn-accent:hover { background: var(--lime-400); box-shadow: 0 14px 30px rgba(132, 204, 22, 0.4); }
.btn-outline { background: var(--panel); color: var(--blue-900); border: 1.5px solid var(--line-strong); }
.btn-outline:hover { border-color: var(--blue-700); color: var(--blue-700); box-shadow: 0 10px 22px rgba(11, 31, 77, 0.1); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 28px; }
.hero-fact { display: flex; align-items: center; gap: 10px; }
.hero-fact-icon {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none;
  border-radius: 10px;
  background: var(--lime-50);
  color: var(--lime-600);
}
.hero-fact-icon svg { width: 18px; height: 18px; }
.hero-fact-text { font-size: .84rem; font-weight: 700; color: var(--ink); }

.hero-visual { position: relative; }
.hero-card {
  position: relative;
  padding: 34px 30px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--blue-700) 0%, var(--blue-900) 100%);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: transform .3s ease;
}
.hero-card:hover { transform: translateY(-6px); }
.hero-card::after {
  content: '';
  position: absolute; right: -60px; bottom: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(132, 204, 22, 0.22);
  animation: hero-orb-float 7s ease-in-out infinite;
}
@keyframes hero-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-10px, -14px) scale(1.06); }
}
.hero-step { transition: transform .18s ease; }
.hero-steps:hover .hero-step { opacity: .55; }
.hero-steps:hover .hero-step:hover { opacity: 1; transform: translateX(4px); }
.hero-card-kicker { position: relative; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--lime-400); margin-bottom: 14px; }
/* ".home h1, .home h2, .home h3" (class+type, specificity 0,1,1) would
   otherwise beat a bare ".hero-card-title" (0,1,0) and win the color back
   to var(--ink) — qualify with the ".hero-card" ancestor (0,2,0) instead. */
.hero-card .hero-card-title { position: relative; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-bottom: 22px; line-height: 1.3; color: var(--white); }
.hero-steps { position: relative; display: flex; flex-direction: column; gap: 14px; }
.hero-step { display: flex; align-items: flex-start; gap: 12px; }
.hero-step-num {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  font-size: .78rem; font-weight: 800;
}
.hero-step-body { font-size: .88rem; color: rgba(255,255,255,0.86); line-height: 1.5; padding-top: 3px; }
.hero-step-body strong { color: var(--white); }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 44px; }
.section-eyebrow { display: block; margin-bottom: 10px; color: var(--blue-700); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin-bottom: 12px; }
.section-head p { font-size: 1.02rem; line-height: 1.6; }

/* About */
.about-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 56px; align-items: center; }
.about-map {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 30px;
  background: linear-gradient(160deg, var(--lime-50) 0%, var(--blue-50) 100%);
  border: 1px solid var(--line);
  min-height: 300px;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.about-map:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.about-map-pin {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--blue-700);
  color: var(--white);
  box-shadow: 0 12px 26px rgba(29, 78, 216, 0.35);
  margin-bottom: 18px;
  animation: pin-pulse 2.6s ease-in-out infinite;
}
@keyframes pin-pulse {
  0%, 100% { box-shadow: 0 12px 26px rgba(29, 78, 216, 0.35), 0 0 0 0 rgba(29, 78, 216, 0.28); }
  50% { box-shadow: 0 12px 26px rgba(29, 78, 216, 0.35), 0 0 0 10px rgba(29, 78, 216, 0); }
}
.about-map-pin svg { width: 26px; height: 26px; }
.about-map-label { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--blue-900); margin-bottom: 6px; }
.about-map-sub { font-size: .85rem; color: var(--ink-soft); line-height: 1.55; }
.about-map-owner { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .78rem; font-weight: 700; color: var(--blue-700); }
.about-body p + p { margin-top: 16px; }
.about-body { font-size: 1.02rem; line-height: 1.7; margin-bottom: 26px; }
.about-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.about-tag {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: .8rem;
  font-weight: 700;
  transition: background .18s ease, transform .18s ease;
}
.about-tag:hover { background: var(--lime-50); color: var(--lime-600); transform: translateY(-2px); }

/* Services */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  padding: 30px 26px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
}
.section-alt .service-card { background: var(--paper); }
.service-icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  margin-bottom: 18px;
  transition: transform .22s ease;
}
.service-card:hover .service-icon { transform: scale(1.08) rotate(-4deg); }
.service-icon svg { width: 24px; height: 24px; }
.service-icon-blue { background: var(--blue-50); color: var(--blue-700); }
.service-icon-lime { background: var(--lime-50); color: var(--lime-600); }
.service-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.service-card p { font-size: .92rem; line-height: 1.6; }

/* How it works */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; counter-reset: step; }
.step-item { position: relative; padding-left: 0; }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--blue-900);
  color: var(--lime-400);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}
.step-item h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step-item p { font-size: .9rem; line-height: 1.6; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-card {
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.contact-row-icon { transition: transform .18s ease, background .18s ease; }
.contact-row:hover .contact-row-icon { transform: scale(1.1); background: var(--lime-50); color: var(--lime-600); }
.contact-row { display: flex; align-items: flex-start; gap: 14px; }
.contact-row + .contact-row { margin-top: 22px; }
.contact-row-icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: none;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue-700);
}
.contact-row-icon svg { width: 20px; height: 20px; }
.contact-row-label { font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact-row-value { font-size: 1rem; font-weight: 700; color: var(--ink); }
.contact-row-value a { color: var(--ink); }
.contact-row-value a:hover { color: var(--blue-700); }
.contact-cta-panel {
  padding: 34px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--blue-700), var(--blue-900));
  color: var(--white);
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
}
.contact-cta-panel h3 { font-family: var(--font-display); font-size: 1.4rem; color: var(--white); }
.contact-cta-panel p { color: rgba(255,255,255,0.82); font-size: .95rem; line-height: 1.6; }

/* Footer */
.home-footer { padding: 40px 0; border-top: 1px solid var(--line); }
.home-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.home-footer-brand { display: flex; align-items: center; gap: 10px; }
.home-footer-brand img { width: 28px; height: 28px; }
.home-footer-brand span { font-family: var(--font-display); font-weight: 650; color: var(--blue-900); }
.home-footer-meta { font-size: .82rem; color: var(--muted); }
.home-footer-meta a { color: var(--muted); font-weight: 600; }

/* ---------- Scroll reveal ---------- */
/* .reveal elements start faded/offset and are flipped to .reveal-in by
   home.js's IntersectionObserver as they scroll into view. */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal-in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .about-map-pin, .hero-card::after { animation: none; }
  .btn, .btn:hover, .service-card, .service-card:hover, .contact-card, .contact-card:hover,
  .about-map, .about-map:hover, .hero-card, .hero-card:hover, .home-nav-cta, .home-nav-cta:hover {
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .home-nav-links { display: none; }
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .card-grid, .steps-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .hero { padding: 48px 0 60px; }
  .hero-eyebrow { font-size: .66rem; letter-spacing: .05em; padding: 8px 12px; margin-bottom: 22px; }
  .hero-facts { gap: 18px 24px; }
  .home-nav-inner { gap: 10px; }
  .home-brand-name { font-size: .98rem; }
  .home-nav-cta { padding: 9px 14px; font-size: .82rem; }
}
