/* Styles for the workshop safety acknowledgement page (/safety-waiver/). */

.waiver-hero {
  padding: 66px 0 58px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.waiver-hero h1 {
  max-width: 15ch;
  margin-bottom: 22px;
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.waiver-lede {
  max-width: 62ch;
  margin: 0 0 26px;
  color: #4b574f;
  font-size: 17px;
  line-height: 1.68;
}
.waiver-callout {
  max-width: 68ch;
  margin: 0;
  padding: 18px 22px;
  border-left: 3px solid var(--clay);
  background: var(--white);
  color: var(--forest-deep);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
}

.waiver-section { padding: 62px 0 88px; }
.waiver-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr);
  gap: 52px;
  align-items: start;
}

/* Current-page marker. Only this page loads waiver.css, so the homepage nav
   is untouched. The desktop hover underline is simply held open; on mobile,
   where styles.css hides that underline, the colour carries the state.
   A shade darker than --clay, which is only 4.2:1 here and misses AA. */
.site-nav > a[aria-current="page"] { color: #9c563c; }
.site-nav > a[aria-current="page"]::after { right: 0; background: #9c563c; }
.site-footer nav a[aria-current="page"] { color: var(--white); }

/* ---- form shell ---- */
.waiver-form {
  padding: 40px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}
.waiver-fieldset {
  margin: 0 0 34px;
  padding: 0 0 30px;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.waiver-fieldset:last-of-type { margin-bottom: 8px; padding-bottom: 0; border-bottom: 0; }
.waiver-fieldset > legend {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 20px;
  padding: 0;
  color: var(--forest-deep);
  font-family: var(--serif);
  font-size: 25px;
}
.legend-step {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--white);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 800;
}
.req { color: var(--clay); font-weight: 800; text-decoration: none; border: 0; }
/* styles.css sets .form-help to #869088, which is only 3.2:1 on this page's
   light background. --muted is the same palette and clears AA at 5:1.
   Scoped here so the homepage keeps its own styling. */
.waiver-form .form-help { color: var(--muted); }

.field-help {
  max-width: 68ch;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.stack-label { display: block; margin-bottom: 16px; }
.stack-label > span,
.choice-group > legend {
  display: block;
  margin: 0 0 7px;
  color: #4b584f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---- radio + checkbox groups ---- */
.choice-group {
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}
.choice-group > legend { padding: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px 14px; }

.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.choice-row .choice {
  flex: 0 1 auto;
  align-items: center;
  min-height: 48px;
  padding: 8px 18px 8px 14px;
  border: 1px solid rgba(38, 56, 45, .28);
  background: rgba(255, 255, 255, .72);
}
.choice-row .choice:hover { border-color: var(--moss); }
.choice-row .choice > span { font-size: 14px; font-weight: 700; }

.choice-block {
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid rgba(38, 56, 45, .18);
  background: var(--paper);
}
.choice-block:hover { border-color: var(--moss); }
.choice-block > span { font-size: 14.5px; line-height: 1.6; color: #35423a; }
.choice-note {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.waiver-form input[type="checkbox"],
.waiver-form input[type="radio"] {
  flex: 0 0 auto;
  width: 22px;
  min-width: 22px;
  height: 22px;
  margin: 1px 0 0;
  padding: 0;
  appearance: auto;
  -webkit-appearance: auto;
  accent-color: #26382d;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  cursor: pointer;
}
.waiver-form input[type="radio"] { border-radius: 50%; }
.choice-row .choice > input { margin-top: 0; }

/* The hidden attribute must win over .button's display, so it is enforced here. */
.waiver-main [hidden] { display: none !important; }

/* Fieldsets default to min-inline-size: min-content, which would widen the
   grid track and scroll the page sideways on narrow screens. */
.waiver-form,
.waiver-fieldset,
.choice-group,
.child-row { min-inline-size: 0; }

/* ---- adult / children flow blocks ---- */
.flow-block {
  margin-top: 22px;
  padding: 20px 20px 8px;
  border: 1px dashed rgba(169, 95, 67, .5);
  background: rgba(197, 155, 88, .07);
}
.flow-block > .form-grid:last-child,
.flow-block > .choice-block:last-child { margin-bottom: 12px; }
.flow-subsection { margin-bottom: 24px; }
.flow-subsection:last-of-type { margin-bottom: 18px; }
.subsection-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  color: var(--forest-deep);
}

/* ---- repeatable children rows ---- */
.children-list { display: grid; gap: 14px; margin: 0 0 14px; }
.child-row {
  margin: 0;
  padding: 14px 16px 16px;
  border: 1px solid rgba(38, 56, 45, .18);
  background: var(--white);
}
.child-row > legend {
  padding: 0 7px;
  margin-left: -7px;
  color: #4b584f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.child-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px auto;
  gap: 13px;
  align-items: end;
}
.child-grid label > span {
  display: block;
  margin: 0 0 7px;
  color: #4b584f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.add-child,
.remove-child {
  min-height: 48px;
  padding: 12px 20px;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

/* ---- read-only date signed ---- */
.readonly-field {
  background: var(--fern);
  color: #35423a;
  cursor: default;
}
.field-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

/* ---- agreement ---- */
.agreement {
  margin: 0 0 30px;
  padding: 22px 24px;
  border-left: 3px solid var(--moss);
  background: var(--cream);
}
.agreement p { margin: 0 0 12px; color: var(--forest-deep); font-family: var(--serif); font-size: 16.5px; line-height: 1.62; }
.agreement p:last-child { margin-bottom: 0; }
.agreement-intro {
  font-family: var(--sans) !important;
  font-size: 10px !important;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #4b584f !important;
}

/* ---- signature pad ---- */
.signature-block { margin-bottom: 28px; }
.signature-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.signature-head h2 { margin: 0; font-size: 22px; }
.clear-signature {
  min-height: 44px;
  padding: 9px 18px;
  font-size: 11px;
  cursor: pointer;
}
.signature-pad {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  min-height: 170px;
  border: 2px solid var(--forest);
  background: var(--white);
  overflow: hidden;
}
.signature-pad canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.signature-baseline {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 26%;
  height: 1px;
  background: rgba(38, 56, 45, .32);
  pointer-events: none;
}
.signature-placeholder {
  position: absolute;
  left: 6%;
  bottom: calc(26% + 10px);
  color: #9ba29d;
  font-family: var(--serif);
  font-size: 17px;
  pointer-events: none;
}
.signature-block.has-signature .signature-placeholder { display: none; }
.signature-block.is-invalid .signature-pad { border-color: #9d2f22; }
.field-error {
  margin: 10px 0 0;
  color: #9d2f22;
  font-size: 13px;
  font-weight: 700;
}
.signature-details { margin-top: 26px; }

/* ---- status ---- */
.form-status:empty { margin-top: 0; }
.form-status {
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
}
.form-status.is-success {
  margin-top: 16px;
  padding: 16px 18px;
  border-left: 3px solid var(--moss);
  background: var(--fern);
  color: var(--forest-deep);
}
.form-status.is-error {
  margin-top: 16px;
  padding: 16px 18px;
  border-left: 3px solid #9d2f22;
  background: rgba(157, 47, 34, .08);
  color: #7d251b;
}

/* ---- aside ---- */
.waiver-aside {
  position: sticky;
  top: 110px;
  padding: 32px 30px 34px;
  background: var(--forest-deep);
  color: #d7ddd5;
}
.waiver-aside h2 { margin: 0 0 14px; color: var(--white); font-size: 26px; }
.waiver-aside p { margin: 0; color: #bfc8be; font-size: 14.5px; line-height: 1.65; }
.waiver-aside .direct-contact { margin-top: 26px; }

@media (max-width: 980px) {
  .waiver-shell { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .waiver-aside { position: static; }
}

@media (max-width: 720px) {
  .waiver-hero { padding: 46px 0 42px; }
  .waiver-hero h1 { font-size: clamp(33px, 9vw, 46px); }
  .waiver-lede { font-size: 16px; }
  .waiver-callout { padding: 16px 18px; font-size: 16px; }
  .waiver-section { padding: 44px 0 64px; }
  .waiver-form { padding: 26px 18px 30px; }
  .waiver-fieldset > legend { font-size: 21px; }
  .choice-row { flex-direction: column; align-items: stretch; }
  .signature-pad { aspect-ratio: 2 / 1; min-height: 190px; }
  .signature-head { justify-content: flex-start; }
  .waiver-aside { padding: 26px 20px 28px; }
}

@media (max-width: 720px) {
  .child-grid { grid-template-columns: 1fr; }
  .child-grid > label:nth-child(2) { max-width: 140px; }
  .add-child,
  .remove-child { width: 100%; }
  .flow-block { padding: 16px 15px 6px; }
}
