/* Bappa Agro public site. Colours mirror mobile_app/lib/theme.dart. */
:root {
  --green: #173f35;
  --green-deep: #0e2b25;
  --saffron: #c66a2b;
  --cream: #eee4d3;
  --canvas: #f7f2e8;
  --surface: #fffcf6;
  --ink: #1d231f;
  --muted: #6e746d;
  --line: #e3dccd;
  --soft-green: #dde8df;
  --radius: 20px;
  --font: "Manrope", "Noto Sans Gujarati", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
}

html[data-lang="gu"] body { font-family: "Noto Sans Gujarati", "Manrope", system-ui, sans-serif; }

/* Language switching: every translatable node carries data-l="gu" or data-l="en". */
html[data-lang="gu"] [data-l="en"],
html[data-lang="en"] [data-l="gu"] { display: none !important; }

a { color: var(--green); }
a:hover { color: var(--saffron); }
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 242, 232, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green-deep); font-weight: 800; letter-spacing: 0.02em; }
.brand img { width: 34px; height: auto; }
.brand:hover { color: var(--green-deep); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-nav { display: none; gap: 20px; margin-right: 12px; }
.header-nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink); }
.header-nav a:hover { color: var(--saffron); }
@media (min-width: 760px) { .header-nav { display: flex; } }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 3px;
}
.lang-toggle button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 34px;
}
.lang-toggle button[aria-pressed="true"] { background: var(--green); color: #fff; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); color: #fff; }
.btn-outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn-outline:hover { background: var(--soft-green); color: var(--green-deep); }

/* Hero */
.hero { padding: 48px 0 32px; }
.hero .wrap { display: grid; gap: 32px; align-items: center; }
.hero-logo { width: 120px; }
.eyebrow { color: var(--saffron); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; font-size: 13px; margin: 0 0 8px; }
.hero h1 { font-size: clamp(32px, 7vw, 54px); line-height: 1.1; color: var(--green-deep); margin: 0 0 16px; letter-spacing: -0.01em; }
.hero p.lead { font-size: 18px; color: var(--muted); margin: 0 0 24px; max-width: 34em; }
@media (min-width: 860px) {
  .hero { padding: 80px 0 56px; }
  .hero .wrap { grid-template-columns: 1.3fr 1fr; }
  .hero-card { display: grid; }
}
.hero-card {
  display: none;
  background: var(--green);
  color: #fff;
  border-radius: 28px;
  padding: 32px 28px;
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}
.hero-card img { width: 150px; background: var(--surface); border-radius: 24px; padding: 14px; }
.hero-card p { margin: 0; color: var(--cream); }

/* Store badges */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  min-width: 200px;
  padding: 10px 20px 10px 16px;
  border-radius: 14px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1.2;
}
.store:hover { color: #fff; background: #1a1a1a; }
.store svg { width: 28px; height: 28px; flex: none; fill: currentColor; }
.store small { display: block; font-size: 11px; font-weight: 600; opacity: 0.85; letter-spacing: 0.02em; }
.store strong { display: block; font-size: 19px; font-weight: 700; }
.store.is-recommended { border-color: var(--saffron); box-shadow: 0 0 0 4px rgba(198, 106, 43, 0.18); }
.store.is-disabled { background: #5d615e; cursor: default; pointer-events: none; }
.store-note { font-size: 14px; color: var(--muted); margin: 12px 0 0; min-height: 1em; }

/* Sections */
section { padding: 40px 0; }
.section-title { font-size: clamp(24px, 4.5vw, 34px); color: var(--green-deep); margin: 0 0 8px; line-height: 1.2; }
.section-sub { color: var(--muted); margin: 0 0 24px; max-width: 42em; }

.cards { display: grid; gap: 16px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin: 0 0 6px; font-size: 18px; color: var(--green-deep); }
.card p { margin: 0; color: var(--muted); }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--soft-green); color: var(--green);
  display: grid; place-items: center; margin-bottom: 14px;
}
.card .icon svg { width: 24px; height: 24px; }

.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.download-band { background: var(--green-deep); color: #fff; }
.download-band .section-title { color: #fff; }
.download-band .section-sub, .download-band .store-note { color: var(--cream); }

.contact-list { display: grid; gap: 12px; }
@media (min-width: 720px) { .contact-list { grid-template-columns: repeat(3, 1fr); } }
.contact-item { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.contact-item strong { display: block; font-size: 17px; }
.contact-item span { color: var(--muted); font-size: 14px; }

/* Document pages */
.doc { padding: 40px 0 56px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(30px, 6vw, 42px); line-height: 1.15; color: var(--green-deep); margin: 0 0 8px; }
.doc .updated { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.doc h2 { font-size: 21px; color: var(--green-deep); margin: 36px 0 8px; line-height: 1.3; }
.doc h3 { font-size: 17px; margin: 20px 0 6px; }
.doc p, .doc li { color: #333a35; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { background: var(--cream); color: var(--green-deep); }
.table-scroll { overflow-x: auto; }

.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--saffron);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 20px 0;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }

.steps { list-style: none; padding: 0 !important; counter-reset: step; display: grid; gap: 12px; margin: 16px 0; }
.steps li {
  counter-increment: step;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 16px 64px;
  margin: 0 !important;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px; top: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  display: grid; place-items: center;
}
.steps strong { color: var(--green-deep); }

.tag { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.tag-red { background: #f6ded7; color: #8a2d16; }
.tag-green { background: var(--soft-green); color: var(--green-deep); }

/* Footer */
.site-footer { background: var(--green-deep); color: var(--cream); padding: 36px 0 28px; font-size: 15px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--saffron); }
.footer-grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-title { color: #fff; font-weight: 800; margin: 0 0 8px; }
.copyright { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(238, 228, 211, 0.2); font-size: 13px; opacity: 0.8; }
.contact-item .icon { margin: 0; flex: none; }

/* Inside the mobile app's WebView (?app=1): the app supplies its own title
   bar and navigation, so show only the page content. /about serves index.html,
   which is trimmed to its About section. */
html[data-app] .site-header,
html[data-app] .site-footer,
html[data-app] main > section:not(#about) { display: none; }
html[data-app] .doc { padding-top: 20px; }
