/* Contact modal (assets/js/contact-modal.js): a white card with Figma-style corners (radius 28, 100% smoothing; the
   script sets the clip path to fit the card's size) and a soft shadow, over a dimmed page. The phone is plain text;
   the email row is the one button. */
html:has(dialog.contact[open]) { overflow: hidden; }

.contact {
  width: min(460px, calc(100vw - 32px)); max-width: none; max-height: none;
  margin: auto; padding: 0; border: 0; background: none; overflow: visible;
  filter: drop-shadow(0 24px 40px rgb(21 28 40 / 0.28));   /* follows the clipped squircle, unlike box-shadow */
  color: #151c28; font-family: var(--font);
}
/* No backdrop blur: it made the page vanish from captures in the app's browser pane. */
.contact::backdrop { background: rgb(21 28 40 / 0.5); }
.contact[open] { animation: contact-in 320ms cubic-bezier(.22, 1, .36, 1); }
.contact[open]::backdrop { animation: contact-fade 240ms ease; }
@keyframes contact-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes contact-fade { from { opacity: 0; } }

.contact__card {
  position: relative; padding: 40px 32px 32px;
  border-radius: 28px; background: #fff;   /* the radius is the fallback until the squircle clip path is set */
}
.contact__close {
  position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 40px; height: 40px;
  padding: 0; border: 0; border-radius: 12px; background: none; color: #151c28; cursor: pointer;
  transition: background-color 160ms ease;
}
.contact__close:hover { background: #eef6fc; }
.contact__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }   /* same 20px box and stroke as the row chevrons */
/* Text follows the Other Work tile captions: medium uppercase labels (0.06em tracking), semi bold names. */
.contact__eyebrow { font-size: 15px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: #6b7690; }   /* same colour and weight as the Phone / Email labels */
.contact__name { margin: 4px 0 28px; font-size: 34px; font-weight: 600; line-height: 1.2; }

.contact__list { display: grid; gap: 12px; }
/* Phone: plain text row. Email: the one button. */
.contact__row { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: inherit; text-decoration: none; }
/* The mail button looks like the Hall / Kitchen tabs: light outline and a light 5px ledge, lifting 2px on hover
   (the ledge grows) and sinking onto the ledge when pressed. Its three layers share one squircle (radius 18, 100%
   smoothing) that the script sizes: ledge (shifted down 5px, never moves), ring (outer shape), face (inset 1.5px).
   Until the script sets the paths the layers have no clip, so the button shows as a plain white row. */
.contact__btn { --lift: 0px; margin-bottom: 5px; border-radius: 18px; }
.contact__btn > * { position: relative; translate: 0 var(--lift); transition: translate 120ms ease, background-color 120ms ease; }
.contact__btn > .contact__sq { position: absolute; inset: 0; pointer-events: none; clip-path: var(--sq-outer); }
.contact__btn > .contact__sq--ledge { inset: 5px 0 -5px; translate: none; background: #c9d4e3; }
.contact__btn > .contact__sq--ring { background: #d3dce8; }
.contact__btn > .contact__sq--face { background: #fff; clip-path: var(--sq-inner); }   /* same box; the path is inset 1.5px */
.contact__btn:hover { --lift: -2px; }
.contact__btn:hover .contact__sq--ring { background: #b9c7da; }
.contact__btn:active { --lift: 5px; }
.contact__btn:active .contact__sq--ring { background: #8fb4ff; }
.contact__btn:active .contact__sq--face { background: #edf4ff; }
.contact__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: #e2f5ff; color: #151c28; }   /* glyphs in the phone number / email text colour */
/* Fill-state glyphs from the portfolio's own icon set (iconography-fill.svg). */
.contact__icon svg { width: 18px; height: 18px; fill: currentColor; }
.contact__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contact__label { font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: #6b7690; }
.contact__value { font-size: 18px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.contact__go { flex: none; width: 20px; height: 20px; margin-left: auto; fill: none; stroke: #3e4b66; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: translate 200ms ease; }
.contact__btn:hover .contact__go { translate: 3px var(--lift); }
.contact :focus-visible { outline: 3px solid var(--blue-2, #267cfd); outline-offset: 3px; }

@media (max-width: 480px) {
  .contact__card { padding: 32px 20px 22px; }
  .contact__name { font-size: 28px; margin-bottom: 22px; }
  .contact__value { font-size: 16px; }
  .contact__icon { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .contact[open], .contact[open]::backdrop { animation: none; }
  .contact__row, .contact__go { transition: none; }
}
