/* ============================================================
   Chennai Residential Plot Guide — styles
   Palette: deep slate + teal/emerald accent
   Semantics: good (green) / caution (amber) / bad (rose)
   ============================================================ */

:root {
  --bg: #f6f7f9;
  --bg-tint: #eef1f5;
  --surface: #ffffff;
  --ink: #0f1b2d;
  --ink-soft: #33445c;
  --muted: #66748a;

  --accent: #0e8a7d;
  --accent-ink: #0b6e64;
  --accent-soft: #e3f4f1;

  --good: #14833a;
  --good-bg: #e2f6e9;
  --good-border: #b7e4c7;

  --caution: #a16207;
  --caution-bg: #fdf4d9;
  --caution-border: #f3dfa3;

  --bad: #be123c;
  --bad-bg: #fde7ec;
  --bad-border: #f5c2ce;

  --border: #e4e8ee;
  --border-strong: #d4dae3;

  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(15, 27, 45, 0.18);
  --shadow-lg: 0 24px 60px -24px rgba(15, 27, 45, 0.28);

  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", sans-serif;

  --maxw: 1140px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
a { color: inherit; }
strong { font-weight: 600; }
em { font-style: normal; color: var(--accent-ink); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ============================================================ NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav__brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); }
.nav__brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-ink));
  color: #fff; font-size: 16px;
}
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  text-decoration: none; color: var(--ink-soft);
  font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 9px;
  transition: background .15s, color .15s;
}
.nav__links a:hover { background: var(--bg-tint); color: var(--ink); }
.nav__budget {
  font-size: 13px; font-weight: 600; color: var(--accent-ink);
  background: var(--accent-soft); border: 1px solid var(--accent-soft);
  padding: 6px 11px; border-radius: 999px; white-space: nowrap;
}

/* ============================================================ HERO */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(14, 138, 125, 0.16), transparent 60%),
    radial-gradient(900px 420px at 0% 110%, rgba(15, 27, 45, 0.10), transparent 55%),
    linear-gradient(180deg, #eaf4f3 0%, #f6f7f9 100%);
  border-bottom: 1px solid var(--border);
}
.hero__inner { max-width: var(--maxw); margin: 0 auto; padding: 88px 24px 56px; }
.hero__eyebrow { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  padding: 7px 13px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid rgba(14, 138, 125, 0.25);
}
.pill--static { cursor: default; }
.pill--faint { background: #fff; color: var(--muted); border-color: var(--border-strong); }

.hero__title {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.hero__subtitle { font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-soft); max-width: 720px; margin-bottom: 32px; }

.hero__filters { display: flex; flex-wrap: wrap; gap: 12px; }
.filter-chip {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--border);
  padding: 13px 18px; border-radius: 14px;
  box-shadow: var(--shadow-sm);
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.filter-chip__icon { font-size: 18px; }
.filter-chip__label { font-weight: 600; }

.hero__scroll {
  margin-top: 46px; display: inline-flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
}
.hero__scroll-arrow { animation: bounce 2s infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ============================================================ SECTION */
.section { padding: 72px 0; }
.section--tint { background: var(--bg-tint); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section__head { max-width: 720px; margin-bottom: 40px; }
.section__kicker {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink);
  background: var(--accent-soft); padding: 5px 11px; border-radius: 7px; margin-bottom: 16px;
}
.section__title { font-size: clamp(26px, 4vw, 36px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.section__lead { font-size: 17px; color: var(--muted); }

/* ============================================================ VERDICT */
.verdict-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.verdict-card {
  position: relative; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-md);
}
.verdict-card--winner { border-top: 4px solid var(--accent); }
.verdict-card--runner { border-top: 4px solid var(--caution); }
.verdict-card__tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 14px; color: var(--muted);
}
.verdict-card__title { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.verdict-card__body { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 18px; }
.verdict-card__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.verdict-card__list li { font-size: 14.5px; color: var(--ink-soft); padding-left: 2px; }

.legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  margin-top: 28px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.legend__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.legend__item { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); font-weight: 500; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot--good { background: var(--good); }
.dot--caution { background: var(--caution); }
.dot--bad { background: var(--bad); }

/* ============================================================ TABLES */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.table { border-collapse: collapse; width: 100%; min-width: 880px; font-size: 14px; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table thead th {
  font-family: var(--font-display); font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  background: #fbfcfd; position: sticky; top: 0; white-space: nowrap;
}
.table tbody tr:last-child th, .table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafbfd; }
.table tbody th { font-weight: 600; color: var(--ink); }
.table td { color: var(--ink-soft); }
.table .table__sticky { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 200px; box-shadow: inset -1px 0 0 var(--border); }
.table tbody tr:hover .table__sticky { background: #fafbfd; }
.table thead .table__sticky { background: #fbfcfd; }
.table td[data-strong] { color: var(--accent-ink); font-weight: 700; white-space: nowrap; }

.badge {
  display: inline-block; font-size: 12.5px; font-weight: 600; line-height: 1.35;
  padding: 4px 9px; border-radius: 7px; white-space: nowrap;
}
.badge--good { background: var(--good-bg); color: var(--good); border: 1px solid var(--good-border); }
.badge--caution { background: var(--caution-bg); color: var(--caution); border: 1px solid var(--caution-border); }
.badge--bad { background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-border); }

.footnote { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* ============================================================ FLOOD CARDS */
.flood-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.flood-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 16px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.flood-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.flood-card__top { display: flex; flex-direction: column; gap: 10px; }
.flood-card__title { font-size: 18px; font-weight: 700; }
.flood-card__body { margin: 0; display: grid; gap: 14px; font-size: 14px; }
.flood-card__body > div { display: grid; gap: 3px; }
.flood-card__body dt {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.flood-card__body dd { margin: 0; color: var(--ink-soft); }
.flood-card__body .is-good dd { color: var(--good); font-weight: 500; }
.flood-card__body .is-bad dd { color: var(--bad); font-weight: 500; }

.level {
  align-self: flex-start; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 7px;
}
.level--good { background: var(--good-bg); color: var(--good); }
.level--caution { background: var(--caution-bg); color: var(--caution); }
.level--bad { background: var(--bad-bg); color: var(--bad); }

/* ============================================================ CHECKLIST */
.checklist-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 24px; margin-bottom: 22px; box-shadow: var(--shadow-sm);
}
.checklist-head__meta { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14.5px; color: var(--ink-soft); }
.checklist-progress { flex: 1 1 260px; min-width: 220px; }
.checklist-progress__bar { height: 8px; background: var(--bg-tint); border-radius: 999px; overflow: hidden; margin-bottom: 7px; }
.checklist-progress__bar span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-ink));
  border-radius: 999px; transition: width .3s ease;
}
.checklist-progress__label { font-size: 12.5px; font-weight: 600; color: var(--muted); }

.must-key { color: var(--caution); font-weight: 700; }

.checklist { display: grid; gap: 22px; }
.cl-section {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.cl-section__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--border); background: #fbfcfd;
}
.cl-section__title { font-size: 17px; font-weight: 700; }
.cl-section__badge { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); }
.cl-section__count { font-size: 12px; font-weight: 600; color: var(--muted); }

.cl-item {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center;
  padding: 13px 22px; border-bottom: 1px solid var(--border);
}
.cl-item:last-child { border-bottom: none; }
.cl-item label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.cl-item input[type="checkbox"] {
  width: 20px; height: 20px; margin: 0; margin-top: 1px;
  accent-color: var(--accent); cursor: pointer; flex: none;
}
.cl-item__text { font-size: 14.5px; color: var(--ink); }
.cl-item.is-done .cl-item__text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.cl-item__must {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap; align-self: center;
}
.cl-item__must--yes { background: var(--caution-bg); color: var(--caution); border: 1px solid var(--caution-border); }
.cl-item__must--no { background: var(--bg-tint); color: var(--muted); border: 1px solid var(--border-strong); }

/* verdict box */
.verdict-box {
  margin-top: 26px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm);
}
.verdict-box__title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.verdict-box__options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.vopt {
  display: flex; flex-direction: column; gap: 4px;
  border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 16px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.vopt:hover { border-color: var(--accent); background: var(--accent-soft); }
.vopt input[type="radio"] { accent-color: var(--accent); margin: 0 0 6px; width: 16px; height: 16px; }
.vopt span { font-weight: 700; font-size: 15px; }
.vopt small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.vopt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }

.checklist-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.btn {
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600;
  padding: 11px 20px; border-radius: 11px; cursor: pointer; border: 1px solid transparent;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-ink); }
.btn--ghost { background: var(--surface); color: var(--ink-soft); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--bg-tint); }

/* ============================================================ FOOTER */
.footer { background: #0d1725; color: #c9d4e0; padding: 64px 0; }
.footer__title { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer__note { font-size: 14px; color: #9aa9ba; margin-bottom: 20px; max-width: 640px; }
.footer__rule { font-size: 13.5px; color: #c9d4e0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); }
.footer__rule strong { color: #fff; }

/* ============================================================ RESPONSIVE */
@media (max-width: 900px) {
  .verdict-grid { grid-template-columns: 1fr; }
  .flood-grid { grid-template-columns: repeat(2, 1fr); }
  .verdict-box__options { grid-template-columns: 1fr; }
  .nav__budget { display: none; }
  .nav__links { gap: 2px; }
  .nav__links a { padding: 8px 9px; font-size: 13px; }
  .section { padding: 56px 0; }
}

@media (max-width: 600px) {
  .flood-grid { grid-template-columns: 1fr; }
  .hero__inner { padding: 64px 20px 44px; }
  .nav__inner { padding: 10px 16px; }
  .nav__links a { font-size: 12.5px; padding: 8px 7px; }
  .cl-item { padding: 12px 16px; grid-template-columns: 30px 1fr auto; gap: 10px; }
  .checklist-head { padding: 16px; }
  .footer { padding: 48px 0; }
}

@media print {
  .nav, .hero, .checklist-actions, .hero__scroll, .legend { display: none !important; }
  body { background: #fff; }
  .section { padding: 24px 0; }
  .flood-card, .verdict-card, .cl-section, .verdict-box { box-shadow: none; break-inside: avoid; }
}
