/* ==========================================================================
   Cookie consent — the bar and the preferences sheet

   Built in the theme's own language rather than the reference screenshot's:
   the panel fill, the #0087FF hairline and the 32 radius are the Technology
   stage's cards; the buttons are the site's .btn with its corner brackets;
   the eyebrow is the same Arame mono label every section uses.

   Sizes are in px, not --s. This is chrome, not composition -- it has no
   place on the 1920 grid and has to stay legible at every width, including
   above 1920 where --s stops growing.
   ========================================================================== */

.ck[hidden] { display: none; }

/* --- the bar ------------------------------------------------------------- */

.ck__bar {
  position: fixed;
  z-index: 180;            /* under the mobile nav's 200, over everything else */
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 20px clamp(20px, 4vw, 48px);
  /* Mono/Light-Dark, not Mono/Dark: the page is Mono/Dark, and a bar the same
     colour as the page has to be drawn with a line to be seen at all. Lifted
     a step instead, it separates itself and the line is unnecessary -- which
     is why there is no border here. */
  background: rgba(26, 36, 50, 0.96);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  transform: translateY(100%);
  transition: transform 640ms var(--rv-ease);
}
.ck.is-in .ck__bar { transform: none; }

.ck__bar-copy { max-width: 76ch; }
.ck__eyebrow { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.08em; }
.ck__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-light-grey-02);
}

.ck__bar-actions { display: flex; align-items: center; gap: 12px; flex: none; }

/* Reject all carries nothing but its brackets. .btn--bare fills with
   Mono/Dark, which was invisible against a Mono/Dark bar but reads as a plate
   on a plate now the bar is a step lighter. Transparent on hover too: the
   brackets closing to full size is this site's own hover feedback, so the
   fill has no work left to do. */
.ck__bar-actions .btn--bare {
  --btn-bg: transparent;
  --btn-bg-hover: transparent;
}

/* Tertiary. Neither a plate nor a bracketed outline -- three equally framed
   controls give the eye nowhere to land, and Manage is the way past the
   decision rather than one of the answers to it. A rule under it on hover is
   the whole of its feedback. */
.ck__tertiary {
  padding: 12px 6px;
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.2;
  color: var(--c-light-grey-02);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  transition: color 200ms ease, text-decoration-color 200ms ease;
  white-space: nowrap;
  cursor: pointer;
}
.ck__tertiary:hover,
.ck__tertiary:focus-visible {
  color: var(--c-mono-light);
  text-decoration-color: currentColor;
}

/* The brackets are drawn in --s units, which go sub-pixel on a phone. Pin
   them so the corners stay visible at every width. */
.ck__btn {
  padding: 12px 18px;
  font-size: 14px;
  white-space: nowrap;
}
.ck__btn .brk__c { --brk-w: 12px; --brk-h: 12px; width: 12px; height: 12px; }
.ck__btn:hover .brk__c,
.ck__btn:focus-visible .brk__c { width: 100%; height: 100%; }

/* --- the preferences sheet ----------------------------------------------- */

.ck__sheet-wrap[hidden] { display: none; }
.ck__sheet-wrap {
  position: fixed;
  z-index: 190;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
/* The Book-a-demo scrim, verbatim: a real blur of the page behind rather
   than a flat wash, so the sphere keeps turning through it. The colour is
   set alongside the filter, not instead of it -- where backdrop-filter is
   missing the heavier flat scrim is what carries the sheet. */
.ck__scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 12, 27, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
          backdrop-filter: blur(18px) saturate(120%);
  opacity: 0;
  transition: opacity 520ms var(--ui-ease);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  /* With a real blur the scrim can be lighter, so more of the page reads. */
  .ck__scrim { background: rgba(3, 12, 27, 0.45); }
}
.ck.is-managing .ck__scrim { opacity: 1; }

/* Square, unbordered, Mono/Dark and opaque -- the Book-a-demo sheet's own
   treatment. The page reads through the blurred scrim around it, which is
   where the blur belongs; the sheet itself stays solid so the switches have
   something to sit against. Narrower now the copy is short. */
.ck__sheet {
  position: relative;
  width: min(520px, 100%);
  max-height: min(84vh, 760px);
  overflow-y: auto;
  padding: 40px clamp(24px, 4vw, 40px) 36px;
  background: var(--c-mono-dark);
  border: 0;
  border-radius: 0;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition:
    opacity 360ms var(--rv-ease),
    transform 480ms var(--rv-ease);
}
.ck.is-managing .ck__sheet { opacity: 1; transform: none; }

.ck__sheet-head { position: relative; padding-right: 52px; margin-bottom: 20px; }
.ck__title {
  margin: 0;
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--c-mono-light);
}
.ck__close {
  position: absolute;
  right: -6px;
  top: -6px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--c-mono-light);
}
.ck__x { position: relative; display: block; width: 18px; height: 18px; }
.ck__x i {
  position: absolute; left: 0; top: 8px;
  width: 100%; height: 1.5px;
  background: currentColor; border-radius: 2px;
}
.ck__x i:nth-child(1) { transform: rotate(45deg); }
.ck__x i:nth-child(2) { transform: rotate(-45deg); }

.ck__rows { margin: 0 0 28px; }
.ck__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--c-hairline);
}
.ck__row:first-child { border-top: 0; }
.ck__row-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-mono-light);
}
.ck__row-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-light-grey-02);
}
.ck__required {
  flex: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  /* Accent/Yellow: it is the state of that row, and yellow is what this site
     marks a fixed state with. */
  color: var(--c-accent-yellow);
  padding-top: 2px;
}

/* The switch. Yellow when on, which is the accent every other selected
   thing on the site uses. */
.ck__switch {
  flex: none;
  position: relative;
  width: 46px;
  height: 26px;
  margin-top: 1px;
  border-radius: 999px;
  background: rgba(236, 247, 255, 0.14);
  border: 1px solid var(--c-hairline);
  transition: background-color 240ms var(--ui-ease), border-color 240ms var(--ui-ease);
  cursor: pointer;
}
.ck__knob {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c-mono-light);
  transition: transform 240ms var(--ui-ease), background-color 240ms var(--ui-ease);
}
.ck__switch[aria-checked="true"] {
  background: var(--c-accent-yellow);
  border-color: var(--c-accent-yellow);
}
.ck__switch[aria-checked="true"] .ck__knob {
  transform: translateX(20px);
  background: var(--c-mono-dark);
}
.ck__switch:focus-visible { outline: 2px solid var(--c-accent-yellow); outline-offset: 3px; }

.ck__sheet-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ck__sheet-pair { display: flex; align-items: center; gap: 10px; }

/* --- reflow -------------------------------------------------------------- */

@media (max-width: 860px) {
  .ck__bar { flex-direction: column; align-items: stretch; gap: 16px; padding: 18px 20px 20px; }
  .ck__bar-actions { justify-content: stretch; }
  .ck__bar-actions .ck__btn { flex: 1 1 auto; padding: 12px 10px; }
  .ck__text { font-size: 13px; }
  .ck__sheet { padding: 28px 20px 24px; }
  .ck__row { flex-wrap: nowrap; }
  /* No room for two groups on a phone: they stack, and Save leads because it
     is the one that carries the switches. */
  .ck__sheet-actions { flex-direction: column-reverse; align-items: stretch; }
  .ck__sheet-pair { gap: 10px; }
  .ck__sheet-pair .ck__btn { flex: 1 1 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ck__bar, .ck__scrim, .ck__sheet, .ck__knob, .ck__switch { transition: none; }
  .ck__bar { transform: none; }
}
