/* Blog posts: the buying touch points added by _content/post_touch.py.
   A product card mid-article, a two-way block and a free card at the end, "Read next", and a slim bar
   that shows once the reader is half way. Loaded after styles.css on every post. */

/* ---- product card in the middle of the article ---- */
.prose .post-card{display:grid;grid-template-columns:96px minmax(0,1fr) auto;gap:1rem 1.2rem;align-items:center;margin:2.4rem 0;padding:1rem 1.2rem 1rem 1rem;
  border:1px solid var(--line);border-radius:var(--r-lg);background:var(--bg-2)}
.post-card-img{display:block;width:96px;height:96px;border-radius:14px;overflow:hidden;background:oklch(0.13 0.01 55)}
.post-card-img img{width:100%;height:100%;object-fit:cover;display:block}
.prose .post-card .kicker{display:block;margin:0 0 .25rem;font-family:var(--font-tight);font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-mute)}
.prose .post-card h3{margin:0 0 .25rem;font-size:1.2rem}
.prose .post-card h3 a{color:var(--ink);text-decoration:none}
.prose .post-card h3 a:hover{color:var(--ember-hi)}
.prose .post-card p{margin:0;font-size:.93rem;line-height:1.5;max-width:44ch}
.post-card-buy{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem}
.post-card-buy b{font-family:var(--font-display);font-weight:600;font-size:1.4rem;letter-spacing:-.02em;color:var(--ink)}
.post-card-buy s{font-family:var(--font-tight);font-weight:400;font-size:.9rem;color:var(--ink-mute);margin-left:.35rem}
.post-card-buy .btn{white-space:nowrap}
@media (max-width:620px){
  .prose .post-card{grid-template-columns:72px minmax(0,1fr)}
  .post-card-img{width:72px;height:72px}
  .post-card-buy{grid-column:1 / -1;flex-direction:row;align-items:center;justify-content:space-between}
}

/* ---- end of the post: two ways to start ---- */
.post-end{margin-top:2.8rem}
.prose .post-end > h3{font-size:1.5rem;margin:0 0 1rem}
.post-end-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.post-way{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--bg-2);overflow:hidden}
.post-way.is-main{border-color:oklch(0.72 0.185 48 / .55);background:linear-gradient(160deg,oklch(0.24 0.035 50),var(--bg-2) 60%)}
.post-way-img{display:block;aspect-ratio:16/10;overflow:hidden;background:oklch(0.13 0.01 55)}
.post-way-img img{width:100%;height:100%;object-fit:cover;object-position:50% 30%;display:block}
.post-way-body{display:flex;flex-direction:column;flex:1;padding:1.1rem 1.2rem 1.2rem}
.prose .post-way .kicker{display:block;margin:0 0 .3rem;font-family:var(--font-tight);font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-mute)}
.prose .post-way h4{font-family:var(--font-display);font-weight:600;font-size:1.25rem;letter-spacing:-.02em;margin:0 0 .4rem;color:var(--ink)}
.prose .post-way p{margin:0 0 1rem;font-size:.93rem;line-height:1.5}
.post-way-foot{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:.8rem;flex-wrap:wrap}
.post-way-foot b{font-family:var(--font-display);font-weight:600;font-size:1.5rem;letter-spacing:-.02em;color:var(--ink)}
.post-way-foot s{font-family:var(--font-tight);font-weight:400;font-size:.9rem;color:var(--ink-mute);margin-left:.35rem}
.post-end-fine{margin:.9rem 0 0!important;font-size:.82rem!important;color:var(--ink-mute)!important}
@media (max-width:620px){.post-end-grid{grid-template-columns:1fr}}

/* ---- the free card for readers who are not ready to buy ---- */
.post-free{margin-top:1rem;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem 1.6rem;align-items:center;padding:1.2rem 1.3rem;border:1px dashed oklch(0.42 0.03 55);border-radius:var(--r-lg)}
.prose .post-free h4{font-family:var(--font-display);font-weight:600;font-size:1.15rem;letter-spacing:-.01em;margin:0 0 .35rem;color:var(--ink)}
.prose .post-free p{margin:0;font-size:.92rem;line-height:1.5}
.post-free-form{display:flex;gap:.5rem}
.post-free-form input[type=email]{flex:1;min-width:0;padding:.75em 1em;border-radius:100px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-family:var(--font-body);font-size:.92rem}
.post-free-form input[type=email]:focus{outline:none;border-color:var(--ember)}
.post-free-form .btn{white-space:nowrap}
.prose .post-free .post-free-fine{margin-top:.6rem;font-size:.74rem;line-height:1.45;color:var(--ink-mute)}
.prose .post-free .post-free-fine a{color:var(--ink-soft)}
.prose .post-free .post-free-msg{margin-top:.6rem;font-size:.88rem;color:var(--ink)}
.post-free-done{display:flex;flex-direction:column;align-items:flex-start;gap:.6rem}
@media (max-width:720px){.post-free{grid-template-columns:1fr}}
@media (max-width:420px){.post-free-form{flex-direction:column}.post-free-form .btn{justify-content:center}}

/* ---- read next ---- */
.post-next{max-width:780px;margin:2.6rem auto 0;padding:0 var(--pad)}
.post-next h2{font-family:var(--font-tight);font-weight:600;font-size:.8rem;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-mute);margin:0 0 .8rem}
.post-next ul{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.post-next a{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.95rem 0;border-bottom:1px solid var(--line);font-family:var(--font-display);font-weight:500;font-size:1.08rem;line-height:1.3;color:var(--ink);transition:color var(--t-fast) var(--ease)}
.post-next a small{flex:0 0 auto;font-family:var(--font-tight);font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-mute)}
.post-next a:hover{color:var(--ember-hi)}

/* ---- slim bar, from the middle of the article on ---- */
.post-bar{position:fixed;left:50%;bottom:max(1rem,env(safe-area-inset-bottom));z-index:60;display:flex;align-items:center;gap:.9rem;max-width:calc(100vw - 2rem);
  padding:.5rem .55rem .5rem .6rem;border:1px solid var(--line);border-radius:100px;background:oklch(0.17 0.014 52 / .94);backdrop-filter:blur(10px);box-shadow:0 18px 40px oklch(0 0 0 / .45);
  transform:translate(-50%,140%);opacity:0;transition:transform .4s var(--ease),opacity .3s var(--ease)}
.post-bar.in{transform:translate(-50%,0);opacity:1}
.post-bar[hidden]{display:none}
.post-bar img{width:40px;height:40px;border-radius:50%;object-fit:cover;flex:0 0 40px}
.post-bar-info{display:flex;flex-direction:column;min-width:0;font-family:var(--font-tight);line-height:1.25}
.post-bar-info b{font-weight:600;font-size:.9rem;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.post-bar-info span{font-size:.78rem;color:var(--ink-mute);white-space:nowrap}
.post-bar .btn{white-space:nowrap}
.post-bar-x{flex:0 0 2rem;width:2rem;height:2rem;border-radius:50%;font-size:1.2rem;line-height:1;color:var(--ink-mute)}
.post-bar-x:hover{color:var(--ink);background:oklch(1 0 0 / .08)}
@media (max-width:520px){.post-bar{left:1rem;right:1rem;transform:translateY(140%);justify-content:space-between}.post-bar.in{transform:none}.post-bar img{display:none}}
@media (prefers-reduced-motion:reduce){.post-bar{transition:none}}

/* liquid glass on the slim bar, matching the store pages */
.post-bar{background:oklch(0.22 0.014 55 / .62);border-color:transparent;-webkit-backdrop-filter:saturate(1.9) brightness(1.08) blur(22px);backdrop-filter:saturate(1.9) brightness(1.08) blur(22px);
  box-shadow:inset 0 1px 0 oklch(1 0 0 / .26),inset 0 -1px 0 oklch(0 0 0 / .3),0 16px 44px oklch(0 0 0 / .42)}
