/* ==========================================================================
   JeevanOS — base design system
   Shared by the marketing site and the app. Warm, India-modern, fast.
   Change --brand here and the whole product re-skins.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Brand */
  --brand: #E0562B;
  --brand-ink: #A63A18;
  --brand-soft: #FDEEE7;
  --jade: #0E7C66;
  --jade-soft: #E3F3EF;

  /* Light surfaces */
  --bg: #FCFAF7;
  --surface: #FFFFFF;
  --surface-2: #F5F1EB;
  --surface-3: #EDE7DE;
  --ink: #191512;
  --ink-2: #57504A;
  --ink-3: #8B8179;
  --line: #E7E0D6;
  --line-strong: #D6CCBF;

  /* Type */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", "Noto Sans Devanagari", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --step--1: clamp(0.82rem, 0.79rem + 0.13vw, 0.88rem);
  --step-0: clamp(0.97rem, 0.94rem + 0.16vw, 1.06rem);
  --step-1: clamp(1.14rem, 1.08rem + 0.3vw, 1.32rem);
  --step-2: clamp(1.38rem, 1.26rem + 0.58vw, 1.72rem);
  --step-3: clamp(1.68rem, 1.45rem + 1.1vw, 2.4rem);
  --step-4: clamp(2.05rem, 1.6rem + 2.2vw, 3.4rem);
  --step-5: clamp(2.45rem, 1.7rem + 3.6vw, 4.6rem);

  /* Space */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: 7rem;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(25, 21, 18, 0.05), 0 1px 3px rgba(25, 21, 18, 0.04);
  --shadow-2: 0 4px 12px rgba(25, 21, 18, 0.07), 0 2px 4px rgba(25, 21, 18, 0.04);
  --shadow-3: 0 18px 44px rgba(25, 21, 18, 0.12), 0 4px 12px rgba(25, 21, 18, 0.06);

  --maxw: 1140px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

:root[data-theme="dark"],
:root[data-theme="auto"] {
  /* placeholder so the selector exists; real values below */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141110;
    --surface: #1C1815;
    --surface-2: #241F1A;
    --surface-3: #2E2721;
    --ink: #F6F1EB;
    --ink-2: #BAB1A6;
    --ink-3: #8B8179;
    --line: #322B24;
    --line-strong: #443A31;
    --brand: #FF7043;
    --brand-ink: #FF8A65;
    --brand-soft: #2C1A12;
    --jade: #3FBFA2;
    --jade-soft: #12281F;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 18px 44px rgba(0, 0, 0, 0.55);
  }
}

:root[data-theme="dark"] {
  --bg: #141110;
  --surface: #1C1815;
  --surface-2: #241F1A;
  --surface-3: #2E2721;
  --ink: #F6F1EB;
  --ink-2: #BAB1A6;
  --ink-3: #8B8179;
  --line: #322B24;
  --line-strong: #443A31;
  --brand: #FF7043;
  --brand-ink: #FF8A65;
  --brand-soft: #2C1A12;
  --jade: #3FBFA2;
  --jade-soft: #12281F;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 18px 44px rgba(0, 0, 0, 0.55);
}

:root[data-theme="light"] {
  --bg: #FCFAF7;
  --surface: #FFFFFF;
  --surface-2: #F5F1EB;
  --surface-3: #EDE7DE;
  --ink: #191512;
  --ink-2: #57504A;
  --ink-3: #8B8179;
  --line: #E7E0D6;
  --line-strong: #D6CCBF;
  --brand: #E0562B;
  --brand-ink: #A63A18;
  --brand-soft: #FDEEE7;
  --jade: #0E7C66;
  --jade-soft: #E3F3EF;
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  line-height: 1.14;
  letter-spacing: -0.022em;
  font-weight: 660;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--brand) 45%, transparent); text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); }

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.stack > * + * { margin-top: var(--sp-4); }

.section { padding-block: clamp(3.5rem, 8vw, var(--sp-9)); }

.eyebrow {
  font-size: var(--step--1);
  font-weight: 640;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand);
}

.lede {
  font-size: var(--step-1);
  color: var(--ink-2);
  max-width: 62ch;
}

.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); color: var(--ink-3); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.78em 1.35em;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 620;
  font-size: var(--step-0);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.16s var(--ease);
  box-shadow: var(--shadow-2);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-3); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line-strong);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--surface-2); box-shadow: var(--shadow-1); }

.btn--quiet {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--ink);
  box-shadow: none;
  border-color: var(--line);
}
.btn--quiet:hover { background: var(--surface-3); box-shadow: var(--shadow-1); }

.btn--sm { padding: 0.5em 0.95em; font-size: var(--step--1); }
.btn--lg { padding: 0.95em 1.7em; font-size: var(--step-1); }
.btn--block { width: 100%; }

.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* ---------- form fields ---------- */
.field {
  width: 100%;
  padding: 0.72em 0.95em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.field::placeholder { color: var(--ink-3); }

.field:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

textarea.field { resize: vertical; min-height: 7rem; line-height: 1.6; }

.label {
  display: block;
  font-size: var(--step--1);
  font-weight: 620;
  color: var(--ink-2);
  margin-bottom: 0.35rem;
}

/* ---------- card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.15rem, 3vw, 1.75rem);
  box-shadow: var(--shadow-1);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3em 0.75em;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: var(--step--1);
  font-weight: 560;
  color: var(--ink-2);
  white-space: nowrap;
}

.pill--brand { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); color: var(--brand-ink); }
.pill--jade { background: var(--jade-soft); border-color: color-mix(in srgb, var(--jade) 30%, transparent); color: var(--jade); }

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--brand);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }
