/* ==================================================================
   book.css — intro call request page

   This page borrows the home page's structural language rather than
   inventing its own: separation by space rather than rules, corners at
   the site's --radius--small (which reads as square), and the display
   face for the heading at section scale.

   Labels use the primary face. Only values the reader compares —
   times, counts — stay monospaced.
   ================================================================== */

:root {
  --bk-rule: color-mix(in srgb, var(--swatch--beige-100, #e8e8e3) 14%, transparent);
  --bk-rule-soft: color-mix(in srgb, var(--swatch--beige-100, #e8e8e3) 8%, transparent);
  --bk-surface: color-mix(in srgb, var(--swatch--beige-100, #e8e8e3) 4%, transparent);
  --bk-surface-hi: color-mix(in srgb, var(--swatch--beige-100, #e8e8e3) 9%, transparent);
  --bk-dim: var(--swatch--black-50, #938f8a);
  --bk-err: #ff8a7a;
  --bk-ease: cubic-bezier(.22, 1, .36, 1);
  --bk-radius: var(--radius--small, .15rem);
}

body {
  margin: 0;
  background: var(--swatch--black-400, #080807);
  color: var(--swatch--beige-100, #e8e8e3);
  min-height: 100svh;
}
fieldset { border: 0; margin: 0; padding: 0; }
dl, dd, h1, p { margin: 0; }

/* the shared navbar is fixed; give the content room to clear it */
.bk {
  position: relative;
  padding: clamp(7rem, 16vh, 11rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 8vh, 6rem);
  overflow: hidden;
}

/* --- layout ------------------------------------------------------ */
.bk__grid {
  position: relative;
  width: min(74rem, 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: clamp(1.5rem, 4vw, 4.5rem);
}

/* --- aside ------------------------------------------------------- */
.bk__aside { padding-right: clamp(0rem, 2vw, 2rem); }

.bk__kicker {
  color: var(--bk-dim);
  margin-bottom: clamp(1.1rem, 3vh, 1.8rem);
}

/* section-scale display type, matching the home page's headings */
.bk__title {
  font-family: var(--_typography---font--secondary-family, sans-serif);
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.9rem);
  line-height: 1.0;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.bk__lede {
  margin-top: 1.3rem;
  max-width: 38ch;
  color: var(--swatch--beige-400, #bfbfb1);
}

/* the meta list is spaced, not ruled — the home page separates with air */
.bk__meta {
  margin-top: clamp(2rem, 5vh, 3rem);
  display: grid;
  gap: 1.15rem;
}
.bk__meta > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  align-items: baseline;
  gap: 1rem;
}
.bk__meta dt { color: var(--bk-dim); }
.bk__meta dd { margin: 0; }
.bk__meta [data-clock] { font-variant-numeric: tabular-nums; }

.bk__note {
  margin-top: clamp(1.5rem, 4vh, 2.25rem);
  color: var(--bk-dim);
  max-width: 40ch;
}

/* --- form -------------------------------------------------------- */
.bk__form { padding: 0; }

.bk__field { margin-bottom: 2.1rem; }
.bk__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2vw, 1.6rem);
  margin-bottom: 2.1rem;
}
.bk__row .bk__field { margin-bottom: 0; }

.bk__label {
  display: block;
  color: var(--swatch--beige-200, #ddddd5);
  margin-bottom: .7rem;
}
.bk__hint { display: block; margin-top: .25rem; color: var(--bk-dim); }
.bk__hint b { color: var(--swatch--beige-200, #ddddd5); font-weight: 600; }

input[type=text], input[type=email], input[type=date], textarea {
  width: 100%;
  padding: .8rem .9rem;
  font-family: var(--_typography---font--primary-family, sans-serif);
  font-size: .95rem;
  color: var(--swatch--beige-100, #e8e8e3);
  background: var(--bk-surface);
  border: 0;
  border-radius: var(--bk-radius);
  transition: background .22s ease, box-shadow .22s ease;
}
input[type=date] { font-variant-numeric: tabular-nums; color-scheme: dark; }
input:focus, textarea:focus {
  outline: none;
  background: var(--bk-surface-hi);
  box-shadow: inset 0 -1px 0 0 var(--swatch--beige-100, #e8e8e3);
}
textarea { resize: vertical; min-height: 7rem; line-height: 1.55; }
::placeholder { color: var(--bk-dim); opacity: 1; }
[aria-invalid="true"] { box-shadow: inset 0 -1px 0 0 var(--bk-err); }

/* chips + slots: square, the way every other control on the site is */
.bk__chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.bk__chip input, .bk__slot input { position: absolute; opacity: 0; pointer-events: none; }
.bk__chip span, .bk__slot span {
  display: block;
  cursor: pointer;
  background: var(--bk-surface);
  border-radius: var(--bk-radius);
  transition: background .22s ease, color .22s ease, opacity .22s ease;
}
.bk__chip span { padding: .6rem 1.15rem; }
.bk__slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr)); gap: .5rem; }
.bk__slot span {
  text-align: center;
  padding: .65rem .3rem;
  font-family: var(--_typography---font--tertiary-family, monospace);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}
.bk__chip span:hover, .bk__slot span:hover { background: var(--bk-surface-hi); }
.bk__chip input:checked + span,
.bk__slot input:checked + span {
  background: var(--swatch--beige-100, #e8e8e3);
  color: var(--swatch--black-400, #080807);
}
.bk__chip input:focus-visible + span,
.bk__slot input:focus-visible + span { outline: 2px solid var(--swatch--beige-300, #d1d1c7); outline-offset: 2px; }
.bk__slot input:disabled + span { opacity: .3; cursor: not-allowed; }

/* character meter */
.bk__meter { display: flex; justify-content: flex-end; margin-top: .45rem; }
.bk__meter span {
  color: var(--bk-dim);
  font-family: var(--_typography---font--tertiary-family, monospace);
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}
.bk__meter[data-state="over"] span { color: var(--bk-err); }

/* --- actions + the one animated line ----------------------------- */
.bk__actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}
.bk__submit { border: 0; cursor: pointer; font: inherit; }
.bk__submit[disabled] { opacity: .55; cursor: not-allowed; }

/* the same vertical swap the statement rotator uses */
.bk__say {
  display: block;
  overflow: hidden;
  height: 1.5em;
  min-width: 1px;
  color: var(--swatch--beige-300, #d1d1c7);
}
.bk__say_item {
  display: block;
  line-height: 1.5em;
  opacity: 0;
  transform: translateY(0.9em);
  transition: opacity 420ms ease, transform 620ms var(--bk-ease);
}
.bk__say_item[data-in] { opacity: 1; transform: translateY(0); }
.bk__say_item[data-out] { opacity: 0; transform: translateY(-0.9em); }
.bk__say[data-state="err"] .bk__say_item { color: var(--bk-err); }
.bk__say[data-state="ok"] .bk__say_item { color: var(--swatch--beige-100, #e8e8e3); }

.bk__alt { margin-top: 1.4rem; color: var(--bk-dim); }
.bk__alt a { color: inherit; box-shadow: 0 1px 0 0 currentColor; }
.bk__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 900px) {
  .bk__grid { grid-template-columns: 1fr; }
  .bk__aside { padding-right: 0; }
  .bk__row { grid-template-columns: 1fr; gap: 1.4rem; }
  .bk__row .bk__field:first-child { margin-bottom: 2.1rem; }
  .bk__meta > div { grid-template-columns: 7rem 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .bk__say_item, .bk__chip span, .bk__slot span, input, textarea { transition: none; }
}
