/* ============================================================
   Agam — shared brand for the marketing sites (agam.geoael.com,
   agam-crm.geoael.com). Tokens mirror the CRM app
   (agam-crm/apps/web/src/styles.css) — keep them in step.
   ============================================================ */

:root {
  /* Brand */
  --maroon-900: #3A0A14;
  --maroon-800: #4F0F1B;
  --maroon-700: #6B1F2A;       /* primary */
  --maroon-600: #8A2A36;
  --maroon-500: #A53848;
  --brand-red: #C8102E;

  /* Gold / turmeric */
  --gold-800: #7E5A1D;          /* AA text on paper */
  --gold-700: #8C6420;
  --gold-600: #A87A26;
  --gold-500: #B8893A;          /* accent — large text / ornament only on paper */
  --gold-400: #D1A65E;          /* accent on maroon */
  --gold-200: #ECD9A6;
  --gold-100: #F4E7C4;

  /* Paper / neutrals */
  --paper: #FBF6EC;
  --paper-2: #F5EFE0;
  --paper-3: #EFE6D2;
  --cream: #FFFBF2;
  --line: #E5D9BE;
  --line-strong: #D6C6A1;
  --on-maroon: #FBF1D9;
  --on-maroon-muted: rgba(245, 231, 202, 0.78);

  /* Ink */
  --ink-900: #1F0B08;
  --ink-800: #2B1410;
  --ink-700: #3D2520;
  --ink-600: #5C443E;
  --ink-400: #746455;          /* AA on paper */

  /* Food marks */
  --veg: #2F7D4D;
  --nonveg: #B41E2E;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(60, 20, 10, 0.06);
  --shadow-md: 0 6px 18px -6px rgba(60, 20, 10, 0.16), 0 2px 4px rgba(60, 20, 10, 0.05);
  --shadow-lg: 0 24px 48px -16px rgba(40, 8, 12, 0.35), 0 6px 16px rgba(40, 8, 12, 0.12);

  --f-display: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
  --f-ui: "Manrope", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-tamil: "Noto Sans Tamil", "Latha", "Tamil Sangam MN", sans-serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 9vw, 112px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-800);
  font: 400 17px/1.65 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--maroon-700); text-underline-offset: 3px; }
a:hover { color: var(--maroon-600); }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold-200); color: var(--ink-900); }
[lang="ta"], .ta { font-family: var(--f-tamil); }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
  text-wrap: balance;
}
h1 { font-size: clamp(42px, 6.4vw, 78px); }
h2 { font-size: clamp(34px, 4.6vw, 54px); }
h3 { font-size: clamp(23px, 2.2vw, 28px); line-height: 1.2; }
h1 em, h2 em { font-style: italic; font-weight: 500; }
.num { font-variant-numeric: lining-nums; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lede { font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-600); max-width: 62ch; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--maroon-700); color: var(--on-maroon);
  padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-maroon); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; position: relative; }
.section--cream { background: var(--cream); border-block: 1px solid var(--line); }
.section--paper2 { background: var(--paper-2); }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lede { margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 12.5px/1.2 var(--f-ui); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-800); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.7; }
.section-head--center .eyebrow::after { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.7; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--maroon-700); --fg: var(--on-maroon); --bd: var(--maroon-700);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd);
  font: 700 15.5px/1.2 var(--f-ui); letter-spacing: 0.01em; text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s, box-shadow 0.2s, color 0.2s;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.btn:hover { --bg: var(--maroon-600); --bd: var(--maroon-600); color: var(--fg); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--gold { --bg: var(--gold-400); --fg: var(--maroon-900); --bd: var(--gold-400); }
.btn--gold:hover { --bg: var(--gold-200); --bd: var(--gold-200); }
.btn--ghost { --bg: transparent; --fg: var(--maroon-700); --bd: var(--line-strong); box-shadow: none; }
.btn--ghost:hover { --bg: var(--paper-3); --bd: var(--maroon-700); --fg: var(--maroon-700); }
.btn--ghost-light { --bg: transparent; --fg: var(--on-maroon); --bd: rgba(251, 241, 217, 0.45); box-shadow: none; }
.btn--ghost-light:hover { --bg: rgba(251, 241, 217, 0.1); --bd: var(--on-maroon); --fg: var(--on-maroon); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 14.5px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { height: 46px; width: auto; }
.brand-tag {
  font: 700 11.5px/1 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--maroon-700); border: 1.5px solid var(--maroon-700); border-radius: 999px; padding: 6px 10px;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink-700); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 10px 12px; border-radius: 999px;
}
.nav a:hover { color: var(--maroon-700); background: var(--paper-3); }
.header-cta { display: flex; gap: 10px; }
.burger {
  display: none; width: 46px; height: 46px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--cream); color: var(--maroon-700);
  align-items: center; justify-content: center; cursor: pointer;
}
.burger svg { width: 22px; height: 22px; }

@media (max-width: 980px) {
  .nav, .header-cta { display: none; }
  .burger { display: inline-flex; }
  .site-header.is-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    padding: 10px var(--gutter) 18px;
  }
  .site-header.is-open .nav a { padding: 14px 12px; font-size: 17px; border-radius: var(--r-md); }
  .site-header.is-open .nav .nav-cta { display: flex; margin-top: 8px; }
}
.nav .nav-cta { display: none; }

/* ---------- Maroon band (hero, CTA) ---------- */
.band-maroon {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--maroon-800); color: var(--on-maroon);
}
.band-maroon::before { /* gold glow + dot grid, as on the CRM sign-in panel */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 82% 18%, rgba(209, 166, 94, 0.22), transparent 46%),
    radial-gradient(circle at 8% 92%, rgba(165, 56, 72, 0.5), transparent 42%),
    radial-gradient(rgba(236, 217, 166, 0.13) 1px, transparent 1.2px) 0 0 / 22px 22px;
}
.band-maroon h1, .band-maroon h2, .band-maroon h3 { color: var(--on-maroon); }
.band-maroon em { color: var(--gold-400); }
.band-maroon .eyebrow { color: var(--gold-400); }
.band-maroon .lede, .band-maroon p { color: var(--on-maroon-muted); }
.band-maroon a:not(.btn) { color: var(--gold-200); }

.kolam { position: absolute; pointer-events: none; color: var(--gold-400); z-index: -1; }

.hero { padding: clamp(72px, 11vw, 136px) 0 clamp(72px, 10vw, 120px); }
.hero h1 { max-width: 20ch; }
.hero .lede { margin: 22px 0 34px; }
.hero-watermark {
  position: absolute; right: -2vw; bottom: -6vw; z-index: -1;
  font: 600 clamp(180px, 30vw, 420px)/1 var(--f-tamil);
  color: rgba(209, 166, 94, 0.08); letter-spacing: -0.04em; user-select: none;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 40px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.04em; color: var(--on-maroon-muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--gold-400); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(22px, 2.4vw, 30px); box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-600); font-size: 16px; margin: 0; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--gold-100); color: var(--maroon-700); margin-bottom: 18px;
}
.card-icon svg { width: 26px; height: 26px; }
.card ul { margin: 14px 0 0; padding: 0; list-style: none; }
.card li { position: relative; padding-left: 18px; font-size: 15.5px; color: var(--ink-700); margin: 6px 0; }
.card li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: clamp(26px, 3vw, 36px) clamp(12px, 2vw, 28px); text-align: center; position: relative; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 24%; bottom: 24%; width: 1px; background: var(--line-strong); }
.stat-value { font: 600 clamp(40px, 4.6vw, 58px)/1 var(--f-display); color: var(--maroon-700); font-variant-numeric: lining-nums; }
.stat-value small { font-size: 0.5em; font-weight: 600; color: var(--gold-700); margin-left: 2px; }
.stat-label { margin-top: 10px; font-size: 14.5px; font-weight: 600; color: var(--ink-600); }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.step { position: relative; padding-top: 58px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font: 600 40px/1 var(--f-display); color: var(--gold-500); font-variant-numeric: lining-nums;
}
.step::after { content: ""; position: absolute; top: 20px; left: 62px; right: -12px; height: 1px; background: var(--line-strong); }
.step:last-child::after { display: none; }
.step h3 { font-size: 26px; }
.step p { color: var(--ink-600); font-size: 16px; margin: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .step:nth-child(2)::after { display: none; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .step::after { display: none; } }

/* ---------- Food marks (Indian veg / non-veg symbol) ---------- */
.mark { display: inline-grid; place-items: center; width: 14px; height: 14px; border: 1.5px solid var(--veg); border-radius: 2px; flex: none; }
.mark::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--veg); }
.mark--nonveg { border-color: var(--nonveg); }
.mark--nonveg::after { background: none; width: 0; height: 0; border-radius: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid var(--nonveg); }

/* ---------- Browser frame for screenshots ---------- */
.frame {
  border-radius: var(--r-lg); overflow: hidden; background: var(--cream);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
}
.frame-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.frame-bar span { margin-left: 10px; font-size: 12px; color: var(--ink-400); font-weight: 600; letter-spacing: 0.02em; }
.band-maroon .frame { border-color: rgba(236, 217, 166, 0.25); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--gold-100); color: var(--maroon-800); font-size: 14.5px; font-weight: 600;
}
.band-maroon .chip { background: rgba(251, 241, 217, 0.1); color: var(--on-maroon); border: 1px solid rgba(251, 241, 217, 0.22); }
.chip svg { width: 16px; height: 16px; color: var(--gold-600); }
.band-maroon .chip svg { color: var(--gold-400); }

/* ---------- Footer ---------- */
.site-footer { background: var(--maroon-900); color: var(--on-maroon-muted); padding: 56px 0 32px; font-size: 15px; }
.site-footer a { color: var(--on-maroon); text-decoration: none; }
.site-footer a:hover { color: var(--gold-200); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font: 700 12.5px/1.2 var(--f-ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-400); margin: 0 0 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 8px 0; }
.footer-logo { height: 54px; width: auto; margin-bottom: 16px; }
.footer-base { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(251, 241, 217, 0.14); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 13.5px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Mobile action bar ---------- */
.mobile-cta { display: none; }
@media (max-width: 720px) {
  .mobile-cta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: rgba(251, 246, 236, 0.96); border-top: 1px solid var(--line);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .mobile-cta .btn { min-height: 46px; padding: 10px 12px; }
  body.has-mobile-cta { padding-bottom: 76px; }
}

/* ---------- Reveal on scroll (progressive; see site.js) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
  .btn:hover, .card:hover { transform: none; }
}
