/* Earth Surveillance: site graphics (flow, two ways in, start small, five steps)
   Text comes from /i18n/<lang>.json via js/i18n.js. Layout switches to a vertical stack below 760px. */
:root {
  --es-bg: #0B0E12;
  --es-bg-alt: #12181F;
  --es-card: #1A222B;
  --es-card-line: #22303C;
  --es-green: #00AD10;
  --es-lime: #A3F54A;
  --es-white: #FFFFFF;
  --es-ink: #0B0E12;
  --es-font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --es-gap: 60px;
}

.es-section {
  background: var(--es-bg);
  color: var(--es-white);
  font-family: var(--es-font);
  padding: clamp(32px, 4.5vw, 60px) clamp(20px, 6vw, 80px);
}
.es-section * { box-sizing: border-box; }
.es-inner { max-width: 1120px; margin: 0 auto; }

.es-eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0 0 20px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--es-green);
}
.es-eyebrow::before { content: ""; width: 14px; height: 14px; background: var(--es-green); }
.es-title {
  margin: 0; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.14; font-weight: 800;
  text-transform: uppercase; letter-spacing: .01em; text-wrap: balance;
}
.es-title span { display: block; color: var(--es-green); }
.es-sub { margin: 18px 0 0; max-width: 62ch; font-size: clamp(16px, 1.4vw, 18px); line-height: 1.45; }

.es-label { line-height: 1.35; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--es-green); }
.es-card {
  position: relative; background: var(--es-card); border: 1px solid var(--es-card-line);
  border-radius: 4px; padding: 24px; min-width: 0;
}
.es-card h3 {
  margin: 8px 0 10px; font-size: 26px; line-height: 1.15; font-weight: 800;
  text-transform: uppercase; letter-spacing: .02em; color: var(--es-lime);
}
.es-card p { margin: 0; font-size: 17px; line-height: 1.47; }
.es-card--accent { background: var(--es-green); border-color: var(--es-green); color: var(--es-ink); }
.es-card--accent h3, .es-card--accent .es-label, .es-card--accent .es-num { color: var(--es-ink); }
.es-num { font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--es-green); }

/* Ownership bar under a row of cards */
.es-own { display: grid; gap: var(--es-gap); margin-top: 32px; }
.es-own div { border-top: 2px solid var(--es-lime); padding-top: 14px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--es-lime); }
.es-own div.es-own--ours { border-color: var(--es-green); color: var(--es-green); }
.es-own-inline { display: none; margin-top: 10px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--es-lime); }
.es-own-inline.es-own--ours { color: var(--es-green); }
.es-card--accent .es-own-inline { color: var(--es-ink); }

/* Arrows: a line with a triangle head, drawn in CSS */
.es-arrow { position: relative; background: var(--es-green); }
.es-arrow::after { content: ""; position: absolute; border: 6px solid transparent; }

/* ---------- 1. Flow: Map → Verify → Monitor → Use ---------- */
.es-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--es-gap); margin-top: 48px; }
.es-flow .es-card { min-height: 220px; }
.es-flow .es-card:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: calc(-1 * var(--es-gap)); width: var(--es-gap); height: 2px;
  background: linear-gradient(var(--es-green), var(--es-green)) left / calc(100% - 10px) 2px no-repeat;
}
.es-flow .es-card:not(:last-child)::before {
  content: ""; position: absolute; top: calc(50% - 5px); right: calc(-1 * var(--es-gap) + 1px);
  border: 6px solid transparent; border-left: 9px solid var(--es-green); border-right: 0;
}
.es-status { display: flex; gap: 3px; margin-top: 28px; }
.es-status span { flex: 1; height: 8px; }
.es-status span:nth-child(1) { background: #00AD10; }
.es-status span:nth-child(2) { background: #A3F54A; }
.es-status span:nth-child(3) { background: #F5B700; }
.es-status span:nth-child(4) { background: #F07A1A; }
.es-status span:nth-child(5) { background: #E8402A; }
.es-flow + .es-own { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.es-flow + .es-own div:nth-child(2) { grid-column: span 2; }

/* ---------- 2. Two ways in ---------- */
.es-ways { display: grid; grid-template-columns: minmax(0, 1fr) 128px minmax(0, 1fr) 128px minmax(0, 1fr); margin-top: 48px; align-items: stretch; }
.es-ways .es-card { min-height: 220px; }
.es-link { display: flex; flex-direction: column; justify-content: center; gap: 44px; padding: 0 4px; }
.es-link figure { margin: 0; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.es-link figcaption { text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .04em; overflow-wrap: anywhere; text-transform: uppercase; color: var(--es-green); }
.es-link .es-back figcaption { order: 2; color: var(--es-lime); }
.es-link .es-arrow { height: 2px; margin: 0 2px; }
.es-link .es-fwd .es-arrow::after { right: -2px; top: -5px; border-left: 9px solid var(--es-green); border-right: 0; }
.es-link .es-back .es-arrow { background: var(--es-lime); }
.es-link .es-back .es-arrow::after { left: -2px; top: -5px; border-right: 9px solid var(--es-lime); border-left: 0; }
.es-ways + .es-own { grid-template-columns: minmax(0, 1fr) 128px minmax(0, 1fr) 128px minmax(0, 1fr); gap: 0; }
.es-ways + .es-own .es-own-gap { border: 0; }

/* ---------- 3. Start small ---------- */
.es-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; margin: 48px 0 0; padding: 0; list-style: none; }
.es-step { position: relative; min-width: 0; }
.es-dot {
  display: flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border: 2px solid var(--es-green); border-radius: 50%; background: var(--es-card);
  font-size: 20px; font-weight: 800; color: var(--es-lime); position: relative; z-index: 1;
}
.es-step:last-child .es-dot { background: var(--es-green); color: var(--es-ink); }
.es-step:not(:last-child)::after {
  content: ""; position: absolute; top: 23px; left: 48px; right: -36px; height: 2px;
  background: linear-gradient(var(--es-green), var(--es-green)) left / calc(100% - 10px) 2px no-repeat;
}
.es-step:not(:last-child)::before {
  content: ""; position: absolute; top: 18px; right: -36px;
  border: 6px solid transparent; border-left: 9px solid var(--es-green); border-right: 0;
}
.es-step h3 { margin: 28px 0 8px; font-size: 24px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: var(--es-lime); }
.es-step p { margin: 0; font-size: 17px; line-height: 1.47; max-width: 32ch; }

/* ---------- Mobile: everything stacks ---------- */
@media (max-width: 760px) {
  :root { --es-gap: 48px; }
  .es-flow, .es-ways { grid-template-columns: minmax(0, 1fr); }
  .es-flow { gap: 48px; }
  .es-flow .es-card, .es-ways .es-card { min-height: 0; padding: 18px 20px; }
  .es-card h3 { font-size: 20px; margin: 4px 0 6px; }
  .es-card p { font-size: 15px; }
  .es-flow .es-card:not(:last-child)::after {
    top: auto; bottom: -48px; right: auto; left: 50%; width: 2px; height: 48px;
    background: linear-gradient(var(--es-green), var(--es-green)) top / 2px calc(100% - 10px) no-repeat;
  }
  .es-flow .es-card:not(:last-child)::before {
    top: auto; bottom: -47px; right: auto; left: calc(50% - 5px);
    border: 6px solid transparent; border-top: 9px solid var(--es-green); border-bottom: 0;
  }
  .es-status { position: absolute; top: 20px; right: 20px; width: 100px; margin: 0; gap: 2px; }
  .es-status span { height: 6px; }
  .es-own { display: none; }
  .es-own-inline { display: block; }

  .es-link { flex-direction: row; justify-content: center; gap: 72px; padding: 0; height: 96px; }
  .es-link figure { flex-direction: row; align-items: stretch; gap: 10px; }
  .es-link figcaption { align-self: center; text-align: left; }
  .es-link .es-back figcaption { order: 2; }
  .es-link .es-arrow { width: 2px; height: auto; margin: 2px 0; }
  .es-link .es-fwd .es-arrow::after { right: -5px; top: auto; bottom: -2px; border: 6px solid transparent; border-top: 9px solid var(--es-green); border-bottom: 0; }
  .es-link .es-back { flex-direction: row; }
  .es-link .es-back .es-arrow::after { left: -5px; top: -2px; border: 6px solid transparent; border-bottom: 9px solid var(--es-lime); border-top: 0; }

  .es-steps { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .es-step { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 20px; }
  .es-step h3 { margin: 10px 0 6px; font-size: 20px; grid-column: 2; }
  .es-step p { grid-column: 2; font-size: 15px; }
  .es-dot { grid-row: 1 / span 2; }
  .es-step:not(:last-child)::after {
    top: 48px; left: 23px; right: auto; bottom: -40px; width: 2px; height: auto;
    background: linear-gradient(var(--es-green), var(--es-green)) top / 2px calc(100% - 10px) no-repeat;
  }
  .es-step:not(:last-child)::before {
    top: auto; bottom: -39px; right: auto; left: 18px;
    border: 6px solid transparent; border-top: 9px solid var(--es-green); border-bottom: 0;
  }
}

/* ===== 4. The five steps (components/five-steps.html) ===== */
.es-steps5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: stretch; margin: 56px 0 0; padding: 0; list-style: none; }
.es-step5 { display: flex; flex-direction: column; background: var(--es-card); border: 1px solid var(--es-card-line); border-radius: 4px; padding: 18px 18px 20px; min-width: 0; }
.es-step5:nth-child(1) { margin-top: 240px; }
.es-step5:nth-child(2) { margin-top: 180px; }
.es-step5:nth-child(3) { margin-top: 120px; }
.es-step5:nth-child(4) { margin-top: 60px; }
.es-step5:nth-child(5) { margin-top: 0; background: var(--es-green); border-color: var(--es-green); color: var(--es-ink); }
.es-step5-marker { align-self: flex-start; margin: 0 0 12px; padding: 3px 9px; border-radius: 3px; background: var(--es-lime); color: var(--es-ink); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.es-step5-n { display: block; font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--es-green); }
.es-step5 h3 { margin: 6px 0 4px; font-size: 21px; line-height: 1.2; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: var(--es-lime); }
.es-step5-sub { margin: 0 0 12px !important; font-weight: 600; }
.es-step5 p { margin: 0 0 12px; font-size: 15px; line-height: 1.45; }
.es-step5-result { margin-top: auto !important; color: var(--es-lime); font-weight: 600; }
.es-tag5 { display: inline-block; align-self: flex-start; padding: 3px 8px; border: 1px solid var(--es-lime); border-radius: 3px; color: var(--es-lime); font-size: 12px; font-weight: 600; letter-spacing: .06em; line-height: 1.3; }
.es-step5:nth-child(5) .es-step5-n, .es-step5:nth-child(5) h3, .es-step5:nth-child(5) .es-step5-result { color: var(--es-ink); }

@media (max-width: 1000px) {
  .es-steps5 { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 40px; }
  .es-step5, .es-step5:nth-child(n) { margin-top: 0; }
  .es-step5-result { margin-top: 4px !important; }
}

/* ===== EUDR country risk (components/eudr-country-risk.html) ===== */
.es-risk { margin-top: 40px; font-family: var(--es-font); color: var(--es-white); }
.es-risk * { box-sizing: border-box; }
.es-risk-title {
  margin: 0 0 24px; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; font-weight: 800;
  text-transform: uppercase; letter-spacing: .02em; color: var(--es-lime);
}
.es-risk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.es-risk-region { background: var(--es-card); border: 1px solid var(--es-card-line); border-radius: 4px; padding: 24px; min-width: 0; }
.es-risk-region-name { margin: 0 0 20px; font-size: 20px; line-height: 1.2; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.es-risk-group + .es-risk-group { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--es-card-line); }
.es-risk-label {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px;
  font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.es-risk-count { min-width: 30px; padding: 3px 8px; border-radius: 3px; text-align: center; letter-spacing: 0; font-weight: 800; }
.es-risk--standard .es-risk-label { color: var(--es-lime); }
.es-risk--standard .es-risk-count { border: 1px solid var(--es-lime); }
.es-risk--low .es-risk-label { color: var(--es-white); }
.es-risk--low .es-risk-count { border: 1px solid var(--es-white); }
.es-risk--high .es-risk-label { color: var(--es-green); }
.es-risk--high .es-risk-count { background: var(--es-green); color: var(--es-ink); }
.es-risk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.es-risk-list li {
  padding: 6px 10px; border: 1px solid var(--es-card-line); border-radius: 3px; background: var(--es-bg);
  font-size: 15px; line-height: 1.3; font-weight: 400;
}
.es-risk--standard .es-risk-list li { border-color: rgba(163, 245, 74, .45); }
.es-risk--high .es-risk-list li { border-color: var(--es-green); }
.es-risk-source { margin: 22px 0 0; max-width: 80ch; font-size: 15px; line-height: 1.5; }
.es-risk-source a { color: var(--es-lime); }
@media (max-width: 1000px) { .es-risk-grid { grid-template-columns: 1fr 1fr; } .es-risk-region:first-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .es-risk-grid { grid-template-columns: 1fr; } .es-risk-region { padding: 20px; } }

