/* quickdial.ai/the-inference-mechanic — book page, on top of the site's Ambient Glass styles */
.bk .page { align-items: center; }
.bk-hero-page { min-height: 100vh; }
.bk-hero { display: grid; grid-template-columns: minmax(280px, .82fr) 1.18fr; gap: clamp(32px, 5vw, 80px); align-items: center; }

/* the cover: a lit book on a dark bench */
.bk-cover { position: relative; display: grid; justify-items: center; padding: 26px 0 34px; }
.bk-cover-glow { position: absolute; inset: 0; margin: auto; width: 78%; height: 70%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(240,115,61,.32), rgba(240,192,112,.10) 55%, transparent 72%); filter: blur(24px); }
.bk-cover-frame { position: relative; display: block; width: min(400px, 88%); border-radius: 12px; overflow: hidden;
  transform: perspective(1400px) rotateY(-7deg) rotateX(1.5deg); transform-origin: 60% 50%;
  box-shadow: 0 40px 90px rgba(0,0,0,.72), 0 14px 32px rgba(0,0,0,.5), 0 0 0 1px rgba(240,192,112,.42), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s ease; }
.bk-cover-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.04) 28%, rgba(255,255,255,0) 50%, rgba(0,0,0,.18) 100%); }
.bk-cover-frame:hover { transform: perspective(1400px) rotateY(-3deg) rotateX(0deg) translateY(-4px); box-shadow: 0 50px 100px rgba(0,0,0,.75), 0 0 0 1px rgba(240,192,112,.6), 0 0 60px rgba(240,115,61,.25); }
.bk-cover-frame img { width: 100%; height: auto; display: block; }
.bk-ribbon { position: absolute; right: 0; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px 9px 12px; border-radius: 999px;
  font-family: var(--ui); font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; color: #1a120a; font-weight: 600;
  background: linear-gradient(135deg, #ffd9a0, var(--gold) 60%, #d9a955); box-shadow: 0 12px 28px rgba(240,192,112,.35); transform: rotate(3deg); }
.bk-ribbon b { font-weight: 700; }

.bk-copy { display: grid; gap: clamp(14px, 1.8vh, 20px); }
.bk-copy h1 { font-size: clamp(44px, 5.6vw, 84px); }
.bk-sub { margin: -6px 0 0; font-family: var(--display); font-weight: 300; font-style: italic; font-size: clamp(20px, 2vw, 28px); color: var(--gold); letter-spacing: -.01em; }
.bk-by { margin: 0; font-size: 15px; color: var(--text-mid); max-width: 60ch; }
.bk-by a { color: var(--text-hi); border-bottom: 1px solid rgba(240,192,112,.45); }
.bk-by a:hover { color: var(--gold); }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.bk-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding-top: 6px; }
.bk-facts .fact b { font-size: 22px; line-height: 1.1; }

/* chapters */
.bk-chapters { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bk-ch { padding: 22px 22px 20px; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 6px; align-content: start; }
.bk-ch b { grid-row: 1 / 3; align-self: start; font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1; color: var(--orange); padding-top: 4px; }
.bk-ch h3 { font-size: 19px; line-height: 1.2; }
.bk-ch p { margin: 0; color: var(--text-mid); font-size: 13.5px; line-height: 1.5; }
.bk-ch-dyno { background: linear-gradient(135deg, rgba(240,192,112,.12), rgba(240,115,61,.05)), var(--glass-1); border-color: rgba(240,192,112,.55); }
.bk-ch-dyno b { color: var(--gold); }
.bk-who { margin-top: 18px; padding: 20px 24px; border-radius: var(--r-md); background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); display: grid; grid-template-columns: auto 1fr; gap: 10px 28px; align-items: start; }
.bk-who-k { font-family: var(--ui); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--orange); font-weight: 600; padding-top: 4px; white-space: nowrap; }
.bk-who ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--text-mid); }
.bk-who li b { color: var(--text-hi); font-weight: 600; }

/* author */
.bk-author { padding: clamp(24px, 3vw, 40px); display: grid; grid-template-columns: 220px 1fr; gap: clamp(22px, 3vw, 44px); align-items: center; }
.bk-author-photo { display: block; width: 200px; aspect-ratio: 1; border-radius: 50%; padding: 5px; margin: 0 auto;
  background: linear-gradient(135deg, rgba(240,192,112,.9), rgba(240,115,61,.55)); box-shadow: 0 18px 44px rgba(0,0,0,.55), 0 0 46px rgba(240,115,61,.22); }
.bk-author-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; filter: grayscale(1) contrast(1.05); background: #1c1815; }
.bk-author-copy { display: grid; gap: 12px; }
.bk-author-copy h2 { font-size: clamp(32px, 3.6vw, 52px); }
.bk-author-role { margin: 0; font-family: var(--ui); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.bk-author-copy p { margin: 0; color: var(--text-mid); font-size: 15px; line-height: 1.6; max-width: 70ch; }
.bk-author-links { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.bk-author-links .btn { padding: 11px 18px; font-size: 14px; }

/* waiting list */
.bk-wait { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3.5vw, 56px); align-items: center; }
.bk-wait-copy { display: grid; gap: 18px; }
.bk-form { padding: clamp(24px, 3vw, 36px); display: grid; gap: 14px; }
.bk-form-k { display: inline-flex; align-items: center; gap: 9px; font-family: var(--ui); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--orange); font-weight: 600; }
.bk-form-k i { width: 8px; height: 8px; border-radius: 50%; background: #5fd08a; box-shadow: 0 0 10px #5fd08a; }
.bk-field { display: grid; gap: 6px; }
.bk-field > span { font-family: var(--ui); font-size: 12px; font-weight: 500; color: var(--text-mid); letter-spacing: .3px; }
.bk-field em { font-style: normal; color: var(--text-faint); margin-left: 4px; }
.bk-field input, .bk-field select { width: 100%; padding: 14px 16px; border-radius: 14px; color: var(--text-hi); font: 500 15px var(--ui);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; appearance: none; -webkit-appearance: none; }
.bk-field select { background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,.6) 50%), linear-gradient(135deg, rgba(255,255,255,.6) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.bk-field select option { color: #111; }
.bk-field input::placeholder { color: var(--text-faint); }
.bk-field input:focus, .bk-field select:focus { border-color: rgba(240,192,112,.7); box-shadow: 0 0 0 4px rgba(240,192,112,.14); background: rgba(255,255,255,.09); }
.bk-field.invalid input { border-color: rgba(255,120,110,.8); box-shadow: 0 0 0 4px rgba(255,120,110,.14); }
.bk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bk-submit { justify-self: start; margin-top: 4px; }
.bk-submit[disabled] { opacity: .7; cursor: progress; }
.bk-form-note { margin: 0; font-size: 12.5px; color: var(--text-lo); line-height: 1.5; }
.bk-form-note a { color: var(--gold); border-bottom: 1px solid rgba(240,192,112,.35); }
.bk-form-done { display: grid; gap: 4px; padding: 16px 18px; border-radius: 14px; background: rgba(95,208,138,.10); border: 1px solid rgba(95,208,138,.4); }
.bk-form-done b { font-family: var(--display); font-weight: 600; font-size: 20px; }
.bk-form-done span { color: var(--gold); font-weight: 500; }
.bk-form-done small { color: var(--text-mid); font-size: 13px; }
.bk-form-err { padding: 12px 14px; border-radius: 12px; font-size: 13.5px; color: #ffb3aa; background: rgba(255,120,110,.10); border: 1px solid rgba(255,120,110,.4); }
.bk-form-err a { color: var(--gold); text-decoration: underline; }
.bk-form.is-done .bk-field, .bk-form.is-done .bk-submit, .bk-form.is-done .bk-form-note { display: none; }

/* responsive */
@media (max-width: 1100px) { .bk-chapters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 980px) {
  .bk-hero { grid-template-columns: 1fr; gap: 20px; } .bk-cover { padding: 10px 0 20px; } .bk-cover-frame { width: min(320px, 78%); transform: none; }
  .bk-wait { grid-template-columns: 1fr; } .bk-author { grid-template-columns: 1fr; text-align: center; } .bk-author-copy { justify-items: center; } .bk-author-photo { width: 170px; }
  .bk-who { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .bk-facts { grid-template-columns: 1fr 1fr; } .bk-chapters { grid-template-columns: 1fr; } .bk-ribbon { top: 0; right: 6px; font-size: 10.5px; } }

.bk-form-done[hidden], .bk-form-err[hidden] { display: none; }

/* the homepage strips padding from #top (the film); the book hero keeps the normal page padding */
.bk .bk-hero-page { padding: calc(var(--nav-h) + 40px) 22px 56px !important; }
.bk #top .wrap { width: min(1180px, 100%); }

/* ===== theinferencemechanic.com additions ===== */
.tim-logo svg { width: 30px; height: 30px; color: var(--gold); }
.tim-logo { font-size: 19px; }
.bk-chapters .bk-ch p a { color: var(--gold); font-weight: 600; border-bottom: 1px solid rgba(240,192,112,.35); }
.lead em { font-style: italic; color: var(--gold); }
/* read-before-you-buy */
.bk-read { padding: clamp(24px, 3.2vw, 44px); display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 4vw, 60px); align-items: center; }
.bk-read-copy { display: grid; gap: 16px; }
.bk-read-copy h2 { font-size: clamp(30px, 3.6vw, 50px); }
.bk-read-copy .btn { justify-self: start; }
.bk-read-shot { position: relative; display: block; justify-self: center; width: min(300px, 100%); aspect-ratio: 3 / 4; }
.bk-read-page { position: absolute; inset: 0; border-radius: 10px; background: #f3ece0; box-shadow: 0 26px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(240,192,112,.35); overflow: hidden; }
.bk-read-page.p1 { transform: rotate(-7deg) translate(-26px, 10px); opacity: .55; }
.bk-read-page.p2 { transform: rotate(-3deg) translate(-12px, 5px); opacity: .8; }
.bk-read-page.p1::before, .bk-read-page.p2::before { content: ""; position: absolute; inset: 14% 12%; background: repeating-linear-gradient(180deg, rgba(20,18,16,.16) 0 3px, transparent 3px 12px); }
.bk-read-page.p3 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-read-badge { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); white-space: nowrap; padding: 9px 14px; border-radius: 999px; font-family: var(--ui); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; color: #1a120a; background: linear-gradient(135deg, #ffd9a0, var(--gold) 60%, #d9a955); box-shadow: 0 12px 28px rgba(240,192,112,.35); }
footer .foot-brand { display: inline-flex; align-items: center; gap: 8px; } footer .foot-brand a { color: var(--gold); }
@media (max-width: 980px) { .bk-read { grid-template-columns: 1fr; } .bk-read-shot { width: min(240px, 70%); margin-bottom: 20px; } }
