/* STUDIO SEM · consent box
 *
 * The box that asks before anything is stored on the visitor's device. It only
 * ever appears when there is something to ask about: assets/consent.js keeps the
 * measurement id, and with no id set it never renders. A site that asks about
 * cookies it does not set trains people to click past the question.
 *
 * Shape rules, from PTS's position on valid consent (LEK, the ePrivacy rules):
 * refusing has to be as easy as accepting, in the first view, without a second
 * layer. So the two buttons are the same size, the same weight and sit next to
 * each other. There is no × that slips past the question, because closing
 * without answering is not an answer.
 *
 * Palette from tokens.css. Cream ground takes clay, never saffron: saffron on
 * cream is 1.44:1 and banned outright, brand-identity.md and G-11.
 */

.consent {
  position: fixed;
  left: var(--gutter, 20px);
  bottom: var(--gutter, 20px);
  z-index: 9000;
  width: min(30rem, calc(100vw - (var(--gutter, 20px) * 2)));
  padding: 20px 22px 18px;
  background: var(--cream, #FDF9F0);
  color: var(--espresso, #251818);
  border: 1px solid var(--espresso, #251818);
  box-shadow: 0 10px 30px rgba(37, 24, 24, .16);
}

/* Hidden rather than absent, so the footer link can bring it back without
   rebuilding the markup. */
.consent[hidden] { display: none; }

/* A short heading, so the box reads as a question and not as a notice. Both of the
   two comparable sites that run a banner at all do this: Cure Media heads it
   "Privacy Policy", Canguro Media "Cookies". */
.consent-kicker {
  margin: 0 0 6px;
  font-family: var(--label, 'Anton', Impact, sans-serif);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted, #716764);
}

.consent-text {
  margin: 0 0 16px;
  font-family: var(--body, 'EB Garamond', Georgia, serif);
  font-size: .95rem;
  line-height: 1.45;
}

.consent-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* The two answers. Same box, same padding, same font size. The only difference
   is fill, and that is deliberately the weaker signal of the two. */
.consent-btn {
  flex: 0 0 auto;
  min-width: 7.5rem;
  padding: 10px 18px;
  font-family: var(--label, 'Anton', Impact, sans-serif);
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
  border: 1px solid var(--espresso, #251818);
  background: transparent;
  color: var(--espresso, #251818);
  cursor: pointer;
}

.consent-btn--yes {
  background: var(--espresso, #251818);
  color: var(--cream, #FDF9F0);
}

.consent-btn:hover { background: var(--clay-ink, #A14831); border-color: var(--clay-ink, #A14831); color: var(--cream, #FDF9F0); }
.consent-btn:focus-visible { outline: 2px solid var(--air, #4E93B8); outline-offset: 2px; }

.consent-more {
  margin-left: auto;
  font-family: var(--body, 'EB Garamond', Georgia, serif);
  font-size: .9rem;
  color: var(--muted, #716764);
}
.consent-more:hover { color: var(--clay-ink, #A14831); }

/* On a phone the box takes the full width and the link drops under the buttons
   rather than squeezing them. */
@media (max-width: 30rem) {
  .consent { left: 10px; right: 10px; bottom: 10px; width: auto; }
  .consent-btn { flex: 1 1 auto; }
  .consent-more { margin: 4px 0 0; flex: 1 0 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .consent { animation: consent-in .22s ease-out both; }
  @keyframes consent-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
}
