/* Social Factory public site — shared stylesheet (2026-10-31 redesign)
   Palette: floor #EEF1EC · ink #17201E · steel #5B6764 · line #F2C230 · pass #3E7C6F · rule #CDD3CE
   Type: Archivo (variable width) — expanded heavy for display, normal width for text. */

@font-face {
  font-family: "Archivo";
  font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"), url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
}

:root {
  --floor: #EEF1EC;
  --panel: #F8FAF7;
  --ink: #17201E;
  --steel: #5B6764;
  --line: #F2C230;
  --pass: #3E7C6F;
  --rule: #CDD3CE;
  --focus: #1F5FD1;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--floor);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--floor); color: var(--ink); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--rule); background: rgba(238,241,236,.92); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; font-size: 1.05rem; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--steel); font-size: 0.94rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; text-decoration: none; border: 2px solid var(--ink); line-height: 1.2; }
.btn-solid { background: var(--ink); color: var(--floor); }
.btn-solid:hover { background: #26332F; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--panel); }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 0; }
.hero h1 {
  font-stretch: 125%; font-weight: 800; letter-spacing: -0.025em;
  font-size: clamp(2.3rem, 6.4vw, 5.2rem); line-height: 0.98; margin: 0; max-width: 15ch;
}
.hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--steel); max-width: 52ch; margin: 28px 0 32px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* the production line */
.line { margin-top: clamp(48px, 7vw, 88px); position: relative; padding-bottom: 56px; }
.track { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); }
.track::before { /* belt */
  content: ""; position: absolute; left: 0; right: 0; top: 300px; height: 14px; border-radius: 7px; background: var(--line);
}
.station { position: relative; padding-top: 336px; padding-right: 12px; }
.station::before { /* roller */
  content: ""; position: absolute; left: 0; top: 293px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--floor); border: 5px solid var(--ink);
}
.station h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 800; font-stretch: 112%; }
.station p { margin: 0; color: var(--steel); font-size: 0.9rem; max-width: 22ch; }

.post {
  position: absolute; top: 0; left: 0; width: min(230px, 19%); min-width: 190px;
  background: var(--panel); border: 2px solid var(--ink); border-radius: 14px; padding: 14px;
  box-shadow: 0 8px 0 var(--ink);
  animation: ride 6.5s cubic-bezier(.6,.0,.3,1) 0.4s both;
}
.post { z-index: 2; }
.queue { position: absolute; top: 0; left: 0; width: min(230px, 19%); min-width: 190px; height: 286px; z-index: 1; pointer-events: none; }
.queue i { position: absolute; inset: 0; border: 2px solid #B9C2BC; border-radius: 14px; opacity: 0; animation: queue-in .5s ease-out both;
  background:
    radial-gradient(circle at 25px 25px, #C9D1CB 11px, transparent 12px),
    linear-gradient(#DDE3DD, #DDE3DD) 14px 48px / calc(100% - 28px) 56px no-repeat,
    linear-gradient(#D3DAD4, #D3DAD4) 14px 118px / 70% 8px no-repeat,
    linear-gradient(#D3DAD4, #D3DAD4) 14px 134px / 52% 8px no-repeat,
    var(--panel); }
.queue i:nth-child(1) { animation-delay: 1.5s; }
.queue i:nth-child(2) { transform: translate(16px, -16px); z-index: -1; animation-delay: 1.8s; filter: brightness(.97); }
@keyframes queue-in { to { opacity: 1; } }
.post .who { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 700; }
.post .who span { width: 22px; height: 22px; border-radius: 50%; background: var(--pass); }
.post .media { margin: 10px 0; height: 56px; border-radius: 8px; background:
  repeating-linear-gradient(135deg, #DCE2DC 0 10px, #E7ECE6 10px 20px); }
.post .cap { font-size: 0.8rem; line-height: 1.4; margin: 0 0 10px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.74rem; }
.checks li { display: flex; align-items: center; gap: 6px; color: var(--steel); }
.checks li::before { content: ""; width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--rule); flex: none; }
.checks li.ok { color: var(--ink); }
.checks li.ok::before { background: var(--pass); border-color: var(--pass); }
.checks li:nth-child(1) { animation: tick 0s linear 1.9s both; }
.checks li:nth-child(2) { animation: tick 0s linear 3.2s both; }
.checks li:nth-child(3) { animation: tick 0s linear 4.5s both; }
.checks li:nth-child(4) { animation: tick 0s linear 5.8s both; }
.line { container-type: inline-size; }
.post { --step: 20cqw; }

@keyframes ride {
  0%, 12%  { transform: translateX(0); }
  25%, 33% { transform: translateX(calc(var(--step) * 1)); }
  45%, 53% { transform: translateX(calc(var(--step) * 2)); }
  65%, 73% { transform: translateX(calc(var(--step) * 3)); }
  88%, 100%{ transform: translateX(calc(var(--step) * 4)); }
}
@keyframes tick { to { color: var(--ink); } }
.checks li::before { animation: box 0s linear both; }
.checks li:nth-child(1)::before { animation-delay: 1.9s; }
.checks li:nth-child(2)::before { animation-delay: 3.2s; }
.checks li:nth-child(3)::before { animation-delay: 4.5s; }
.checks li:nth-child(4)::before { animation-delay: 5.8s; }
@keyframes box { to { background: var(--pass); border-color: var(--pass); } }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--rule); }
.section h2 { font-stretch: 118%; font-weight: 800; letter-spacing: -0.02em; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.05; margin: 0 0 16px; max-width: 24ch; }
.section .intro { color: var(--steel); max-width: 56ch; margin: 0 0 48px; font-size: 1.08rem; }

/* spec sheet: what the workspace does */
.spec { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; border-top: 2px solid var(--ink); }
.spec dt, .spec dd { padding: 22px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.spec dt { font-weight: 800; font-stretch: 112%; font-size: 1.15rem; padding-right: 24px; }
.spec dd { color: var(--steel); }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 6px solid var(--line); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font-weight: 800; font-stretch: 125%; font-size: 2.6rem; line-height: 1; margin-bottom: 14px; }
.steps h3 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 800; }
.steps p { margin: 0; color: var(--steel); font-size: 0.97rem; }

/* tiktok: product panel */
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.split p { max-width: 52ch; }
.facts { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; gap: 14px; }
.facts li { padding-left: 28px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 8px; width: 14px; height: 14px; border-radius: 3px; background: var(--pass); }
.panel { background: var(--panel); border: 2px solid var(--ink); border-radius: 18px; padding: 22px; box-shadow: 0 10px 0 var(--ink); }
.panel .bar { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--steel); margin-bottom: 16px; }
.panel .bar strong { color: var(--ink); }
.panel .preview { display: grid; grid-template-columns: 120px 1fr; gap: 16px; }
.panel .vid { aspect-ratio: 9/16; border-radius: 10px; background: linear-gradient(160deg, #2C3B37, #17201E); position: relative; }
.panel .vid::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-40%, -50%); border-left: 22px solid var(--floor); border-top: 14px solid transparent; border-bottom: 14px solid transparent; }
.panel dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 0.88rem; }
.panel dt { color: var(--steel); }
.panel dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.panel .consent { margin: 18px 0; padding: 14px; border: 1px dashed var(--steel); border-radius: 10px; font-size: 0.88rem; display: flex; gap: 10px; }
.panel .consent span.box { width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 4px; flex: none; margin-top: 2px; }
.panel .row { display: flex; gap: 10px; flex-wrap: wrap; }
.panel .row span { padding: 10px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; border: 2px solid var(--ink); }
.panel .row span.primary { background: var(--ink); color: var(--floor); }
.panel figcaption { margin-top: 16px; font-size: 0.8rem; color: var(--steel); }

/* channels */
.channels { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); }
.channels div { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--rule); }
.channels div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.channels h3 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 800; font-stretch: 112%; }
.channels p { margin: 0; color: var(--steel); font-size: 0.95rem; }

/* closing band */
.band { background: var(--ink); color: var(--floor); padding: clamp(56px, 8vw, 96px) 0; }
.band h2 { color: var(--floor); margin: 0 0 12px; font-stretch: 118%; font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -0.02em; }
.band p { color: #B9C3BF; max-width: 54ch; margin: 0 0 28px; }
.band .btn { border-color: var(--line); }
.band .btn-solid { background: var(--line); color: var(--ink); }
.band .btn-ghost { color: var(--floor); border-color: #4A5753; }
.band .btn-ghost:hover { background: #22302C; }

/* footer */
.site-foot { padding: 40px 0 56px; font-size: 0.9rem; color: var(--steel); }
.site-foot .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.site-foot .brand { color: var(--ink); font-size: 0.95rem; }
.site-foot .who { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-foot .brand img { width: 24px; height: 24px; border-radius: 6px; }
.band a.mail { color: var(--line); }
.site-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* inner pages: same header/footer, prose column */
.page { padding: clamp(48px, 7vw, 88px) 0; }
.page h1 { font-stretch: 125%; font-weight: 800; letter-spacing: -0.025em; font-size: clamp(2.1rem, 5vw, 3.8rem); line-height: 1; margin: 0 0 24px; max-width: 18ch; }
.page h2 { font-stretch: 112%; font-weight: 800; font-size: 1.4rem; margin: 48px 0 10px; }
.page p, .page li { max-width: var(--measure); }
.page .lede { font-size: 1.15rem; color: var(--steel); }
.page .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(32px, 6vw, 96px); }
.page aside { border-top: 6px solid var(--line); padding-top: 18px; font-size: 0.92rem; color: var(--steel); align-self: start; position: sticky; top: 96px; }
.page aside h2 { margin: 0 0 8px; font-size: 1rem; color: var(--ink); }
.page aside ul { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.page aside a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.page article > :first-child { margin-top: 0; }
.page ol.flow { list-style: none; padding: 0; counter-reset: f; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.page ol.flow li { counter-increment: f; display: grid; grid-template-columns: 56px 1fr; padding: 20px 0; border-bottom: 1px solid var(--rule); max-width: none; }
.page ol.flow li::before { content: counter(f); font-weight: 800; font-stretch: 125%; font-size: 1.6rem; line-height: 1.1; }
.page ol.flow h3 { margin: 0 0 4px; font-size: 1.1rem; }
.page ol.flow p { margin: 0; color: var(--steel); }
.page .note { background: var(--panel); border-left: 6px solid var(--pass); padding: 18px 20px; border-radius: 0 10px 10px 0; max-width: var(--measure); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: minmax(0,1fr); }
  .channels { grid-template-columns: 1fr; }
  .channels div + div { padding-left: 0; border-left: 0; }
  .page .wrap { grid-template-columns: minmax(0,1fr); }
  .page aside { position: static; }
}
@media (max-width: 760px) {
  .site-head .wrap { gap: 12px; min-height: 60px; padding-top: 10px; }
  .brand { font-size: 0.98rem; gap: 10px; }
  .brand img { width: 30px; height: 30px; }
  .site-nav { margin-left: 0; width: 100%; order: 3; gap: 14px; padding-bottom: 10px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .site-nav a { white-space: nowrap; font-size: 0.86rem; }
  .site-head .btn { margin-left: auto; padding: 8px 14px; font-size: 0.82rem; }
  .spec { grid-template-columns: 1fr; }
  .spec dt { padding-bottom: 4px; border-bottom: 0; }
  .spec dd { padding-top: 0; }
  /* line becomes vertical */
  .line { padding-bottom: 0; }
  .track { grid-template-columns: 1fr; padding-left: 48px; }
  .track::before { left: 12px; right: auto; top: 0; bottom: 0; width: 10px; height: auto; }
  .station { padding: 0 0 22px; }
  .station::before { left: -48px; top: 2px; width: 24px; height: 24px; border-width: 4px; }
  .post { position: relative; width: auto; min-width: 0; margin: 0 0 28px 48px; animation: none; }
  .queue { display: none; }
  .checks li::before, .checks li { animation: none !important; }
  .checks li::before { background: var(--pass); border-color: var(--pass); }
  .checks li { color: var(--ink); }
  .steps { grid-template-columns: 1fr; }
  .panel .preview { grid-template-columns: 90px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .post { animation: none; transform: translateX(calc(var(--step) * 4)); }
  .queue i { animation: none; opacity: 1; }
  .checks li, .checks li::before { animation: none !important; }
  .checks li { color: var(--ink); }
  .checks li::before { background: var(--pass); border-color: var(--pass); }
}
@media (prefers-reduced-motion: reduce) and (max-width: 760px) {
  .post { transform: none; }
}

/* Walkthrough page -------------------------------------------------------
   The design has no page with embedded media, so these two elements have no
   rules above: a <video> is not covered by the img/svg max-width line, which
   let it push the article wider than the viewport on both desktop and
   mobile. Measured with a real render before and after. */
.walkthrough-video, .shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 10px;
}
.walkthrough-video { background: var(--ink); }
.shot { margin: 28px 0; }
.shot figcaption { margin-top: 10px; color: var(--steel); font-size: 0.92rem; max-width: var(--measure); }

/* TikTok workspace ------------------------------------------------------
   The signed-in workspace used to be unstyled default HTML that printed raw
   JSON for the connection and the last result. It now reads as part of the
   site, so these rules cover what the marketing pages never needed: status
   cards, scope chips and real form controls. Selectors and form behaviour
   are untouched -- this is presentation only. */
.workspace { padding: clamp(32px, 5vw, 64px) 0; }
.workspace h1 { font-stretch: 125%; font-weight: 800; letter-spacing: -0.025em;
  font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.02; margin: 0 0 8px; }
.workspace .lede { color: var(--steel); max-width: 60ch; margin: 0 0 32px; }
.workspace h2 { font-stretch: 112%; font-weight: 800; font-size: 1.25rem; margin: 0 0 14px; }
.workspace h3 { font-weight: 700; font-size: 1rem; margin: 0 0 6px; }
.card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 28px; }
.panel-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.panel-card p { margin: 0 0 8px; }
.panel-card p:last-child { margin-bottom: 0; }
.panel-card .muted { color: var(--steel); font-size: 0.92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 10px 0 12px; list-style: none; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px;
  font-size: 0.85rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.chips li.off { color: var(--steel); border-style: dashed; }
.badge { display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: 0.85rem;
  font-weight: 700; border: 1px solid var(--line); }
.badge.ok { background: var(--pass); border-color: var(--pass); color: #fff; }
.badge.wait { background: var(--line); border-color: var(--line); color: var(--ink); }
.badge.none { color: var(--steel); }
.field { display: block; margin: 0 0 16px; }
.field > span { display: block; font-weight: 700; margin-bottom: 6px; }
.field textarea, .field select, .field input[type="text"] { width: 100%; font: inherit;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.field textarea { min-height: 96px; resize: vertical; }
.workspace fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 0 0 16px; }
.workspace legend { font-weight: 700; padding: 0 6px; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; line-height: 1.45; }
.check input { margin-top: 4px; flex: none; }
.workspace .notice { background: #fff; border-left: 4px solid var(--line); padding: 12px 16px;
  border-radius: 0 8px 8px 0; color: var(--steel); margin: 0 0 16px; }
.workspace video { display: block; width: 270px; max-width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 10px; background: var(--ink); margin: 0 0 16px; }
.workspace button[type="submit"] { font: inherit; font-weight: 700; cursor: pointer;
  background: var(--ink); color: var(--floor); border: 1px solid var(--ink);
  border-radius: 999px; padding: 11px 22px; }
.workspace button[disabled] { background: transparent; color: var(--steel);
  border-color: var(--line); cursor: not-allowed; }
.workspace .inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 20px; }
.workspace .inline-form .field { margin: 0; flex: 1 1 320px; }
.workspace .inline-form button { font: inherit; border-radius: 999px; padding: 10px 18px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.workspace section { margin-bottom: 36px; }

/* The posting form's own markup is untouched by the redesign, so these rules
   constrain controls that were never styled: the media <select> takes its
   intrinsic width from the longest candidate id, which pushed the document
   wider than a 390px viewport. Measured before and after with a real render. */
.workspace label { display: block; max-width: 100%; }
.workspace select, .workspace textarea, .workspace input { max-width: 100%; }
.workspace select { width: 100%; font: inherit; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.workspace textarea { width: 100%; font: inherit; padding: 10px 12px; min-height: 96px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.workspace label input[type="checkbox"] { margin-right: 8px; }
.workspace form > label, .workspace fieldset label { margin-bottom: 12px; }
.workspace form button { font: inherit; font-weight: 700; cursor: pointer; margin-top: 4px;
  background: var(--ink); color: var(--floor); border: 1px solid var(--ink);
  border-radius: 999px; padding: 11px 22px; }
.workspace form button[disabled] { background: transparent; color: var(--steel);
  border-color: var(--rule); cursor: not-allowed; }
