/* Contact sheet (assets/contact.js): every [data-contact] link opens it. Bottom sheet on phones, small card above 640 px.
   Channels and look follow /text (WhatsApp, text message, phone call, pill buttons); email is a quiet link under them.
   Self-contained: a page can tint the hover with --contact-accent. */

.csheet {
  --cs-ink: #000000;
  --cs-white: #ffffff;
  --cs-line: #d0dbdb;
  --cs-light: #f5f6f6;
  --cs-muted: #56676a;
  --cs-accent: var(--contact-accent, #0d72d1);
  --cs-ease: cubic-bezier(0.22, 1, 0.36, 1);

  inset: 0;
  width: 100%;
  max-width: none;
  max-height: calc(100% - 24px);
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--cs-white);
  color: var(--cs-ink);
  box-shadow: 0 -24px 60px -24px rgba(0, 0, 0, 0.45);
  overflow: auto;
  overscroll-behavior: contain;
  font-family: inherit;
  text-align: left;
}
.csheet::backdrop {
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
html:has(.csheet[open]) {
  overflow: hidden;
}

.csheet__panel {
  display: grid;
  gap: 16px;
  padding: 10px 18px max(20px, env(safe-area-inset-bottom));
}
/* Grab bar: says "this slides away" on phones. */
.csheet__panel::before {
  content: '';
  justify-self: center;
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: var(--cs-line);
}
.csheet__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.csheet__who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 14px 4px 4px;
  border-radius: 999px;
  background: var(--cs-light);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #303737;
}
.csheet__face {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cs-line);
}
.csheet__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cs-light);
  color: var(--cs-ink);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.csheet__close:hover {
  background: var(--cs-line);
}
.csheet__close svg {
  width: 20px;
  height: 20px;
}
.csheet__title {
  margin: 2px 0 0;
  font-size: 26px;
  font-weight: 700;
  font-stretch: 115%;
  font-variation-settings: 'wdth' 115;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.csheet__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.csheet__opt {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 8px 20px 8px 8px;
  border: 1px solid var(--cs-line);
  border-radius: 999px;
  background: var(--cs-white);
  color: var(--cs-ink);
  text-decoration: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.35s var(--cs-ease),
    translate 0.35s var(--cs-ease);
}
.csheet__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--cs-ink);
  color: var(--cs-white);
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.35s var(--cs-ease);
}
.csheet__icon svg {
  width: 22px;
  height: 22px;
}
.csheet__label {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}
.csheet__arrow {
  flex: none;
  width: 20px;
  height: 20px;
  transition: translate 0.35s var(--cs-ease);
}
.csheet__opt--primary {
  background: var(--cs-ink);
  border-color: var(--cs-ink);
  color: var(--cs-white);
}
.csheet__opt--primary .csheet__icon {
  background: var(--cs-white);
  color: var(--cs-ink);
}
.csheet__opt:focus-visible,
.csheet__close:focus-visible,
.csheet__alt a:focus-visible,
.csheet__legal a:focus-visible {
  outline: 3px solid var(--cs-accent);
  outline-offset: 3px;
}
@media (hover: hover) {
  .csheet__opt:hover {
    border-color: var(--cs-ink);
    translate: 0 -2px;
    box-shadow: 0 16px 30px -20px rgba(0, 0, 0, 0.5);
  }
  .csheet__opt:hover .csheet__icon {
    background: var(--cs-accent);
    color: var(--cs-white);
    transform: scale(1.08);
  }
  .csheet__opt:hover .csheet__arrow {
    translate: 3px 0;
  }
}
.csheet__opt:active {
  translate: 0 0;
}

.csheet__alt,
.csheet__legal {
  margin: 0;
  text-align: center;
  color: var(--cs-muted);
}
.csheet__alt {
  font-size: 16px;
}
.csheet__alt a {
  color: var(--cs-ink);
  font-weight: 600;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.csheet__legal {
  margin-top: -6px;
  font-size: 13px;
}
.csheet__legal a {
  display: inline-block;
  padding-block: 4px;
  color: var(--cs-muted);
}

/* ---------- motion: slides up on phones, rises as a card on wider screens ---------- */
.csheet[open] {
  animation: csheet-up 0.42s var(--cs-ease) both;
}
.csheet[open]::backdrop {
  animation: csheet-fade 0.3s ease both;
}
.csheet.is-closing {
  animation: csheet-down 0.22s ease-in both;
}
.csheet.is-closing::backdrop {
  animation: csheet-fade 0.22s ease-in reverse both;
}
@keyframes csheet-up {
  from {
    transform: translate3d(0, 100%, 0);
  }
  to {
    transform: none;
  }
}
@keyframes csheet-down {
  to {
    transform: translate3d(0, 100%, 0);
  }
}
@keyframes csheet-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes csheet-pop {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes csheet-unpop {
  to {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.98);
  }
}

@media (min-width: 640px) {
  .csheet {
    width: min(420px, calc(100% - 40px));
    max-height: calc(100% - 40px);
    margin: auto;
    border-radius: 24px;
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
  }
  .csheet__panel {
    padding: 18px 22px 22px;
  }
  .csheet__panel::before {
    display: none;
  }
  .csheet[open] {
    animation-name: csheet-pop;
    animation-duration: 0.34s;
  }
  .csheet.is-closing {
    animation-name: csheet-unpop;
    animation-duration: 0.18s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .csheet[open],
  .csheet[open]::backdrop,
  .csheet.is-closing,
  .csheet.is-closing::backdrop {
    animation: none;
  }
}
