/* ==========================================================================
   Rivertown Lacrosse
   Tone per Handoff Doc 11.1: warm, community-friendly, inclusive, low-pressure.
   Nothing here should read as competitive, exclusive, or "elite".
   ========================================================================== */

:root {
  --brand: #1f7a5a;
  --brand-deep: #145240;
  --brand-soft: #e7f4ee;
  --accent: #e0803a;
  --accent-soft: #fdf1e6;

  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #1e2420;
  --ink-soft: #5c6862;
  --line: #ddd9d1;

  --ok-bg: #e7f4ee;
  --ok-line: #1f7a5a;
  --warn-bg: #fdf3e3;
  --warn-line: #c9821f;
  --err-bg: #fdecec;
  --err-line: #c0392b;
  --err-ink: #92241a;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 40, 30, .05), 0 6px 20px rgba(20, 40, 30, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #4bbd90;
    --brand-deep: #7ad4ae;
    --brand-soft: #17302a;
    --accent: #f0a065;
    --accent-soft: #33241a;

    --bg: #121614;
    --surface: #1a201d;
    --surface-2: #232a26;
    --ink: #e8ede9;
    --ink-soft: #a3b0aa;
    --line: #333d38;

    --ok-bg: #16302a;
    --ok-line: #4bbd90;
    --warn-bg: #33280f;
    --warn-line: #e0a94a;
    --err-bg: #351a18;
    --err-line: #e4796c;
    --err-ink: #f3b4ac;

    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
a { color: var(--brand); }
a:hover { color: var(--brand-deep); }
img { max-width: 100%; height: auto; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 760px; }

/* -------------------------------------------------------------- skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------------- nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.25rem; max-width: var(--maxw); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.brand svg { flex: none; }
.nav-links { display: flex; gap: 1.25rem; margin-left: auto; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-size: .95rem; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--brand); }
@media (max-width: 720px) {
  .nav { flex-wrap: wrap; gap: .5rem; }
  .nav-links { width: 100%; margin-left: 0; gap: 1rem; overflow-x: auto; padding-bottom: .25rem; }
  .nav-links a { white-space: nowrap; }
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: 999px;
  padding: .8rem 1.6rem; font: inherit; font-weight: 600; text-decoration: none;
  background: var(--brand); color: #fff; cursor: pointer; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); color: var(--brand-deep); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { padding: .45rem 1rem; font-size: .9rem; }
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

/* ------------------------------------------------------------------ hero */
.hero { padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero-eyebrow {
  display: inline-block; background: var(--brand-soft); color: var(--brand-deep);
  padding: .3rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 700;
  letter-spacing: .02em; margin-bottom: 1.2rem;
}
.hero h1 { max-width: 16ch; }
.hero .lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--ink-soft); max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; align-items: center; }
.hero-note { font-size: .9rem; color: var(--ink-soft); }

/* --------------------------------------------------------------- section */
.section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ----------------------------------------------------------------- cards */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; display: flex; align-items: center; gap: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  flex: none; width: 2.1rem; height: 2.1rem; border-radius: 8px; background: var(--brand-soft);
  color: var(--brand-deep); display: grid; place-items: center; font-size: 1.1rem;
}

/* -------------------------------------------------------------- callouts */
.callout {
  border-left: 4px solid var(--brand); background: var(--brand-soft);
  padding: 1rem 1.25rem; border-radius: 0 8px 8px 0; margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout-ok   { border-color: var(--ok-line);   background: var(--ok-bg); }
.callout-warn { border-color: var(--warn-line); background: var(--warn-bg); }
.callout-err  { border-color: var(--err-line);  background: var(--err-bg); }

/* Site-wide preview banner shown until the attorney clears the waiver. */
.preview-banner {
  background: var(--warn-bg); border-bottom: 1px solid var(--warn-line);
  color: var(--ink); padding: .7rem 1.25rem; text-align: center; font-size: .93rem;
}
.preview-banner strong { color: var(--warn-line); }

/* ------------------------------------------------------------------ list */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 1.9rem; margin-bottom: .7rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: .95rem; height: .5rem;
  border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand);
  transform: rotate(-45deg);
}
.crosslist li::before {
  content: "\00d7"; border: 0; transform: none; color: var(--ink-soft);
  font-size: 1.3rem; line-height: 1; top: .1em;
}

/* ------------------------------------------------------------------- faq */
details.faq {
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  margin-bottom: .75rem; overflow: hidden;
}
details.faq summary {
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); flex: none; line-height: 1; }
details.faq[open] summary::after { content: "\2212"; }
details.faq .faq-body { padding: 0 1.25rem 1.1rem; color: var(--ink-soft); }
details.faq .faq-body p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ form */
.form-shell { max-width: 780px; margin: 0 auto; }
.steps { display: flex; gap: .35rem; margin: 0 0 2rem; padding: 0; list-style: none; flex-wrap: wrap; }
.steps li {
  flex: 1 1 120px; font-size: .8rem; font-weight: 600; color: var(--ink-soft);
  padding-top: .6rem; border-top: 4px solid var(--line); transition: color .2s, border-color .2s;
}
.steps li[data-state="active"] { color: var(--brand); border-top-color: var(--brand); }
.steps li[data-state="done"] { color: var(--ink-soft); border-top-color: var(--brand); }

fieldset { border: 0; margin: 0 0 2rem; padding: 0; }
legend { font-size: 1.3rem; font-weight: 700; padding: 0; margin-bottom: .3rem; }
.field { margin-bottom: 1.15rem; }
.field label, .field .label {
  display: block; font-weight: 600; font-size: .93rem; margin-bottom: .35rem;
}
.field .hint { display: block; font-weight: 400; color: var(--ink-soft); font-size: .85rem; margin-top: .15rem; }
.req { color: var(--err-line); font-weight: 700; }
.optional { color: var(--ink-soft); font-weight: 400; font-size: .85rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="search"], select, textarea {
  width: 100%; padding: .65rem .8rem; font: inherit; font-size: 1rem;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { min-height: 5rem; resize: vertical; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--err-line); }
.field-error { color: var(--err-ink); font-size: .87rem; font-weight: 600; margin-top: .3rem; display: none; }
.field.has-error .field-error { display: block; }

.check {
  display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .85rem;
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  cursor: pointer;
}
.check:hover { border-color: var(--brand); }
.check input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--brand); }
.check span { font-size: .95rem; }
.check.has-error { border-color: var(--err-line); background: var(--err-bg); }

/* ------------------------------------------------------------- child card */
.child-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 1.4rem; margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.child-card-head {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1.1rem;
  padding-bottom: .75rem; border-bottom: 1px solid var(--line);
}
.child-card-head h3 { margin: 0; font-size: 1.15rem; }
.child-num {
  flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--brand);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
.child-remove { margin-left: auto; }
.child-age-note { font-size: .87rem; color: var(--brand-deep); font-weight: 600; margin-top: .3rem; }

/* --------------------------------------------------------------- waiver */
.waiver-doc {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 1.5rem; max-height: 30rem; overflow-y: auto; margin-bottom: 1rem;
  font-size: .95rem; line-height: 1.7;
}
.waiver-doc h3 { font-size: 1.05rem; margin-top: 1.6rem; }
.waiver-doc h3:first-child { margin-top: 0; }
.waiver-doc p { white-space: pre-wrap; }

/* Fla. Stat. 744.301(3) requires this notice in uppercase, set apart, and in
   type at least 5 POINTS larger than the surrounding text.
   Surrounding waiver body is .95rem = 15.2px. 5pt ~= 6.67px at 96dpi, so the
   notice must be at least ~21.9px. 1.55rem = 24.8px leaves ~7.2pt of headroom.
   DO NOT SHRINK THIS without recomputing against .waiver-doc's font-size. */
.waiver-statutory-notice {
  border: 3px solid var(--ink); border-radius: 8px; padding: 1.25rem;
  margin-bottom: 1.5rem; background: var(--surface-2);
  font-size: 1.55rem; line-height: 1.45; font-weight: 700; text-transform: uppercase;
  white-space: pre-wrap;
}
.waiver-release-section {
  border: 2px solid var(--brand); border-radius: 8px; padding: 1rem 1.25rem;
  background: var(--brand-soft); margin: 1.5rem 0;
}
.waiver-scroll-note { font-size: .87rem; color: var(--ink-soft); margin-bottom: 1.25rem; }

.sig-pad-wrap { margin-bottom: 1rem; }
.sig-pad {
  width: 100%; height: 190px; border: 2px dashed var(--line); border-radius: 8px;
  background: #fff; touch-action: none; cursor: crosshair; display: block;
}
.sig-pad.signed { border-style: solid; border-color: var(--brand); }
.sig-pad-actions { display: flex; align-items: center; gap: 1rem; margin-top: .5rem; flex-wrap: wrap; }
.sig-pad-actions .hint { color: var(--ink-soft); font-size: .85rem; }

/* --------------------------------------------------------------- review */
.review-block { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 1.25rem; margin-bottom: 1rem; }
.review-block h3 { margin-top: 0; font-size: 1.05rem; display: flex; align-items: center; gap: .6rem; }
.review-block dl { display: grid; grid-template-columns: minmax(130px, auto) 1fr; gap: .4rem 1rem; margin: 0; font-size: .93rem; }
.review-block dt { color: var(--ink-soft); }
.review-block dd { margin: 0; }

/* ------------------------------------------------------------------- nav */
.form-nav { display: flex; gap: .75rem; align-items: center; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.form-nav .spacer { margin-left: auto; }

.error-summary { display: none; }
.error-summary[data-visible="true"] { display: block; }
.error-summary ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.error-summary a { color: var(--err-ink); }

/* ------------------------------------------------------------------ misc */
.stick-guide { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stick-guide figure { margin: 0; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.stick-guide figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: .5rem; }
.stick-guide strong { display: block; color: var(--ink); font-size: 1.05rem; }

.site-footer { background: var(--surface-2); border-top: 1px solid var(--line); padding: 2.5rem 0; margin-top: 3rem; font-size: .92rem; color: var(--ink-soft); }
.site-footer a { color: var(--brand); }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer-grid h4 { color: var(--ink); font-size: .95rem; margin-bottom: .5rem; }
.footer-bottom { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .85rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.confirm-code {
  font-size: 1.6rem; font-weight: 800; letter-spacing: .05em; color: var(--brand-deep);
  background: var(--brand-soft); padding: .5rem 1rem; border-radius: 8px; display: inline-block;
}

@media print {
  .site-header, .site-footer, .form-nav, .no-print, .preview-banner { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .waiver-doc { max-height: none; overflow: visible; border: 0; padding: 0; }
}
