:root {
  --bg: #eef5e8;
  --ink: #112015;
  --muted: #5a665c;
  --panel: #ffffff;
  --line: #d7e2cf;
  --green: #00ed86;
  --green-dark: #00d978;
  --logo-green: #00ed86;
  --soft: #f6faf1;
  --danger: #a63232;
  --warn-bg: #fff4cb;
  --warn-ink: #624600;
}

html {
  min-height: 100%;
  background: #102016;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  color: var(--ink);
  background-color: #102016;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("/assets/lawn-hero.webp") center / cover no-repeat;
}

.page {
  min-height: 100vh;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 18, 10, 0.78) 0%, rgba(6, 18, 10, 0.5) 38%, rgba(6, 18, 10, 0.22) 100%),
    linear-gradient(180deg, rgba(6, 18, 10, 0.12), rgba(6, 18, 10, 0.58));
}

.hero {
  min-height: clamp(210px, 28vh, 260px);
  position: relative;
  z-index: 2;
  padding: clamp(14px, 4vh, 28px) 18px 0;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.brand-logo {
  width: min(220px, 70vw);
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(17, 32, 21, 0.18);
}

.hero-copy {
  width: min(100%, 340px);
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.95rem, 7vw, 2.65rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lede {
  margin: 10px 0 0;
  font-size: clamp(1.05rem, 4vw, 1.3rem);
  line-height: 1.35;
  font-weight: 800;
}

.quote-box {
  width: min(320px, calc(100vw - 36px));
  position: relative;
  z-index: 2;
  align-self: start;
  justify-self: center;
  margin: 0 auto clamp(24px, 6vh, 44px);
  padding: 16px;
  display: grid;
  gap: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(6, 18, 10, 0.3);
  backdrop-filter: blur(4px);
}

.quote-form,
.result {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.quote-form {
  position: relative;
  padding: 16px;
  display: grid;
  gap: 10px;
}

label {
  font-size: 0.86rem;
  font-weight: 900;
}

.address-row {
  display: grid;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 127, 58, 0.18);
  border-color: var(--green);
}

textarea {
  min-height: 68px;
  padding-top: 12px;
  padding-bottom: 12px;
  line-height: 1.25;
  overflow: hidden;
  resize: none;
}

button {
  min-height: 54px;
  padding: 0 18px;
  color: #fff;
  background: var(--green);
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

button:hover {
  background: var(--green-dark);
}

button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.suggestions {
  display: grid;
  gap: 6px;
}

.suggestions:empty {
  display: none;
}

.suggestions button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  height: auto;
  width: 100%;
  padding: 8px 12px;
  color: #fff;
  background: var(--logo-green);
  border: 1px solid var(--logo-green);
  text-align: left;
  font-weight: 800;
  line-height: 1.18;
  white-space: normal;
  overflow-wrap: anywhere;
}

.result {
  border-top: 1px solid var(--line);
  min-height: 122px;
  padding: 16px 0 0;
}

.payment-toggle {
  width: 100%;
  color: #fff;
  background: var(--logo-green);
}

.payment-toggle:hover {
  color: #fff;
  background: #00d978;
}

.payment-panel {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.payment-panel[hidden] {
  display: none;
}

.payment-panel h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.1;
}

.payment-grid {
  display: grid;
  gap: 12px;
}

.payment-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-logo {
  width: min(138px, 70%);
  height: 38px;
  object-fit: contain;
}

.payment-card-venmo .payment-logo {
  width: min(168px, 82%);
  height: 48px;
  filter: invert(45%) sepia(96%) saturate(2950%) hue-rotate(184deg) brightness(99%) contrast(93%);
}

.payment-card-cashapp .payment-logo {
  filter: invert(62%) sepia(90%) saturate(3140%) hue-rotate(97deg) brightness(92%) contrast(102%);
}

.payment-card-zelle .payment-logo {
  filter: invert(34%) sepia(86%) saturate(3029%) hue-rotate(255deg) brightness(90%) contrast(93%);
}

.payment-qr-toggle {
  width: 100%;
  min-height: 46px;
  color: #fff;
  background: var(--logo-green);
}

.payment-qr {
  width: min(100%, 240px);
  height: auto;
  display: block;
  background: #fff;
  border-radius: 8px;
}

.payment-qr[hidden] {
  display: none;
}

.quote-form .address-row button {
  color: #fff;
  background: var(--logo-green);
}

.quote-form .address-row button:hover {
  color: #fff;
  background: #00d978;
}

.frequency-adjustment {
  color: var(--muted);
  font-weight: 900;
}

.frequency-adjustment:empty {
  display: none;
}

.empty-state,
.error {
  color: var(--muted);
  line-height: 1.5;
}

.error {
  color: var(--danger);
  font-weight: 900;
}

.loading-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 14px 0 8px;
  text-align: center;
}

.loading-logo {
  width: 116px;
  height: auto;
  border-radius: 8px;
  animation: logo-spin 1.1s linear infinite;
}

.loading-title {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 950;
}

.loading-copy {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
  font-weight: 850;
}

@keyframes logo-spin {
  to {
    transform: rotate(360deg);
  }
}

.quote-card,
.schedule-card,
.acreage-tool,
.confirm-card {
  display: grid;
  gap: 16px;
}

.quote-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.quote-address {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.quote-detail {
  margin: 6px 0 0;
  color: var(--ink);
  font-weight: 900;
}

.price {
  color: var(--green);
  font-size: clamp(2.6rem, 14vw, 4.2rem);
  line-height: 0.9;
  font-weight: 950;
}

.review {
  padding: 10px 12px;
  color: var(--warn-ink);
  background: var(--warn-bg);
  border: 1px solid #e5c967;
  border-radius: 8px;
  font-weight: 900;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric {
  min-width: 0;
  padding: 10px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
}

.metric strong {
  display: block;
  margin-top: 3px;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.schedule-card {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.schedule-card h2,
.confirm-card h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.schedule-grid {
  display: grid;
  gap: 10px;
}

.schedule-grid label {
  display: grid;
  gap: 6px;
}

.calendar-picker {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.calendar-selected {
  min-height: 0;
  color: var(--muted);
  font-weight: 800;
}

.calendar-heading {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
}

.calendar-heading strong {
  text-align: center;
  font-size: 0.95rem;
}

.calendar-nav {
  min-height: 40px;
  padding: 0;
  color: #fff;
  background: var(--logo-green);
  border: 1px solid var(--logo-green);
}

.calendar-nav:hover {
  color: #fff;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-weekday {
  min-width: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.calendar-day {
  min-height: 38px;
  padding: 0;
  color: #fff;
  background: var(--logo-green);
  border: 1px solid var(--logo-green);
  border-radius: 6px;
  font-size: 0.86rem;
}

.calendar-day:hover {
  color: #fff;
}

.calendar-day.is-selected {
  color: #fff;
  background: #078149;
  border-color: #078149;
}

.calendar-day:disabled {
  cursor: not-allowed;
  color: #99a399;
  background: #edf3e8;
  opacity: 0.72;
}

.schedule-error:empty {
  display: none;
}

.acreage-row {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  gap: 10px;
}

.acreage-label {
  margin: 0;
  color: var(--ink);
  font-weight: 950;
}

.acreage-row button {
  padding: 0;
  font-size: 1.45rem;
}

.acreage-value {
  display: grid;
  place-items: center;
  min-height: 54px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.acreage-value span {
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 950;
}

.acreage-value small {
  color: var(--muted);
  font-weight: 900;
}

.confirm-card {
  padding: 4px 0;
}

.confirm-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (min-width: 760px) {
  .page {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .page::before {
    background:
      linear-gradient(180deg, rgba(6, 18, 10, 0.62) 0%, rgba(6, 18, 10, 0.34) 48%, rgba(6, 18, 10, 0.66) 100%),
      radial-gradient(circle at center 48%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 42%);
  }

  .hero {
    min-height: auto;
    padding: 20px 40px 0;
    align-content: start;
    justify-items: center;
    text-align: center;
    gap: 14px;
  }

  .brand-logo {
    width: 286px;
  }

  .hero-copy {
    width: min(100%, 760px);
  }

  h1 {
    max-width: 760px;
    font-size: clamp(2.6rem, 4vw, 4.4rem);
  }

  .lede {
    font-size: 1.32rem;
  }

  .quote-box {
    align-self: start;
    justify-self: center;
    width: min(620px, 100%);
    margin: clamp(10px, 3vh, 36px) auto 0;
    padding: 18px;
  }

  .address-row {
    grid-template-columns: 1fr auto;
  }

  .schedule-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .schedule-grid > label:first-child,
  .calendar-picker,
  .schedule-error,
  .schedule-submit {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .metrics,
  .quote-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 759px) {
  body.has-suggestions {
    overflow: hidden;
  }

  body.has-suggestions .page {
    display: block;
    min-height: 100svh;
    padding: 12px;
  }

  body.has-suggestions .hero,
  body.has-suggestions .result,
  body.has-suggestions .payment-toggle,
  body.has-suggestions .payment-panel,
  body.has-suggestions .address-row button {
    display: none;
  }

  body.has-suggestions .quote-box {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px;
    gap: 10px;
  }

  body.has-suggestions .quote-form {
    padding: 10px;
    gap: 8px;
  }

  body.has-suggestions textarea {
    min-height: 62px;
  }

  .suggestions:not(:empty) {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(var(--suggestions-bottom, 12px) + env(safe-area-inset-bottom));
    z-index: 20;
    max-height: min(42vh, 320px);
    padding: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 8px;
    box-shadow: 0 18px 54px rgba(6, 18, 10, 0.36);
  }

  .suggestions button {
    min-height: 50px;
  }

  body.has-suggestions .suggestions:not(:empty) {
    position: static;
    max-height: min(58svh, 410px);
    padding: 6px;
    gap: 5px;
  }

  body.has-suggestions .suggestions button {
    min-height: 46px;
    padding: 7px 10px;
    font-size: 0.9rem;
    line-height: 1.18;
  }
}
