/* ============================================================
   MegawattLands — editorial / infrastructure design system
   Adapted from the "XWeather" K2 Renew landing-page design.
   Display: Archivo · Text/UI: Public Sans · Mono: IBM Plex Mono
   Sharp corners, 2px ink borders, field-green + golden-hour accents.
   ============================================================ */

:root {
  /* Brand (overridden per-site in index.html :root, kept here as fallback) */
  --brand: #4E6B2E;          /* field green */
  --brand-hover: #3D551F;
  --brand-active: #324618;
  --accent: #4E6B2E;         /* alias used by main.js active-nav */
  --gold: #C6953C;           /* golden hour */
  --green-soft: #9DB37E;

  /* Ink / paper */
  --ink: #16171A;
  --ink-2: #2A2B2E;
  --ink-soft: #54565A;
  --ink-faint: #6B6D72;
  --paper: #F1EFE8;
  --paper-2: #EAE7DD;
  --paper-line: #D8D5CC;
  --card: #ffffff;

  --font-display: "Archivo", "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --maxw: 1200px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink-2);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: var(--brand); transition: var(--transition); }
a:hover { color: var(--brand-hover); }
ul { list-style: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Layout helpers ---------- */
.section { padding: clamp(64px, 10vh, 110px) clamp(18px, 4vw, 48px); border-top: 2px solid var(--ink); }
.container { max-width: var(--maxw); margin: 0 auto; }
.section-header { max-width: 640px; margin-bottom: 48px; }
.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  font-size: clamp(30px, 4.2vw, 54px);
  color: var(--ink);
  text-wrap: balance;
  margin-bottom: 18px;
}
.section-desc { font-size: 1.06rem; color: var(--ink-soft); max-width: 60ch; }
.lead { font-size: 1.18rem; font-weight: 500; color: var(--ink-2); margin-bottom: 16px; max-width: 50ch; }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
em { color: var(--brand-hover); font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 16px;
  padding: 0 24px;
  height: 52px;
  border: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.btn-outline-light { background: rgba(255,255,255,0.06); color: #fff; border-color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.16); color: #fff; }
.btn-sm { height: 44px; font-size: 14px; padding: 0 18px; }

/* ---------- Nav ---------- */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  transition: box-shadow 0.2s ease;
}
#navbar.scrolled { box-shadow: 0 6px 0 rgba(22,23,26,0.08); }
.nav-container {
  height: 70px; display: flex; align-items: center;
  max-width: 1360px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px); gap: 28px;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
  letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink);
}
.nav-logo .mark { width: 28px; height: 28px; display: block; flex-shrink: 0; }
.nav-logo .accent { color: var(--brand); }
.nav-links {
  display: flex; align-items: center; gap: 28px; margin-left: 16px;
  font-family: var(--font-body); font-weight: 700; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.nav-links li { display: flex; }
.nav-links a { color: var(--ink-2); }
.nav-links a:hover, .nav-links a.active-nav { color: var(--brand); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-links a.nav-cta {
  background: var(--brand); color: #fff; border: 2px solid var(--brand);
  padding: 0 18px; height: 44px; display: inline-flex; align-items: center;
}
.nav-links a.nav-cta:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.nav-toggle { display: none; background: none; border: none; color: var(--ink); font-size: 1.4rem; cursor: pointer; }

/* ---------- Hero ---------- */
#hero {
  position: relative; overflow: hidden;
  padding: calc(70px + clamp(48px,8vh,96px)) clamp(18px,4vw,48px) clamp(48px,7vh,88px);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background: #1d2a12; mix-blend-mode: multiply; opacity: 0.5;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(15,16,12,0.9) 0%, rgba(15,16,12,0.5) 48%, rgba(15,16,12,0.12) 100%);
}
.hero-inner {
  position: relative; z-index: 2; max-width: 1360px; margin: 0 auto;
  display: grid; grid-template-columns: 1.12fr 0.88fr; gap: clamp(32px,5vw,72px); align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  font-family: var(--font-body); font-weight: 800; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase; color: #E3E9D6;
}
.hero-badge::before { content: ""; width: 12px; height: 12px; background: var(--brand); display: inline-block; }
.hero-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em;
  line-height: 0.94; font-size: clamp(40px, 5.6vw, 80px); color: #fff;
  text-wrap: balance; margin-bottom: 26px;
}
.hero-subtitle { font-size: 20px; line-height: 1.55; color: #D8D4C7; max-width: 50ch; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Matchmaking diagram panel */
.match-card { border: 2px solid var(--ink); background: #fff; }
.match-card__head {
  padding: 12px 18px; border-bottom: 2px solid var(--ink);
  font-family: var(--font-body); font-weight: 800; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
  display: flex; justify-content: space-between;
}
.match-card__head .accent { color: var(--brand); }
.match-card__body { padding: 22px; }
.match-side { border: 2px solid var(--ink); padding: 22px; }
.match-side--supply { background: var(--brand); color: #fff; }
.match-side--demand { background: var(--ink); color: #fff; }
.match-side__tag { font-family: var(--font-body); font-weight: 800; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.match-side--supply .match-side__tag { opacity: 0.85; }
.match-side--demand .match-side__tag { color: var(--green-soft); }
.match-side__q { font-family: var(--font-display); font-weight: 800; font-size: 23px; line-height: 1.1; margin-bottom: 6px; }
.match-side__d { font-size: 15px; opacity: 0.9; }
.match-connector { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px 0; }
.match-connector span.line { height: 2px; flex: 1; background: var(--ink); }
.match-connector span.match-label {
  font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: 0.14em;
  color: var(--ink); border: 2px solid var(--ink); padding: 6px 14px; background: var(--gold);
}

/* ---------- Split / "two ways in" ---------- */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px,5vw,72px); align-items: start; }
.split-panel { border: 2px solid var(--ink); background: #fff; }
.split-panel h3 { padding: 16px 22px; border-bottom: 2px solid var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--ink); }
.split-panel ul { display: flex; flex-direction: column; }
.split-panel li { display: flex; gap: 14px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--paper-line); font-size: 16px; color: var(--ink-2); }
.split-panel li:last-child { border-bottom: none; }
.split-panel li .key { font-family: var(--font-display); font-weight: 800; color: var(--brand); font-size: 20px; flex-shrink: 0; }

/* ---------- Features (dark numbered grid) ---------- */
.features { background: var(--ink); color: #fff; }
.features .section-tag { color: var(--green-soft); }
.features .section-title { color: #fff; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px; background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.16);
}
.card { background: var(--ink); padding: 32px; }
.card .num { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--gold); margin-bottom: 16px; }
.card h3 { font-family: var(--font-display); font-size: 1.1rem; color: #fff; margin-bottom: 10px; font-weight: 800; }
.card p { font-size: 16px; line-height: 1.6; color: #B9BBBE; margin: 0; }

/* ---------- Photo band ---------- */
.band { border-top: 2px solid var(--ink); padding: clamp(40px,6vh,72px) clamp(18px,4vw,48px); }
.band-inner { max-width: var(--maxw); margin: 0 auto; border: 2px solid var(--ink); position: relative; height: clamp(320px,44vh,460px); overflow: hidden; }
.band-inner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band-inner::before { content: ""; position: absolute; inset: 0; background: #2f4718; mix-blend-mode: multiply; opacity: 0.72; }
.band-inner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(22,23,26,0.7) 0%, rgba(22,23,26,0.1) 60%); }
.band-caption { position: absolute; left: 0; bottom: 0; padding: clamp(20px,3vw,36px); z-index: 2; }
.band-caption span {
  display: inline-block; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(22px,3vw,40px); line-height: 1; color: #fff; background: var(--ink); padding: 10px 16px;
}

/* ---------- Steps (grid frame) ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-left: 2px solid var(--ink); border-top: 2px solid var(--ink); }
.step { border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: 28px; }
.step-num { font-family: var(--font-display); font-weight: 800; font-size: 52px; line-height: 1; color: var(--ink); margin-bottom: 16px; }
.step.accent .step-num { color: var(--brand); }
.step h4 { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--ink); margin-bottom: 8px; }
.step p { font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); margin: 0; }

/* ---------- FAQ ---------- */
.faq { background: var(--paper-2); }
.faq-list { display: flex; flex-direction: column; max-width: 900px; }
.faq-head { max-width: 900px; }
.faq-item { border-top: 2px solid var(--ink); }
.faq-item:last-child { border-bottom: 2px solid var(--ink); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 22px 0;
  font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand); font-weight: 400; font-size: 1.5rem; line-height: 1; transition: var(--transition); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 0 24px; font-size: 16px; line-height: 1.65; color: #44464A; }
.faq-answer p { margin: 0 0 12px; }
.faq-answer p:last-child { margin: 0; }
.faq-answer strong { color: var(--ink); }

/* ---------- Contact (split: dark rail + form) ---------- */
.k2lf-section { border-top: 2px solid var(--ink); padding: clamp(64px,10vh,110px) clamp(18px,4vw,48px); }
.k2lf-container { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); }
.k2lf-aside { background: var(--ink); color: #fff; padding: clamp(30px,4vw,52px); }
.k2lf-aside .section-tag { color: var(--green-soft); display: inline-flex; align-items: center; gap: 10px; }
.k2lf-aside .section-tag::before { content: ""; width: 12px; height: 12px; background: var(--brand); display: inline-block; }
.k2lf-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.03; font-size: clamp(28px,3.6vw,46px); color: #fff; margin-bottom: 20px; }
.k2lf-sub { font-size: 17px; line-height: 1.6; color: #B9BBBE; max-width: 42ch; margin-bottom: 28px; }
.k2lf-points { display: flex; flex-direction: column; gap: 14px; font-size: 16px; color: #E4E5E6; }
.k2lf-points li { display: flex; gap: 12px; align-items: center; }
.k2lf-points li::before { content: "→"; color: var(--green-soft); font-weight: 800; }
.k2lf-form { background: #fff; padding: clamp(28px,3.5vw,44px); }
.k2lf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.k2lf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.k2lf-field.k2lf-full { grid-column: 1 / -1; }
.k2lf-field label { font-family: var(--font-body); font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.k2lf-field input, .k2lf-field select, .k2lf-field textarea {
  width: 100%; height: 46px; padding: 0 14px; font-size: 15px; font-family: var(--font-body);
  color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 0;
}
.k2lf-field select { height: 46px; }
.k2lf-field textarea { height: auto; min-height: 108px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.k2lf-field input:focus, .k2lf-field select:focus, .k2lf-field textarea:focus { outline: none; border-color: var(--brand); background: #fff; }

/* Two-audience lead forms: a tab switcher over stacked forms. */
.k2lf-formcol { background: #fff; display: flex; flex-direction: column; }
.k2lf-tabs { display: flex; border-bottom: 2px solid var(--ink); }
.k2lf-tab {
  flex: 1; padding: 15px 12px; background: var(--paper); border: 0; border-right: 2px solid var(--ink);
  font-family: var(--font-body); font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-soft); cursor: pointer; line-height: 1.25; transition: background 0.2s, color 0.2s;
}
.k2lf-tab:last-child { border-right: 0; }
.k2lf-tab:hover { color: var(--ink); }
.k2lf-tab.is-active { background: #fff; color: var(--ink); }
.k2lf-form[hidden] { display: none; }
.k2lf-consent { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); line-height: 1.45; margin: 4px 0 0; }
.k2lf-consent input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); flex: 0 0 auto; }
.k2lf-form .btn { grid-column: 1 / -1; width: 100%; justify-content: center; margin-top: 4px; }
.k2lf-status { grid-column: 1 / -1; margin-top: 12px; text-align: center; font-weight: 700; min-height: 1.2em; }
.k2lf-status.k2lf-ok { color: var(--brand); }
.k2lf-status.k2lf-err { color: #9E4A33; }

/* ---------- Footer ---------- */
#footer { border-top: 2px solid var(--ink); background: var(--ink); color: #B9BBBE; padding: clamp(44px,6vh,64px) clamp(18px,4vw,48px) 36px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-top { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.16); }
.footer-brand { max-width: 360px; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand .footer-logo .mark { width: 28px; height: 28px; }
.footer-name { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: 0.02em; text-transform: uppercase; color: #fff; }
.footer-name .accent { color: var(--green-soft); }
.footer-brand p { font-size: 14px; line-height: 1.6; margin: 0; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-cols h4 { margin: 0 0 14px; color: #fff; font-family: var(--font-body); font-weight: 800; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-cols ul { display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.footer-cols a { color: #B9BBBE; }
.footer-cols a:hover { color: #fff; }
.footer-legal { padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 12px; color: var(--ink-faint); }
.footer-legal span:last-child { max-width: 64ch; }

/* ---------- Fade-in ---------- */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .k2lf-container { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav-actions { display: none; }
  .nav-links {
    position: fixed; top: 70px; right: 16px; left: 16px; margin-left: 0;
    background: var(--paper); border: 2px solid var(--ink);
    flex-direction: column; align-items: stretch; gap: 6px; padding: 16px;
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: var(--transition);
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 10px 6px; }
  .nav-links a.nav-cta { justify-content: center; }
}
@media (max-width: 560px) {
  .k2lf-grid { grid-template-columns: 1fr; }
  .hero-subtitle { font-size: 18px; }
}
