/* /software-factory and its home section. One idea per section, shown
   happening: the app screens are generated images (text inside them comes from
   the image model and is checked word by word); the page's own text stays HTML.
   Motion only moves things that are not text: the swap between screens, the
   station that lights up, the ring around the bell. */

:root {
  --sf-olive: #4c5a2c;
  --sf-caramel: #b3672b;
  --sf-ink: var(--accent, #2b231b);
  --sf-muted: var(--text-muted, #6e6350);
  --sf-border: var(--border-strong, #d8cbaa);
  --sf-surface: var(--surface, #fffdf8);
  --sf-display: var(--font-display, "Newsreader", Georgia, serif);
  --sf-body: var(--font-body, "Geist", sans-serif);
  --sf-mono: var(--font-mono, "JetBrains Mono", monospace);
  --sf-ease: var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.par-sf, .par-sf-home { max-width: var(--wrap, 1240px); margin: 0 auto; padding: 0 var(--gutter, clamp(16px, 5vw, 64px)) 40px; }

.par-sf .sf-hero { padding: clamp(24px, 4vw, 56px) 0 0; }
.sf-kicker { display: flex; align-items: center; gap: 10px; margin: 0; font: 13px var(--sf-mono); color: var(--sf-muted); }
.sf-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sf-olive); }
.sf-h1 { margin: 14px 0 0; max-width: 15em; font: 400 clamp(42px, 7vw, 84px)/1.0 var(--sf-display); letter-spacing: -0.02em; }
.sf-h1 em, .sf-h2 em, .sf-close-t em { font-style: italic; }
.sf-lede { margin: 18px 0 28px; max-width: 34em; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: #3d3325; }
.sf-answer { margin: 28px 0 0; max-width: 46em; font-size: 14px; line-height: 1.6; color: var(--sf-muted); }

.sf-sec { padding: clamp(64px, 9vw, 120px) 0 0; }
.sf-h2 { margin: 0; max-width: 17em; font: 400 clamp(34px, 5vw, 58px)/1.04 var(--sf-display); letter-spacing: -0.015em; }
.sf-h3 { margin: 0; font: 400 22px/1.2 var(--sf-display); }
.sf-first { margin: 14px 0 0; max-width: 34em; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; color: #3d3325; }
.par-sf figure, .par-sf-home figure { margin: 0; }
.sf-cap { margin: 12px 0 0; font-size: 13px; color: var(--sf-muted); max-width: 60em; }
.sf-tag { display: inline-block; margin-left: 4px; padding: 0 8px; border: 1px solid var(--sf-border); border-radius: 99px; font: 11px var(--sf-mono); color: var(--sf-muted); white-space: nowrap; }

/* ---------- a screen that changes state (the run, the faces) ---------- */
.sf-states { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border: 1px solid var(--sf-border); border-radius: 99px; background: var(--sf-surface); flex-wrap: wrap; }
.sf-st { appearance: none; border: 0; background: transparent; padding: 7px 14px; border-radius: 99px; font: 500 14px var(--sf-body); color: var(--sf-muted); cursor: pointer; }
.sf-st[aria-pressed="true"] { background: var(--sf-ink); color: #fff8ee; }
.sf-st:focus-visible { outline: 2px solid var(--sf-caramel); outline-offset: 2px; }
.sf-screen { position: relative; border-radius: 18px; overflow: hidden; background: #2a2118; box-shadow: 0 30px 60px -36px rgba(60, 40, 10, .55); }
.sf-shot { margin: 0; }
.sf-shot img { display: block; width: 100%; height: auto; }
/* with the module running every screen stays in the stack and they cross-fade;
   without it, `hidden` leaves only the open one */
.sf-screen[data-live] { display: grid; }
.sf-screen[data-live] .sf-shot { display: block; grid-area: 1 / 1; opacity: 0; transition: opacity .9s var(--sf-ease); }
.sf-screen[data-live] .sf-shot[data-on] { opacity: 1; z-index: 1; }
.sf-who { position: relative; margin: 0; padding: 14px 18px; background: var(--sf-surface); font-size: 15px; color: #3d3325; }
.sf-who b { font: 400 19px var(--sf-display); color: var(--text, #211a10); margin-right: 4px; }
.par-sf .sf-faces { margin-top: 28px; }
.sf-faces .sf-screen { background: var(--sf-surface); }
.sf-shot picture { display: block; }


/* ---------- stations ---------- */
.sf-line { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; position: relative; }
.sf-line::before { content: ""; position: absolute; left: 4%; right: 4%; top: 52px; border-top: 1.6px dashed var(--sf-border); }
.sf-line li { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.sf-line img { height: 104px; width: auto; max-width: 100%; object-fit: contain; object-position: left bottom; margin-bottom: 14px; }
.sf-line p { margin: 6px 0 0; font-size: 14.5px; color: #4a3f2e; }
.sf-line[data-step] li { transition: opacity .6s var(--sf-ease), transform .6s var(--sf-ease); }
.sf-line[data-step] li[data-later] { opacity: .25; transform: translateY(10px); }
.sf-line[data-step] li[data-now] img { animation: sf-bob 1.6s var(--sf-ease) both; }
@keyframes sf-bob { 0% { transform: translateY(8px) rotate(-4deg); } 60% { transform: translateY(-6px) rotate(2deg); } 100% { transform: none; } }

/* ---------- checks, calls ---------- */
.sf-split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.sf-split-rev { grid-template-columns: minmax(0, 1fr) minmax(0, .7fr); }
.sf-fig img { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 24px 50px -32px rgba(60, 40, 10, .5); }
.sf-phone { max-width: 420px; justify-self: center; position: relative; }
.sf-phone img { border-radius: 30px; border: 8px solid #1d1711; }
.sf-phone::before { content: ""; position: absolute; left: 50%; top: 44px; width: 70px; height: 70px; margin-left: -35px; border-radius: 50%; border: 2px solid var(--sf-caramel); opacity: 0; pointer-events: none; }
.sf-phone[data-ring]::before { animation: sf-ring 1.8s var(--sf-ease) 2; }
@keyframes sf-ring { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(3.2); opacity: 0; } }

/* ---------- learns ---------- */
.sf-runs { list-style: none; margin: 32px 0 28px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; max-width: 980px; position: relative; }
.sf-runs li { padding: 0 24px 0 0; }
.sf-runs li + li { padding-left: 24px; border-left: 1.6px solid var(--sf-ink); }
.sf-when { display: block; font: 12px var(--sf-mono); color: var(--sf-muted); }
.sf-what { display: block; margin-top: 6px; font: 400 22px/1.25 var(--sf-display); }
.sf-wide { max-width: 1040px; }
.sf-quote { margin: 48px 0 0; max-width: 44em; padding: 0 0 0 22px; border-left: 3px solid var(--sf-caramel); }
.sf-quote p { margin: 0; font: italic 400 clamp(22px, 2.4vw, 30px)/1.3 var(--sf-display); }
.sf-quote footer { margin-top: 10px; font-size: 14px; color: var(--sf-muted); }
.sf-quote + .sf-first { margin-top: 28px; }

/* ---------- from your AI ---------- */
.sf-verbs { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; max-width: 900px; }
.sf-verbs li { padding: 10px 16px; border: 1px solid var(--sf-border); border-radius: 99px; background: var(--sf-surface); font-size: 16px; }
.sf-verbs b { font: 400 19px var(--sf-display); margin-right: 3px; }
.sf-dev { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 36px; }
.sf-code { margin: 0; padding: 16px 20px; border-radius: 12px; background: #211a10; color: #f7f0e1; font: 13.5px/1.7 var(--sf-mono); white-space: pre; overflow-x: auto; }
.sf-c { color: #a99a7d; }
.sf-dev-s { margin: 0; font-size: 14px; color: var(--sf-muted); max-width: 32em; }

/* ---------- voice, team, proof, platform ---------- */
.par-sf .sf-voice { margin-top: 28px; }
.par-sf .sf-review { margin-top: 56px; }
.par-sf .sf-review .sf-fig { margin-top: 20px; max-width: 1000px; }
.sf-h3-big { font-size: clamp(24px, 2.4vw, 30px); }
.par-sf .sf-wide { margin-top: 28px; }
.sf-proof { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 28px; max-width: 1000px; }
.sf-real { margin: 24px 0 0; max-width: 820px; padding: 16px 18px; border-radius: 14px; background: #211a10; color: #f1e7d2; }
.sf-real p { margin: 6px 0 0; font: 13px/1.6 var(--sf-mono); }
.sf-real .sf-real-h { margin: 0 0 4px; font: 400 19px var(--sf-display); color: #fff8ee; }
.sf-under { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(24px, 4vw, 48px); align-items: center; margin-top: 36px; }
.sf-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.sf-facts li { font-size: 15.5px; color: #3d3325; }
.sf-facts b { display: block; font: 400 21px/1.2 var(--sf-display); color: var(--text, #211a10); margin-bottom: 2px; }
.sf-soon { display: inline-block; padding: 0 8px; border: 1px solid var(--sf-border); border-radius: 99px; font: 11px var(--sf-mono); color: var(--sf-muted); vertical-align: 1px; }

/* ---------- questions and the closing line ---------- */
.sf-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 56px; margin-top: 32px; max-width: 1080px; }
.sf-faq p { margin: 8px 0 0; font-size: 15px; color: #4a3f2e; }
/* review marker: an answer that is only true after an open PR merges */
.par-sf [data-pending] { position: relative; padding: 10px 12px; border: 1.5px dashed #c98a2b; border-radius: 10px; }
.sf-faq [data-pending] { margin: -10px -12px; }
.sf-real[data-pending] { border-color: #c98a2b; }
.par-sf [data-pending]::before { content: "Pending: " attr(data-pending); display: inline-block; margin-bottom: 6px; padding: 0 8px; border-radius: 99px; background: #f5dfb4; font: 11px var(--sf-mono); color: #6b4410; }
.sf-close { padding: clamp(80px, 11vw, 150px) 0 clamp(40px, 6vw, 80px); text-align: center; }
.sf-close-t { margin: 0 auto; max-width: 14em; font: 400 clamp(38px, 6.2vw, 80px)/1.02 var(--sf-display); letter-spacing: -0.02em; }
.sf-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin: 32px 0 0; }
.sf-close .sf-ctas { justify-content: center; }
.sf-ctas a { text-decoration: none; padding: 10px 18px; border-radius: 99px; font-size: 15px; }
.sf-ghost { border: 1px solid var(--sf-border); background: var(--sf-surface); }

/* ---------- the home section ---------- */
.par-sf-home .sf-band { padding: clamp(64px, 9vw, 120px) 0; }
.par-sf-home .sf-band-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.par-sf-home .sf-h2 { font-size: clamp(34px, 4.2vw, 52px); }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .sf-line { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .sf-line::before { display: none; }
  .sf-line img { height: 84px; }
  .sf-split, .sf-split-rev, .par-sf-home .sf-band-grid { grid-template-columns: minmax(0, 1fr); }
  .sf-split-rev > div { order: -1; }
  .sf-runs { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .sf-runs li + li { padding-left: 0; padding-top: 18px; border-left: 0; border-top: 1.6px solid var(--sf-ink); }
  .sf-dev, .sf-proof, .sf-under { grid-template-columns: minmax(0, 1fr); }
  .sf-states { display: flex; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .sf-st { flex: none; }
  .sf-faq { grid-template-columns: minmax(0, 1fr); }
  .sf-screen { border-radius: 12px; }
  .sf-st { padding: 7px 11px; font-size: 13px; }
  .sf-phone { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .sf-screen[data-live] .sf-shot, .sf-line[data-step] li { transition: none; }
  .sf-line[data-step] li[data-now] img, .sf-phone[data-ring]::before { animation: none; }
}

/* the fourth face is not a picture: any look is one sentence away */
.sf-any-panel { background: linear-gradient(160deg, #fbf7ef 0%, #efe7d8 100%); }
.sf-screen[data-live] .sf-any-panel { display: flex; }
.sf-any-in { display: flex; flex-direction: column; justify-content: center; gap: 22px; width: 100%; padding: clamp(28px, 6vw, 72px); }
.sf-any-k { margin: 0; font: 400 clamp(28px, 3.6vw, 46px)/1.05 var(--sf-display); }
.sf-ideas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sf-ideas li { padding: 10px 16px; border: 1px solid var(--sf-border); border-radius: 99px; background: var(--sf-surface); font: italic 400 clamp(17px, 1.7vw, 21px)/1.2 var(--sf-display); }
.sf-any-t { margin: 0; font-size: clamp(16px, 1.5vw, 19px); color: #3d3325; }
.sf-any-t em { font-style: normal; font-weight: 500; color: var(--text, #211a10); }

/* the team: one job, told for each person (real buttons, one line each) */
.par-sf .sf-lens { margin: 28px 0 0; max-width: 900px; }
.sf-lens-screen { background: var(--sf-surface); border: 1px solid var(--sf-border); box-shadow: 0 24px 50px -36px rgba(60, 40, 10, .45); }
.sf-lens-line { margin: 0; padding: clamp(24px, 4vw, 44px); font: 400 clamp(22px, 2.6vw, 32px)/1.3 var(--sf-display); }
.sf-rule { margin: 32px 0 0; max-width: 46em; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; color: #3d3325; }
.sf-rule b { display: block; font: 400 clamp(22px, 2.2vw, 28px)/1.25 var(--sf-display); color: var(--text, #211a10); margin-bottom: 6px; }

/* proof in plain words */
.sf-proofs { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 1000px; }
.sf-proofs li { padding: 18px 20px; border-radius: 14px; background: var(--sf-surface); border: 1px solid var(--sf-border); font-size: 15.5px; color: #3d3325; }
.sf-proofs b { display: block; font: 400 21px/1.25 var(--sf-display); color: var(--text, #211a10); margin-bottom: 4px; }
.par-sf .sf-decide { margin-top: 36px; max-width: 900px; }
p.sf-real { font: 15px/1.6 var(--sf-body); color: #f1e7d2; }

/* the code stays one click away */
details.sf-dev { display: block; margin-top: 32px; }
details.sf-dev summary { cursor: pointer; font: 500 15px var(--sf-body); color: var(--sf-muted); }
details.sf-dev[open] summary { margin-bottom: 14px; }
details.sf-dev .sf-dev-s { margin-top: 12px; }

@media (max-width: 860px) {
  .sf-proofs { grid-template-columns: minmax(0, 1fr); }
}

/* whole apps: Mei's ask, the build beside its decision, the app on iPad and phone */
.par-sf .sf-ask { margin-top: 36px; }
.sf-apps-build { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: center; margin-top: 48px; }
.sf-apps-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.sf-apps-steps li { font-size: clamp(16px, 1.4vw, 18px); line-height: 1.5; color: #3d3325; }
.sf-apps-steps b { display: block; margin-bottom: 2px; font: 400 clamp(22px, 2.2vw, 28px)/1.2 var(--sf-display); color: var(--text, #211a10); }
.sf-apps-app { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, .9fr); gap: clamp(20px, 3vw, 36px); align-items: center; margin-top: 56px; max-width: 1160px; }
.sf-apps-app .sf-cap { grid-column: 1 / -1; margin-top: 0; }
.sf-apps-phone img { border-radius: 30px; border: 8px solid #1d1711; }
.sf-condition { margin: 28px 0 0; max-width: 40em; padding: 4px 0 4px 18px; border-left: 3px solid var(--sf-olive); font: 400 clamp(19px, 1.8vw, 23px)/1.4 var(--sf-display); color: var(--text, #211a10); }
.sf-jobs-wrap { margin-top: clamp(56px, 7vw, 88px); }
.sf-jobs { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 1080px; }
.sf-jobs li { padding: 18px 20px; border-radius: 14px; background: var(--sf-surface); border: 1px solid var(--sf-border); font: 400 clamp(18px, 1.6vw, 21px)/1.35 var(--sf-display); }
.sf-coda { margin: 20px 0 0; font: italic 400 clamp(18px, 1.7vw, 22px)/1.4 var(--sf-display); color: var(--sf-muted); }
.par-sf-home .sf-home-apps { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: center; margin-top: clamp(36px, 5vw, 56px); max-width: 760px; }
.sf-home-apps p { margin: 0; font: 400 clamp(20px, 2vw, 26px)/1.3 var(--sf-display); }
.sf-home-apps a { display: inline-block; margin-top: 8px; font: 500 16px var(--sf-body); color: var(--sf-olive); }

@media (max-width: 860px) {
  .sf-apps-build, .sf-apps-app, .sf-jobs, .par-sf-home .sf-home-apps { grid-template-columns: minmax(0, 1fr); }
  .sf-apps-phone { order: -1; justify-self: center; width: 100%; max-width: 340px; }
}
