* { box-sizing: border-box; }

:root {
  --navy: #08224f;
  --red: #ef141c;
  --green: #238733;
  --blue: #1d5ca8;
  --purple: #7444a5;
  --orange: #ea6b14;
  --text: #0d2347;
  --muted: #67718a;
  --line: #dce4ee;
  --white: #fff;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #f5f8fb;
}

button, input { font: inherit; }

.layout {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 64%) minmax(430px, 36%);
}

/* ── Marketing ── */
.marketing {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 20% 5%, rgba(222, 236, 255, .85), transparent 34%),
    linear-gradient(180deg, #fbfdff 0%, #fff 55%, #f8faf7 100%);
}

.marketing-body {
  flex: 1;
  min-height: 0;
  padding: 38px 52px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Text logo — matches reference */
.brand { width: max-content; flex-shrink: 0; }

.logo-wordmark {
  position: relative;
  font-size: clamp(44px, 4vw, 72px);
  line-height: .9;
  font-weight: 800;
  letter-spacing: -4px;
}

.logo-bid { color: var(--navy); }
.logo-fresh { color: var(--red); }

.logo-leaf {
  position: absolute;
  left: 42px;
  top: -12px;
  color: var(--green);
  font-size: 14px;
  transform: rotate(45deg);
}

.tagline {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--red);
  font-size: 18px;
  font-weight: 700;
}

.tagline span {
  width: 32px;
  height: 2px;
  background: var(--red);
}

.hero-copy {
  margin-top: 20px;
  flex-shrink: 0;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(36px, 3.4vw, 58px);
  line-height: 1.08;
  letter-spacing: -2px;
  font-weight: 800;
  color: var(--navy);
}

.hero-copy h1 strong {
  color: var(--red);
  font-weight: 800;
}

.hero-copy p {
  margin: 10px 0 0;
  font-size: clamp(14px, 1.25vw, 20px);
  line-height: 1.45;
  color: #44516e;
}

/* ── Network diagram ── */
.network {
  position: relative;
  width: min(780px, 100%);
  height: min(400px, 42vh);
  margin: 14px auto 0;
  flex: 1;
  min-height: 280px;
}

.partner {
  position: absolute;
  z-index: 2;
  width: 245px;
  min-height: 102px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 17px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 26px rgba(8, 34, 79, .08);
  border: 1.5px solid;
}

.partner-icon {
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 32px;
}

.partner h3 {
  margin: 0 0 5px;
  font-size: 19px;
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.1;
}

.partner p {
  margin: 0;
  color: #4e5a75;
  font-size: 14px;
  line-height: 1.35;
}

.farmers { top: 0; left: 50%; transform: translateX(-50%); border-color: #74b87b; }
.farmers .partner-icon { background: #edf8ef; color: var(--green); }
.farmers h3 { color: var(--green); }

.wholesalers { top: 28%; left: 0; border-color: #7ba9dc; }
.wholesalers .partner-icon { background: #eef5fd; color: var(--blue); }
.wholesalers h3 { color: var(--blue); }

.restaurants { top: 28%; right: 0; border-color: #f3a0a3; }
.restaurants .partner-icon { background: #fff1f2; color: var(--red); }
.restaurants h3 { color: var(--red); }

.hotels { top: 58%; left: 110px; border-color: #b9a2d7; }
.hotels .partner-icon { background: #f5effb; color: var(--purple); }
.hotels h3 { color: var(--purple); }

.caterers { top: 58%; right: 110px; border-color: #efb07f; }
.caterers .partner-icon { background: #fff4eb; color: var(--orange); }
.caterers h3 { color: var(--orange); }

.retailers { bottom: 0; left: 50%; transform: translateX(-50%); border-color: #86aeda; }
.retailers .partner-icon { background: #eef5fd; color: var(--blue); }
.retailers h3 { color: var(--blue); }

.connector {
  position: absolute;
  z-index: 1;
  border-top: 2px dashed;
  transform-origin: left center;
}

.connector::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -5px;
  border-left: 8px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.connector-farm-wholesale { width: 210px; left: 225px; top: 17%; color: var(--green); transform: rotate(145deg); }
.connector-farm-restaurant { width: 210px; left: 545px; top: 17%; color: var(--green); transform: rotate(35deg); }
.connector-wholesale-restaurant { width: 310px; left: 235px; top: 40%; color: var(--blue); }
.connector-wholesale-hotel { width: 120px; left: 130px; top: 53%; color: var(--purple); transform: rotate(65deg); }
.connector-hotel-retail { width: 170px; left: 285px; top: 78%; color: var(--blue); transform: rotate(35deg); }
.connector-retail-caterer { width: 170px; left: 430px; top: 91%; color: var(--blue); transform: rotate(-35deg); }
.connector-caterer-restaurant { width: 120px; right: 95px; top: 66%; color: var(--orange); transform: rotate(-65deg); }
.connector-farm-retail {
  height: 62%;
  width: 0;
  left: 50%;
  top: 22%;
  border-left: 2px dashed var(--green);
  border-top: 0;
}
.connector-farm-retail::after { display: none; }

/* ── Bottom scene: truck photo + feature strip overlay ── */
.bottom-scene {
  position: relative;
  flex-shrink: 0;
  height: 255px;
  margin-top: auto;
}

.landscape {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .82) 0%, rgba(255, 255, 255, .25) 28%, rgba(255, 255, 255, 0) 48%),
    url("/assets/img/bidfresh-logistics.jpg") center 65% / cover no-repeat;
  pointer-events: none;
}

.feature-strip {
  position: absolute;
  z-index: 3;
  bottom: 26px;
  left: 38%;
  right: 52px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: rgba(255, 255, 255, .98);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(8, 34, 79, .1);
}

.feature-strip article {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 0 12px;
}

.feature-strip article + article {
  border-left: 1px solid #e8edf3;
}

.feature-icon {
  font-size: 26px;
  line-height: 1;
  width: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.feature-item--quotes .feature-icon { color: var(--green); }
.feature-item--price .feature-icon { color: var(--red); }
.feature-item--delivery .feature-icon { color: var(--blue); }
.feature-item--cod .feature-icon { color: var(--orange); }

.feature-strip b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.feature-strip small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.3;
  font-size: 11px;
}

/* ── Login panel ── */
.login-panel {
  height: 100vh;
  padding: 32px 28px 32px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #f6f8fb, #edf2f7);
}

.login-card {
  width: 100%;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 52px 50px 36px;
  border-radius: 28px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 20px 60px rgba(8, 34, 79, .14);
}

.login-card header h2 {
  margin: 0;
  font-size: clamp(36px, 3vw, 52px);
  line-height: 1.1;
  letter-spacing: -1.5px;
  font-weight: 800;
  color: var(--navy);
}

.login-card header h2 .leaf {
  color: var(--green);
  font-size: 16px;
  vertical-align: top;
}

.login-card header p {
  margin: 14px 0 28px;
  color: #53617c;
  font-size: 17px;
}

#login-form { display: grid; gap: 20px; }

.field {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 17px;
  border: 1px solid #cfd8e4;
  border-radius: 9px;
  background: #fff;
}

.field:focus-within {
  border-color: #9eb0c7;
  box-shadow: 0 0 0 3px rgba(8, 34, 79, .07);
}

.field.is-invalid { border-color: #ef4444; }

.field input {
  width: 100%;
  border: 0;
  outline: 0;
  font-size: 16px;
  color: var(--navy);
  background: transparent;
}

.field input::placeholder { color: #687494; }

.field-icon {
  width: 22px;
  flex-shrink: 0;
  font-size: 20px;
  color: #6e7890;
  display: grid;
  place-items: center;
}

.eye-btn {
  border: 0;
  background: transparent;
  color: #6e7890;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
}

.field-error {
  font-size: 12px;
  color: #ef4444;
  margin: -14px 0 0;
}

.verification > label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--text);
}

.verify-row { display: flex; gap: 14px; }

.challenge {
  min-width: 170px;
  flex: 1;
  min-height: 58px;
  padding: 0 22px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  font-size: 21px;
  font-weight: 800;
}

.refresh-btn {
  padding: 0 22px;
  border: 1px solid #d1d9e4;
  border-radius: 9px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.answer-label {
  display: block;
  margin: 14px 0 11px;
  color: #56627c;
  font-size: 14px;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.answer-grid label { cursor: pointer; margin: 0; }
.answer-grid input { position: absolute; opacity: 0; pointer-events: none; }

.answer-grid span {
  min-height: 60px;
  border: 1px solid #d5dce6;
  border-radius: 9px;
  background: #fff;
  font-size: 20px;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.answer-grid input:checked + span {
  border-color: var(--red);
  box-shadow: inset 0 0 0 2px var(--red);
  color: var(--red);
}

.verification.is-invalid .answer-grid span { border-color: #fca5a5; }

.captcha-error {
  font-size: 12px;
  color: #ef4444;
  margin-top: 8px;
  display: none;
}

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #59647c;
  font-size: 14px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.remember input { accent-color: var(--red); }

.options a,
.signup a {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
}

.login-btn {
  min-height: 62px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(239, 20, 28, .2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.login-btn:hover { filter: brightness(1.04); }
.login-btn:disabled,
.login-btn.is-submitting { opacity: .72; cursor: not-allowed; }

.signup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #59647c;
  font-size: 14px;
}

.signup::before,
.signup::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e4e8ef;
}

.trust {
  margin-top: 28px;
  padding: 22px 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #dce3ec;
  border-radius: 14px;
}

.trust article {
  text-align: center;
  padding: 0 14px;
}

.trust article + article { border-left: 1px solid #e4e9f0; }

.trust-icon {
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-size: 36px;
  line-height: 1;
}

.trust b {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.trust small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.3;
  font-size: 12px;
}

.login-alert {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

.login-alert-danger { background: #fff5f5; border: 1px solid #fecaca; color: #991b1b; }
.login-alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.login-alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.login-alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

@media (max-height: 860px) {
  .marketing-body { padding-top: 24px; }
  .hero-copy h1 { font-size: 34px; }
  .hero-copy p { font-size: 14px; }
  .network { min-height: 240px; height: 320px; }
  .partner { width: 220px; min-height: 92px; padding: 12px 14px; }
  .partner-icon { width: 58px; height: 58px; font-size: 26px; flex-basis: 58px; }
  .partner h3 { font-size: 16px; }
  .partner p { font-size: 12px; }
  .bottom-scene { height: 220px; }
  .feature-strip { bottom: 18px; left: 36%; }
  .login-card { padding: 36px 40px 28px; }
}

@media (max-width: 1200px) {
  .layout { grid-template-columns: 1fr; }
  html, body { overflow: auto; height: auto; }
  .layout { height: auto; max-height: none; overflow: visible; }
  .marketing { height: auto; min-height: auto; }
  .marketing-body { padding-bottom: 20px; }
  .bottom-scene { height: 280px; }
  .feature-strip { left: 24px; right: 24px; }
  .login-panel { height: auto; min-height: auto; padding: 24px; overflow: visible; }
  .login-card { max-height: none; overflow: visible; }
}

@media (max-width: 820px) {
  .marketing-body { padding: 28px 20px 0; }
  .network {
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 20px;
  }
  .partner {
    position: static !important;
    width: auto;
    transform: none !important;
  }
  .connector { display: none; }
  .feature-strip {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin: 16px 20px;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .feature-strip article + article { border-left: 0; }
  .bottom-scene { height: auto; display: flex; flex-direction: column; }
  .landscape { position: relative; height: 180px; }
  .login-panel { padding: 0; }
  .login-card { border-radius: 0; padding: 38px 22px; }
}

@media (max-width: 560px) {
  .network { grid-template-columns: 1fr; }
  .feature-strip { grid-template-columns: 1fr; margin: 16px; }
  .verify-row { flex-direction: column; }
  .refresh-btn { min-height: 52px; justify-content: center; }
  .options { align-items: flex-start; gap: 12px; flex-direction: column; }
  .signup::before, .signup::after { display: none; }
  .trust { grid-template-columns: 1fr; gap: 20px; }
  .trust article + article { border-left: 0; border-top: 1px solid #e4e9f0; padding-top: 20px; }
}
