/* ---------- "Let's Talk" layer (reference: maximilianberndt.com contact modal) ----------
   Panel: clip-path mask opening top -> bottom, 550ms quart in-out; closes back upwards.
   Button: "Let's Talk" rolls out downwards while "Close" rolls in from above, 350ms, same curve. */
:root {
  --ease-quart-in-out: cubic-bezier(.76, 0, .24, 1);
  /* inverse of the page: blue panel on the light theme, white panel on the dark one */
  --contact-bg: var(--blue);
  --contact-fg: #ffffff;
}
:root[data-theme="dark"] {
  --contact-bg: #ffffff;
  --contact-fg: var(--blue);
}

.talk {
  position: relative;
  z-index: 2; /* above the panel */
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  cursor: pointer;
  display: inline-flex;
  overflow: hidden;
  transition: color .3s ease;
}
.talk__label {
  display: block;
  transition: transform .35s var(--ease-quart-in-out);
}
.talk__label--close {
  position: absolute; right: 0; top: 0;
  transform: translateY(-120%);
}
.is-contact-open .talk__label:not(.talk__label--close) { transform: translateY(120%); }
.is-contact-open .talk__label--close { transform: translateY(0); }
/* over the open panel the button takes the panel's text colour */
.is-contact-open .talk { color: var(--contact-fg); }

.contact {
  /* Figma export: 280px wide, flush to the top, 16px from the right edge */
  position: fixed;
  top: 0;
  right: calc(var(--gutter) - 16px);
  z-index: 1;
  width: 280px;
  padding: 48px 16px 24px;
  display: flex; flex-direction: column;
  background: var(--contact-bg);
  color: var(--contact-fg);
  font-size: 14px; line-height: 16px;
  text-align: left;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .55s var(--ease-quart-in-out), visibility 0s linear .55s;
}
.is-contact-open .contact {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path .55s var(--ease-quart-in-out), visibility 0s;
}
.contact__rings {
  /* 2:1 like the reference canvas: the circles always stay inside it, never over the text */
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  margin-bottom: 24px;
  cursor: grab;
}
.contact__rings:active { cursor: grabbing; }
.contact__block { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.contact__label { opacity: .6; }
.contact a { color: inherit; text-decoration: none; transition: opacity .3s ease; }
.contact a:hover { opacity: .6; }

@media (prefers-reduced-motion: reduce) {
  .contact, .talk__label { transition: none !important; }
}
