:root {
  --ink: #132333;
  --ink-2: #26394a;
  --muted: #687785;
  --paper: #f5f6f2;
  --paper-deep: #e9eeea;
  --white: #ffffff;
  --terracotta: #f05f3b;
  --terracotta-dark: #cf4526;
  --sage: #769786;
  --sage-soft: #dce9e2;
  --gold: #d9a94b;
  --line: rgba(19, 35, 51, .1);
  --shadow: 0 24px 70px rgba(22, 38, 50, .1);
  --shadow-soft: 0 12px 36px rgba(22, 38, 50, .07);
  --radius-lg: 32px;
  --radius-md: 22px;
  --sans: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Manrope", ui-sans-serif, sans-serif;
}

html { background: #dfe5e1; }
body { color: var(--ink); background: var(--paper); font-family: var(--sans); letter-spacing: -.02em; }
button, input, textarea, select { font-family: inherit; }
h1, h2, h3, .feature-content h2 { font-family: var(--sans); letter-spacing: -.055em; }

/* Navigation */
.topbar {
  min-height: 78px;
  padding: 0 max(28px, calc((100vw - 1440px) / 2));
  gap: 38px;
  background: rgba(245, 246, 242, .92);
  border-bottom: 0;
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(22px) saturate(1.25);
}
.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  font: 800 10px/1 var(--sans);
  letter-spacing: -.08em;
  box-shadow: 0 8px 18px rgba(19,35,51,.16);
}
.brand-mark::after { content: ""; position: absolute; right: 5px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta); }
.brand strong { font-size: 15px; font-weight: 800; }.brand small { color: var(--terracotta); font-size: 6px; }
.desktop-nav { gap: clamp(20px, 2.5vw, 42px); }
.nav-link { padding: 31px 0 27px; color: #71808c; font-size: 10px; font-weight: 700; }
.nav-link:hover, .nav-link.is-active { color: var(--ink); border-bottom-color: var(--terracotta); }
.search-control { height: 42px; border: 1px solid transparent; background: #e9eeeb; }
.search-control:focus-within { border-color: rgba(240,95,59,.35); background: #fff; }
.avatar-button { width: 40px; height: 40px; color: #fff; background: var(--ink); }
.demo-ribbon { min-height: 30px; color: rgba(255,255,255,.72); background: var(--ink); font-size: 6.5px; font-weight: 700; letter-spacing: .14em; }
.connection-badge { color: #b9e2cc; background: rgba(109,186,144,.14); }

/* Shared controls */
.eyebrow { color: var(--terracotta); font-size: 8px; letter-spacing: .2em; }
.primary-button, .secondary-button { min-height: 52px; padding: 0 24px; font-size: 10px; font-weight: 800; }
.primary-button { border-color: var(--ink); background: var(--ink); box-shadow: 0 12px 25px rgba(19,35,51,.16); }
.primary-button:hover { border-color: var(--terracotta); background: var(--terracotta); }
.secondary-button { border-color: rgba(19,35,51,.28); background: rgba(255,255,255,.3); }
.text-button { font-size: 10px; }
.status-pill { min-height: 25px; padding-inline: 10px; font-size: 7px; letter-spacing: .09em; }

/* New split hero */
.hero-grid {
  max-width: 1440px;
  min-height: 700px;
  margin: 26px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(460px, .94fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #e8ede8;
  box-shadow: var(--shadow-soft);
}
.hero-copy {
  position: relative;
  grid-area: 1 / 1;
  width: auto;
  min-height: 700px;
  padding: clamp(74px, 7vw, 112px) clamp(44px, 7vw, 105px);
  color: var(--ink);
  background: radial-gradient(circle at 12% 10%, rgba(255,255,255,.9), transparent 34%), linear-gradient(145deg, #f3f5f0, #e5ebe5);
}
.hero-copy::after { content: ""; position: absolute; right: 34px; top: 34px; width: 74px; height: 74px; border: 1px solid rgba(19,35,51,.1); border-radius: 50%; box-shadow: inset 0 0 0 20px rgba(255,255,255,.22); }
.hero-copy .eyebrow { color: var(--terracotta); }
.hero-copy h1 { max-width: 690px; margin-bottom: 28px; color: var(--ink); font-size: clamp(74px, 7.7vw, 116px); font-weight: 800; line-height: .84; letter-spacing: -.082em; }
.hero-copy h1 em { color: var(--terracotta); font-style: normal; }
.hero-description { max-width: 500px; color: #5f6f78; font-size: 14px; line-height: 1.7; }
.hero-copy .primary-button { color: #fff; border-color: var(--ink); background: var(--ink); }
.hero-copy .primary-button:hover { border-color: var(--terracotta); background: var(--terracotta); }
.hero-copy .text-button { color: var(--ink); border-color: rgba(19,35,51,.38); }
.trust-row { margin-top: 54px; }.avatar-stack span { color: var(--ink); background: #fff; border-color: #e5eae5; box-shadow: 0 3px 10px rgba(19,35,51,.07); }
.trust-row p { color: #73818b; }.trust-row strong { color: var(--ink); }
.city-feature { grid-area: 1 / 2; min-height: 700px; overflow: visible; background: #8ca397; }
.feature-sky { background-image: linear-gradient(180deg, rgba(10,28,37,.03), rgba(10,28,37,.2)), url('./hero-tehuacan-clean.webp'); background-position: 58% center; }
.feature-content {
  position: absolute;
  left: 32px;
  right: auto;
  bottom: 32px;
  width: min(390px, calc(100% - 28px));
  margin: 0;
  padding: 24px;
  color: var(--ink);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 25px 60px rgba(13,33,42,.22);
  backdrop-filter: blur(18px);
}
.feature-content h2 { font-size: 23px; font-weight: 750; }.feature-kicker { color: #71808a; }
.feature-footer { border-color: var(--line); color: #71808a; }.feature-pin { display: none; }

/* Home sections */
.content-section { max-width: 1440px; padding: 104px 34px; }
.section-heading { margin-bottom: 42px; }.section-heading h2 { font-size: clamp(38px, 4.3vw, 58px); font-weight: 750; }
.categories-section { padding-bottom: 68px; border-bottom: 0; }
.category-grid { gap: 14px; }
.category-card {
  min-height: 174px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.75);
  box-shadow: 0 8px 22px rgba(19,35,51,.035);
}
.category-card:hover { transform: translateY(-6px); border-color: rgba(240,95,59,.3); box-shadow: var(--shadow-soft); }
.category-icon { width: 58px; height: 58px; border-radius: 17px; color: #fff; background: var(--ink); font: 700 20px/1 var(--sans); }
.category-card strong { font-family: var(--sans); font-size: 15px; font-weight: 800; }.category-card small { color: #87939b; }
.reports-section { padding-top: 42px; }
.segmented { padding: 5px; background: #e7ebe7; }.segmented button { padding: 9px 16px; font-weight: 700; }.segmented button.is-active { color: #fff; background: var(--ink); }
.report-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.report-card { border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; box-shadow: 0 8px 24px rgba(19,35,51,.04); }
.report-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.report-visual { height: 220px; }.report-body { padding: 22px; }
.report-body h3 { min-height: 55px; font-family: var(--sans); font-size: 18px; font-weight: 750; line-height: 1.16; }
.report-body p { color: #74818a; }.report-card-footer { border-color: var(--line); }
.city-impact {
  max-width: 1440px;
  margin: 0 auto 76px;
  padding: 76px clamp(32px, 6vw, 92px);
  grid-template-columns: 1.4fr repeat(3, 1fr);
  border-radius: var(--radius-lg);
  color: #fff;
  background: linear-gradient(125deg, #142737, #213b47 70%, #35584d);
  overflow: hidden;
}
.city-impact .eyebrow { color: #f59b80; }.city-impact h2 { max-width: 490px; font-size: 42px; }
.impact-stat { border-left-color: rgba(255,255,255,.16); }.impact-stat strong { font-family: var(--sans); font-weight: 750; }

/* Interior headers and map */
.page-intro {
  position: relative;
  max-width: 1440px;
  min-height: 360px;
  margin: 26px auto 0;
  padding: 72px clamp(34px, 6vw, 86px);
  border-radius: var(--radius-lg);
  color: #fff;
  background: linear-gradient(125deg, #122332, #294253 68%, #46675b);
  box-shadow: var(--shadow-soft);
}
.page-intro::after { right: -40px; top: -150px; width: 430px; height: 430px; border-width: 85px; }
.page-intro .eyebrow { color: #f3a48d; }.page-intro h1 { max-width: 790px; font-size: clamp(54px, 6.5vw, 86px); font-weight: 780; }
.page-intro > div > p:last-child { color: rgba(255,255,255,.66); font-size: 12px; }
.map-toolbar { max-width: 1440px; margin: 20px auto; padding: 0; }
.filter-chip, .locate-button, .map-selects select { min-height: 42px; border: 1px solid transparent; background: #e8ece8; }
.filter-chip:hover, .locate-button:hover { border-color: rgba(19,35,51,.13); background: #fff; }
.filter-chip.is-active { color: #fff; background: var(--ink); }
.map-layout { max-width: 1440px; height: min(700px, calc(100vh - 230px)); min-height: 560px; margin: 0 auto 76px; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.map-results { background: #fff; }.map-list-item { border-radius: 15px; }.map-list-item:hover { background: var(--paper-deep); }
.leaflet-report-marker { border-radius: 14px 14px 14px 4px; }

/* Report form */
.report-form-layout { max-width: 1440px; margin: 26px auto 76px; grid-template-columns: minmax(0,1.15fr) minmax(390px,.85fr); border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-soft); }
.form-panel { padding: 62px clamp(36px, 6vw, 92px) 90px 56px; }.form-panel h1 { font-size: clamp(54px, 5.6vw, 80px); font-weight: 780; }
.form-intro { color: #72808a; font-size: 12px; }
input, textarea { border: 1px solid transparent; border-radius: 14px; background: #f0f3f0; }
input:focus, textarea:focus { border-color: rgba(240,95,59,.55); background: #fff; box-shadow: 0 0 0 4px rgba(240,95,59,.09); }
.category-options span, .location-card, .upload-card { border: 1px solid transparent; border-radius: 16px; background: #f0f3f0; }
.category-options input:checked + span { color: #fff; border-color: var(--ink); background: var(--ink); }
.location-card:hover, .upload-card:hover { border-color: rgba(19,35,51,.15); background: #fff; }
.form-aside { padding: 62px 38px; color: #fff; background: linear-gradient(160deg, #172b3a, #29473f); border: 0; }
.phone-preview { border: 0; border-radius: 28px; box-shadow: 0 30px 70px rgba(4,18,25,.3); }.tip-card { border-color: rgba(255,255,255,.16); }.tip-card p { color: rgba(255,255,255,.6); }

/* Dashboard */
.dashboard-stats { max-width: 1440px; padding: 26px 0; gap: 14px; }
.dashboard-stats article { padding: 25px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 8px 24px rgba(19,35,51,.035); }
.dashboard-stats strong { font-family: var(--sans); font-size: 39px; font-weight: 780; }
.dashboard-grid { max-width: 1440px; padding: 0 0 20px; gap: 16px; }
.chart-card, .resolution-card, .queue-card { border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; box-shadow: 0 8px 24px rgba(19,35,51,.04); }
.queue-card { width: min(1440px, calc(100% - 48px)); }.bar-chart i { background: linear-gradient(#f05f3b, #f5a38e); }
.donut { background: conic-gradient(var(--terracotta) 0 72%, #e7ece8 72% 100%); }
.panel-access, .profile-card, .profile-empty { border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-soft); }

/* Dialogs */
dialog { border: 1px solid rgba(255,255,255,.3); border-radius: 26px !important; background: #fff; }
.auth-dialog { width: min(480px, calc(100vw - 30px)); padding: 42px; }.auth-brand h2 { font-size: 34px; font-weight: 780; }
.auth-tabs { padding: 5px; background: #edf1ed; }.auth-tabs button { padding: 11px; font-weight: 700; }.auth-tabs button.is-active { color: #fff; background: var(--ink); }
.admin-demo-button { margin-top: 14px; border-style: dashed; background: #f7f8f5; }.auth-note { margin-top: 18px; line-height: 1.5; }
.report-dialog { border-radius: 26px !important; }.detail-copy h2 { font-weight: 780; }.detail-side { background: #edf1ed; }
.toast { background: var(--ink); }

@media (max-width: 1180px) {
  .topbar { padding-inline: 24px; }
  .hero-grid { margin-inline: 18px; grid-template-columns: 1fr .82fr; }.hero-copy { padding: 72px 48px; }.hero-copy h1 { font-size: 82px; }
  .content-section { padding-inline: 24px; }.report-grid { grid-template-columns: repeat(2,1fr); }
  .page-intro, .map-toolbar, .map-layout, .report-form-layout { margin-left: 20px; margin-right: 20px; }
  .dashboard-stats, .dashboard-grid { margin-inline: 20px; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(94px + env(safe-area-inset-bottom)); background: #f7f8f5; }
  .topbar { min-height: 66px; padding: 0 15px; background: rgba(247,248,245,.95); }.brand-mark { width: 36px; height: 36px; border-radius: 12px; }.demo-ribbon { min-height: 29px; padding-inline: 12px; }
  .hero-grid { min-height: 0; margin: 12px; display: flex; flex-direction: column; border-radius: 25px; }
  .hero-copy { order: 1; min-height: 490px; padding: 58px 22px 48px; color: var(--ink); background: radial-gradient(circle at 95% 8%, rgba(255,255,255,.95), transparent 35%), linear-gradient(145deg,#f0f3ef,#e3eae4); }
  .hero-copy::after { right: 18px; top: 20px; width: 52px; height: 52px; }.hero-copy .eyebrow { color: var(--terracotta); }
  .hero-copy h1 { max-width: 350px; color: var(--ink); font-size: clamp(57px, 17.5vw, 76px); line-height: .86; }.hero-copy h1 em { color: var(--terracotta); }
  .hero-description { color: #66747d; font-size: 13px; }.hero-actions { width: 100%; }.hero-actions .primary-button { width: 100%; color: #fff; background: var(--ink); }.hero-actions .text-button { display: none; }
  .city-feature { order: 2; min-height: 420px; }.feature-sky { background-position: 59% center; }.feature-content { left: 14px; right: 14px; bottom: 14px; width: auto; padding: 20px; }.feature-content h2 { font-size: 19px; }
  .content-section { padding: 78px 17px; }.section-heading { margin-bottom: 30px; }.section-heading h2 { font-size: 38px; }
  .category-grid, .report-grid { display: flex; overflow-x: auto; gap: 12px; scroll-snap-type: x mandatory; }.category-card { min-width: 270px; min-height: 160px; }.report-card { min-width: min(84vw,330px); }.report-visual { height: 215px; }
  .city-impact { margin: 0 12px 76px; padding: 58px 22px; grid-template-columns: repeat(2,1fr); border-radius: 25px; }.city-impact > div:first-child { grid-column: 1/-1; }.city-impact h2 { font-size: 32px; }
  .page-intro { min-height: 370px; margin: 12px; padding: 52px 23px 34px; border-radius: 25px; }.page-intro h1 { font-size: 50px; }.page-intro .primary-button, .page-intro .secondary-button { width: 100%; }
  .map-toolbar { margin: 14px 12px; }.map-layout { margin: 0 12px 84px; border-radius: 24px; }.map-canvas { min-height: 420px; }.map-selects { grid-template-columns: 1fr 1fr; }
  .report-form-layout { margin: 12px 12px 84px; border-radius: 25px; }.form-panel { padding: 46px 18px 66px; }.form-panel h1 { font-size: 50px; }.form-aside { padding: 50px 18px; }
  .dashboard-stats, .dashboard-grid { margin-inline: 12px; }.queue-card { width: calc(100% - 24px); }
  .profile-wrap { padding: 48px 12px 100px; }.profile-card { padding: 24px; }
  .mobile-nav { left: 12px; right: 12px; bottom: 12px; height: calc(70px + env(safe-area-inset-bottom)); padding: 8px 8px env(safe-area-inset-bottom); border: 1px solid var(--line); border-radius: 23px; background: rgba(255,255,255,.94); box-shadow: 0 18px 55px rgba(18,34,47,.18); }
  .mobile-nav button { height: 52px; }.new-report-nav > span { width: 52px; height: 52px; border-color: #fff; background: var(--terracotta); box-shadow: 0 10px 24px rgba(240,95,59,.32); }
  .auth-dialog { padding: 34px 23px; border-radius: 25px !important; }.report-dialog { border-radius: 26px 26px 0 0 !important; }
}

@media (prefers-reduced-motion: reduce) { .report-card:hover, .category-card:hover { transform: none; } }
