/* JharProp public site. Tokens match apps/web/app/globals.css so the site and the app read as one product. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-alt: #f0f2f6;
  --border: #d9dee7;
  --text: #14181f;
  --muted: #535c69;
  --accent: #1f5fd0;
  --accent-strong: #184ca8;
  --accent-ink: #ffffff;
  --up: #12805c;
  --down: #b32020;
  --warn: #7a4f00;
  --warn-bg: #fff4d6;
  --radius: 12px;
  --tap: 48px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", "Devanagari Sangam MN", Mangal, "Lohit Devanagari", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --surface-alt: #1d212a;
    --border: #2b313d;
    --text: #e7eaf0;
    --muted: #a3acb9;
    --accent: #6f9bf5;
    --accent-strong: #8fb2f8;
    --accent-ink: #0f1115;
    --up: #3ddc97;
    --down: #ff8a8a;
    --warn: #ffd580;
    --warn-bg: #2e2510;
  }
}

/* Language switching: both languages are in the markup; one is hidden. Without JS, English shows. */
html[data-lang="hi"] .en { display: none !important; }
html:not([data-lang="hi"]) .hi { display: none !important; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
[lang="hi"], html[data-lang="hi"] body { line-height: 1.75; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 0.5rem; }
h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.3rem, 3.4vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.9rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: 0.35rem; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 0.5rem; z-index: 100; background: var(--surface); padding: 0.5rem 0.8rem; border: 2px solid var(--accent); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text); font-weight: 750; font-size: 1.2rem; min-height: var(--tap); }
.brand svg { width: 30px; height: 30px; flex: none; }
.header-tools { display: flex; align-items: center; gap: 0.5rem; }
.lang-toggle {
  font: inherit; font-size: 0.95rem; font-weight: 700; min-height: 44px; padding: 0.3rem 0.85rem;
  border-radius: 999px; border: 2px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer;
}
.lang-toggle:hover { background: var(--accent); color: var(--accent-ink); }
.site-nav { width: 100%; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.15rem 0.25rem; }
.site-nav li { margin: 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.7rem; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600; }
.site-nav a:hover { background: var(--surface-alt); color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.site-nav a.nav-signin { border: 1px solid var(--border); }
@media (min-width: 820px) {
  .header-row { flex-wrap: nowrap; }
  .site-nav { width: auto; order: 0; }
  .header-tools { order: 1; }
}

/* ---------------------------------------------------------------- main */
main { display: block; }
.section { padding: 2.5rem 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-alt { background: var(--surface); }
.eyebrow { display: inline-block; font-size: 0.85rem; font-weight: 700; color: var(--warn); background: var(--warn-bg); padding: 0.2rem 0.65rem; border-radius: 999px; margin-bottom: 0.9rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 46rem; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

.hero { padding: 3rem 0 2.5rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.hero h1 { max-width: 40rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.4rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0.5rem 1.2rem;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.grid { display: grid; gap: 1rem; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.2rem; }
.section-alt .card { background: var(--bg); }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card h3 { margin-bottom: 0.4rem; }

.steps { list-style: none; padding: 0; margin: 1.25rem 0 0; counter-reset: step; display: grid; gap: 0.9rem; }
.steps > li { counter-increment: step; position: relative; padding: 1rem 1.1rem 1rem 3.6rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 0; }
.section-alt .steps > li { background: var(--bg); }
.steps > li::before {
  content: counter(step); position: absolute; left: 1rem; top: 1rem; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
}
.steps h3 { margin-bottom: 0.25rem; }
.steps p { margin: 0; }

.notice { border: 1px solid var(--border); border-left: 5px solid var(--warn); background: var(--warn-bg); color: var(--text); border-radius: var(--radius); padding: 1rem 1.15rem; }
.notice p:last-child { margin-bottom: 0; }
.notice-info { border-left-color: var(--accent); background: var(--surface-alt); }
.notice-error { border-left-color: var(--down); background: var(--surface); }
.notice-ok { border-left-color: var(--up); background: var(--surface); }

.nots { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.nots li { margin: 0; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.nots strong { display: block; }

.draft-banner { background: var(--warn-bg); color: var(--warn); font-weight: 700; border-bottom: 1px solid var(--border); padding: 0.6rem 0; }
.draft-banner p { margin: 0; }

.legal h2 { margin-top: 2rem; }
.legal h2:first-of-type { margin-top: 0.5rem; }
.legal table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.95rem; }
.legal th, .legal td { border: 1px solid var(--border); padding: 0.55rem 0.65rem; text-align: left; vertical-align: top; }
.legal th { background: var(--surface-alt); }
.table-scroll { overflow-x: auto; }

/* ---------------------------------------------------------------- forms */
.form-layout { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .form-layout { grid-template-columns: 5fr 6fr; align-items: start; } }
.form { display: grid; gap: 1.05rem; }
.field { display: grid; gap: 0.3rem; }
.label { font-weight: 650; }
.opt { font-weight: 400; color: var(--muted); }
.hint { color: var(--muted); font-size: 0.88rem; }
.input, .select, .textarea {
  width: 100%; min-height: var(--tap); padding: 0.6rem 0.75rem; border: 1px solid #8a93a1; border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit;
}
.textarea { min-height: 7rem; resize: vertical; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--down); border-width: 2px; }
.phone-row { display: flex; align-items: stretch; }
.phone-prefix { display: inline-flex; align-items: center; padding: 0 0.75rem; border: 1px solid #8a93a1; border-right: 0; border-radius: 10px 0 0 10px; background: var(--surface-alt); font-weight: 700; }
.phone-row .input { border-radius: 0 10px 10px 0; }
.field-error { color: var(--down); font-weight: 650; font-size: 0.92rem; margin: 0; }
.check { display: flex; gap: 0.65rem; align-items: flex-start; }
.check input { width: 1.35rem; height: 1.35rem; margin-top: 0.2rem; flex: none; accent-color: var(--accent); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status:empty { display: none; }
.result h2:focus { outline: none; }
.ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.15rem; font-weight: 800; letter-spacing: 0.03em; background: var(--surface-alt); padding: 0.1rem 0.45rem; border-radius: 6px; overflow-wrap: anywhere; }
.contact-block { font-style: normal; }
.contact-block p { margin-bottom: 0.4rem; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 1.75rem 0 2.25rem; margin-top: 0; font-size: 0.93rem; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0; }
.footer-links a { display: inline-flex; min-height: 44px; min-width: 44px; justify-content: center; align-items: center; }
.footer-note { margin-top: 0.75rem; max-width: 48rem; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .site-header, .site-footer, .lang-toggle { display: none; } }
