/*
 * The free try's first step (WS-A 17, 19): snap the fridge, or tap what's in it, then "Pick dinner
 * for me". One component for "/" and /welcome (marketing.css), the compare pages and /cook-with
 * hubs (compare.css), and /mealime-alternative (its own styles). Its colours come from each page's
 * own tokens, so it follows that page's light and dark scheme: --card/--surface, --ink/--text,
 * --ink-soft/--text-muted/--text-soft and --line, with the brand's values when a page has none.
 * Markup: scripts/start-step.mjs. Behaviour: start.js.
 */
.start {
  --start-card: var(--card, var(--surface, #ffffff));
  --start-ink: var(--ink, var(--text, #2b1708));
  --start-soft: var(--ink-soft, var(--text-muted, var(--text-soft, #6b5544)));
  --start-line: var(--line, rgba(43, 23, 8, 0.15));
  --start-alert: var(--tomato, var(--red, #c9381f));
  display: grid;
  gap: 12px;
  max-width: 34rem;
  margin-top: 28px;
  color: var(--start-ink);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* On a coloured hero band (the compare pages and hubs): the step sits on a card, inked like the band's buttons. */
.start--card {
  margin-top: 24px;
  padding: 18px;
  border: 2px solid var(--start-ink);
  border-radius: 20px;
  background: var(--start-card);
  box-shadow: 4px 4px 0 rgba(43, 23, 8, 0.12);
}

.start-snap,
.start-pick,
.start-add-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  font: 700 17px/1 "DM Sans", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease;
}
/* The fridge's frost where the page has it (the landing), an outline elsewhere */
.start-snap {
  width: 100%;
  background: var(--frost, transparent);
  color: var(--frost-ink, var(--start-ink));
  border: 1.5px solid var(--frost, var(--start-ink));
}
.start-snap:hover {
  border-color: var(--frost-ink, var(--start-ink));
}
/* The one primary action: butter, with the offset Crust shadow (the page's ink, so it's light in dark mode) */
.start-pick {
  width: 100%;
  background: #f6c413;
  color: #2b1708;
  border: 2px solid #2b1708;
  box-shadow: 4px 4px 0 var(--start-ink);
}
.start-pick:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--start-ink);
}
.start-pick:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--start-ink);
}
.start-pick[aria-disabled="true"] {
  opacity: 0.55;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.start-q {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--start-ink);
}
.start-hint {
  font-size: 14px;
  font-weight: 500;
  color: var(--start-soft);
  white-space: nowrap;
}
.start-hint.is-nudged {
  color: var(--start-alert);
  font-weight: 700;
}
.start-picks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--start-line);
  background: var(--start-card);
  color: var(--start-ink);
  font: 500 15px/1 "DM Sans", system-ui, sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}
.pick:hover {
  border-color: var(--start-soft);
}
/* Picked: the ink and card swap places (reads in every page's light and dark; no width change, so nothing reflows) */
.pick[aria-pressed="true"] {
  background: var(--start-ink);
  border-color: var(--start-ink);
  color: var(--start-card);
}
.pick-add {
  border-style: dashed;
  color: var(--start-soft);
}
.pick:focus-visible,
.start-snap:focus-visible,
.start-pick:focus-visible,
.start-add-go:focus-visible,
.start-add input:focus-visible,
.start-note a:focus-visible {
  outline: 2px solid var(--start-ink);
  outline-offset: 2px;
}

.start-add {
  display: flex;
  gap: 8px;
  margin: 0;
}
.start-add[hidden] {
  display: none;
}
.start-add input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1.5px solid var(--start-line);
  background: var(--start-card);
  color: var(--start-ink);
  font: 16px "DM Sans", system-ui, sans-serif;
}
.start-add-go {
  min-height: 48px;
  padding: 0 18px;
  background: transparent;
  color: var(--start-ink);
  border: 1.5px solid var(--start-line);
}

.start-note {
  margin: 0;
  font-size: 15px;
  color: var(--start-soft);
}
.start-note a {
  color: var(--start-ink);
  font-weight: 600;
  text-underline-offset: 3px;
}
.start-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .pick:active {
    transform: scale(0.95);
  }
}
@media (prefers-reduced-motion: reduce) {
  .start-pick:hover,
  .start-pick:active {
    transform: none;
  }
}
@media (min-width: 560px) {
  .start-snap,
  .start-pick {
    width: auto;
    justify-self: start;
  }
}
/* Phones: thumb-sized, and compact enough for the first screen of an in-app browser */
@media (max-width: 559px) {
  .start {
    margin-top: 18px;
    gap: 10px;
  }
  .start--card {
    padding: 14px;
  }
  .pick {
    min-height: 38px;
    padding: 0 12px;
  }
}
@media (max-width: 559px) and (max-height: 700px) {
  .start {
    margin-top: 14px;
    gap: 8px;
  }
  .start-snap,
  .start-pick {
    min-height: 46px;
  }
  .pick {
    min-height: 36px;
    font-size: 14px;
  }
}
