/* Shiny Head Farms
   Aubergine ink on leek white. The potato-head illustration is the one loud thing;
   everything else stays quiet. */

:root {
  --leek: #eef2e3;        /* page ground */
  --paper: #f8faf1;       /* fields, raised surfaces */
  --aubergine: #2a1533;   /* ink, dark band */
  --plum: #5b4466;        /* secondary text */
  --rule: #cfd6bf;        /* hairlines on leek */
  --chard: #2c6b3f;       /* leaf green */
  --beet: #a8214f;        /* errors, link hover */
  --blossom: #f0cf55;     /* button and focus on dark */
  --spud: #d2a45c;        /* potato skin, used in the mark and hero art */

  --serif: "Young Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 34rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--leek);
  color: var(--aubergine);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
p { margin: 0; }
a { color: inherit; }

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

/* ---------- top bar ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-mark { width: 2.5rem; height: 2.5rem; flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; line-height: 1; }

.top-link {
  font-size: 1rem;
  font-weight: 500;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}
.top-link:hover { color: var(--beet); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: end;
  gap: 2rem;
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) 0;
  overflow: hidden;
}

.hero-copy { padding-bottom: clamp(3rem, 8vw, 7rem); }

.hero h1 {
  font-size: clamp(2.9rem, 6.2vw, 5.5rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 16ch;
  text-wrap: balance;
}

.lede {
  margin-top: 1.75rem;
  max-width: var(--measure);
  font-size: clamp(1.125rem, 1.5vw, 1.3rem);
  color: var(--plum);
}

.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--aubergine);
  color: var(--paper);
  font: 600 1.0625rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.button:hover { background: #47265a; }
.button.on-dark { background: var(--blossom); color: var(--aubergine); }
.button.on-dark:hover { background: #f6dc7a; }
.button[disabled] { opacity: 0.6; cursor: progress; }

.quiet-link {
  font-weight: 500;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}
.quiet-link:hover { color: var(--beet); }

.spud {
  display: block;
  width: 100%;
  max-width: 23rem;
  justify-self: center;
  height: auto;
  align-self: center;
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

/* ---------- what's growing ---------- */

.growing {
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter);
  background: var(--paper);
  border-top: 1px solid var(--rule);
}

.section-head { max-width: 46rem; }
.section-head h2,
.list-copy h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.section-head p { margin-top: 0.75rem; color: var(--plum); }

.key {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.95rem;
  color: var(--plum);
}
.key li { display: inline-flex; align-items: center; gap: 0.5rem; }

/* Status is carried by the marker's fill, not by colour alone. */
.dot {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 1.5px solid var(--chard);
  flex: none;
}
.dot.now { background: var(--chard); }
.dot.soon { background: linear-gradient(90deg, var(--chard) 50%, transparent 50%); }
.dot.planted { background: transparent; }

.beds { margin-top: clamp(2rem, 5vw, 3.5rem); }

.bed {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: 0 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--aubergine);
}
.bed h3 { font-size: 1.25rem; padding-top: 0.6rem; color: var(--plum); }

.crops { list-style: none; margin: 0; padding: 0; }
.crops li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 9rem;
  align-items: baseline;
  gap: 0.25rem 1.5rem;
  padding: 0.85rem 0;
}
.crops li + li { border-top: 1px solid var(--rule); }

.crop { font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.2; }
.note { color: var(--plum); font-size: 1rem; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- interest list ---------- */

.list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter);
  background:
    radial-gradient(60rem 30rem at 12% -10%, rgba(109, 58, 130, 0.55), transparent 70%),
    var(--aubergine);
  color: var(--paper);
}
.list :focus-visible { outline-color: var(--blossom); }

.list-copy p {
  margin-top: 1.25rem;
  max-width: var(--measure);
  color: #d9cfe0;
}

.signup { display: grid; gap: 1.25rem; align-content: start; max-width: 30rem; }
.signup .button { justify-self: start; }

.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend {
  display: block;
  padding: 0;
  margin-bottom: 0.4rem;
  font-size: 1rem;
  font-weight: 500;
}
.optional { font-weight: 400; color: #b9a9c4; margin-left: 0.25rem; }

.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #7c6589;
  border-radius: 10px;
  background: rgba(248, 250, 241, 0.06);
  color: var(--paper);
  font: 400 1.0625rem/1.3 var(--sans);
}
.field input::placeholder { color: #a593b1; }
.field input[aria-invalid="true"] { border-color: #ff9db9; }

.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { margin: 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  border: 1px solid #7c6589;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 400;
}
.choice input:checked + span { background: var(--paper); border-color: var(--paper); color: var(--aubergine); }
.choice input:focus-visible + span { outline: 3px solid var(--blossom); outline-offset: 3px; }

.hp { position: absolute; left: -100vw; width: 1px; height: 1px; overflow: hidden; }

.form-status { min-height: 1.6em; font-weight: 500; }
.form-status.error { color: #ffb3c8; }
.form-status.ok { color: var(--blossom); }
.fine { font-size: 0.9rem; color: #b9a9c4; max-width: 28rem; }

/* ---------- footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.75rem var(--gutter);
  background: var(--aubergine);
  color: #b9a9c4;
  font-size: 0.95rem;
  border-top: 1px solid #4a3156;
}

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .spud { max-width: 15rem; margin-top: 1rem; }
  .bed { grid-template-columns: 1fr; }
  .bed h3 { padding: 0 0 0.25rem; }
  .list { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 1.0625rem; }
  .top-link { display: none; }
  .crops li { grid-template-columns: minmax(0, 1fr) auto; }
  .note { grid-column: 1 / -1; grid-row: 2; }
}
