/* foliowork.space: the one-page site. Tokens and shared pieces are in kraft.css.
   Radii follow the redesign's --radius: 10px scale (lg 10, xl 14, 2xl 18, 3xl 22). */

.page { min-height: 100dvh; overflow-x: clip; }
.wrap { margin: 0 auto; max-width: 80rem; padding: 0 24px; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }

/* FileTag: an outlined type badge and a file name. */
.ftag { display: inline-flex; min-width: 0; align-items: center; gap: 10px; }
.ftag b { flex: none; border: 1px solid var(--ink-25); border-radius: 4px; padding: 0 6px; font: 400 11px/18px var(--font-code); color: var(--ink-soft); }
.ftag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }

/* Initials only: no photos, no presence. */
.av { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border: 1px solid var(--ink-25); border-radius: 999px; background: var(--paper); color: var(--ink); font: 400 11px/1 var(--font-code); }
.av.you { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.av.sm { width: 24px; height: 24px; font-size: 10px; }
.avs { display: flex; }
.avs .av { box-shadow: 0 0 0 2px var(--paper); }
.avs .av + .av { margin-left: -8px; }

.mono-s { font-family: var(--font-code); font-size: 12px; color: var(--ink-soft); }
.soft { color: var(--ink-soft); }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-grain { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero-inner { display: flex; min-height: 100dvh; flex-direction: column; justify-content: flex-end; padding-top: 128px; padding-bottom: 64px; }
.hero .eyebrow { margin-bottom: 32px; }
.hero h1 { max-width: 11ch; font-family: var(--font-display); font-size: clamp(56px, 10.5vw, 164px); line-height: .92; letter-spacing: -0.035em; }
.hero h1 em { color: var(--ink-soft); }
.hero-row { margin-top: 48px; display: flex; flex-direction: column; gap: 32px; }
.hero-sub { max-width: 28rem; font-size: 19px; line-height: 1.625; color: var(--ink-soft); }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.textlink { font-size: 15px; color: var(--ink-soft); text-underline-offset: 4px; transition: color .15s; }
.textlink:hover { color: var(--ink); text-decoration: underline; }
@media (min-width: 768px) { .hero-row { flex-direction: row; align-items: flex-end; justify-content: space-between; } }

/* File band: two rows that drift, and speed up when you scroll. */
.band { border-top: 1px solid var(--ink-18); padding: 20px 0; display: grid; gap: 12px; }
.vrow { width: 100%; overflow: hidden; white-space: nowrap; }
.vtrack { display: inline-flex; align-items: center; will-change: transform; user-select: none; -webkit-user-select: none; }
.vblock { display: inline-flex; flex-shrink: 0; align-items: center; }
.vblock .ftag { flex: none; margin: 0 24px; }

/* ---------- statement ---------- */
.statement-sec { padding-top: 160px; padding-bottom: 128px; }
.statement { margin-top: 32px; max-width: 17ch; font-family: var(--font-display); font-size: clamp(44px, 7vw, 112px); line-height: .98; letter-spacing: -0.03em; }
.flip-row { margin-top: 64px; display: flex; flex-direction: column; gap: 24px; }
.flip-row p { max-width: 20rem; font-size: 15px; line-height: 1.625; color: var(--ink-soft); }
@media (min-width: 768px) { .flip-row { flex-direction: row; align-items: center; gap: 40px; } }

/* Split-flap board (after Kokonut UI's split-flap text, MIT; see THIRD_PARTY_NOTICES.md). */
.flap { display: inline-flex; gap: .08em; font-family: var(--font-code); font-size: 24px; font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .flap { font-size: 36px; } }
.tile { position: relative; display: inline-block; height: 1.15em; width: .72em; border-radius: 3px; background: var(--ink); color: var(--on-ink); perspective: 5em; }
.half { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: inherit; border-radius: inherit; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.half.top { top: 0; transform-origin: 50% 100%; }
.half.bot { bottom: 0; transform-origin: 50% 0%; }
.half i { position: absolute; left: 0; right: 0; display: flex; height: 200%; align-items: center; justify-content: center; font-style: normal; }
.half.top i { top: 0; }
.half.bot i { bottom: 0; }
.tile .shade { pointer-events: none; position: absolute; left: 0; right: 0; bottom: 0; height: 50%; background: color-mix(in srgb, var(--on-ink) 25%, transparent); opacity: 0; }
.tile .hinge { pointer-events: none; position: absolute; left: 0; right: 0; top: 50%; height: .04em; transform: translateY(-50%); background: var(--paper); }

/* ---------- the demo: one Daktylo job ---------- */
.stage { display: flex; min-height: 100dvh; align-items: center; background: var(--paper-2); }
.stage-grid { width: 100%; display: grid; gap: 48px; padding-top: 96px; padding-bottom: 96px; }
.steps { display: flex; flex-direction: column; justify-content: center; gap: 40px; order: 2; }
.counter { display: flex; align-items: center; gap: 16px; font: 400 13px/1.5 var(--font-code); color: var(--ink-soft); }
.counter .c-step-n { color: var(--ink); }
.counter .line { position: relative; height: 1px; flex: 1; background: var(--ink-18); }
.counter .c-progress { position: absolute; inset: 0; transform-origin: left; background: var(--ink); }
.caps { display: grid; gap: 32px; }
.cap-t { font-family: var(--font-display); font-size: clamp(32px, 3.4vw, 48px); line-height: 1.02; letter-spacing: -0.02em; }
.cap-b { margin-top: 12px; max-width: 20rem; font-size: 16px; line-height: 1.625; color: var(--ink-soft); }
@media (min-width: 960px) {
  .stage-grid { grid-template-columns: 19rem 1fr; padding-top: 48px; padding-bottom: 48px; }
  .steps { order: 0; }
}
/* Captions share one cell only while pinned; otherwise they stack. */
[data-pinned] .caps { grid-template-columns: 1fr; grid-template-rows: 1fr; }
[data-pinned] .c-cap { grid-column-start: 1; grid-row-start: 1; }

.app-wrap { position: relative; min-width: 0; }
.app { min-width: 0; overflow: hidden; border: 1px solid var(--ink-18); border-radius: 18px; background: var(--paper); box-shadow: 0 40px 80px -48px rgba(46, 48, 51, .5); }
.app-bar { display: flex; height: 44px; align-items: center; gap: 8px; border-bottom: 1px solid var(--ink-18); padding: 0 16px; }
.app-bar .dot { width: 12px; height: 12px; border-radius: 999px; background: var(--ink-18); }
.app-bar .title { margin-left: 16px; }
.app-bar .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.app-bar .shared { display: none; }
@media (min-width: 640px) { .app-bar .shared { display: inline; } }
.app-body { display: grid; min-height: 30rem; }
.tree { display: none; min-width: 0; border-right: 1px solid var(--ink-18); background: color-mix(in srgb, var(--paper-2) 60%, transparent); padding: 8px; }
.tree li { display: flex; min-width: 0; align-items: center; gap: 8px; border-radius: 10px; padding: 8px 10px; }
.tree li.c-hit { background: var(--ink-10); }
.tree .c-skip { margin-left: auto; flex: none; font: 400 11px/1.5 var(--font-code); color: var(--ink-soft); }
@media (min-width: 1280px) { .app-body { grid-template-columns: 16rem 1fr; } .tree { display: block; } }
.chat { display: flex; min-width: 0; flex-direction: column; gap: 16px; padding: 20px; }
@media (min-width: 768px) { .chat { padding: 28px; } }
.ask { max-width: 85%; align-self: flex-end; border-radius: 18px 18px 8px 18px; background: var(--ink); padding: 12px 16px; font-size: 15px; color: var(--on-ink); }
.ask span { display: block; }
.changes { display: grid; grid-template-columns: 1fr; border: 1px solid var(--ink-18); border-radius: 14px; }
.changes li { min-width: 0; padding: 16px; }
.changes li + li { border-top: 1px solid var(--ink-18); }
.change-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.swap { display: grid; flex: none; font-size: 13px; }
.swap > * { grid-column-start: 1; grid-row-start: 1; border-radius: 999px; padding: 4px 12px; font-weight: 600; text-align: center; }
.swap .ghost { visibility: hidden; border: 1px solid var(--ink); }
.swap .solid { background: var(--ink); color: var(--on-ink); }
.version .swap > * { padding: 6px 12px; }
.change-text { margin-top: 12px; font-family: var(--font-display); font-size: 19px; }
.change-text s { color: var(--ink-soft); text-decoration-thickness: 1px; }
.undo { display: inline-flex; height: 36px; align-items: center; align-self: flex-start; border: 1px solid var(--ink-25); border-radius: 999px; padding: 0 16px; font-size: 13px; font-weight: 600; }
.undo:hover { background: var(--ink-10); }
.version { display: flex; align-items: center; gap: 12px; border-radius: 14px; background: var(--ink-10); padding: 10px 10px 10px 16px; }
.version .bullet { width: 10px; height: 10px; flex: none; border-radius: 999px; background: var(--ink); }
.version .what { min-width: 0; flex: 1; font-size: 15px; }

/* The same project on a teammate's Mac: over the window while pinned, below it otherwise. */
.mate { margin-top: 16px; border: 1px solid var(--ink-18); border-radius: 18px; background: var(--paper); padding: 20px; box-shadow: 0 30px 60px -30px rgba(46, 48, 51, .55); }
[data-pinned] .mate { position: absolute; top: 64px; right: 24px; margin-top: 0; width: min(23rem, 78%); }
.mate-head { display: flex; align-items: center; gap: 12px; }
.mate-title { margin-top: 16px; font-family: var(--font-display); font-size: 24px; line-height: 1.25; }
.mate-who { margin-top: 12px; display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.375; }
.mate-who .soft { display: block; }
.mate ul { margin-top: 12px; display: grid; gap: 6px; border-top: 1px solid var(--ink-18); padding-top: 12px; }
.mate li { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; }
.mate li .by { flex: none; font: 400 11px/1.5 var(--font-code); color: var(--ink-soft); }

/* ---------- stacking cards ---------- */
/* A flex column, so each zero-height anchor sits exactly where its card starts
   (no margin collapsing). Links aim at the anchors, never at the sticky cards:
   a stuck card reports its stuck position, which is why #team used to land
   with every later card stacked on top of it. */
.cards { margin: 0 auto; max-width: 72rem; padding: 128px 16px 64px; display: flex; flex-direction: column; }
@media (min-width: 768px) { .cards { padding-left: 40px; padding-right: 40px; } }
.card-anchor { height: 0; }
.c-card { position: sticky; margin-bottom: 8vh; border: 1px solid var(--ink-18); border-radius: 22px; background: var(--paper); padding: 32px; }
.c-card:last-child { margin-bottom: 0; }
@media (min-width: 768px) { .c-card { padding: 48px; } }
.c-card.k1 { top: 10vh; } #team { scroll-margin-top: 10vh; }
.c-card.k2 { top: 12vh; background: var(--paper-2); } #versions { scroll-margin-top: 12vh; }
.c-card.k3 { top: 14vh; } #files { scroll-margin-top: 14vh; }
.c-card.k4 { top: 16vh; border: 0; } #power { scroll-margin-top: 16vh; }
.card-grid { margin-top: 24px; display: grid; gap: 40px; }
.card-grid.end { gap: 32px; }
@media (min-width: 768px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .card-grid.end { align-items: end; }
  .card-grid.mid { align-items: center; }
}
.card-h { font-family: var(--font-display); font-size: clamp(36px, 4.6vw, 64px); line-height: 1; letter-spacing: -0.025em; }
.card-p { margin-top: 24px; max-width: 28rem; font-size: 17px; line-height: 1.625; color: var(--ink-soft); }
.card-grid.end .card-p { margin-top: 0; }
.people { margin-top: 32px; display: flex; align-items: center; gap: 12px; }
.panel { display: grid; min-width: 0; align-content: start; gap: 4px; border: 1px solid var(--ink-18); border-radius: 18px; background: color-mix(in srgb, var(--paper-2) 50%, transparent); padding: 8px; }
.activity li { display: flex; align-items: flex-start; gap: 12px; border-radius: 14px; padding: 12px; }
.activity .what { margin-top: 2px; font-size: 15px; line-height: 1.375; }
.activity .tag { margin-top: 8px; display: inline-block; border: 1px solid var(--ink-25); border-radius: 999px; padding: 2px 10px; font: 400 11px/1.5 var(--font-code); color: var(--ink-soft); }
.filelist li { min-width: 0; border-radius: 10px; padding: 10px 12px; transition: background-color .15s; }
.filelist li:hover { background: var(--ink-10); }

/* The web take on Kraft Grid's version line. */
.vline { margin-top: 48px; }
.vline-track { position: relative; height: 64px; }
.vline-track > span { position: absolute; }
.vl-main { left: 0; right: 0; top: 40px; height: 1px; background: var(--ink-25); }
.vl-branch { top: 12px; left: 29%; width: 18%; height: 1px; background: var(--ink-soft); }
.vl-drop { top: 12px; left: 29%; width: 1px; height: 28px; background: var(--ink-soft); }
.vl-wip { top: 12px; left: 39%; width: 10px; height: 10px; transform: translate(-50%, -50%); border: 1px solid var(--ink-soft); border-radius: 999px; background: var(--paper); }
.vl-dot { top: 40px; width: 10px; height: 10px; transform: translate(-50%, -50%); border-radius: 999px; background: var(--ink); }
.vl-dot.now { width: 14px; height: 14px; outline: 1px solid var(--ink); outline-offset: 4px; }
.vline ol { margin-top: 16px; display: grid; gap: 16px 24px; }
.vline li p + p { margin-top: 4px; font-size: 15px; line-height: 1.375; }
@media (min-width: 640px) { .vline ol { grid-template-columns: repeat(4, 1fr); } }

.opts { display: grid; gap: 20px; }
.opts dt { margin-bottom: 8px; }
/* Segmented choices: sized to their options on wide screens, one equal row on phones. */
.opts dd { display: flex; width: fit-content; max-width: 100%; flex-wrap: wrap; gap: 4px; border: 1px solid var(--ink-18); border-radius: 999px; padding: 4px; }
.opts dd button { border-radius: 999px; padding: 8px 16px; font-size: 14px; color: var(--ink-soft); transition: background-color .2s, color .2s; }
.opts dd button:hover { color: var(--ink); background: var(--ink-10); }
.opts dd button[aria-checked="true"] { background: var(--ink); color: var(--on-ink); }
.opts dd button:focus-visible { outline-offset: -4px; outline-color: var(--paper); }
.opts dd button[aria-checked="false"]:focus-visible { outline-color: var(--ink); }
@media (max-width: 520px) {
  .opts dd { width: auto; flex-wrap: nowrap; }
  .opts dd button { flex: 1 1 0; min-width: 0; padding: 8px 10px; font-size: 13px; line-height: 1.25; text-align: center; }
}

/* ---------- invite ---------- */
.invite { display: grid; gap: 48px; padding-top: 96px; padding-bottom: 144px; scroll-margin-top: 96px; }
@media (min-width: 768px) { .invite { grid-template-columns: 1.3fr 1fr; } }
.invite h2 { max-width: 9ch; font-family: var(--font-display); font-size: clamp(56px, 8vw, 128px); line-height: .92; letter-spacing: -0.035em; }
.invite-side { align-self: end; }
.invite-side > p { margin-bottom: 32px; font-size: 17px; line-height: 1.625; color: var(--ink-soft); }
.form { display: grid; gap: 12px; }
.field { height: 52px; width: 100%; border: 1px solid var(--ink-25); border-radius: 999px; background: var(--paper); padding: 0 20px; font-size: 16px; color: var(--ink); outline: none; transition: border-color .15s; -webkit-appearance: none; appearance: none; }
.field::placeholder { color: var(--ink-soft); }
.field:focus, .field[aria-invalid="true"] { border-color: var(--ink); }
.field:disabled { opacity: .6; }
select.field.empty { color: var(--ink-soft); }
.form .submit { height: 52px; font-size: 16px; }
.form .submit[aria-disabled="true"] { opacity: .7; }
.note { font-size: 14px; line-height: 1.375; }
.fine { font: 400 14px/1.5 var(--font-code); color: var(--ink-soft); }
.done { border: 1px solid var(--ink-18); border-radius: 22px; padding: 24px; }
.done h3 { font-family: var(--font-display); font-size: 28px; line-height: 1.25; }
.done .soft { margin-top: 8px; }
.done .fine { margin-top: 16px; }
.done button { margin-top: 20px; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
[hidden] { display: none !important; }
