/* Homepage sections (index.html): how it works, example results, trust strip, who it's for, mission. */

.hm-section {
  max-width: 1080px;
  margin: 56px auto 0;
  padding: 0 22px;
  text-align: center;
}

.hm-section h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.1;
  font-weight: 400;
}

.hm-sub {
  max-width: 640px;
  margin: 12px auto 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ag-muted);
}

.hm-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* How it works */
.hm-steps {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  text-align: left;
}
.hm-steps li {
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--ag-shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hm-step-n {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ag-green-700); color: #fff; font-weight: 900;
}
.hm-steps h3 { margin: 4px 0 0; font-size: 1.12rem; color: var(--ag-green-900); text-align: left; }
.hm-steps p { margin: 0; line-height: 1.55; color: #4f5c50; flex: 1; }
.hm-steps a { color: var(--ag-green-700); font-weight: 800; text-decoration: none; }
.hm-steps a:hover { text-decoration: underline; }

/* Example results */
.hm-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  text-align: left;
}
.hm-preview p { line-height: 1.6; color: #4f5c50; margin: 12px 0 0; font-size: 1.02rem; }
.hm-checks { list-style: none; padding: 0; margin: 16px 0 20px; display: flex; flex-direction: column; gap: 8px; }
.hm-checks li { position: relative; padding-left: 28px; line-height: 1.45; color: var(--ag-text); }
.hm-checks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--ag-green-100); color: var(--ag-green-700);
  font-size: 0.75rem; font-weight: 900; display: flex; align-items: center; justify-content: center;
}

.hm-card {
  margin: 0;
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: 22px;
  box-shadow: var(--ag-shadow-lift);
  overflow: hidden;
}
.hm-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px; background: var(--ag-green-900); color: #fff;
}
.hm-card-head strong { display: block; font-size: 1.1rem; }
.hm-card-head span { font-size: 0.82rem; color: #b9d3b5; }
.hm-ring {
  width: 58px; height: 58px; border-radius: 50%;
  background: conic-gradient(#8fc98a var(--deg), rgba(255, 255, 255, 0.18) var(--deg));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0;
}
.hm-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--ag-green-900); }
.hm-ring b, .hm-ring small { position: relative; line-height: 1; }
.hm-ring b { font-size: 1.1rem; }
.hm-ring small { font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.05em; color: #b9d3b5; margin-top: 2px; }
.hm-bars { padding: 16px 20px 4px; display: flex; flex-direction: column; gap: 12px; }
.hm-bar { display: grid; grid-template-columns: 120px minmax(0, 1fr) 130px; align-items: center; gap: 10px; font-size: 0.88rem; }
.hm-bar span { font-weight: 800; color: var(--ag-green-900); }
.hm-bar i { display: block; height: 10px; border-radius: 999px; background: #ece8dd; overflow: hidden; }
.hm-bar em { display: block; height: 100%; border-radius: 999px; background: #3a7444; }
.hm-bar.is-low em { background: #caa53d; }
.hm-bar b { font-weight: 800; text-align: right; color: #2e5d34; }
.hm-bar.is-low b { color: #8a5a12; }
.hm-plan { margin: 14px 20px 20px; padding: 12px 14px; border-radius: 14px; background: #f7f1e3; }
.hm-plan span { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: #6b4f2e; }
.hm-plan p { margin: 4px 0 0; font-size: 0.92rem; line-height: 1.5; color: var(--ag-text); }

/* Who it's for */
.hm-who-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; text-align: left; }
.hm-who-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px; border-radius: 20px;
  background: #fff; border: 1px solid var(--ag-border); box-shadow: var(--ag-shadow);
  text-decoration: none; color: var(--ag-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.hm-who-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(30, 58, 35, 0.12); border-color: var(--ag-green-400); }
.hm-who-card:focus-visible { outline: 2px solid #2e5d34; outline-offset: 2px; }
.hm-who-card strong { font-size: 1.1rem; color: var(--ag-green-900); }
.hm-who-card span { line-height: 1.5; color: #4f5c50; flex: 1; }
.hm-who-card em { font-style: normal; font-weight: 800; color: var(--ag-green-700); }

.hm-audience-icon {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 17px;
}
.hm-audience-icon { margin-bottom: 8px; }

/* Mission */
.hm-mission {
  max-width: 820px;
  padding: 34px 28px;
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: 22px;
  box-shadow: var(--ag-shadow);
}
.hm-mission p { margin: 12px auto 0; max-width: 640px; line-height: 1.6; color: #4f5c50; font-size: 1.05rem; }

body.home .soil-cta a:not(.home-btn) { color: var(--ag-green-700); font-weight: 800; }

@media (max-width: 900px) {
  .hm-steps, .hm-who-grid { grid-template-columns: 1fr; }
  .hm-preview { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 600px) {
  .hm-section { margin-top: 40px; padding: 0 16px; }
  .hm-mission { margin-left: 16px; margin-right: 16px; padding: 24px 18px; }
  .hm-bar { grid-template-columns: 90px minmax(0, 1fr); }
  .hm-bar b { grid-column: 1 / -1; text-align: left; margin-top: -6px; font-size: 0.8rem; }
  .hm-steps li, .hm-who-card { padding: 18px; }
}

/* How it works: step number with the tool's icon */
.hm-step-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hm-step-icon { width: 76px; height: 76px; border-radius: 18px; flex-shrink: 0; box-shadow: 0 4px 12px rgba(30, 58, 35, 0.18); }
.hm-how { margin-top: 48px; }

/* Live community soil map */
.hm-map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: center; text-align: left; }
.hm-map p { line-height: 1.6; color: #4f5c50; margin: 12px 0 0; font-size: 1.02rem; }
.hm-map-art { display: block; border-radius: 22px; overflow: hidden; box-shadow: var(--ag-shadow-lift); }
.hm-map-art img { display: block; width: 100%; height: auto; }
.hm-actions-left { justify-content: flex-start; }
@media (max-width: 900px) {
  .hm-map { grid-template-columns: 1fr; gap: 24px; }
}
/* Bigger map art, a little narrower text column */
@media (min-width: 901px) {
  .hm-map { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}
.hm-map-art { max-width: 560px; justify-self: center; width: 100%; }

/* Example card header: same look as a plot in the Soil Analytics
   (white header, ring colored by status, Caution pill for a 58-77 score). */
.hm-card-head { background: #fff; color: var(--ag-text); justify-content: flex-start; gap: 16px; padding: 20px 20px 14px; border-bottom: 1px solid #efeae0; }
.hm-card-title { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.hm-card-title strong { font-family: var(--ag-font-display); font-weight: 400; font-size: 1.35rem; color: var(--ag-green-900); line-height: 1.1; }
.hm-card-title span { font-size: 0.82rem; color: var(--ag-muted); }
.hm-status {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  padding: 3px 11px; border-radius: 999px;
  background: #f7ecd5; color: #9a6a16; font-style: normal; font-size: 0.8rem; font-weight: 800;
}
.hm-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9a6a16; }
.hm-ring { width: 76px; height: 76px; background: conic-gradient(#9a6a16 var(--deg), #ece8dd var(--deg)); }
.hm-ring::before { inset: 7px; background: #fff; }
.hm-ring b { font-size: 1.4rem; font-weight: 900; color: #26302a; }
.hm-ring small { font-size: 0.56rem; font-weight: 800; letter-spacing: 0.05em; color: #9aa394; }

/* ===== Professional home page (hero copy, quick lime check, field card, proof) ===== */
/* The headline is a full sentence now, so it runs smaller than the old three-word line. */
.home .home-hero__title { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.08; }
.home-hero__home { margin: 14px 0 0; font-size: 0.92rem; color: rgba(255, 255, 255, 0.82); }
.home-hero__home a { color: #fff; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

/* Quick lime check */
.hm-planner { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px; align-items: center; text-align: left; }
.hm-planner-text h2 { text-align: left; }
.hm-planner-text p { margin: 12px 0 0; line-height: 1.6; color: #4f5c50; font-size: 1.02rem; }
.hm-planner-card { margin: 0; padding: 22px; background: var(--ag-white); border: 1px solid var(--ag-border); border-radius: 22px; box-shadow: var(--ag-shadow-lift); }
.hm-planner-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hm-planner-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 0.85rem; font-weight: 800; color: var(--ag-green-900); text-align: left; min-width: 0; }
.hm-planner-grid input, .hm-planner-grid select {
  width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--ag-border); border-radius: 11px;
  background-color: var(--ag-white); font-family: inherit; font-size: 0.98rem; color: var(--ag-text);
}
.hm-planner-grid input:focus, .hm-planner-grid select:focus { outline: 2px solid var(--ag-green-700); outline-offset: 1px; border-color: var(--ag-green-700); }
.hm-input-unit { position: relative; display: block; }
.hm-input-unit input { padding-right: 62px; }
.hm-input-unit em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 700; font-size: 0.8rem; color: var(--ag-muted); pointer-events: none; }
.hm-planner-out { margin: 16px 0; padding: 14px 16px; border-radius: 16px; background: var(--ag-green-100); text-align: left; min-height: 96px; }
.hm-planner-out p { margin: 0; }
.hm-plan-label { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ag-brown-700); }
.hm-plan-big { margin-top: 2px !important; font-size: 1.05rem; color: var(--ag-text); }
.hm-plan-big strong { font-family: var(--ag-font-display); font-weight: 400; font-size: 1.9rem; color: var(--ag-green-900); }
.hm-plan-sub, .hm-plan-note, .hm-plan-hint { margin-top: 4px !important; font-size: 0.9rem; line-height: 1.5; color: #3f4c42; }
.hm-plan-note { font-weight: 700; color: var(--ag-green-900); }
.hm-plan-target { margin-top: 8px !important; font-size: 0.8rem; color: var(--ag-muted); }
.hm-planner-card .ui-btn { width: 100%; text-align: center; }

/* Example field card: "Action needed" (score under 58) colors, same as Soil Analytics */
.hm-ring.is-poor { background: conic-gradient(#a43a28 var(--deg), #ece8dd var(--deg)); }
.hm-status.is-poor { background: #f6dee0; color: #9b3b3b; }
.hm-status.is-poor::before { background: #9b3b3b; }
.hm-plan-total { margin-top: 8px !important; padding-top: 8px; border-top: 1px dashed #e2d6bd; font-size: 0.86rem !important; color: #4f5c50 !important; }


@media (max-width: 900px) {
  .hm-planner { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 600px) {
  .hm-planner-card { padding: 16px; }
  .hm-planner-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hm-planner-grid label:first-child { grid-column: 1 / -1; }
  .hm-plan-big strong { font-size: 1.6rem; }
}
