/* Contact: one quiet screen. The ways to reach Emil sit in the middle as round icons (WhatsApp, phone, mail,
   Facebook, Instagram), with one button under them that opens the details card. The card's form opens WhatsApp with
   the message filled in (no server, nothing stored). */
main.contact { display: grid; place-items: center; padding: 100px 24px 70px; }
.c-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; }
.c-wrap h1 { margin: 0 0 44px; font-family: var(--display); font-weight: 700; font-size: clamp(40px, 4vw, 60px); line-height: 1; letter-spacing: .2em; padding-inline-start: .2em; }
.ways { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 34px; }
.ways a { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ways .ic { width: 74px; height: 74px; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-items: center; transition: background-color .35s var(--swing), color .35s var(--swing), transform .35s var(--swing); }
.ways svg { width: 26px; height: 26px; fill: currentColor; }
.ways svg.ln { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ways b { font-weight: 500; font-size: 14px; letter-spacing: .04em; color: var(--support); transition: color .35s var(--swing); }
.ways a:hover .ic, .ways a:focus-visible .ic { background: var(--ink); color: var(--ground); transform: translateY(-3px); }
.ways a:hover b, .ways a:focus-visible b { color: var(--ink); }
.ways a:focus-visible { outline: none; }
.ways a:focus-visible .ic { outline: 2px solid var(--accent); outline-offset: 3px; }
.direct { margin: 30px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; font-size: 14px; letter-spacing: .04em; color: var(--support); user-select: text; }
.leave { margin-top: 40px; font-weight: 500; font-size: 15px; letter-spacing: .06em; border: 1px solid var(--ink); padding: 12px 30px; transition: background-color .3s ease-in-out, color .3s ease-in-out; }
.leave:hover, .leave:focus-visible { background: var(--ink); color: var(--ground); }
main.contact .credit { position: absolute; bottom: 22px; inset-inline: 0; margin: 0; justify-content: center; color: var(--faint); }

/* entrance, the same motion as the story quote: the heading's words rise in one by one, then each icon, the
   number line and the button, 70ms apart (the order --i is set in pages.py; site.js adds .in once the page is in) */
.js .c-wrap .w, .js .c-wrap .rise { opacity: 0; transform: translateY(.7em); transition: opacity .6s ease, transform .8s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * 70ms + 150ms); }
.c-wrap .w { display: inline-block; }
.js .c-wrap .rise { transform: translateY(26px); }
/* the button keeps its own hover fill, with no delay */
.js .c-wrap .leave.rise { transition: opacity .6s ease, transform .8s cubic-bezier(.2, .8, .2, 1), background-color .3s ease-in-out, color .3s ease-in-out;
  transition-delay: calc(var(--i) * 70ms + 150ms), calc(var(--i) * 70ms + 150ms), 0s, 0s; }
.js .c-wrap.in .w, .js .c-wrap.in .rise { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .c-wrap .w, .js .c-wrap .rise { opacity: 1; transform: none; transition: none; } }

/* the details card: the page dims (.5s), the card rises 24px into place (.6s) */
.cardbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(38, 32, 28, .62); opacity: 0; visibility: hidden; transition: opacity .5s var(--swing), visibility .5s; }
.cardbox.open { opacity: 1; visibility: visible; }
.card { position: relative; width: min(520px, 100%); max-height: calc(100svh - 40px); overflow: auto; background: var(--ground); padding: 46px 42px 34px; transform: translateY(24px); transition: transform .6s var(--swing); }
.cardbox.open .card { transform: none; }
.card .x { position: absolute; top: 12px; left: 14px; width: 44px; height: 44px; font-size: 30px; line-height: 1; color: var(--support); }
.card .x:hover { color: var(--ink); }
.card h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.1; letter-spacing: .12em; }
.card .note { margin: 0 0 18px; font-size: 14px; color: var(--support); }
form.lead { display: grid; gap: 12px; }
form.lead input, form.lead textarea, form.lead select { font: inherit; font-size: 16px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule); padding: 12px 0 8px; width: 100%; border-radius: 0; }
/* the message box grows from one line to 100px on focus (.3s) */
form.lead textarea { resize: none; height: 44px; min-height: 44px; transition: height .3s ease-in-out, border-color .3s; }
form.lead textarea:focus, form.lead textarea:not(:placeholder-shown) { height: 100px; overflow: auto; }
form.lead textarea:placeholder-shown:not(:focus) { overflow: hidden; }
form.lead input:focus, form.lead textarea:focus, form.lead select:focus { outline: none; border-bottom-color: var(--ink); }
form.lead ::placeholder { color: var(--faint); }
form.lead .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; }
form.lead button { justify-self: start; margin-top: 8px; font-weight: 500; font-size: 15px; letter-spacing: .06em; background: var(--ink); color: var(--ground); padding: 12px 26px; transition: background-color .3s ease-in-out; }
form.lead button:hover { background: var(--accent); }
form.lead .err { color: #B3261E; font-size: 14px; min-height: 1.2em; margin: 0; }

@media (max-width: 1024px) {
  main.contact { min-height: 100svh; padding: 90px 20px 70px; }
  .ways { gap: 18px 22px; }
  .ways .ic { width: 62px; height: 62px; }
}
/* a phone: all five in one row (Instagram used to drop to a line of its own) */
@media (max-width: 560px) {
  .c-wrap { width: 100%; }
  .ways { flex-wrap: nowrap; gap: 6px; width: 100%; justify-content: space-between; max-width: 360px; }
  .ways li { flex: 1 1 0; min-width: 0; }
  .ways .ic { width: 54px; height: 54px; }
  .ways svg { width: 22px; height: 22px; }
  .ways b { font-size: 12.5px; letter-spacing: 0; white-space: nowrap; }
  .card { padding: 44px 24px 28px; }
}
