/* ─────────────────────────────────────────────────────────────────────────────
   Wurk — stylesheet

   Conventions:
   · All colour, and only colour, comes from the custom properties in :root.
   · Class names are kebab-case and grouped by the section they belong to.
   · Component styles live under the section banner comments below; add new
     components to the matching section rather than at the end of the file.
   ───────────────────────────────────────────────────────────────────────────── */

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

:root {
  --green-dark: #1e3d2b;
  --green-mid: #2d5a3d;
  --green-bright: #3a7d52;
  --green-light: #c8e6d0;
  --yellow: #f5c842;
  --cream: #f9f5ee;
  --white: #ffffff;
  --text-dark: #1a2e20;
  --text-muted: #4a6355;
  --danger: #a5321f;
  --danger-tint: rgba(165, 50, 31, 0.1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
}

/* Every interactive element gets the same visible keyboard focus ring. */
:focus-visible {
  outline: 3px solid var(--green-bright);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Available to screen readers, invisible on screen. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 200;
  background: var(--green-dark);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
  transition: top 0.15s;
}

.skip-link:focus { top: 0; }

/* ── NAV ──────────────────────────────────────────────────────────────────── */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(249, 245, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(30, 61, 43, 0.08);
}

.nav-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--green-dark);
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--yellow); }

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--green-dark); }

/* ── HERO ─────────────────────────────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(58, 125, 82, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%; left: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(245, 200, 66, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-logo {
  height: 72px;
  width: auto;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s ease both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s ease both;
}

.hero-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--green-bright);
  border-radius: 50%;
}

.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1;
  color: var(--green-dark);
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero-title em {
  font-style: normal;
  color: var(--green-bright);
  position: relative;
}

.hero-title em::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 0; right: 0;
  height: 4px;
  background: var(--yellow);
  border-radius: 2px;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 3rem;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.6s 0.3s ease both;
}

.hero-note {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  animation: fadeUp 0.6s 0.4s ease both;
}

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--green-dark);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(30, 61, 43, 0.25);
}

.btn-primary:hover { box-shadow: 0 8px 30px rgba(30, 61, 43, 0.35); }

.btn-secondary {
  background: var(--yellow);
  color: var(--green-dark);
  box-shadow: 0 4px 20px rgba(245, 200, 66, 0.3);
}

.btn-secondary:hover { box-shadow: 0 8px 30px rgba(245, 200, 66, 0.45); }

.btn-submit {
  display: block;
  width: 100%;
  padding: 1rem;
  margin-top: 1.5rem;
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(30, 61, 43, 0.3);
}

.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── SECTIONS ─────────────────────────────────────────────────────────────── */

.section {
  padding: 5rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-bright);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--green-dark);
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  line-height: 1.1;
}

.divider {
  height: 1px;
  background: rgba(30, 61, 43, 0.08);
  max-width: 1000px;
  margin: 0 auto;
}

/* ── HOW IT WORKS ─────────────────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.step {
  background: var(--white);
  border-radius: 1.5rem;
  padding: 2rem;
  border: 1px solid rgba(30, 61, 43, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(30, 61, 43, 0.1);
}

.step-num {
  font-family: 'Fraunces', serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--green-light);
  line-height: 1;
  margin-bottom: 1rem;
}

.step h3 { font-size: 1.1rem; font-weight: 500; color: var(--green-dark); margin-bottom: 0.5rem; }
.step p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* ── JOBS ─────────────────────────────────────────────────────────────────── */

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.job-card {
  background: var(--white);
  border: 1px solid rgba(30, 61, 43, 0.08);
  border-radius: 1.25rem;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.job-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(30, 61, 43, 0.1);
}

.job-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.job-name { font-size: 0.95rem; font-weight: 500; color: var(--green-dark); margin-bottom: 0.25rem; }
.job-rate { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 700; color: var(--green-bright); }
.job-detail { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── CTA SPLIT ────────────────────────────────────────────────────────────── */

.cta-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.cta-card {
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cta-card.dark { background: var(--green-dark); color: var(--white); }
.cta-card.light { background: var(--yellow); color: var(--green-dark); }

.cta-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.cta-card p { font-size: 0.9rem; line-height: 1.6; opacity: 0.85; }
.cta-card .btn { align-self: flex-start; margin-top: 0.5rem; }
.cta-card.dark .btn { background: var(--yellow); color: var(--green-dark); }
.cta-card.light .btn { background: var(--green-dark); color: var(--white); }

/* ── TRUST ────────────────────────────────────────────────────────────────── */

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  list-style: none;
}

.trust-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid rgba(30, 61, 43, 0.1);
  border-radius: 999px;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-dark);
}

.trust-pill::before { content: '✓'; color: var(--green-bright); font-weight: 700; }

/* ── FORMS ────────────────────────────────────────────────────────────────── */

#homeowner-form, #worker-form { scroll-margin-top: 80px; }

.form-card {
  background: var(--white);
  border: 1px solid rgba(30, 61, 43, 0.08);
  border-radius: 1.5rem;
  padding: 2.5rem;
}

.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--green-dark);
  margin-bottom: 0.4rem;
}

/* Grouped controls use fieldset/legend so the group name is announced with
   each option; the legend is styled to match .form-label exactly. */
.form-fieldset { border: 0; margin-bottom: 1.25rem; }

.form-legend {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--green-dark);
  margin-bottom: 0.4rem;
  padding: 0;
}

.required { color: var(--green-bright); }

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(30, 61, 43, 0.15);
  border-radius: 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  border-color: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(58, 125, 82, 0.12);
  background: var(--white);
  outline: none;
}

.form-input[aria-invalid='true'] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-tint);
}

select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field-error {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 0.3rem;
  display: none;
}

.field-error.show { display: block; }

/* Submission-level failures, distinct from per-field errors. */
.form-banner {
  display: none;
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1px solid var(--danger);
  background: var(--danger-tint);
  color: var(--danger);
}

.form-banner.show { display: block; }

.form-banner.notice {
  border-color: rgba(30, 61, 43, 0.2);
  background: var(--green-light);
  color: var(--green-dark);
}

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.check-group, .radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.radio-group.inline { flex-direction: row; flex-wrap: wrap; gap: 0.75rem 1.5rem; }

.check-item, .radio-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.925rem;
  color: var(--text-dark);
  cursor: pointer;
}

.check-item input, .radio-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--green-bright);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── AVAILABILITY TOGGLES ─────────────────────────────────────────────────── */

.avail-days {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.avail-day-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avail-day-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green-dark);
  width: 2.75rem;
  flex-shrink: 0;
}

.avail-slots {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.avail-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.avail-toggle input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.avail-toggle span {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1.5px solid rgba(30, 61, 43, 0.2);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--white);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
}

.avail-toggle input:checked + span {
  background: var(--green-dark);
  color: var(--white);
  border-color: var(--green-dark);
}

.avail-toggle:hover span { border-color: var(--green-bright); }

/* The pills hide the real checkbox, so focus has to be drawn on the pill. */
.avail-toggle input:focus-visible + span {
  outline: 3px solid var(--green-bright);
  outline-offset: 2px;
}

/* ── MINI CALENDAR ────────────────────────────────────────────────────────── */

.cal-wrapper {
  border: 1px solid rgba(30, 61, 43, 0.12);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-top: 0.25rem;
  max-width: 320px;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: var(--cream);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-dark);
}

.cal-nav {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--green-dark);
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
  line-height: 1;
}

.cal-nav:hover { background: rgba(30, 61, 43, 0.08); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0.5rem;
}

.cal-dow {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.2rem 0 0.35rem;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.82rem;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text-dark);
  font-family: 'DM Sans', sans-serif;
  transition: background 0.12s, color 0.12s;
}

.cal-day:hover:not(:disabled):not(.empty) { background: var(--green-light); color: var(--green-dark); }
.cal-day[aria-pressed='true'] { background: var(--green-dark); color: var(--white); }
.cal-day:disabled { color: rgba(30, 61, 43, 0.25); cursor: not-allowed; }
.cal-day.empty { cursor: default; pointer-events: none; }

.cal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.cal-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.65rem;
  background: var(--green-dark);
  color: var(--white);
  border-radius: 999px;
  font-size: 0.78rem;
}

.cal-chip-remove {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  opacity: 0.65;
}

.cal-chip-remove:hover { opacity: 1; }

/* ── SUCCESS ──────────────────────────────────────────────────────────────── */

.form-success {
  display: none;
  background: var(--green-light);
  border: 1px solid rgba(30, 61, 43, 0.12);
  border-radius: 1.25rem;
  padding: 3rem 2rem;
  text-align: center;
}

.form-success.show { display: block; }

.form-success h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--green-dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.form-success p { color: var(--text-muted); line-height: 1.6; }

/* ── FOOTER ───────────────────────────────────────────────────────────────── */

footer {
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
}

footer a { color: var(--yellow); }

footer .footer-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 0.5rem;
}

/* ── ANIMATIONS ───────────────────────────────────────────────────────────── */

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

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  nav { padding: 0.875rem 1.25rem; }
  .section { padding: 3.5rem 1.25rem; }
  .cta-split { grid-template-columns: 1fr; }
  .cta-card { padding: 2rem 1.5rem; }
  .hero-buttons { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .hero-logo { height: 56px; }
  .form-card { padding: 1.5rem 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
}
