/* ============================================================
   Milk Khata — Shared Styles
   Bright dairy blue · matches Milk Khata Diary app
   ============================================================ */

:root {
  /* Core palette — bright dairy blue (matches the actual app) */
  --cream: #EAF3FF;          /* sky tint background */
  --cream-deep: #D6E8FF;     /* deeper sky */
  --paper: #FFFFFF;          /* pure white cards */
  --cocoa: #0A2A66;           /* deep navy text */
  --cocoa-soft: #4A6794;      /* muted blue-gray */
  --terracotta: #1E5FE8;      /* primary royal blue */
  --terracotta-deep: #1746B8; /* deep blue hover */
  --sage: #16A34A;            /* dairy green (success / install) */
  --butter: #F59E0B;          /* amber accent */
  --line: #CFE0F7;            /* soft blue line */

  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --container: 1240px;
  --shadow-sm: 0 1px 2px rgba(10, 42, 102, 0.06), 0 2px 6px rgba(10, 42, 102, 0.04);
  --shadow: 0 4px 14px rgba(30, 95, 232, 0.10), 0 12px 32px rgba(10, 42, 102, 0.08);
  --shadow-lg: 0 12px 32px rgba(30, 95, 232, 0.14), 0 24px 64px rgba(10, 42, 102, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: linear-gradient(180deg, #EAF3FF 0%, #F5F9FF 100%);
  color: var(--cocoa);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle splash dots */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(30, 95, 232, 0.05) 0 2px, transparent 2px),
    radial-gradient(circle at 78% 70%, rgba(30, 95, 232, 0.04) 0 2px, transparent 2px);
  background-size: 60px 60px, 80px 80px;
}

img { max-width: 100%; display: block; }

a { color: var(--terracotta-deep); text-decoration: none; }
a:hover { color: var(--cocoa); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--cocoa);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 6vw, 72px); }
h2 { font-size: clamp(32px, 4.2vw, 52px); }
h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; }
h4 { font-size: 20px; font-weight: 700; }

p { margin: 0 0 1em; text-wrap: pretty; }
.lead { font-size: 21px; line-height: 1.5; color: var(--cocoa-soft); }

/* Container */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--cocoa); letter-spacing: -0.01em; }
.logo-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #1E5FE8 0%, #0A2A66 100%);
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800; font-size: 20px;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.18), 0 4px 10px rgba(30, 95, 232, 0.30);
  position: relative;
}
.logo-mark::after {
  content: ""; position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: #F59E0B;
}
.nav-links { display: flex; gap: 28px; list-style: none; padding: 0; margin: 0; font-size: 15px; font-weight: 600; }
.nav-links a { color: var(--cocoa); position: relative; padding: 6px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--terracotta); }
.nav-links a.active::after { content: ""; position: absolute; bottom: -2px; left: 0; right: 0; height: 3px; background: var(--terracotta); border-radius: 3px; }
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: var(--radius-pill); font-family: var(--font-sans); font-weight: 700; font-size: 15px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; white-space: nowrap; }
.btn-primary { background: var(--terracotta); color: #fff; box-shadow: 0 4px 14px rgba(30, 95, 232, 0.30); }
.btn-primary:hover { background: var(--terracotta-deep); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(30, 95, 232, 0.40); }
.btn-accent { background: var(--sage); color: #fff; box-shadow: 0 4px 14px rgba(22, 163, 74, 0.30); }
.btn-accent:hover { background: #128a3e; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(22, 163, 74, 0.40); }
.btn-ghost { background: transparent; color: var(--cocoa); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--terracotta); color: var(--terracotta); }
.btn-lg { padding: 16px 30px; font-size: 17px; }

/* Store buttons */
.store-row { display: flex; gap: 12px; flex-wrap: wrap; }
.store-btn { display: inline-flex; align-items: center; gap: 12px; padding: 10px 22px 10px 18px; background: var(--cocoa); color: #fff; border-radius: var(--radius-pill); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.store-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: #fff; }
.store-btn svg { flex-shrink: 0; }
.store-btn .s-small { font-size: 11px; opacity: 0.8; letter-spacing: 0.04em; text-transform: uppercase; display: block; line-height: 1; margin-bottom: 3px; }
.store-btn .s-big { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1; }

/* Section */
.section { padding: 96px 0; position: relative; z-index: 1; }
.section-sm { padding: 64px 0; }
.section-cream { background: var(--cream-deep); }
.section-cocoa { background: linear-gradient(145deg, #0A2A66 0%, #1746B8 100%); color: #fff; }
.section-cocoa h1, .section-cocoa h2, .section-cocoa h3 { color: #fff; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--terracotta); padding: 6px 14px; background: rgba(30, 95, 232, 0.10); border-radius: var(--radius-pill); margin-bottom: 20px; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta); }

.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head .lead { margin-top: 16px; }

/* Cards */
.card { background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); padding: 32px; transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* Footer */
.footer { background: linear-gradient(145deg, #0A2A66 0%, #1746B8 100%); color: #fff; padding: 80px 0 32px; position: relative; z-index: 1; }
.footer a { color: rgba(255,255,255,0.8); }
.footer a:hover { color: var(--butter); opacity: 1; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-col h5 { font-family: var(--font-sans); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; opacity: 0.7; margin: 0 0 20px; color: #fff; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 15px; }
.footer .logo { color: #fff; margin-bottom: 16px; }
.footer-tag { opacity: 0.75; font-size: 14px; max-width: 280px; line-height: 1.6; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; font-size: 13px; opacity: 0.7; flex-wrap: wrap; gap: 16px; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .section { padding: 64px 0; }
}

/* Utility */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.tag { display: inline-block; font-family: var(--font-sans); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 12px; border-radius: var(--radius-pill); background: rgba(30, 95, 232, 0.12); color: var(--terracotta); }

/* Decorative shapes */
.blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.5; z-index: 0; pointer-events: none; }

/* Icon circle */
.icon-circle { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(30, 95, 232, 0.10); color: var(--terracotta); border: 1.5px solid var(--line); margin-bottom: 20px; flex-shrink: 0; }

/* ============================================================
   ANIMATIONS LIBRARY
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideRight { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pop { 0% { opacity: 0; transform: scale(0.85); } 60% { transform: scale(1.04); } 100% { opacity: 1; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(30, 95, 232, 0.4); } 50% { box-shadow: 0 0 0 14px rgba(30, 95, 232, 0); } }
@keyframes drip { 0% { transform: translateY(-8px) scale(0.9); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(120px) scale(0.5); opacity: 0; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes count { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-l { opacity: 0; transform: translateX(-40px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal-l.in { opacity: 1; transform: translateX(0); }
.reveal-r { opacity: 0; transform: translateX(40px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal-r.in { opacity: 1; transform: translateX(0); }
.reveal-pop { opacity: 0; transform: scale(0.85); transition: opacity 0.6s cubic-bezier(.2,.7,.2,1), transform 0.6s cubic-bezier(.34,1.56,.64,1); }
.reveal-pop.in { opacity: 1; transform: scale(1); }
.reveal-stagger > * { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(.2,.7,.2,1), transform 0.6s cubic-bezier(.2,.7,.2,1); }
.reveal-stagger.in > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.12s; }
.reveal-stagger.in > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.19s; }
.reveal-stagger.in > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.26s; }
.reveal-stagger.in > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.33s; }
.reveal-stagger.in > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.40s; }
.reveal-stagger.in > *:nth-child(7) { opacity: 1; transform: translateY(0); transition-delay: 0.47s; }
.reveal-stagger.in > *:nth-child(8) { opacity: 1; transform: translateY(0); transition-delay: 0.54s; }
.reveal-stagger.in > *:nth-child(n+9) { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }

.float-anim { animation: float 6s ease-in-out infinite; }
.pulse-anim { animation: pulse 2.4s ease-out infinite; }
.wobble-anim { animation: wobble 4s ease-in-out infinite; }

/* Bilingual helper */
.hi { font-family: "Hind", "Mukta", "Noto Sans Devanagari", var(--font-sans); display: block; color: var(--cocoa-soft); font-weight: 500; font-size: 0.85em; margin-top: 4px; line-height: 1.4; }
.hi-only { font-family: "Hind", "Mukta", "Noto Sans Devanagari", var(--font-sans); }
h1 .hi, h2 .hi { font-size: 0.5em; font-weight: 600; letter-spacing: 0; margin-top: 10px; color: var(--terracotta); }
h3 .hi, h4 .hi { font-size: 0.7em; }
.lead .hi { font-size: 0.88em; margin-top: 8px; }

/* Bilingual two-line label inside cards */
.bi-label b { display: block; }
.bi-label .hi { margin-top: 2px; font-size: 13px; }

/* Hover lift utility */
.lift { transition: transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s; }
.lift:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* Page hero (used on all sub-pages) */
.page-hero { padding: 80px 0 64px; position: relative; overflow: hidden; background: linear-gradient(180deg, #EAF3FF 0%, transparent 100%); }
.page-hero .container { position: relative; z-index: 2; text-align: center; max-width: 880px; }
.page-hero h1 { margin-bottom: 18px; }
.page-hero .lead { max-width: 680px; margin: 0 auto; }
.page-hero::before, .page-hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); z-index: 0; }
.page-hero::before { width: 380px; height: 380px; background: rgba(30, 95, 232, 0.18); top: -100px; right: -80px; }
.page-hero::after { width: 280px; height: 280px; background: rgba(245, 158, 11, 0.14); bottom: -80px; left: -50px; }

/* Tweaks panel */
.tweaks-panel { position: fixed; bottom: 24px; right: 24px; width: 280px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 20px; z-index: 200; font-size: 14px; display: none; }
.tweaks-panel.active { display: block; }
.tweaks-panel h5 { margin: 0 0 16px; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.tweaks-panel .swatch-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.tweaks-panel .swatch { aspect-ratio: 1; border-radius: var(--radius-sm); border: 2px solid transparent; cursor: pointer; transition: transform 0.15s; }
.tweaks-panel .swatch:hover { transform: scale(1.08); }
.tweaks-panel .swatch.active { border-color: var(--cocoa); }
.tweaks-panel label { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--cocoa-soft); margin-bottom: 8px; }
