/* finds.dev — landing styles
   Typography: Geist + Geist Mono
   Palette: monochrome + a single green accent
*/

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #1f1f1f;
  --muted: #595959;
  --muted-2: #7a7a7a;
  --line: #e7e5e4;
  --line-2: #d6d3d1;
  --accent: #15803d;
  --accent-2: #166534;
  --accent-soft: #dcfce7;
  --focus: #15803d;
  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 620px;

  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0a;
    --surface: #111110;
    --ink: #f5f5f4;
    --ink-2: #e7e5e4;
    --muted: #a8a29e;
    --muted-2: #78716c;
    --line: #27272a;
    --line-2: #3f3f46;
    --accent: #4ade80;
    --accent-2: #86efac;
    --accent-soft: #14532d;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

code { font-family: var(--f-mono); font-size: 0.92em; color: var(--muted); }

.sr-only {
  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 — visible on focus only */
.skip {
  position: absolute;
  top: -40px;
  left: 12px;
  z-index: 10;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--f-mono);
  font-size: 13px;
  text-decoration: none;
  transition: top 120ms ease;
}
.skip:focus { top: 12px; color: var(--bg); }

/* Keyboard focus rings on interactive elements */
.btn:focus-visible,
.brand__mark:focus-visible,
.foot a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Respect users who ask for less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* layout ------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) clamp(20px, 5vw, 40px) 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex: 1;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand__mark {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}

.brand__dot { color: var(--accent); }

.foot {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.foot a { text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot__sep { opacity: 0.5; }

/* flow + steps ------------------------------------------------------- */

.flow {
  position: relative;
  min-height: 440px;
}

.step {
  display: none;
  animation: step-in 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.step--active { display: block; }

@keyframes step-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 20px;
  text-transform: lowercase;
}

.hero {
  font-size: clamp(38px, 7vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 20px;
}

.hero__accent { color: var(--accent); }

.prompt {
  font-size: clamp(28px, 4.5vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 14px;
}

.lede {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 28px;
  max-width: 54ch;
}

/* form --------------------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.field__label {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

input[type="email"],
input[type="text"],
input[type="time"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  line-height: 1.4;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

textarea {
  resize: vertical;
  min-height: 140px;
  font-family: var(--f-sans);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: 1fr 1fr; }

@media (max-width: 460px) {
  .grid--2 { grid-template-columns: 1fr; }
}

.toggle {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 0 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.toggle legend { padding: 0 6px; }

.toggle__opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  border: 1px solid transparent;
  transition: background 120ms ease, border-color 120ms ease;
}

.toggle__opt:has(input:checked) {
  background: var(--accent-soft);
  border-color: color-mix(in oklab, var(--accent) 35%, transparent);
  color: var(--accent-2);
}

.toggle__opt input { accent-color: var(--accent); }

.hint {
  font-size: 13px;
  color: var(--muted);
  margin: -6px 0 20px;
}

.hint code {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--ink-2);
}

/* buttons ------------------------------------------------------------ */

.actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.actions--split { justify-content: space-between; }

.btn {
  font: inherit;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 12px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 80ms ease;
  letter-spacing: -0.01em;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--ink);
  color: var(--bg);
}
.btn--primary:hover { background: var(--accent); color: #fff; }

.btn--ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
.btn--ghost:hover { color: var(--ink); border-color: var(--line-2); }

/* progress dots ------------------------------------------------------ */

.dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 12px 0 0;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-2);
  transition: background 200ms ease, width 200ms ease;
}

.dot--on {
  background: var(--accent);
  width: 18px;
  border-radius: 4px;
}

/* marquee of tags (hero eye candy) ----------------------------------- */

.marquee {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted-2);
}

.marquee li::before { content: ""; }

/* sample find card --------------------------------------------------- */

/* recent finds strip (async-loaded) ---------------------------------- */

.recent {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recent[hidden] { display: none; }

.recent .eyebrow { margin: 0; }

.recent .prompt { margin: 0 0 8px; }

.recent .lede { margin: 0 0 8px; }

.recent__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent__item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
}

.recent__item a {
  color: var(--ink);
  text-decoration: none;
}

.recent__item a:hover { color: var(--accent); }

.recent__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  line-height: 1.3;
}

.recent__excerpt {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 10px;
}

.recent__meta {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted-2);
  margin: 0;
}

.recent__item--skeleton .recent__title,
.recent__item--skeleton .recent__excerpt,
.recent__item--skeleton .recent__meta {
  color: transparent;
  background: var(--line);
  border-radius: 4px;
}

.recent__item--skeleton .recent__title { width: 70%; height: 1em; }
.recent__item--skeleton .recent__excerpt { width: 100%; height: 1.4em; }
.recent__item--skeleton .recent__meta { width: 40%; height: 1em; }

/* done screen -------------------------------------------------------- */

.step--done .prompt { color: var(--ink); }

/* long-form pages (criteria, privacy) -------------------------------- */

.page__title {
  font-size: clamp(32px, 5.5vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 14px;
}

.page__title .hero__accent { color: var(--accent); }

.page__lede {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 36px;
  max-width: 60ch;
}

.prose {
  max-width: 62ch;
  color: var(--ink-2);
}

.prose h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 36px 0 10px;
  color: var(--ink);
}

.prose h2:first-child { margin-top: 0; }

.prose p {
  margin: 0 0 14px;
  color: var(--ink-2);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--accent-2); }

.prose ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.prose li {
  margin: 0 0 6px;
  color: var(--ink-2);
}

.prose li::marker { color: var(--muted-2); }

.prose strong { color: var(--ink); font-weight: 600; }

.prose code {
  font-family: var(--f-mono);
  font-size: 0.9em;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 14px 16px;
  border-radius: var(--radius);
  margin: 20px 0 22px;
  font-size: 15px;
  color: var(--ink-2);
}

.callout p:last-child { margin-bottom: 0; }

/* error banner ------------------------------------------------------- */

.alert {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 14px;
}

@media (prefers-color-scheme: dark) {
  .alert {
    border-color: #7f1d1d;
    background: #1c0a0a;
    color: #fecaca;
  }
}
