/*
  Jalna City Municipal corporation — Styles
  Palette and utilities
*/

:root {
  --brand: #1b6aa5;
  --brand-2: #10997e;
  --bg: #f7fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(2,6,23,.06), 0 2px 8px rgba(2,6,23,.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #0f172a;
    --text: #e6edf3;
    --muted: #93a3b3;
    --border: #283345;
    --shadow: 0 10px 30px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.4);
  }
}

/* Reset-ish */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.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 */
.container { width: min(1120px, 92vw); margin: 0 auto; }
.section { padding: 3rem 0; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Header / Nav */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: .75rem 0; }
.brand { display: flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; }
.brand-text { font-weight: 700; letter-spacing: .2px; }
.nav-toggle { display: none; border: 1px solid var(--border); background: var(--surface); padding: .5rem .75rem; border-radius: .5rem; }
.nav { }
.nav-list { display: flex; gap: 1rem; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-list a { display: block; padding: .5rem .75rem; border-radius: .5rem; }
.nav-list li.active a, .nav-list a.active, .nav-list a[aria-current="page"] { background: color-mix(in oklab, var(--brand) 18%, transparent); color: var(--text); text-decoration: none; }
.has-sub { position: relative; }
.has-sub .sub-menu { position: absolute; right: 0; top: calc(100% + .25rem); background: var(--surface); border: 1px solid var(--border); border-radius: .75rem; padding: .25rem; list-style: none; display: none; box-shadow: var(--shadow); }
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu { display: block; }
.sub-menu li a { white-space: nowrap; display: block; padding: .5rem .75rem; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav { position: fixed; inset: 56px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--border); transform-origin: top; transform: scaleY(0); transition: transform .2s ease; }
  .nav.open { transform: scaleY(1); }
  .nav-list { flex-direction: column; align-items: stretch; padding: .5rem; }
  .has-sub .sub-menu { position: static; display: block; border: none; box-shadow: none; padding-left: 1rem; }
}

.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 0; top: 0; width: auto; height: auto; background: var(--brand); color: #fff; padding: .5rem .75rem; z-index: 2000; }

/* Hero */
.hero { padding: 3rem 0; background: linear-gradient(135deg, color-mix(in oklab, var(--brand) 10%, transparent), transparent); }
.hero .lead { color: var(--muted); }
.hero-cta { margin-top: 1rem; display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-media img { border-radius: 1rem; box-shadow: var(--shadow); }

.page-hero { padding: 2.5rem 0; }
.hero-banner { position: relative; border-radius: 1rem; overflow: hidden; box-shadow: var(--shadow); }
.banner-overlay { position: absolute; inset: auto 0 0 0; padding: 1rem 1.25rem; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 100%); color: #fff; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; overflow: hidden; box-shadow: var(--shadow); }
.card-body { padding: 1rem 1.25rem; }
.link-card { text-decoration: none; color: inherit; }
.link-card:hover { outline: 2px solid color-mix(in oklab, var(--brand) 25%, transparent); outline-offset: 2px; }

/* Typography */
h1, h2, h3, h4, h5 { line-height: 1.25; margin: 0 0 .5rem; }
.h3 { font-size: 1.35rem; }
.h4 { font-size: 1.1rem; }
.h5 { font-size: 1rem; }
.lead { font-size: 1.1rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem .9rem; border-radius: .6rem; background: color-mix(in oklab, var(--brand) 12%, transparent); border: 1px solid var(--border); color: inherit; text-decoration: none; }
.btn:hover { text-decoration: none; filter: brightness(0.98); }
.btn-primary { background: linear-gradient(180deg, var(--brand), color-mix(in oklab, var(--brand) 80%, var(--brand-2))); color: #fff; border: none; }
.btn-primary:hover { filter: saturate(1.05) brightness(1.02); }

/* Forms */
.form .card-body { display: grid; gap: .9rem; }
.form-row { display: grid; gap: .35rem; }
label { font-weight: 600; }
input, textarea, select { padding: .65rem .75rem; border-radius: .6rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in oklab, var(--brand) 30%, transparent); outline-offset: 1px; }
.form-actions { display: flex; gap: .75rem; margin-top: .5rem; }
.error { color: #b42318; min-height: 1em; }
.hint { color: var(--muted); }
.success { background: color-mix(in oklab, var(--brand-2) 12%, transparent); border: 1px solid color-mix(in oklab, var(--brand-2) 20%, var(--border)); border-radius: .75rem; padding: .75rem 1rem; }
.check { display: flex; align-items: flex-start; gap: .5rem; }
.check input { margin-top: .25rem; }

/* Footer */
.site-footer { margin-top: 2rem; border-top: 1px solid var(--border); background: var(--surface); }
.footer-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 1.25rem 0; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.foot-note { grid-column: 1 / -1; color: var(--muted); font-size: .95rem; margin-top: .5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; } }

/* Utilities */
.callout { background: color-mix(in oklab, var(--brand-2) 6%, transparent); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.why .card img, .services-preview .card img, .impact img { aspect-ratio: 3 / 2; object-fit: cover; }
.addr { font-style: normal; }
.map-embed iframe { width: 100%; height: 300px; border: 0; border-radius: .75rem; }

/* High contrast check */
@media (prefers-contrast: more) {
  .btn-primary { box-shadow: 0 0 0 2px #000 inset; }
}

