/* =========================================================
   Camp registration — styles
   Palette: eucalypt green primary, wattle ochre accent
   (non-text only), warm paper. Atkinson Hyperlegible Next throughout;
   hierarchy from weight + size, not a second family.
   ========================================================= */

:root {
  --paper:       #F5F6F1;  /* warm-cool pale paper */
  --card:        #FFFFFF;
  --ink:         #1E2A22;  /* dark eucalypt, near-black */
  --bark:        #6F6453;  /* muted secondary text */
  --forest:      #2E5340;  /* primary green */
  --forest-deep: #21402F;
  --wattle:      #D99A2B;  /* accent — non-text marks only */
  --line:        #DBD7CB;  /* warm border */
  --line-soft:   #ECEAE2;
  --err:         #A53A2C;
  --ridge-far:   #E4E7DD;
  --ridge-near:  #D3DAC9;

  --radius: 12px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(30,42,34,.05), 0 8px 28px rgba(30,42,34,.06);
  --focus: 0 0 0 3px rgba(217,154,43,.45);  /* wattle focus ring */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  min-height: 100dvh;
}

/* Ambient ridge line at the foot of the page — the one bush nod. */
.hills {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: clamp(90px, 16vh, 160px);
  z-index: 0;
  pointer-events: none;
}
.hills svg { width: 100%; height: 100%; display: block; }

.shell {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 1.5rem) 7rem;
}

/* ---------- Masthead ---------- */
.masthead { text-align: center; margin-bottom: 1.75rem; }
.eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--forest);
  margin: 0 0 .5rem;
}
.masthead h1 {
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.9rem, 5.6vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 .6rem;
  color: var(--ink);
}
.lede {
  margin: 0 auto;
  max-width: 44ch;
  color: var(--bark);
  font-size: 1.02rem;
}

/* ---------- Progress trail ---------- */
.trail { margin: 0 0 1.25rem; }
.trail-list {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .25rem;
  margin: 0; padding: 0;
  position: relative;
}
/* connecting line behind the dots */
.trail-list::before {
  content: "";
  position: absolute;
  top: 7px; left: 6%; right: 6%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.trail-step {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  text-align: center;
}
.dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--line);
  transition: background .2s, border-color .2s, transform .2s;
}
.trail-label {
  font-size: .72rem;
  color: var(--bark);
  font-weight: 500;
}
.trail-step.is-done .dot { background: var(--forest); border-color: var(--forest); }
.trail-step.is-current .dot {
  background: var(--wattle);
  border-color: var(--wattle);
  transform: scale(1.15);
}
.trail-step.is-current .trail-label { color: var(--ink); font-weight: 600; }

/* ---------- Card ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 4vw, 2.25rem);
}

.step { animation: fade .25s ease; }
.step[hidden] { display: none; }
.step-title {
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0 0 .5rem;
}
.step-intro { color: var(--bark); margin: 0 0 1.5rem; }
.step p { margin: 0 0 1rem; }

@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Info disclosures (welcome step) ---------- */
.info {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .25rem .9rem;
  margin: 0 0 .65rem;
  background: #FCFCFA;
}
.info summary {
  cursor: pointer;
  font-weight: 600;
  padding: .55rem 0;
  list-style: none;
}
.info summary::-webkit-details-marker { display: none; }
.info summary::before { content: "+ "; color: var(--forest); font-weight: 700; }
.info[open] summary::before { content: "– "; }
.info p { margin: 0 0 .75rem; color: var(--bark); }

/* ---------- Fields ---------- */
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .35rem;
}
.optional { font-weight: 400; color: var(--bark); font-size: .82rem; }

input, textarea, select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #FCFCFA;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .65rem .75rem;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, textarea:hover, select:hover { border-color: #C7C2B4; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: var(--focus);
}
textarea { resize: vertical; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

/* ---------- Repeating rows (persons / equipment) ---------- */
.rows { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1rem; }

.row {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .9rem;
  background: #FCFCFA;
  position: relative;
}
.row-grid-person {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .75rem 1rem;
  align-items: end;
}
.row-grid-equipment {
  display: grid;
  grid-template-columns: 1.4fr .8fr .8fr;
  gap: .75rem .75rem;
  align-items: end;
}
.row .field { margin-bottom: 0; }

/* under-21 tick */
.tick {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
  padding-bottom: .55rem;
}
.tick input {
  width: 1.15rem; height: 1.15rem;
  accent-color: var(--forest);
  flex: 0 0 auto;
}

.row-remove {
  grid-column: 1 / -1;
  justify-self: end;
  background: none;
  border: none;
  color: var(--err);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  padding: .15rem .25rem;
  margin-top: .15rem;
}
.row-remove:hover { text-decoration: underline; }
.row-remove:focus-visible { outline: 2px solid var(--err); outline-offset: 2px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: .7rem 1.2rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-deep); }

.btn-ghost { background: transparent; color: var(--forest); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--forest); }

.btn-add {
  background: transparent;
  color: var(--forest);
  border: 1.5px dashed var(--line);
  width: 100%;
  margin-bottom: 1.5rem;
}
.btn-add:hover { border-color: var(--forest); background: #FBFCFA; }

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
}

/* ---------- Review ---------- */
.review { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.review-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  background: #FCFCFA;
}
.review-block h3 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--forest);
  margin: 0 0 .6rem;
}
.review-block dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; }
.review-block dt { color: var(--bark); font-size: .9rem; }
.review-block dd { margin: 0; font-size: .95rem; }
.review-list { margin: 0; padding-left: 1.1rem; }
.review-list li { margin-bottom: .2rem; }
.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--forest-deep);
  background: #EAF0EA;
  border-radius: 999px;
  padding: .05rem .5rem;
  margin-left: .4rem;
}

/* ---------- Errors ---------- */
.error { color: var(--err); font-size: .82rem; margin: .35rem 0 0; min-height: 0; }
.error:empty { margin: 0; }
.form-error { text-align: right; }
input.invalid, textarea.invalid, select.invalid { border-color: var(--err); }

/* Turnstile spacing */
.cf-turnstile { margin: 0 0 1rem; }

/* ---------- Done ---------- */
.done { text-align: center; padding: 1.5rem 0; }

/* ---------- Footer ---------- */
.foot {
  text-align: center;
  margin-top: 1.25rem;
  color: var(--bark);
  font-size: .8rem;
}

/* ---------- Honeypot: visually gone, still in the DOM ---------- */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .row-grid-equipment { grid-template-columns: 1fr 1fr; }
  .row-grid-equipment .field:first-child { grid-column: 1 / -1; }
  .trail-label { display: none; }       /* keep dots, drop labels on small screens */
  .trail-step.is-current .trail-label {
    display: block;
    position: absolute;
    top: 1.4rem;
    white-space: nowrap;
  }
  .actions { flex-direction: column-reverse; }
  .actions .btn { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
