/* Сторінки клієнтів (render.js): 4 шаблони × світла/темна. Адаптив через container queries —
   та сама верстка працює на весь екран, у прев'ю майстра і в мініатюрах. */
.mf-site {
  container-type: inline-size;
  --s-bg: #fbfaf7; --s-card: #ffffff; --s-ink: #16141d; --s-ink2: #3b3846; --s-muted: #75717f; --s-line: #e7e3da; --s-grid: rgba(22, 20, 29, .045);
  --f-display: Unbounded, Onest, system-ui, sans-serif; --f-body: Manrope, Onest, system-ui, sans-serif; --f-mono: "JetBrains Mono", ui-monospace, monospace; --f-hand: Caveat, cursive;
  --pad: clamp(18px, 6cqw, 72px); --r: 22px;
  background: var(--s-bg); color: var(--s-ink); font: 400 17px/1.6 var(--f-body); min-height: 100%; overflow: hidden; position: relative;
}
.mf-site.theme-dark { --s-bg: #14121b; --s-card: #1d1a28; --s-ink: #f4f1fb; --s-ink2: #cfc9e0; --s-muted: #918ba6; --s-line: #2e2a3d; --s-grid: rgba(255, 255, 255, .045); }
.mf-site * { box-sizing: border-box; }
:where(.mf-site) a { color: inherit; }
.mf-site figure { margin: 0; }
.mf-site h1, .mf-site h2, .mf-site h3 { margin: 0; font-family: var(--f-display); letter-spacing: -.03em; }
.mf-site h1 { font-weight: 800; font-size: clamp(36px, 5.6cqw, 80px); line-height: 1.04; }
.mf-site h2 { font-weight: 700; font-size: clamp(28px, 4.4cqw, 52px); line-height: 1.08; }
.mf-site h3 { font-weight: 700; font-size: 21px; line-height: 1.25; letter-spacing: -.02em; }
.mf-k { font: 500 12px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--s-muted); }
.mf-top { display: flex; align-items: center; padding: 18px var(--pad) 0; }
.mf-brand { display: flex; align-items: center; gap: 10px; font: 600 14px var(--f-mono); }
.mf-brand img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; background: var(--accent); }

/* герой */
.mf-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 4cqw; align-items: center; padding: 3cqw var(--pad) 2cqw; }
.mf-head { color: var(--s-ink2); font-weight: 600; font-size: clamp(18px, 1.9cqw, 22px); margin: 18px 0 0; }
.mf-lead { color: var(--s-ink2); font-size: clamp(17px, 1.6cqw, 20px); margin: 16px 0 0; max-width: 34em; }
.mf-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 30px; }
.mf-btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 16px/1 var(--f-body); padding: 17px 24px; border-radius: 999px;
  background: var(--s-ink); color: var(--s-bg); box-shadow: 4px 4px 0 var(--accent); transition: transform .2s, box-shadow .2s; }
.mf-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--accent); }
.mf-btn svg { width: 18px; height: 18px; }
.mf-soc { display: flex; gap: 8px; flex-wrap: wrap; }
.mf-soc a { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--s-card); border: 1px solid var(--s-line); color: var(--brand); transition: transform .2s, background .2s, color .2s; }
.mf-soc a:hover { transform: translateY(-3px); background: var(--brand); color: #fff; }
.mf-soc svg { width: 21px; height: 21px; }
.mf-stage { position: relative; display: grid; justify-items: center; width: 100%; }
.mf-copy { min-width: 0; }
.mf-site h1 { overflow-wrap: break-word; }
.mf-portrait { width: min(100%, 460px); }
.portrait.mf-portrait::after { content: ""; position: absolute; left: -1%; width: 102%; aspect-ratio: 1; top: calc(57.5% - 51% * 720 / 800);
  border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--accent) 50%, transparent); pointer-events: none; animation: mfspin 60s linear infinite; }
@keyframes mfspin { to { transform: rotate(360deg); } }
.mf-note { position: absolute; z-index: 4; left: -4%; top: 2%; transform: rotate(-8deg); pointer-events: none;
  font: 700 27px/1 var(--f-hand); color: color-mix(in srgb, var(--accent) 80%, var(--s-ink)); white-space: nowrap; }
.mf-note svg { display: block; margin: 4px 0 0 66px; }
.mf-note .t { display: none; }
@media (hover: none) { .mf-note .m { display: none; } .mf-note .t { display: inline; } }
.mf-fig { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.mf-snd { font: 500 12px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--s-ink2); background: var(--s-card);
  border: 1px solid var(--s-line); border-radius: 999px; padding: 7px 12px; cursor: pointer; }

/* секції */
.mf-sec { padding: clamp(64px, 9cqw, 120px) var(--pad) 0; }
.mf-h { margin-bottom: 34px; }
.mf-h .mf-k { display: block; margin-bottom: 12px; }
.mf-stats { padding-top: 40px; }
.mf-stats-in { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); max-width: calc(var(--n, 4) * 290px); background: var(--s-card); border: 1px solid var(--s-line); border-radius: var(--r); overflow: hidden; }
.mf-stat { padding: 28px 26px; border-left: 1px solid var(--s-line); margin-left: -1px; }
.mf-stat b { display: block; font: 700 clamp(30px, 4cqw, 48px)/1 var(--f-display); letter-spacing: -.03em; color: var(--s-ink); }
.mf-stat b::first-letter { color: inherit; }
.mf-stat p { margin: 12px 0 0; color: var(--s-muted); font-size: 15px; line-height: 1.45; }
.mf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.mf-card { background: var(--s-card); border: 1px solid var(--s-line); border-radius: var(--r); padding: 24px; text-decoration: none; display: flex; flex-direction: column; gap: 10px;
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.2), box-shadow .35s, border-color .35s; }
.mf-card:hover { transform: translateY(-5px) rotate(-.3deg); box-shadow: 0 24px 46px -28px color-mix(in srgb, var(--accent) 70%, transparent); border-color: color-mix(in srgb, var(--accent) 35%, var(--s-line)); }
.mf-card p { margin: 0; color: var(--s-ink2); font-size: 16px; }
.mf-price { margin-top: auto; padding-top: 8px; font: 700 15px var(--f-body); color: var(--accent); }
.theme-dark .mf-price, .theme-dark .mf-go { filter: brightness(1.35); }
.mf-go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--accent); }
.mf-go svg { width: 16px; height: 16px; }
.mf-review blockquote { margin: 0; font-size: 18px; line-height: 1.5; font-weight: 500; }
.mf-review figcaption { color: var(--s-muted); font-size: 15px; margin-top: auto; }
.mf-about-in { display: grid; gap: 28px; max-width: 900px; }
.mf-story p { font-size: clamp(17px, 1.7cqw, 20px); color: var(--s-ink2); margin: 0 0 16px; }
.mf-log { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--s-line); }
.mf-log li { display: flex; gap: 14px; align-items: baseline; padding: 15px 4px; border-bottom: 1px solid var(--s-line); font-weight: 600; }
.mf-ck { width: 20px; height: 20px; border-radius: 6px; background: var(--accent); position: relative; top: 4px; flex: none; }
.mf-ck::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mf-quote { margin: 0; padding: 24px 26px; background: var(--s-card); border: 1px solid var(--s-line); border-left: 4px solid var(--accent); border-radius: 0 var(--r) var(--r) 0; font-weight: 600; font-size: 20px; line-height: 1.45; }
.mf-linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.mf-lk { display: flex; align-items: center; gap: 12px; text-decoration: none; background: var(--s-card); border: 1px solid var(--s-line); border-radius: 18px; padding: 14px 16px;
  font: 600 16px var(--f-body); color: var(--s-ink); cursor: pointer; text-align: left; transition: transform .2s, border-color .2s; }
.mf-lk:hover { transform: translateY(-3px); border-color: var(--brand, var(--accent)); }
.mf-lk .ic, .mf-cb .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand, var(--accent)); color: #fff; flex: none; }
.mf-lk svg, .mf-cb svg { width: 21px; height: 21px; }
.mf-lk span, .mf-cb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-lk.done, .mf-cb.done { outline: 2px solid var(--brand, var(--accent)); }

/* контакт: кольоровий блок, як на cv.biz.ua */
.mf-contact-in { position: relative; overflow: hidden; border-radius: 32px; padding: clamp(36px, 6cqw, 80px); background: var(--accent); color: var(--on-accent); }
.mf-contact-in::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(color-mix(in srgb, var(--on-accent) 14%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--on-accent) 14%, transparent) 1px, transparent 1px); background-size: 28px 28px; }
.mf-contact-in > * { position: relative; }
.mf-contact-in .mf-k { color: inherit; opacity: .75; }
.mf-contact-in h2 { margin: 12px 0 14px; max-width: 12em; }
.mf-contact-in p { margin: 0 0 30px; max-width: 30em; opacity: .9; font-size: 18px; }
.mf-cbtns { display: flex; flex-wrap: wrap; gap: 10px; max-width: 72%; }
.mf-cb { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border: 0; cursor: pointer; font: 600 15px var(--f-body);
  background: var(--s-card); color: var(--s-ink); padding: 7px 16px 7px 7px; border-radius: 16px; max-width: 100%; transition: transform .2s; }
.mf-cb:hover { transform: translateY(-3px); }
.mf-cb .ic { width: 34px; height: 34px; border-radius: 10px; }
.mf-peek { position: absolute !important; right: clamp(8px, 4cqw, 56px); bottom: 0; width: clamp(130px, 21cqw, 260px); transform: translateY(18%); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.mf-contact-in:hover .mf-peek { transform: translateY(4%); }
.mf-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 40px var(--pad) 36px; color: var(--s-muted); font-size: 14px; }
.mf-foot a { color: var(--s-ink2); font-weight: 600; text-decoration: none; }

/* ============ Notebook: зошит у клітинку (як cv.biz.ua) ============ */
.t-notebook { background-image: linear-gradient(var(--s-grid) 1px, transparent 1px), linear-gradient(90deg, var(--s-grid) 1px, transparent 1px); background-size: 28px 28px; }
.t-notebook .mf-name { display: inline-block; background: var(--accent); color: var(--on-accent); padding: 0 .14em .04em; border-radius: .12em; transform: rotate(-2deg); }

/* ============ Soft: тепла, мʼяка, з засічками ============ */
.t-soft { --s-bg: #fbf6ef; --s-card: #fffdf9; --s-line: #eee3d4; --f-display: Fraunces, Georgia, serif; --r: 30px; }
.t-soft.theme-dark { --s-bg: #1a1714; --s-card: #24201b; --s-line: #352f27; }
.t-soft h1, .t-soft h2 { font-weight: 700; letter-spacing: -.02em; }
.t-soft h1 { font-size: clamp(42px, 7.5cqw, 88px); }
.t-soft .mf-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 2cqw; }
.t-soft .mf-copy { order: 2; display: grid; justify-items: center; }
.t-soft .mf-stage { order: 1; }
.t-soft .mf-portrait { width: min(100%, 380px); }
.t-soft .mf-head { margin: 0 0 10px; font: italic 500 20px var(--f-display); color: var(--accent); }
.theme-dark.t-soft .mf-head { filter: brightness(1.3); }
.t-soft .mf-lead { margin-inline: auto; }
.t-soft .mf-cta { justify-content: center; }
.t-soft .mf-btn { background: var(--accent); color: var(--on-accent); box-shadow: 0 14px 30px -14px var(--accent); }
.t-soft .mf-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px var(--accent); }
.t-soft .mf-note, .t-soft .mf-fig .mf-k, .t-soft .mf-card > .mf-k { display: none; }
.t-soft .mf-h { text-align: center; }
.t-soft .mf-card { border: 0; box-shadow: 0 10px 40px -24px rgba(90, 60, 20, .35); }
.t-soft .mf-stats-in { border: 0; box-shadow: 0 10px 40px -24px rgba(90, 60, 20, .35); }
.t-soft .mf-stat { text-align: center; }
.t-soft .mf-stat b { font-family: var(--f-display); color: var(--accent); }
.t-soft .mf-about-in { margin-inline: auto; }
.t-soft .mf-contact-in { background: color-mix(in srgb, var(--accent) 14%, var(--s-card)); color: var(--s-ink); text-align: center; }
.t-soft .mf-contact-in::before { display: none; }
.t-soft .mf-contact-in h2, .t-soft .mf-contact-in p { margin-inline: auto; }
.t-soft .mf-cbtns { justify-content: center; max-width: none; }
.t-soft .mf-peek { display: none; }

/* ============ Bold: велике імʼя на кольоровій смузі ============ */
.t-bold { --r: 18px; }
.t-bold .mf-top { position: absolute; z-index: 3; color: var(--on-accent); }
.t-bold .mf-hero { background: var(--accent); color: var(--on-accent); padding-top: 90px; padding-bottom: 0; align-items: end; border-radius: 0 0 44px 44px; }
.t-bold .mf-copy { padding-bottom: 6cqw; }
.t-bold h1 { text-transform: uppercase; font-size: clamp(34px, 5.4cqw, 96px); letter-spacing: -.045em; line-height: .95; }
.t-bold .mf-head { color: inherit; opacity: .85; margin: 0 0 16px; font: 500 14px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.t-bold .mf-lead { color: inherit; opacity: .9; }
.t-bold .mf-btn { background: var(--on-accent); color: var(--accent); box-shadow: 4px 4px 0 var(--s-ink); }
.t-bold .mf-soc a { background: transparent; border-color: color-mix(in srgb, var(--on-accent) 40%, transparent); color: var(--on-accent); }
.t-bold .portrait { --circle: color-mix(in srgb, var(--on-accent) 22%, var(--accent)); }
.t-bold .mf-note { color: var(--on-accent); }
.t-bold .mf-fig { display: none; }
.t-bold .portrait.mf-portrait::after { border-color: color-mix(in srgb, var(--on-accent) 40%, transparent); }
.t-bold .mf-card, .t-bold .mf-stats-in, .t-bold .mf-lk, .t-bold .mf-quote { border: 2px solid var(--s-ink); box-shadow: 5px 5px 0 var(--s-ink); }
.t-bold .mf-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--accent); }
.t-bold .mf-stat b { color: var(--accent); }
.theme-light.t-bold .mf-stat b { filter: brightness(.85); }
.t-bold h2 { text-transform: uppercase; letter-spacing: -.035em; }
.t-bold .mf-contact-in { border-radius: 24px; border: 2px solid var(--s-ink); box-shadow: 8px 8px 0 var(--s-ink); }

/* ============ Link in bio: вузька колонка, фото + соцмережі ============ */
.t-links { --pad: 20px; }
.t-links > * { max-width: 560px; margin-left: auto !important; margin-right: auto !important; }
.t-links .mf-top { display: none; }
.t-links .mf-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; padding-top: 30px; gap: 6px; }
.t-links .mf-copy { order: 2; display: grid; justify-items: center; }
.t-links .mf-stage { order: 1; }
.t-links .mf-portrait { width: 250px; }
.t-links h1 { font-size: 36px; }
.t-links .mf-head { margin-top: 10px; font-size: 17px; }
.t-links .mf-lead { font-size: 16px; }
.t-links .mf-cta { justify-content: center; flex-direction: column; margin-top: 22px; }
.t-links .mf-btn { display: none; }
.t-links .mf-note, .t-links .mf-fig, .t-links .mf-h .mf-k, .t-links .mf-card > .mf-k { display: none; }
.t-links .mf-sec { padding-top: 34px; }
.t-links .mf-links { padding-top: 22px; }
.t-links .mf-h { margin-bottom: 16px; text-align: center; }
.t-links h2 { font-size: 22px; }
.t-links .mf-linkgrid { grid-template-columns: 1fr; gap: 10px; }
.t-links .mf-lk { background: var(--brand, var(--accent)); color: #fff; border: 0; border-radius: 999px; padding: 8px 18px 8px 8px; font-size: 17px; justify-content: flex-start; }
.t-links .mf-lk .ic { background: rgba(255, 255, 255, .2); border-radius: 50%; }
.t-links .mf-lk span { flex: 1; text-align: center; margin-right: 40px; }
.t-links .mf-cards { grid-template-columns: 1fr; gap: 10px; }
.t-links .mf-card { padding: 18px 20px; }
.t-links .mf-stats-in { grid-template-columns: repeat(min(2, var(--n, 4)), minmax(0, 1fr)); }
.t-links .mf-contact-in { padding: 30px 24px; text-align: center; }
.t-links .mf-cbtns { max-width: none; justify-content: center; }
.t-links .mf-peek { display: none; }
.t-links .mf-foot { justify-content: center; text-align: center; }

@container (max-width: 760px) {
  .mf-hero { grid-template-columns: 1fr; gap: 6px; padding-top: 10px; }
  .mf-stage { order: -1; }
  .mf-portrait { width: min(84cqw, 400px); }
  .mf-note { left: -2%; top: 0; font-size: 22px; }
  .mf-note svg { margin-left: 48px; width: 56px; }
  .mf-fig .mf-k { display: none; }
  .mf-fig { margin-top: 24px; }
  .mf-cbtns { max-width: none; }
  .mf-peek { display: none; }
  .t-bold .mf-hero { padding-top: 70px; }
  .t-bold .mf-stage { order: -1; }
  .mf-stats-in { grid-template-columns: repeat(min(2, var(--n, 4)), minmax(0, 1fr)); }
  .mf-stat { padding: 20px 18px; }
}
