/* ==========================================================================
   Keyela — design system
   Principles: flat, square (0 radius), 1px solid borders, brand palette from
   the logo (navy #092348 + orange #FF8128), no box-shadows, no glows,
   no hover animations. Business-grade and calm.
   ========================================================================== */

:root {
  --ink:    #092348;   /* primary text (logo navy)   */
  --muted:  #46587a;   /* secondary text (navy-gray) */
  --line:   #c9d4e4;   /* borders (navy-tinted)      */
  --panel:  #eef3fa;   /* light fill (navy-tinted)   */
  --bg:     #ffffff;   /* page background            */
  --navy:   #092348;   /* primary action (logo navy) */
  --navy-d: #051733;   /* pressed state              */
  --orange:   #ff8128; /* accent (logo key)          */
  --orange-d: #e96f12; /* pressed state              */
  --green:  #1d6b4c;   /* positive / money           */
  --red:    #9b2226;   /* errors                     */
  --maxw:   1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; }
a.underline { text-decoration: underline; }

h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

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

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  font-weight: 800; font-size: 1.25rem; letter-spacing: .08em;
  color: var(--ink); text-transform: uppercase;
  display: flex; align-items: center;
}
.brand-logo { height: 34px; width: auto; display: block; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { color: var(--ink); font-size: .95rem; }
.nav a.active { font-weight: 700; }

/* ---------- Buttons (square, flat, no hover motion) ---------- */
.btn {
  display: inline-block;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
  padding: 13px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0;
  text-align: center;
  line-height: 1.1;
}
.btn:active { background: var(--navy-d); border-color: var(--navy-d); }
.btn-ghost {
  background: transparent; color: var(--navy); border: 1px solid var(--navy);
}
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }

/* ---------- Forms ---------- */
label { display: block; font-size: .9rem; font-weight: 600; margin: 0 0 6px; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--orange);
}
.field { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ---------- Panels / cards ---------- */
.panel {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 28px;
}
.panel-fill { background: var(--panel); }
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }

/* ---------- Hero (house photo under a navy overlay) ---------- */
.hero {
  padding: 64px 0;
  background:
    linear-gradient(rgba(9, 35, 72, .82), rgba(9, 35, 72, .82)),
    url('/assets/img/hero-house.jpg') center / cover no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  min-height: 560px;
}
.hero > .container { width: 100%; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 2.6rem; color: #fff; }
.hero .muted { color: #b7c3d8; }
.hero ul li::marker { color: var(--orange); }
.hero .panel { background: #fff; color: var(--ink); border-color: #fff; }
.hero .panel .muted { color: var(--muted); }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
  font-weight: 700; color: var(--orange); margin-bottom: 14px;
}

/* ---------- Offer result ---------- */
.offer-range {
  border: 1px solid var(--navy);
  padding: 28px;
  background: #fff;
}
/* ---------- Address autocomplete (flat, square) ---------- */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  background: #fff; border: 1px solid var(--navy); border-top: 0;
  max-height: 260px; overflow-y: auto;
}
.ac-item { padding: 11px 14px; cursor: pointer; font-size: .95rem; color: var(--ink); }
.ac-item.active, .ac-item:hover { background: var(--panel); }

/* Seller benefit list: flat orange square markers */
.checks { list-style: none; padding: 0; margin: 0 0 1rem; }
.checks li { padding-left: 22px; position: relative; margin-bottom: 10px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 10px; height: 10px; background: var(--orange);
}
.offer-range .amount {
  font-size: 2.4rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em;
}
.kv { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); }
.steps .step { padding: 28px; border-right: 1px solid var(--line); }
.steps .step:last-child { border-right: 0; }
.step .num {
  width: 34px; height: 34px; border: 1px solid var(--orange); color: var(--orange);
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 14px;
}

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.table th { background: var(--panel); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }

/* ---------- Status badges (flat, square) ---------- */
.badge {
  display: inline-block; padding: 3px 9px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  border: 1px solid var(--line); color: var(--muted); background: var(--panel);
}
.badge.new            { border-color: var(--navy);   color: var(--navy); }
.badge.under_contract { border-color: var(--orange); color: var(--orange-d); }
.badge.assigned       { border-color: var(--orange); color: var(--navy); background: var(--orange); }
.badge.dead           { border-color: var(--red);    color: var(--red); }

/* ---------- Pipeline summary strip ---------- */
.pipeline { display: grid; grid-template-columns: repeat(8, 1fr); border: 1px solid var(--line); }
.pipeline .cell { padding: 16px; border-right: 1px solid var(--line); text-align: center; }
.pipeline .cell:last-child { border-right: 0; }
.pipeline .cell .n { font-size: 1.6rem; font-weight: 800; }
.pipeline .cell .l { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ---------- Alerts ---------- */
.alert { border: 1px solid var(--line); padding: 14px 16px; margin-bottom: 18px; }
.alert-error { border-color: var(--red); color: var(--red); }
.alert-info  { border-color: var(--navy); }

/* ---------- Admin shell ---------- */
.admin-header { border-bottom: 1px solid var(--line); background: var(--navy); }
.admin-header .bar { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.admin-header .brand, .admin-header .nav a { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: .9rem; }

/* ---------- Utilities ---------- */
.card-s { max-width: 460px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.text-center { text-align: center; }
.row { display: flex; gap: 16px; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .pipeline { grid-template-columns: repeat(4, 1fr); }
  .nav { gap: 16px; }
  .hero h1 { font-size: 2rem; }
}
