:root {
  --ink: #18211f;
  --muted: #5d6764;
  --line: #dfe5df;
  --paper: #f7f8f4;
  --white: #ffffff;
  --forest: #13493f;
  --green: #1f725f;
  --red: #b63832;
  --gold: #c4923d;
  --blue: #315f86;
  --shadow: 0 18px 50px rgba(21, 32, 30, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(247, 248, 244, 0.94);
  border-bottom: 1px solid rgba(24, 33, 31, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 250%;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--white);
  background: var(--forest);
  border-radius: var(--radius);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  text-decoration: none;
}

.icon-button,
.ghost-button,
.small-button,
.primary-action,
.secondary-action {
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.icon-button {
  padding: 0 14px;
  color: var(--white);
  background: var(--ink);
  font-weight: 800;
}

.primary-action,
.secondary-action,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-weight: 800;
}

.primary-action {
  color: var(--white);
  background: var(--red);
  box-shadow: 0 10px 26px rgba(182, 56, 50, 0.28);
}

.secondary-action,
.ghost-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(255, 255, 255, 0.7);
}

.primary-action:hover,
.secondary-action:hover,
.icon-button:hover,
.ghost-button:hover,
.small-button:hover {
  transform: translateY(-1px);
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 25, 23, 0.86) 0%, rgba(11, 25, 23, 0.66) 38%, rgba(11, 25, 23, 0.18) 72%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 36px));
  margin-left: clamp(18px, 6vw, 74px);
  padding: 64px 0 96px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 20px;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.98;
}

.hero-content h1 {
  font-size: clamp(23px, 3.3vw, 45px);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.hero-copy {
  max-width: 600px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-support {
  max-width: 620px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.55;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-strip div {
  padding: 24px clamp(18px, 4vw, 56px);
  background: var(--white);
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip span {
  margin-top: 5px;
  color: var(--muted);
}

.section {
  padding: clamp(58px, 8vw, 104px) clamp(18px, 4vw, 56px);
}

.section-heading {
  max-width: 790px;
  margin-bottom: 34px;
}

.process-band {
  background: var(--paper);
}

.process-grid,
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.process-grid article,
.evidence-grid article,
.workspace-card,
.lead-panel,
.deal-panel,
.intake-form,
.login-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(21, 32, 30, 0.06);
}

.process-grid article {
  min-height: 230px;
  padding: 22px;
}

.process-grid span {
  display: inline-block;
  margin-bottom: 36px;
  color: var(--red);
  font-weight: 900;
}

.process-grid p,
.evidence-grid p,
.intake-copy p,
#buyerBrief,
.vehicle-card p,
.tasks-card li {
  color: var(--muted);
  line-height: 1.5;
}

.evidence-band {
  color: var(--white);
  background: var(--forest);
}

.evidence-grid {
  grid-template-columns: repeat(3, 1fr);
}

.evidence-grid article {
  min-height: 170px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.evidence-grid h3 {
  color: var(--gold);
  font-size: 42px;
}

.evidence-grid p {
  color: rgba(255, 255, 255, 0.8);
}

.intake-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(300px, 1.2fr);
  gap: 28px;
  align-items: start;
  background: #eef2ed;
}

.intake-copy,
.login-copy {
  max-width: 560px;
}

.intake-form,
.login-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.intake-form {
  grid-template-columns: repeat(2, 1fr);
}

.login-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: start;
  background: var(--white);
}

.reset-section {
  min-height: calc(100vh - 72px);
  align-content: center;
}

.login-form {
  grid-template-columns: 1fr;
  max-width: 520px;
  justify-self: end;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfcf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 114, 95, 0.14);
}

.form-button {
  width: max-content;
  border: 0;
}

.form-status {
  align-self: center;
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

.login-error {
  color: var(--red);
}

.password-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.forgot-password {
  width: max-content;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.crm-shell {
  padding: clamp(54px, 8vw, 90px) clamp(14px, 3vw, 42px);
  background: #242a2e;
  color: var(--white);
}

.crm-header,
.deal-topline,
.panel-title,
.crm-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.crm-header {
  margin-bottom: 22px;
}

.crm-header h2 {
  color: var(--white);
}

.crm-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}

.lead-panel,
.deal-panel,
.workspace-card {
  color: var(--ink);
}

.lead-panel,
.deal-panel {
  padding: 16px;
}

.lead-list {
  display: grid;
  gap: 10px;
}

.lead-card {
  width: 100%;
  padding: 14px;
  text-align: left;
  background: #f8faf5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.lead-card.active {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(182, 56, 50, 0.12);
}

.lead-card strong,
.lead-card span {
  display: block;
}

.lead-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.deal-panel {
  min-width: 0;
}

.deal-topline {
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.deal-topline select {
  width: min(260px, 100%);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.metric-row div,
.total-box {
  padding: 14px;
  background: #f6f8f3;
  border-radius: var(--radius);
}

.metric-row span,
.total-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-row strong,
.total-box strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.workspace-card {
  padding: 16px;
}

.workspace-card h3,
.panel-title h3 {
  margin: 0;
}

.vehicle-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.vehicle-card {
  padding: 13px;
  background: #f8faf5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.vehicle-card strong {
  display: block;
}

.vehicle-card p {
  margin: 5px 0 0;
  font-size: 13px;
}

.small-button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--white);
  background: var(--forest);
  border: 0;
  font-size: 13px;
  font-weight: 900;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.total-box {
  border: 1px solid var(--line);
}

.tasks-card {
  grid-column: 1 / -1;
}

.tasks-card ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.tasks-card li {
  padding: 10px 12px;
  background: #f8faf5;
  border-radius: var(--radius);
}

.compact {
  min-height: 42px;
  border: 0;
}

@media (max-width: 980px) {
  .process-grid,
  .evidence-grid,
  .intake-section,
  .login-section,
  .crm-layout,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .login-form {
    justify-self: stretch;
  }

  .trust-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 720px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(11, 25, 23, 0.82) 0%, rgba(11, 25, 23, 0.58) 56%, rgba(11, 25, 23, 0.28) 100%);
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin: 0 16px;
  }

  h1 {
    font-size: 40px;
  }

  .intake-form,
  .metric-row,
  .offer-grid {
    grid-template-columns: 1fr;
  }

  .crm-header,
  .deal-topline {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
