/* Sift landing page. Taste-skill direction "split stage" (seed 1181609641), changed by the owner: the network sits in the first screen only, not pinned. Palette "Bottle ink, yellow"; Work Sans. */

:root {
  --bg: #f7f7f7;
  --surface: #ebebeb;
  --ink: #0d2a1c;
  --muted: #5f6b64;
  --accent: #f6e016;
  --accent-ink: #0d2a1c;
  --on-dark: #f7f7f7;
  --on-dark-muted: #a9bbb1;

  --font: "Work Sans", system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: min(22vw, 34svh);

  --margin: clamp(1.25rem, 2.2vw, 2rem);
  --inset: var(--margin);
  --section: clamp(7.5rem, 12vw, 13rem);
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-reveal: 800ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.55; font-kerning: normal; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
canvas { display: block; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
:target { scroll-margin-top: 2rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nums { font-variant-numeric: tabular-nums; }

/* ---------- type ---------- */
h1, h2, h3 { font-weight: 300; text-wrap: balance; }
.head { font-size: var(--step-head); line-height: 1.0; letter-spacing: -0.035em; }
.lead { font-size: var(--step-lead); line-height: 1.3; font-weight: 300; }
p { text-wrap: pretty; }

/* ---------- controls ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.5rem; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius); font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.button:active { transform: scale(0.97); }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em; text-decoration-thickness: 0.07em; transition: text-decoration-color var(--t-hover) ease; }
.link-plain { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; }
@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: currentColor; }
  .button:hover { background: #fff04f; }
}

/* ---------- nav: a few plain links over the dark first screen ---------- */
.nav { position: absolute; top: 0; right: 0; z-index: 4; display: flex; gap: 2rem; padding: 1.75rem var(--margin); font-size: 0.9375rem; font-weight: 500; color: var(--on-dark); }

/* ---------- first screen: the name and the words on the left, the network on the right ---------- */
.hero { display: grid; grid-template-columns: 44fr 56fr; min-height: 100svh; background: var(--ink); color: var(--on-dark); }
.stage { position: relative; height: calc(100svh - 2 * var(--margin)); margin: var(--margin) var(--margin) var(--margin) 0; background: var(--ink); color: var(--on-dark); overflow: hidden; border-radius: var(--radius); }
.graph { position: absolute; inset: 0; width: 100%; height: 100%; }

.stage-count { position: absolute; top: 2rem; left: 2rem; display: grid; gap: 0.1rem; }
.stage-num { font-size: var(--step-lead); font-weight: 400; }
.stage-label { font-size: var(--step-small); color: var(--on-dark-muted); }
/* only shown with reduced motion: the still frame stays, and the loop plays only when asked */
.stage-play { position: absolute; left: 2rem; bottom: 1.25rem; min-height: 44px; padding: 0; background: none; border: 0; color: var(--on-dark-muted); font-size: var(--step-small); cursor: pointer; }

.card-dot { grid-row: span 2; width: 0.75rem; height: 0.75rem; margin-top: 0.4rem; border-radius: 50%; background: var(--accent); }

.hero-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.75rem; min-width: 0; padding: clamp(5rem, 11svh, 7rem) clamp(1.5rem, 2.5vw, 2.5rem) clamp(3rem, 8svh, 5rem) var(--margin); }
.hero .head { max-width: 15ch; }
.hero .lead { max-width: 34ch; color: var(--on-dark); }
/* the name heads the words, on their left edge (nudged for the s's side bearing so it aligns optically) */
.wordmark { margin: 0 0 0.75rem -0.045em; font-size: var(--step-display); font-weight: 300; line-height: 0.8; letter-spacing: -0.05em; color: var(--on-dark); transform-origin: 0 100%; }

/* ---------- how it works: the claim, then the product doing it, left to right: what you do once (grey), what Sift does every week (ink) ---------- */
.how { padding: clamp(4rem, 7vw, 6.5rem) var(--margin) clamp(5rem, 8vw, 8rem); }
.how-intro { display: grid; row-gap: 1.5rem; }
.how-intro .lead { max-width: 52ch; }

.flow { --seq: 1; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; margin-top: clamp(3rem, 5vw, 4.5rem); }
.flow-group { display: grid; grid-template-rows: auto 1fr; gap: 1rem; padding: 1rem; background: var(--surface); }
.flow-group + .flow-group { background: var(--ink); color: var(--on-dark); }
.flow-when { font-size: 1rem; font-weight: 500; }
.flow-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 0.75rem 1rem; }
/* subgrid: panels and captions line up across a block, however long a caption runs */
.step { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.step-cap { display: grid; gap: 0.1rem; font-size: var(--step-small); font-weight: 500; }
.step-cap span + span { font-weight: 400; color: var(--muted); }
.flow-group + .flow-group .step-cap span + span { color: var(--on-dark-muted); }
.flow [data-ui].panel { min-height: 300px; padding: 1rem; color: var(--ink); }
.flow [data-ui].panel, .flow-group + .flow-group [data-ui].panel { border-color: transparent; }

[data-ui].panel { display: flex; flex-direction: column; gap: 1rem; min-height: 220px; padding: 1.25rem; background: #ffffff; border: 1px solid #dcdcdc; border-radius: var(--radius); font-size: var(--step-small); }
[data-ui] .panel-top { display: grid; gap: 0.15rem; }
[data-ui] .panel-name { font-size: 1rem; font-weight: 500; }
[data-ui] .panel-meta { color: var(--muted); }
[data-ui] .panel-rows li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-top: 1px solid #ececec; }
[data-ui] .panel-rows li span:last-child { color: var(--muted); }
[data-ui] .panel-fields { display: grid; gap: 0.25rem; }
[data-ui] .panel-fields dt { color: var(--muted); margin-top: 0.5rem; }
[data-ui] .panel-fields dt:first-child { margin-top: 0; }
[data-ui] .panel-fields dd { font-size: 1rem; line-height: 1.4; }

/* the graph: your library in ink at the middle, the week's papers in grey around it, three picks in yellow */
[data-ui] .flow-graph { width: 100%; height: auto; margin: auto 0; overflow: visible; }
[data-ui] .flow-graph .e { stroke: #cdd3cf; stroke-width: 0.8; }
[data-ui] .flow-graph .e-pick { stroke: var(--ink); stroke-opacity: 0.6; }
[data-ui] .flow-graph .n-lib { fill: var(--ink); }
[data-ui] .flow-graph .n-new { fill: #b3bbb6; }
[data-ui] .flow-graph .n-pick { fill: var(--accent); stroke: var(--ink); stroke-width: 1; }
[data-ui] .flow-graph circle { transform-box: fill-box; transform-origin: center; }

/* the ranking: a score bar per paper; the top three set on yellow */
[data-ui] .rank { display: grid; gap: 0.15rem; margin: 0 -0.5rem; }
[data-ui] .rank li { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) 1.5rem; align-items: center; column-gap: 0.5rem; row-gap: 0.25rem; padding: 0.4rem 0.5rem; color: var(--muted); line-height: 1.3; }
[data-ui] .rank li span:first-child { grid-column: 1 / -1; }
[data-ui] .rank li span:last-child { text-align: right; }
[data-ui] .rank .rank-pick { color: var(--ink); }
[data-ui] .rank .rank-pick::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); }
[data-ui] .rank-bar { height: 0.375rem; background: #e6e8e7; }
[data-ui] .rank-bar::after { content: ""; display: block; height: 100%; width: var(--w); background: var(--muted); transform-origin: left; }
[data-ui] .rank-pick .rank-bar { background: #fff6a3; }
[data-ui] .rank-pick .rank-bar::after { background: var(--ink); }

/* the digest, small */
[data-ui] .flow-mail li { display: grid; grid-template-columns: 0.75rem minmax(0, 1fr); column-gap: 0.6rem; padding: 0.6rem 0; border-top: 1px solid #ececec; }
[data-ui] .flow-mail b { font-weight: 500; font-size: 0.9375rem; line-height: 1.3; }
[data-ui] .flow-mail li > span:last-child { color: var(--muted); line-height: 1.4; }
[data-ui] .flow-mail .card-dot { margin-top: 0.3rem; }

/* ---------- join: the hero's green again, with the yellow button ---------- */
.join { background: var(--ink); color: var(--on-dark); padding: clamp(5rem, 8vw, 8rem) var(--margin) var(--section); }
.join-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(2rem, 6vw, 8rem); row-gap: 1.25rem; align-items: start; }
.join-title { grid-column: 1; font-size: var(--step-head); line-height: 1.0; letter-spacing: -0.035em; }
.join-line { grid-column: 1; max-width: 32ch; font-size: var(--step-body); }
.form { grid-column: 2; grid-row: 1 / span 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-field { display: grid; gap: 0.4rem; font-size: var(--step-small); font-weight: 500; }
.form-field:first-of-type { grid-column: 1 / -1; }
.field { width: 100%; min-height: 3.25rem; padding: 0.75rem 0.9rem; background: var(--bg); color: var(--ink); border: 0; border-radius: var(--radius); font-size: max(1rem, var(--step-body)); }
.field::placeholder { color: var(--muted); }
.form .button { grid-column: 1 / -1; justify-self: start; margin-top: 0.5rem; }
.form-note { grid-column: 1 / -1; font-size: var(--step-small); }

/* ---------- phone: the stage becomes a picture at the top that stays while the first screen passes ---------- */
@media (max-width: 899px) {
  :root { --step-display: 21vw; }
  .nav { gap: 1.25rem; padding: 1.25rem 1.5rem; }
  .nav-quiet { display: none; }
  .hero { display: block; min-height: 0; padding-bottom: 3.5rem; }
  .stage { height: 50svh; margin: 1.5rem 12px 0; }
  .stage-count { top: 1.25rem; left: 1.25rem; }
  .stage-play { left: 1.25rem; bottom: 0.5rem; }
  .hero-copy { padding: 5rem 1.25rem 0; gap: 1.5rem; }
  .hero .head { font-size: clamp(2rem, 7vw, 3.5rem); }
  .wordmark { margin: 0 0 0 -0.045em; line-height: 0.85; }
  .how { padding: 4rem 1.25rem 5rem; }
  .how-intro { row-gap: 1.25rem; }
  .flow { grid-template-columns: 1fr; margin-top: 2.5rem; }
  /* the steps sit below each other here, so each plays as it arrives instead of in one sequence */
  .flow { --seq: 0; }
  .join { padding: 5.5rem 1.25rem; }
  .join-inner { grid-template-columns: 1fr; }
  .form { grid-column: 1; grid-row: auto; grid-template-columns: 1fr; margin-top: 1rem; }
}

/* ---------- tablet: the hero's words take both columns under the stage ---------- */
@media (min-width: 600px) and (max-width: 899px) {
  .hero-copy { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; align-items: start; }
  .wordmark { grid-column: 1 / -1; grid-row: 1; }
  .hero .head { grid-column: 1; grid-row: 2 / span 2; max-width: none; font-size: clamp(2rem, 5.4vw, 3rem); }
  .hero .lead { grid-column: 2; grid-row: 2; max-width: none; }
  .hero .button { grid-column: 2; grid-row: 3; }
  .flow { --seq: 1; }
}
@media (max-width: 599px) {
  .flow-steps { grid-auto-flow: row; grid-template-rows: none; }
  .step { grid-row: auto; grid-template-rows: auto auto; gap: 0.75rem; }
  .flow [data-ui].panel { min-height: 0; }
}

/* ---------- motion: entrances, the scaling name; the reduced page is the finished page ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .stage { animation: stage-in 1100ms var(--ease-out) both; }

  /* the flow plays once, left to right: each step rises, then its contents fill in */
  .flow { --gap: 1.1s; }
  .js .flow .step[data-reveal] { --at: calc(var(--s) * var(--seq) * var(--gap)); transition-delay: var(--at); }
  .js .flow .seq, .js .flow .flow-graph circle, .js .flow .flow-graph line { opacity: 0; transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); }
  .js .flow .seq { transform: translateY(8px); transition-delay: calc(var(--at) + 300ms + var(--d) * 120ms); }
  .js .flow .flow-graph .n-lib { transform: scale(0.4); transition-delay: calc(var(--at) + 250ms); }
  .js .flow .flow-graph .n-new, .js .flow .flow-graph .e { transition-delay: calc(var(--at) + 450ms + var(--d) * 70ms); }
  .js .flow .flow-graph .n-pick { transform: scale(0.5); fill: #b3bbb6; transition: opacity 400ms, transform 500ms var(--ease-out), fill 400ms; transition-delay: calc(var(--at) + 1100ms); }
  .js .flow .flow-graph .e-pick { transition-delay: calc(var(--at) + 1000ms); }
  .js .flow .rank-bar::after { transform: scaleX(0); transition: transform 700ms var(--ease-out); transition-delay: calc(var(--at) + 450ms + var(--d) * 120ms); }
  .js .flow .rank-pick::before { opacity: 0; transition: opacity 400ms ease; transition-delay: calc(var(--at) + 1300ms); }
  .js .flow .is-in .seq, .js .flow .is-in .flow-graph circle, .js .flow .is-in .flow-graph line, .js .flow .is-in .rank-pick::before { opacity: 1; transform: none; }
  .js .flow .is-in .n-pick { fill: var(--accent); }
  .js .flow .is-in .rank-bar::after { transform: none; }
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
    .wordmark { animation: name-weight linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
  }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes stage-in { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes name-weight { from { transform: scale(1); } to { transform: scale(0.93); } }
