/* Mostly Clean: shared styles for mostlyclean.com */

:root {
  --rinse: #E6EFE9;      /* page background: pale sage, like a rinsed glass */
  --soap: #FBFCFA;       /* panels */
  --bottle: #1F3A33;     /* ink: deep bottle green */
  --moss: #4F6B5F;       /* secondary text */
  --lemon: #E9B93C;      /* the progress fill, lemon as in "vinegar and lemon" */
  --lemon-deep: #B8871A; /* focus and hover on lemon */
  --line: #C9D8CF;       /* hairlines and field borders */
  --error: #9A3B2E;

  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--rinse);
  color: var(--bottle);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--bottle); text-underline-offset: 3px; }
a:hover { color: var(--moss); }

:focus-visible {
  outline: 3px solid var(--lemon-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  gap: 48px;
  padding: 56px 0 64px;
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1.15fr 1fr;
    gap: 72px;
    padding: 104px 0 96px;
    align-items: start;
  }
}

.wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.25rem, 11vw, 6.25rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0;
}

/* The one memorable thing: a progress bar that is mostly full */
.meter {
  position: relative;
  height: 14px;
  margin: 22px 0 18px;
  max-width: 440px;
  background: var(--soap);
  border: 1.5px solid var(--bottle);
  border-radius: 999px;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  width: 82%;
  background: var(--lemon);
  border-right: 1.5px solid var(--bottle);
  border-radius: 999px 0 0 999px;
  transform-origin: left center;
  animation: fill 1.6s cubic-bezier(.2, .7, .2, 1) .3s both;
}

@keyframes fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .meter span { animation: none; }
}

.tagline {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.6vw, 1.85rem);
  line-height: 1.25;
  margin: 0 0 16px;
}

.intro {
  font-size: 1.1875rem;
  color: var(--moss);
  max-width: 34ch;
  margin: 0 0 32px;
}

/* ---------- Form ---------- */

.signup {
  display: grid;
  gap: 12px;
  max-width: 440px;
}

.field { display: grid; gap: 4px; }

.field label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.field label .opt {
  font-weight: 400;
  color: var(--moss);
}

.field input {
  font: inherit;
  color: var(--bottle);
  background: var(--soap);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  width: 100%;
}

.field input:focus-visible {
  outline: none;
  border-color: var(--bottle);
  box-shadow: 0 0 0 3px rgba(233, 185, 60, .55);
}

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--soap);
  background: var(--bottle);
  border: 0;
  border-radius: 10px;
  padding: 15px 20px;
  cursor: pointer;
  margin-top: 4px;
}

.btn:hover { background: #2B4D44; }

.fineprint {
  font-size: 0.875rem;
  color: var(--moss);
  margin: 4px 0 0;
}

.notice {
  font-size: 0.9375rem;
  background: var(--soap);
  border-left: 4px solid var(--lemon);
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  margin: 0;
}

.notice[hidden] { display: none; }

/* ---------- Promises ---------- */

.promises {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1.5px solid var(--bottle);
}

@media (min-width: 880px) {
  .promises { margin-top: 18px; }
}

.promises li {
  padding: 24px 0 26px;
  border-bottom: 1px solid var(--line);
}

.promises h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 6px;
}

.promises p {
  margin: 0;
  color: var(--moss);
  max-width: 40ch;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 0.9375rem;
  color: var(--moss);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

.site-footer p { margin: 0; }

/* ---------- Simple pages (thanks, privacy) ---------- */

.page {
  max-width: 640px;
  padding: 56px 0 72px;
}

@media (min-width: 880px) {
  .page { padding: 96px 0 104px; }
}

.home-link {
  font-family: var(--serif);
  font-size: 1.375rem;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 40px;
}

.page h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.page h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.375rem;
  line-height: 1.25;
  margin: 36px 0 8px;
}

.page p,
.page li { max-width: 62ch; }

.page ul { padding-left: 1.2em; }

.lede {
  font-size: 1.1875rem;
  color: var(--moss);
}

.first-swap {
  background: var(--soap);
  border: 1.5px solid var(--bottle);
  border-radius: 14px;
  padding: 24px 22px;
  margin: 36px 0;
}

.first-swap h2 { margin-top: 0; }

.first-swap .tag {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--lemon);
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 12px;
}

.first-swap p { margin: 0 0 10px; }
.first-swap p:last-child { margin-bottom: 0; }
