/* =========================================================
   CONNEQ — Design System
   Navy / Gold / Cream — clean, exclusive, editorial feel
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&display=swap');

:root {
  /* Brand palette — sampled from the Conneq logo */
  --navy-950: #08071f;
  --navy-900: #0b0a2a;
  --navy-800: #12123a;
  --navy-700: #1b1b4a;
  --navy-600: #2a2a63;
  --gold-600: #a9905c;
  --gold-500: #b8a870;
  --gold-400: #cbbd8c;
  --gold-100: #f1ead9;
  --cream: #f7f4ec;
  --white: #ffffff;
  --ink: #1c1b2e;
  --muted: #6e6c85;
  --line: rgba(11, 10, 42, 0.10);
  --line-on-navy: rgba(247, 244, 236, 0.14);
  --danger: #a5423a;
  --success: #4c7a5e;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: Cambria, Georgia, 'Times New Roman', serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-soft: 0 10px 40px rgba(11, 10, 42, 0.10);
  --shadow-card: 0 2px 10px rgba(11, 10, 42, 0.06);
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.005em;
}

p { margin: 0 0 1em; color: var(--ink); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 500;
  color: var(--gold-600);
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold-500);
  color: var(--navy-950);
  border-color: var(--gold-500);
}
.btn-gold:hover { background: var(--gold-400); border-color: var(--gold-400); }

.btn-outline-light {
  background: transparent;
  color: var(--cream);
  border-color: var(--line-on-navy);
}
.btn-outline-light:hover { border-color: var(--gold-500); color: var(--gold-400); }

.btn-outline-dark {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--navy-900);
}
.btn-outline-dark:hover { background: var(--navy-900); color: var(--cream); }

.btn-navy {
  background: var(--navy-900);
  color: var(--cream);
  border-color: var(--navy-900);
}
.btn-navy:hover { background: var(--navy-700); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 12px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-text {
  background: none;
  border: none;
  color: var(--gold-600);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 0;
}
.btn-text:hover { color: var(--navy-900); }

/* ---------- Top navigation ---------- */
.site-header {
  background: var(--navy-950);
  border-bottom: 1px solid var(--line-on-navy);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  position: relative;
}
.logo-link { display: flex; align-items: center; height: 34px; }
.logo-link img { height: 100%; width: auto; }

/* Centered independently of the logo/CTA widths either side, so it stays
   dead-centre in the header no matter how many links it holds. */
.nav-primary {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-100);
  opacity: 0.75;
  transition: opacity 0.15s ease, color 0.15s ease;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--gold-400); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -26px;
  height: 2px;
  background: var(--gold-500);
}
.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-msg-link {
  position: relative;
  display: inline-flex;
  color: var(--gold-400);
  opacity: 0.85;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.nav-msg-link:hover { opacity: 1; color: var(--gold-100); }
.nav-badge {
  position: absolute;
  top: -7px; right: -11px;
  background: var(--gold-500);
  color: var(--navy-950);
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  border: 1.3px solid var(--navy-950);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 0 1px rgba(203,189,140,0.5);
}

.avatar-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--navy-700);
  color: var(--gold-400);
  border: 1px solid var(--line-on-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  cursor: pointer;
  overflow: hidden;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 22px;
  cursor: pointer;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: var(--gold-100);
  padding: 56px 0 28px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line-on-navy);
}
.footer-grid img.footer-logo { height: 30px; margin-bottom: 14px; }
.footer-tagline { color: rgba(247,244,236,0.55); font-size: 14px; max-width: 260px; }
.footer-col h4 {
  font-family: var(--font-body);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--gold-500);
  margin-bottom: 16px;
}
.footer-col a, .footer-col p {
  display: block;
  color: rgba(247,244,236,0.68);
  font-size: 14px;
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--gold-400); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 12px;
  color: rgba(247,244,236,0.42);
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

/* ---------- Forms ---------- */
.form-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 48px;
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}
.required-mark {
  color: var(--gold-600);
  margin-left: 2px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(11,10,42,0.16);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--cream);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.field-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 6px;
  display: none;
}
.field.has-error input, .field.has-error select, .field.has-error textarea {
  border-color: var(--danger);
}
.field.has-error .field-error { display: block; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--gold-600);
  flex-shrink: 0;
}
.checkbox-row label { font-size: 14px; color: var(--ink); line-height: 1.5; text-transform: none; letter-spacing: normal; }
.checkbox-row a { color: var(--gold-600); text-decoration: underline; }

.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
}
.alert-error { background: #f9e9e7; color: var(--danger); border: 1px solid #f0c9c4; }
.alert-success { background: #e9f2ec; color: var(--success); border: 1px solid #c8ddcd; }
.alert-info { background: var(--gold-100); color: var(--navy-800); border: 1px solid var(--gold-400); }

/* ---------- Page hero (dark) ---------- */
.hero-dark {
  background: var(--navy-950);
  color: var(--cream);
  padding: 64px 0;
}
/* Landing-page hero only: fills the first screen (minus the sticky header)
   so the section below starts cleanly on scroll, rather than peeking in
   half-cut at the fold. */
.hero-full {
  min-height: calc(82vh - 78px);
  display: flex;
  flex-direction: column;
}
.hero-full .container { width: 100%; }
.hero-full-main {
  flex: 1;
  display: flex;
  align-items: center;
}

/* Light variant of the hero — used on the landing page so it alternates
   with the dark "Our Story" panel underneath instead of stacking two
   heavy navy blocks back to back. */
.hero-cream {
  background: var(--cream);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: auto;
  max-width: 640px;
  object-fit: cover;
  object-position: right center;
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 1080px) {
  .hero-photo { display: none; }
}
.hero-sketch {
  position: absolute;
  bottom: 0;
  right: 0;
  width: min(14vw, 170px);
  height: auto;
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 700px) {
  .hero-sketch { display: none; }
}
.hero-saddle-sketch {
  position: absolute;
  bottom: 0;
  left: 0;
  width: min(19vw, 235px);
  height: auto;
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 700px) {
  .hero-saddle-sketch { display: none; }
}
.hero-jump-sketch {
  position: absolute;
  top: 0;
  right: 0;
  width: min(11vw, 135px);
  height: auto;
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 700px) {
  .hero-jump-sketch { display: none; }
}
.hero-trailer-sketch {
  position: absolute;
  top: 0;
  left: 0;
  width: min(21vw, 260px);
  height: auto;
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 700px) {
  .hero-trailer-sketch { display: none; }
}
.hero-fence-sketch {
  position: absolute;
  top: 55px;
  right: 25vw;
  width: min(11vw, 135px);
  height: auto;
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 700px) {
  .hero-fence-sketch { display: none; }
}
.hero-gate-sketch {
  position: absolute;
  bottom: 0;
  left: 34vw;
  width: min(10vw, 120px);
  height: auto;
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 700px) {
  .hero-gate-sketch { display: none; }
}
.hero-markers-sketch {
  position: absolute;
  bottom: 60px;
  right: 20vw;
  width: min(12vw, 145px);
  height: auto;
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 700px) {
  .hero-markers-sketch { display: none; }
}
.hero-yardgate-sketch {
  position: absolute;
  top: 15px;
  left: 39vw;
  width: min(7vw, 85px);
  height: auto;
  pointer-events: none;
  z-index: 0;
  transform: rotate(-9deg);
}
@media (max-width: 700px) {
  .hero-yardgate-sketch { display: none; }
}

/* ---------- Layout utilities ---------- */
.pt-page { padding: 56px 0 40px; }
.section { padding: 88px 0; }
.section-tight { padding: 48px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.center { text-align: center; }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; }
.divider { height: 1px; background: var(--line); border: none; margin: 32px 0; }

.tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--navy-900);
  color: var(--gold-400);
  font-weight: 500;
}
.tag-outline {
  background: transparent;
  border: 1px solid var(--gold-500);
  color: var(--gold-600);
}

/* ---------- App shell (logged-in pages) ---------- */
.app-shell { min-height: calc(100vh - 78px); }
.app-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}
.app-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.pill-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill-tab {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.pill-tab.active, .pill-tab:hover {
  border-color: var(--navy-900);
  color: var(--navy-900);
  background: var(--gold-100);
}

/* ---------- Posting cards ---------- */
.postings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.posting-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.posting-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.posting-media {
  height: 168px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-500);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
}
.posting-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.posting-category {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-600);
  margin-bottom: 8px;
  font-weight: 500;
}
.posting-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}
.posting-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
}
.posting-price { color: var(--navy-900); font-weight: 600; font-family: var(--font-display); font-size: 16px; }

/* ---------- Image upload previews ---------- */
.img-upload-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.img-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-thumb .remove-img {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(11,10,42,0.72); color: #fff; border: none;
  font-size: 12px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.img-upload-slot {
  aspect-ratio: 1;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 11px; cursor: pointer;
  text-align: center; padding: 6px; line-height: 1.3;
  background: var(--cream);
}
.img-upload-slot:hover { border-color: var(--gold-500); color: var(--gold-600); }

/* ---------- Messaging ---------- */
.messenger {
  display: grid;
  grid-template-columns: 340px 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-card);
  min-height: 560px;
}
.conv-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 640px; }
.conv-item {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.12s ease;
}
.conv-item:hover { background: var(--cream); }
.conv-item.active { background: var(--gold-100); }
.conv-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-400);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  flex-shrink: 0;
}
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-weight: 500; font-size: 14px; margin-bottom: 2px; }
.conv-preview {
  font-size: 13px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conv-listing { font-size: 11px; color: var(--gold-600); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.conv-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); flex-shrink: 0; margin-top: 6px; }

.chat-panel { display: flex; flex-direction: column; height: 100%; }
.chat-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-header-listing { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chat-body { flex: 1; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; max-height: 460px; }
.chat-bubble {
  max-width: 62%;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}
.chat-bubble.them { background: var(--cream); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-bubble.me { background: var(--navy-900); color: var(--cream); align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-time { font-size: 10px; color: var(--muted); margin-top: 4px; }
.chat-input-row {
  border-top: 1px solid var(--line);
  padding: 16px 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--cream);
}
.chat-input-row input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 12px 18px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--white);
}
.chat-input-row input::placeholder { color: var(--muted); }
.chat-input-row input:focus { outline: none; border-color: var(--navy-900); box-shadow: 0 0 0 3px rgba(11,10,42,0.08); }
.chat-send {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-send:hover { background: var(--navy-800); }
.privacy-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--muted);
  padding: 12px 24px;
  background: var(--gold-100);
  border-top: 1px solid var(--line);
}

/* ---------- Profile ---------- */
.profile-header {
  background: var(--navy-950);
  color: var(--cream);
  padding: 56px 0 72px;
  position: relative;
}
.profile-card-float {
  margin-top: -56px;
  display: flex;
  gap: 28px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.profile-avatar-lg {
  width: 116px; height: 116px;
  border-radius: 50%;
  background: var(--navy-800);
  border: 4px solid var(--white);
  color: var(--gold-400);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 40px;
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}
.stat-row { display: flex; gap: 36px; margin-top: 8px; }
.stat-num { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .postings-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .messenger { grid-template-columns: 1fr; }
  .conv-list { max-height: 240px; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .postings-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .form-panel { padding: 30px 22px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}

/* "Private by design" (How It Works) step grid — 4 across on desktop,
   2 across on tablet, stacked on phones so each step has room to breathe. */
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; }
@media (max-width: 760px) {
  .how-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
}
@media (max-width: 480px) {
  .how-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* Header gets cramped on narrow phones — the logo and the two CTA buttons
   fight for space inside the same row. Tighten the gutters, shrink the
   logo slightly, and swap "Join Conneq" for just "Join" to give it room. */
.btn-label-short { display: none; }
@media (max-width: 420px) {
  .site-header .container { padding: 0 14px; }
  .logo-link { height: 26px; }
  .nav-cta { gap: 8px; }
  .nav-cta .btn-sm { padding: 8px 12px; font-size: 11px; }
  .btn-label-full { display: none; }
  .btn-label-short { display: inline; }
}
