:root {
  --evergreen: #183f2b;
  --evergreen-dark: #10281d;
  --moss: #4f7f44;
  --moss-soft: #e6f1dd;
  --cedar: #76533b;
  --sand: #f4efe5;
  --paper: #fffaf0;
  --ink: #1e241f;
  --muted: #667065;
  --line: #d8cdbc;
  --warning: #8a4f14;
  --danger: #8a2f1f;
  --danger-bg: #fff4df;
  --shadow: 0 20px 50px rgba(31, 36, 31, 0.14);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(24, 63, 43, 0.95), rgba(16, 40, 29, 0.84)),
    linear-gradient(90deg, rgba(255, 250, 240, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(255, 250, 240, 0.055) 1px, transparent 1px),
    var(--evergreen-dark);
  background-size: auto, 48px 48px, 48px 48px, auto;
  color: var(--ink);
  font-family: inherit;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.site-header,
.hero-inner,
.trust-strip,
.application-shell {
  width: min(1160px, calc(100% - 28px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 0 10px;
  color: var(--paper);
}

.brand,
.header-call,
.primary-cta {
  color: inherit;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.header-call {
  color: #d9e89e;
  font-weight: 900;
  white-space: nowrap;
}

.hero {
  padding: 28px 0 22px;
  color: var(--paper);
}

.hero-inner {
  display: grid;
  gap: 18px;
}

.eyebrow,
.form-intro .eyebrow {
  margin: 0 0 8px;
  color: #d9e89e;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
label,
legend,
li,
button,
a {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 780px;
  margin: 0;
  color: var(--paper);
  font-size: clamp(2.35rem, 10vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.subheadline {
  max-width: 700px;
  margin: 0;
  color: var(--paper);
  font-size: clamp(1.16rem, 4vw, 1.7rem);
  font-weight: 850;
}

.hero-copy {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 250, 240, 0.84);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.benefit-grid {
  display: grid;
  gap: 9px;
  max-width: 780px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.benefit-grid li,
.trust-strip span,
.notice,
.safety {
  border: 1px solid rgba(255, 250, 240, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.1);
  color: var(--paper);
}

.benefit-grid li {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 11px 14px;
  font-weight: 850;
}

.primary-cta,
.primary-btn,
.secondary-btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: var(--radius);
  padding: 13px 18px;
  border: 1px solid transparent;
  font-weight: 900;
}

.primary-cta,
.primary-btn {
  width: fit-content;
  background: var(--evergreen);
  color: var(--paper);
  border-color: rgba(255, 250, 240, 0.15);
}

.hero .primary-cta {
  background: var(--paper);
  color: var(--evergreen-dark);
}

.primary-cta:hover,
.primary-btn:hover {
  background: #0d2f21;
}

.hero .primary-cta:hover {
  background: #f5eddc;
}

.founding-note {
  max-width: 690px;
  margin: 0;
  color: rgba(255, 250, 240, 0.78);
}

.trust-strip {
  display: grid;
  gap: 10px;
  padding: 0 0 16px;
}

.trust-strip span {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 11px 13px;
  color: rgba(255, 250, 240, 0.92);
  font-weight: 850;
}

.application-shell {
  padding: 0 0 34px;
}

.form-intro {
  color: var(--paper);
  padding: 8px 0 16px;
}

.form-intro h2 {
  max-width: 720px;
  margin: 0;
  color: var(--paper);
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.form-intro p:last-child {
  max-width: 680px;
  margin: 14px 0 0;
  color: rgba(255, 250, 240, 0.82);
  font-size: 1rem;
}

.progress-wrap,
.membership-form,
.confirmation {
  border: 1px solid rgba(255, 250, 240, 0.64);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.96);
  box-shadow: var(--shadow);
}

.progress-wrap {
  margin: 0 0 16px;
  padding: 16px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 900;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3dacb;
}

.progress-bar {
  width: 11%;
  height: 100%;
  border-radius: inherit;
  background: var(--moss);
  transition: width 220ms ease;
}

.membership-form {
  padding: clamp(16px, 4vw, 28px);
}

.form-step {
  display: none;
  animation: fadeUp 180ms ease both;
}

.form-step.is-active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h3 {
  margin: 0 0 20px;
  color: var(--evergreen-dark);
  font-size: clamp(1.55rem, 6vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

label,
legend {
  color: var(--evergreen-dark);
  font-weight: 850;
}

label span,
legend span {
  color: var(--danger);
}

fieldset {
  min-width: 0;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

input:not([type="radio"]):not([type="checkbox"]),
textarea {
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  color: var(--ink);
  padding: 14px 15px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus,
.choice-stack label:has(input:focus-visible),
.choice-row label:has(input:focus-visible),
.scale label:has(input:focus-visible),
.upload-zone:has(input:focus-visible) {
  border-color: var(--moss);
  box-shadow: 0 0 0 4px rgba(79, 127, 68, 0.18);
}

.field-grid,
.city-grid {
  display: grid;
  gap: 14px;
}

.choice-row,
.choice-stack,
.scale {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.choice-row,
.scale {
  grid-template-columns: 1fr;
}

.choice-row label,
.choice-stack label,
.scale label {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  color: var(--ink);
  padding: 13px 14px;
  cursor: pointer;
}

.choice-row label:has(input:checked),
.choice-stack label:has(input:checked),
.scale label:has(input:checked) {
  border-color: var(--moss);
  background: var(--moss-soft);
  color: var(--evergreen-dark);
}

input[type="radio"],
input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  accent-color: var(--moss);
}

.conditional,
.conditional-block {
  display: none;
  margin-top: 16px;
}

.conditional.is-visible,
.conditional-block.is-visible {
  display: block;
}

.scale label {
  min-height: 76px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.scale span {
  color: var(--evergreen-dark);
  font-size: 1.25rem;
  font-weight: 900;
}

.scale small,
.field-help,
.upload-zone small {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.notice,
.safety {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0 0;
  padding: 14px;
  background: var(--danger-bg);
  color: var(--warning);
  line-height: 1.55;
  font-weight: 750;
}

.notice::before,
.safety::before {
  content: "○";
  flex: 0 0 auto;
  color: var(--warning);
}

.upload-zone {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 180px;
  margin-top: 12px;
  padding: 20px;
  border: 1px dashed var(--cedar);
  border-radius: var(--radius);
  background: #fffdf8;
  text-align: center;
  cursor: pointer;
}

.upload-zone span {
  color: var(--evergreen-dark);
  font-size: 1.12rem;
  font-weight: 900;
}

.upload-zone input {
  width: min(100%, 24rem);
}

.photo-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.photo-list div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  color: var(--muted);
  padding: 10px 12px;
  font-weight: 750;
}

.form-error {
  margin-top: 16px;
  border: 1px solid rgba(138, 47, 31, 0.35);
  border-radius: var(--radius);
  background: #fff1e8;
  color: var(--danger);
  padding: 12px 14px;
  font-weight: 900;
}

.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px -16px -16px;
  padding: 12px 16px;
  border-top: 1px solid rgba(216, 205, 188, 0.85);
  background: rgba(255, 250, 240, 0.96);
  backdrop-filter: blur(12px);
}

.secondary-btn {
  border-color: var(--line);
  background: #fffdf8;
  color: var(--muted);
}

.submit-btn {
  display: none;
  grid-column: 1 / -1;
}

.submit-btn.is-visible {
  display: inline-flex;
}

.confirmation {
  position: relative;
  width: min(920px, 100%);
  margin: 0 auto;
  overflow: hidden;
  padding: clamp(28px, 6vw, 58px);
  border-color: rgba(217, 232, 158, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.98), rgba(244, 239, 229, 0.94)),
    var(--paper);
}

.confirmation::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 9px;
  background: linear-gradient(90deg, var(--moss), #d9e89e, var(--cedar));
}

.confirmation-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(22px, 4vw, 34px);
  color: var(--evergreen-dark);
  font-weight: 950;
}

.confirmation-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.confirmation-check {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--evergreen);
  color: var(--paper);
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(24, 63, 43, 0.22);
}

.confirmation h2 {
  max-width: 760px;
  margin: 0;
  color: var(--evergreen-dark);
  font-size: clamp(2.15rem, 7vw, 4.7rem);
  line-height: 0.98;
}

.confirmation p {
  margin: 0;
  color: var(--muted);
}

.confirmation-kicker {
  color: var(--moss) !important;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.confirmation-lead {
  max-width: 720px;
  margin-top: 16px !important;
  color: var(--evergreen-dark) !important;
  font-size: clamp(1.08rem, 2.2vw, 1.32rem);
  font-weight: 760;
}

.confirmation-next {
  display: grid;
  gap: 12px;
  margin: 28px 0 8px;
}

.confirmation-next div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
}

.confirmation-next span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--moss-soft);
  color: var(--evergreen);
  font-size: 0.82rem;
  font-weight: 950;
}

.confirmation-next strong {
  display: block;
  margin-bottom: 2px;
  color: var(--evergreen-dark);
}

.confirmation .primary-cta {
  margin-top: 24px;
  background: var(--evergreen);
  color: var(--paper);
}

footer {
  width: min(1160px, calc(100% - 28px));
  margin: 0 auto;
  padding: 0 0 34px;
  color: rgba(255, 250, 240, 0.72);
  text-align: center;
  font-size: 0.9rem;
}

body.submission-complete .hero,
body.submission-complete .trust-strip {
  display: none;
}

body.submission-complete .application-shell {
  padding-top: clamp(24px, 5vw, 54px);
}

.is-invalid {
  border-color: var(--danger) !important;
}

@media (min-width: 620px) {
  .benefit-grid,
  .trust-strip,
  .field-grid,
  .choice-stack.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .city-grid {
    grid-template-columns: 1.4fr 0.7fr 0.9fr;
  }

  .choice-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scale {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .scale label {
    flex-direction: column;
    gap: 4px;
  }
}

@media (min-width: 900px) {
  .site-header {
    padding-top: 28px;
  }

  .hero {
    padding-top: 42px;
    padding-bottom: 28px;
  }

  .benefit-grid,
  .trust-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .application-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }

  .form-intro {
    grid-column: 1 / -1;
  }

  .progress-wrap {
    position: sticky;
    top: 18px;
    margin: 0;
  }

  .membership-form,
  .confirmation {
    min-width: 0;
  }

  .confirmation {
    grid-column: 1 / -1;
  }

  .application-shell.is-submitted {
    display: block;
    padding-top: 22px;
    padding-bottom: 64px;
  }

  .form-actions {
    margin: 24px 0 0;
    padding: 0;
    position: static;
    border-top: 0;
    background: transparent;
    backdrop-filter: none;
  }
}
