:root {
  --ink: #071a16;
  --forest: #0d3b2d;
  --leaf: #236846;
  --gold: #c9a85c;
  --gold-soft: #eadfbf;
  --cream: #f5f1e7;
  --paper: #fffdf8;
  --muted: #627068;
  --line: #d9ded8;
  --danger: #9d2c27;
  --warning: #8b5b09;
  --success: #176b42;
  --shadow: 0 18px 48px rgba(7, 26, 22, .12);
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(201, 168, 92, .35);
  background: rgba(7, 26, 22, .96);
  color: white;
  backdrop-filter: blur(12px);
}

.nav {
  width: min(calc(100% - 32px), var(--max));
  min-height: 72px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: white;
  text-decoration: none;
  letter-spacing: .08em;
  font-weight: 760;
}
.brand img { width: 34px; height: 40px; }
.brand small {
  display: block;
  color: var(--gold-soft);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .14em;
}

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: #f5f1e7; text-decoration: none; font-size: .92rem; }

.button,
button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--ink);
  background: var(--gold);
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
}
.button.secondary, button.secondary {
  border: 1px solid var(--forest);
  color: var(--forest);
  background: transparent;
}
.button.ghost { border: 1px solid rgba(255,255,255,.45); color: white; background: transparent; }
.button:disabled, button:disabled { cursor: not-allowed; opacity: .55; }

.hero {
  min-height: 650px;
  display: grid;
  align-items: center;
  color: white;
  background:
    radial-gradient(circle at 72% 26%, rgba(201,168,92,.2), transparent 28%),
    linear-gradient(115deg, rgba(7,26,22,1) 0 45%, rgba(13,59,45,.94)),
    #071a16;
}

.hero-inner, .section {
  width: min(calc(100% - 32px), var(--max));
  margin: auto;
}
.hero-inner { padding: 88px 0 96px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 850px;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.4rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .98;
}
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.05;
}
.hero-copy { max-width: 720px; color: #dbe3de; font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 55px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.16);
  color: #cbd7d0;
  font-size: .88rem;
}
.trust-line span::before { content: "◆"; margin-right: 8px; color: var(--gold); font-size: .7em; }

.section { padding: 90px 0; }
.section-intro { max-width: 680px; color: var(--muted); font-size: 1.05rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--paper);
  box-shadow: 0 8px 28px rgba(7,26,22,.06);
}
.card .number { color: var(--gold); font-family: Georgia, serif; font-size: 2.7rem; line-height: 1; }
.card p { color: var(--muted); }
.dark-band { color: white; background: var(--forest); }
.dark-band .section { padding: 70px 0; }
.path { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin-top: 30px; border-radius: var(--radius); overflow: hidden; }
.path article { padding: 22px; background: rgba(255,255,255,.08); }
.path b { display: block; margin-bottom: 7px; color: var(--gold-soft); }
.path small { color: #cbd7d0; }

.notice {
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 16px 18px;
  background: #f4ecd7;
}

.form-shell {
  width: min(calc(100% - 32px), 900px);
  margin: 50px auto 90px;
}
.form-heading { margin-bottom: 30px; }
.form-heading h1 { color: var(--ink); font-size: clamp(2.5rem, 7vw, 4.8rem); }
.progress { display: flex; gap: 7px; margin: 28px 0; }
.progress span { height: 5px; flex: 1; border-radius: 8px; background: var(--line); }
.progress span.active { background: var(--leaf); }

.form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 5vw, 44px);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.form-step[hidden] { display: none; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label, fieldset legend { display: block; margin-bottom: 7px; font-weight: 720; }
.field small { display: block; margin-top: 5px; color: var(--muted); }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #adb8b0;
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--ink);
  background: white;
}
textarea { min-height: 128px; resize: vertical; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }

fieldset { margin: 0 0 24px; border: 0; padding: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  background: white;
}
.choice:has(input:checked) { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.choice input { width: 18px; min-height: 18px; margin-top: 3px; }
.choice b, .choice small { display: block; }
.choice small { color: var(--muted); }
.form-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin: 16px 0;
}
.consent input { width: 18px; min-height: 18px; margin-top: 4px; }
.honeypot { position: absolute; left: -10000px; }
.form-error { color: var(--danger); font-weight: 650; }
.status { border-radius: 12px; padding: 14px 16px; }
.status.error { color: #731e1a; background: #f7dedc; }
.status.success { color: #0c5030; background: #dff0e7; }

.admin-body { background: #edf0eb; }
.admin-login-title { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.confirmation-title { font-size: clamp(2.6rem, 7vw, 4.8rem); }
.admin-shell { width: min(calc(100% - 28px), 1440px); margin: 30px auto 80px; }
.admin-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.admin-header h1 { margin: 0; color: var(--ink); font-size: clamp(2rem, 4vw, 3.5rem); }
.invite-card { margin: 22px 0; border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: white; }
.invite-card summary { cursor: pointer; font-weight: 780; }
.invite-card form { margin-top: 18px; }
.invite-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 25px 0; }
.metric { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: white; }
.metric span { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; }
.metric strong { display: block; margin-top: 4px; font-family: Georgia, serif; font-size: 2rem; }
.toolbar { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.crm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: white; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 14px 12px; border-bottom: 1px solid #e6e9e5; text-align: left; vertical-align: top; }
th { color: #46544c; background: #f8faf7; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover, tbody tr[aria-selected="true"] { background: #f4f0e4; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 8px; background: #e9eee9; font-size: .72rem; font-weight: 780; white-space: nowrap; }
.badge.hot { color: #7b211d; background: #f7dedc; }
.badge.warm { color: #704a09; background: #f8eac7; }
.badge.cold { color: #215778; background: #dcebf4; }
.badge.ok { color: #0c5030; background: #dff0e7; }
.badge.pending { color: #704a09; background: #f8eac7; }
.review-panel { position: sticky; top: 92px; border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: white; }
.review-panel dl { display: grid; grid-template-columns: 100px 1fr; gap: 8px; font-size: .85rem; }
.review-panel dt { color: var(--muted); }
.review-panel dd { margin: 0; overflow-wrap: anywhere; }
.review-panel .button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.review-panel button { min-height: 38px; padding: 8px 12px; font-size: .82rem; }
.empty { padding: 50px 25px; color: var(--muted); text-align: center; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.audit-list { max-height: 220px; margin: 12px 0 20px; padding-left: 20px; overflow: auto; font-size: .8rem; }
.audit-list time { display: block; color: var(--muted); }

footer { padding: 30px 16px; color: #cbd7d0; background: var(--ink); font-size: .82rem; text-align: center; }

@media (max-width: 900px) {
  .grid-3, .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .path { grid-template-columns: 1fr; }
  .crm-layout { grid-template-columns: 1fr; }
  .review-panel { position: static; }
  .toolbar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .nav-links a:not(.button) { display: none; }
  .hero { min-height: 570px; }
  .hero-inner, .section { width: min(calc(100% - 24px), var(--max)); }
  .section { padding: 64px 0; }
  .grid-3, .metric-grid, .field-grid, .choice-grid, .toolbar, .invite-grid { grid-template-columns: 1fr; }
  .form-card { border-radius: 14px; }
  .admin-header { align-items: start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
