/* Booking. Two separate pieces: a halftone art card where every answer adds a layer to the mark,
   and an editorial panel of ruled lines, serif numerals and underlined fields. */
.bk {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
  font-family: var(--sans);
  color: #14213d;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.26s ease, visibility 0.26s;
}

.bk.is-open {
  visibility: visible;
  opacity: 1;
}

.bk__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  background: rgba(14, 23, 44, 0.66);
  border: 0;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.bk__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  width: min(1040px, 100%);
  height: min(680px, calc(100dvh - 32px));
}

.bk__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: #14213d;
  background: transparent;
  border: 1px solid rgba(20, 33, 61, 0.18);
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}

.bk__close:hover {
  color: #f4ede0;
  background: #14213d;
}

.bk__close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ---------- The art card ---------- */
.bk__art {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 26px;
  overflow: hidden;
  color: #f4ede0;
  background: linear-gradient(180deg, #14213d 42%, #2a4073 58%, #bc784d 70%, #e6ad61 80%, #f7cc8f 92%);
  border-radius: 28px;
  opacity: 0;
  transform: translateX(-22px) rotate(-1.2deg);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.bk.is-open .bk__art {
  opacity: 1;
  transform: none;
}

.bk__canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.bk__eyebrow {
  align-self: flex-start;
  margin: 0;
  padding: 7px 12px;
  color: #14213d;
  font: 600 14px/1 var(--sans);
  letter-spacing: -0.02em;
  background: #f4ede0;
  border-radius: 999px;
}

.bk__stack {
  position: relative;
  flex: none;
  height: 200px;
  margin: auto 0;
}

@keyframes bk-breathe {
  50% { opacity: 0.42; }
}

@keyframes bk-land {
  from { opacity: 0.2; transform: translateY(calc(var(--lift) - 30px)); }
}


/* The finished booking: the layers close up into the whole mark. */
/* Once the light has filled the card, everything on it turns navy. */
.bk.is-done .bk__eyebrow {
  color: #f4ede0;
  background: #14213d;
}

.bk.is-done .bk__pitch {
  color: #14213d;
}

.bk__pitch {
  margin: 0;
  color: #14213d;
  font: 600 clamp(33px, 3.5vw, 42px)/0.98 var(--sans);
  letter-spacing: -0.05em;
  transition: color 1.2s ease;
}

/* ---------- The panel ---------- */
.bk__main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 22px 34px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f4ede0;
  border-radius: 28px;
  opacity: 0;
  transform: translateX(22px);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.bk.is-open .bk__main {
  opacity: 1;
  transform: none;
}

.bk__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-right: 44px;
  color: #626a84;
  font: 400 15px/1 var(--sans);
  letter-spacing: -0.01em;
}

.bk__back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 6px 8px 6px 0;
  color: #14213d;
  font: 600 15px/1 var(--sans);
  letter-spacing: -0.02em;
  background: none;
  border: 0;
}

.bk__back svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bk__heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 8px 0 18px;
}

.bk__num {
  flex: none;
  font: 400 clamp(52px, 5.6vw, 70px)/0.9 var(--serif);
  letter-spacing: -0.03em;
}

.bk__title {
  margin: 0;
  font: 600 clamp(28px, 3.1vw, 38px)/1 var(--sans);
  letter-spacing: -0.05em;
  outline: 0;
}

.bk__step.is-entering {
  animation: bk-in 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes bk-in {
  from { opacity: 0; transform: translateY(12px); }
}

/* Step 1: a ruled list, like the rest of the site */
.bk__needs {
  border-bottom: 1px solid rgba(20, 33, 61, 0.16);
}

.bk__need {
  position: relative;
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 14px 4px 14px 0;
  color: #14213d;
  font-family: var(--sans);
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid rgba(20, 33, 61, 0.16);
}

.bk__need strong {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.04em;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.bk__need span {
  grid-column: 1;
  color: #626a84;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.03s;
}

.bk__need:hover strong,
.bk__need:hover span,
.bk__need:focus-visible strong,
.bk__need:focus-visible span {
  transform: translateX(8px);
}

.bk__need[aria-pressed="true"] strong {
  text-decoration: underline 2px #d99757;
  text-underline-offset: 5px;
}

/* Step 2 */
.bk__days {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(20, 33, 61, 0.16);
  border-left: 1px solid rgba(20, 33, 61, 0.16);
}

.bk__day {
  display: grid;
  gap: 3px;
  min-height: 56px;
  padding: 8px 4px;
  color: #14213d;
  font-family: var(--sans);
  text-align: center;
  background: none;
  border: 0;
  border-right: 1px solid rgba(20, 33, 61, 0.16);
  border-bottom: 1px solid rgba(20, 33, 61, 0.16);
  transition: background 0.18s ease, color 0.18s ease;
}

.bk__day small {
  color: #626a84;
  font-size: 13px;
}

.bk__day strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.bk__day:hover {
  background: rgba(217, 151, 87, 0.26);
}

.bk__day[aria-pressed="true"] {
  color: #f4ede0;
  background: #14213d;
}

.bk__day[aria-pressed="true"] small {
  color: rgba(244, 237, 224, 0.74);
}

.bk__more {
  display: block;
  margin: 6px 0 0 auto;
  padding: 4px 0;
  color: #14213d;
  font: 600 14px/1.2 var(--sans);
  letter-spacing: -0.02em;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
}

.bk__more[hidden] {
  display: none;
}

.bk__label {
  margin: 2px 0 9px;
  font: 600 16px/1.2 var(--sans);
  letter-spacing: -0.02em;
}

.bk__times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 5px;
}

.bk__time {
  min-height: 38px;
  padding: 0 4px;
  color: #14213d;
  font: 600 15px/1 var(--sans);
  letter-spacing: -0.02em;
  background: none;
  border: 1px solid rgba(20, 33, 61, 0.16);
  border-radius: 999px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.bk__time:hover:not(:disabled) {
  background: #d99757;
  border-color: #d99757;
}

.bk__time[aria-pressed="true"] {
  background: #d99757;
  border-color: #d99757;
}

.bk__time:disabled {
  color: rgba(20, 33, 61, 0.32);
  text-decoration: line-through;
  border-color: transparent;
}

.bk__zone {
  margin: 10px 0 0;
  color: #626a84;
  font: 400 14px/1.3 var(--sans);
  letter-spacing: -0.01em;
}

/* Step 3: words on a line, not boxes */
.bk__form {
  display: grid;
  gap: 15px;
}

.bk__form[hidden],
.bk__step[hidden],
.bk__done[hidden],
.bk__head[hidden] {
  display: none;
}

.bk__summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: -6px 0 0;
  font: 600 18px/1.2 var(--sans);
  letter-spacing: -0.03em;
}

.bk__summary button {
  flex: none;
  padding: 2px 0;
  color: #14213d;
  font: 400 14px/1 var(--sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
}

.bk__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.bk__field {
  display: grid;
  gap: 2px;
}

.bk__field > span:first-child {
  color: #626a84;
  font: 400 15px/1.1 var(--sans);
  letter-spacing: -0.01em;
}

.bk__field input,
.bk__field select,
.bk__field textarea {
  width: 100%;
  min-height: 42px;
  padding: 6px 0;
  color: #14213d;
  font: 600 21px/1.2 var(--sans);
  letter-spacing: -0.03em;
  background: none;
  border: 0;
  border-bottom: 1.5px solid rgba(20, 33, 61, 0.24);
  border-radius: 0;
  outline: 0;
  transition: border-color 0.2s ease;
}

.bk__field select {
  font-size: 17px;
}

.bk__field textarea {
  font-size: 17px;
  font-weight: 500;
  resize: vertical;
}

.bk__field input:focus,
.bk__field select:focus,
.bk__field textarea:focus {
  border-bottom-color: #d99757;
}

.bk__field input[aria-invalid] {
  border-bottom-color: #b23a2e;
}

.bk__field em {
  margin-top: 3px;
  color: #b23a2e;
  font: 500 14px/1.2 var(--sans);
}

.bk__field em:empty {
  display: none;
}

.bk__phone {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
}

.bk__extra summary {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 2px 0;
  font: 600 15px/1.2 var(--sans);
  letter-spacing: -0.02em;
  list-style: none;
}

.bk__extra summary::-webkit-details-marker {
  display: none;
}

.bk__extra summary::before {
  content: "+";
}

.bk__extra[open] summary::before {
  content: "\2212";
}

.bk__extra small {
  color: #626a84;
  font-size: 14px;
  font-weight: 400;
}

.bk__extra .bk__field {
  margin-top: 8px;
}

.bk__submit,
.bk__finish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  padding: 0 22px;
  color: #14213d;
  font: 600 17px/1 var(--sans);
  letter-spacing: -0.02em;
  background: #d99757;
  border: 0;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.bk__submit:hover,
.bk__finish:hover {
  background: #cd8847;
}

.bk__submit:disabled {
  opacity: 0.7;
}

.bk__submit svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bk__assure {
  margin: -8px 0 0;
  color: #626a84;
  font: 400 14px/1.2 var(--sans);
  text-align: center;
}

.bk__status {
  margin: 0;
  color: #b23a2e;
  font: 500 14px/1.3 var(--sans);
  text-align: center;
}

.bk__status:empty {
  display: none;
}

/* The footer of the panel */
.bk__foot {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 13px;
  color: #3a4660;
  font: 400 14px/1.25 var(--sans);
  letter-spacing: -0.015em;
}

.bk__step + .bk__foot {
  margin-top: auto;
}

.bk__foot p {
  margin: 0;
}

.bk__foot .bk__alt {
  margin-left: auto;
  text-align: right;
}

.bk__alt a {
  color: #14213d;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bk__faces {
  display: flex;
  flex: none;
}

.bk__face {
  --s: 38px;
  display: block;
  width: var(--s);
  height: var(--s);
  background-color: #1e2f54;
  background-repeat: no-repeat;
  border: 2px solid #f4ede0;
  border-radius: 50%;
}

.bk__face + .bk__face {
  margin-left: -10px;
}

.bk__face--umair {
  background-image: url("face-umair.webp");
  background-size: cover;
  background-position: center;
}

.bk__face--abdul {
  background-image: url("face-abdul.webp");
  background-size: cover;
  background-position: center;
}

/* The ending */
.bk__done {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  outline: 0;
  animation: bk-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s backwards;
}

.bk__tick {
  display: none;
}

.bk__done .bk__title {
  margin: 0 0 10px;
  font-size: clamp(50px, 6.2vw, 76px);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.bk__when {
  margin: 0;
  font: 600 22px/1.2 var(--sans);
  letter-spacing: -0.03em;
}

.bk__next {
  margin: 10px 0 24px;
  color: #3a4660;
  font: 500 16px/1.4 var(--sans);
  letter-spacing: -0.02em;
}

/* ---------- Narrower screens: the art card becomes a banner, still its own piece ---------- */
@media (max-width: 779px) {
  .bk {
    padding: 6px;
  }

  /* Compact and centred: the card and the panel only take the room their content needs. */
  .bk__card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - 12px);
  }

  .bk__close {
    top: 10px;
    right: 10px;
    color: #f4ede0;
    border-color: rgba(244, 237, 224, 0.4);
  }

  .bk__close:hover {
    color: #14213d;
    background: #f4ede0;
  }

  .bk__art {
    container: art / size;
    flex: 0 1 clamp(250px, 34dvh, 340px);
    min-height: 86px;
    padding: 16px 16px 18px;
    border-radius: 22px;
    transform: translateY(-16px);
  }

  .bk__stack {
    flex: 1;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 6px 0;
  }

  .bk__pitch {
    font-size: clamp(27px, 8.2vw, 40px);
    line-height: 1;
    letter-spacing: -0.05em;
  }

  /* When the steps need most of the screen, the art card folds into a banner. */
  @container art (max-height: 195px) {
    .bk__eyebrow {
      display: none;
    }

    .bk__stack {
      position: absolute;
      top: 50%;
      left: 16px;
      flex: none;
      width: 62px;
      height: 62px;
      margin: 0;
      transform: translateY(-50%);
    }

    .bk__pitch {
      margin: auto 42px auto 0;
      color: #f4ede0;
      font-size: clamp(18px, 5vw, 24px);
      line-height: 1.06;
      letter-spacing: -0.04em;
    }
  }

  .bk__main {
    flex: none;
    max-height: calc(100dvh - 12px - 6px - 170px);
    padding: 12px 16px max(14px, env(safe-area-inset-bottom));
    border-radius: 22px;
    transform: translateY(16px);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease, height 0.46s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .bk__meta {
    margin-right: 0;
  }

  .bk__heading {
    gap: 10px;
    margin: 6px 0 14px;
  }

  .bk__num {
    font-size: clamp(44px, 12vw, 60px);
  }

  .bk__title {
    font-size: clamp(25px, 7.6vw, 34px);
  }

  .bk__need {
    padding: 12px 2px 12px 0;
  }

  .bk__need strong {
    font-size: 21px;
  }

  .bk__zone {
    margin-top: 8px;
  }

  .bk__foot {
    margin-top: 6px;
    padding-top: 8px;
    font-size: 13px;
  }
}

/* Short phones: the steps come first, so the art card may fold right down. */
@media (max-width: 779px) and (max-height: 740px) {
  .bk__main {
    max-height: calc(100dvh - 12px - 6px - 86px);
  }
}

@media (min-width: 560px) and (max-width: 779px) {
  .bk__days {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .bk__day small {
    font-size: 12px;
  }

  .bk__day strong {
    font-size: 13px;
  }
}

/* Phones keep the founder line beside the email; the faces give way first when it gets tight. */
@media (max-width: 400px) {
  .bk__foot {
    gap: 8px;
    font-size: 12.5px;
  }

  .bk__face {
    --s: 32px;
  }
}

@media (max-width: 379px) {
  .bk__foot .bk__faces {
    display: none;
  }
}

@media (max-width: 319px) {
  .bk__foot p:not(.bk__alt) {
    display: none;
  }

  .bk__foot .bk__alt {
    margin: 0;
    text-align: left;
  }
}

@media (max-width: 359px) {
  .bk__days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bk__times {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  }

  .bk__phone {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
  }

}

/* Between phone and laptop the art card keeps its side, a little slimmer */
@media (min-width: 780px) and (max-width: 919px) {
  .bk__card {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  }



  .bk__main {
    padding-inline: 26px;
  }

}

/* Short laptop screens */
@media (min-width: 780px) and (max-height: 640px) {
  .bk__stack {
    height: 160px;
  }



  .bk__pitch {
    font-size: 30px;
  }

  .bk__heading {
    margin: 2px 0 10px;
  }

  .bk__num {
    font-size: 46px;
  }

  .bk__title {
    font-size: 27px;
  }

  .bk__need {
    padding: 9px 4px 9px 0;
  }

  .bk__need strong {
    font-size: 20px;
  }

  .bk__foot {
    padding-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bk,
  .bk__art,
  .bk__main,
  .bk__step.is-entering,
  .bk__done {
    transition: none;
    animation: none;
  }
}

/* ---------- Inline: on the Contact page the booking sits in the page ---------- */
.bk.bk--inline {
  position: relative;
  inset: auto;
  z-index: auto;
  display: block;
  margin-top: 34px;
  padding: 0;
  visibility: visible;
  opacity: 1;
}

.bk--inline .bk__card {
  width: 100%;
  height: 640px;
}

@media (max-width: 779px) {
  .bk--inline .bk__card {
    height: auto;
    max-height: none;
  }

  .bk--inline .bk__art {
    flex: none;
    height: 260px;
  }

  .bk--inline .bk__main {
    max-height: none;
    overflow: visible;
  }
}
