/* contact page styles — owned by the contact page agent */

/* =====================================================================
   CONTACT — "Say hello." under an open sky with a soaring gull
   ===================================================================== */
.contact {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--hdr-h);
  overflow: hidden;
}
.contact-field {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
/* the open sky the gull flies in; grows to fill whatever the type leaves */
.contact-sky { flex: 1 1 auto; min-height: clamp(40px, 6vh, 120px); }
.contact-body {
  position: relative; z-index: 1;
  padding-bottom: clamp(28px, 5.5vh, 72px);
}
.contact .foot { position: relative; z-index: 1; }

/* ---- headline ---- */
.contact-title {
  width: fit-content;
  margin-left: -0.045em; /* optical: pull the S onto the gutter line */
  font-size: min(var(--t-3xl), 24vh);
  letter-spacing: -0.045em;
}
/* Split words clip their slide-up (overflow:hidden); with tight tracking the last
   glyph's ink overhangs the word box, so give the box room on the right without
   moving anything. Shared with the 404 headings below. */
.contact-title .w, .nf-code .w, .nf-line .w { padding-right: .1em; margin-right: -.1em; }
.contact-br { display: none; }
/* the full stop is a true dot: it pops in once the words have landed */
.contact-stop {
  display: inline-block;
  width: .19em; height: .19em;
  margin-left: .035em;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform .9s var(--ease-spring) .62s;
}
.contact-title.is-in .contact-stop { transform: none; }

/* ---- email ---- */
.contact-mail { width: fit-content; max-width: 100%; margin-top: clamp(16px, 3vh, 36px); }
.contact-email {
  position: relative;
  display: inline-block;
  max-width: 100%;
  font-size: min(var(--t-xl), 7.6vh);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.06;
  padding-bottom: .2em;
  overflow-wrap: anywhere;
}
.contact-email__text { display: inline-block; transition: transform .6s var(--ease-out); }
/* halftone underline: a faint row of dots always, a bright row draws in on hover */
.contact-email::before,
.contact-email::after {
  content: "";
  position: absolute; left: .02em; right: 0; bottom: 0;
  height: .11em;
  background: radial-gradient(circle closest-side, currentColor 78%, transparent 86%) 0 50% / .17em .11em repeat-x;
}
.contact-email::before { opacity: .26; }
.contact-email::after {
  clip-path: inset(0 100% 0 0);
  transition: clip-path .8s var(--ease-out), color .3s;
}
.contact-email:hover::after,
.contact-email:focus-visible::after { clip-path: inset(0 0 0 0); }
.contact-email:hover .contact-email__text { transform: translateX(.06em); }
.contact-mail:has(.is-copied) .contact-email::after { color: var(--accent); clip-path: inset(0 0 0 0); }

.contact-hint {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px;
  color: var(--sand-dim);
}
.contact-hint__text { transition: color .3s; }
.contact-hint__dot {
  width: 6px; height: 6px; flex: none; border-radius: 50%;
  background: var(--sand-faint);
  transition: background-color .3s, transform .5s var(--ease-spring);
}
.contact-mail:hover .contact-hint__dot { background: var(--accent); transform: scale(1.35); }
.contact-hint.is-copied .contact-hint__text { color: var(--sand); }
.contact-hint.is-copied .contact-hint__dot { background: var(--accent); transform: scale(1.6); }

/* ---- info row ---- */
.contact-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gutter);
  margin: clamp(30px, 6.5vh, 84px) 0 0;
}
.contact-info dd { margin: 0; }
.contact-cell { display: flex; flex-direction: column; padding-top: 18px; min-width: 0; }
.contact-cell dt { margin-bottom: 12px; }
.contact-place {
  font-size: clamp(20px, 1.75vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.contact-time {
  display: flex; align-items: center; gap: 9px;
  margin-top: 9px;
  color: var(--sand);
  font-variant-numeric: tabular-nums;
}
.contact-zone { color: var(--sand-dim); }
.contact-live {
  position: relative;
  width: 6px; height: 6px; flex: none; border-radius: 50%;
  background: var(--accent);
}
.contact-live::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--accent);
  animation: contact-ping 2s var(--ease-out) infinite;
}
@keyframes contact-ping {
  0% { transform: scale(1); opacity: .7; }
  70%, 100% { transform: scale(3.2); opacity: 0; }
}
.contact-links { display: flex; flex-direction: column; gap: 2px; }
.contact-link {
  display: inline-flex; align-items: baseline; gap: .32em;
  font-size: clamp(20px, 1.75vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.contact-link__text {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1px no-repeat;
  transition: background-size .5s var(--ease-out);
}
.contact-link__arrow {
  display: inline-block;
  font-size: .72em;
  color: var(--sand-dim);
  transition: transform .5s var(--ease-spring), color .3s;
}
.contact-link:hover .contact-link__text,
.contact-link:focus-visible .contact-link__text { background-size: 100% 1px; }
.contact-link:hover .contact-link__arrow,
.contact-link:focus-visible .contact-link__arrow { transform: translate(.14em, -.14em); color: var(--accent); }
.contact-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* the page fits the window, so there is no "top" to go back to */
.contact.is-fit .foot__top { visibility: hidden; }

/* ---- upright phones: stacked, scrolls naturally ---- */
@media (max-width: 720px) and (orientation: portrait) {
  .contact-sky { min-height: max(216px, 33svh); }
  .contact-br { display: inline; }
  .contact-title { font-size: min(29vw, 168px); line-height: .86; }
  .contact-email { font-size: min(8.4vw, var(--t-xl)); }
  .contact-info { grid-template-columns: 1fr; margin-top: 36px; }
  .contact-cell { padding: 16px 0 20px; }
  .contact-cell dt { margin-bottom: 8px; }
  .contact-place, .contact-link { font-size: 22px; }
  .contact-links { gap: 4px; }
}
/* ---- short landscape screens (laptops, phones on their side): tighten the vertical
   rhythm so the headline, address and gull share the first view ---- */
@media (orientation: landscape) and (max-height: 760px) {
  .contact-sky { min-height: clamp(16px, 4vh, 40px); }
  .contact-title { font-size: min(var(--t-3xl), 21vh); }
  .contact-info { margin-top: clamp(18px, 3.5vh, 84px); }
  .contact-body { padding-bottom: clamp(14px, 2.5vh, 72px); }
  .contact .foot { padding-top: 18px; padding-bottom: 20px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .contact-mail { margin-top: 10px; }
  .contact-hint { margin-top: 8px; }
  .contact-cell { padding-top: 14px; }
  .contact-cell dt { margin-bottom: 8px; }
  .contact-place, .contact-link { font-size: clamp(17px, 2.6vw, 22px); }
}
/* thumbs: every link gets a 44px-tall row; the list's negative margin keeps the first
   word level with the places beside it */
@media (pointer: coarse) {
  .contact-links { gap: 0; margin-block: -9px; }
  .contact-link { padding-block: max(9px, calc(22px - .6em)); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-live::after { animation: none; opacity: 0; }
}

/* =====================================================================
   NOT FOUND — a crab scuttles along the bottom
   ===================================================================== */
.nf {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--hdr-h);
  overflow: hidden;
}
.nf-field {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.nf-body {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: 20px clamp(28px, 4.5vw, 88px);
  padding-top: clamp(4px, 2vh, 28px);
}
.nf-code {
  width: fit-content;
  margin-left: -0.015em; /* the 4's crossbar end (flat, no overshoot) lands on the gutter line */
  font-size: clamp(128px, min(31vw, 42vh), 480px);
  letter-spacing: -0.03em; /* the unclipped 0 keeps a hairline of air before the 4 */
  line-height: .9;
}
.nf-copy { padding-bottom: clamp(10px, 2.2vh, 30px); }
.nf-line {
  font-size: clamp(26px, 2.7vw, 44px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: balance;
}
.nf-home {
  display: inline-flex; align-items: center; gap: 14px;
  height: 54px; padding: 0 24px;
  margin-top: clamp(18px, 2.6vh, 30px);
  border: 1px solid var(--sand-faint);
  border-radius: 999px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  transition: background-color .45s var(--ease-out), color .45s var(--ease-out), border-color .45s var(--ease-out);
}
.nf-home__arrow { display: inline-block; transition: transform .55s var(--ease-spring); }
.nf-home:hover, .nf-home:focus-visible { background: var(--sand); color: var(--ink); border-color: var(--sand); }
.nf-home:hover .nf-home__arrow, .nf-home:focus-visible .nf-home__arrow { transform: translateX(5px); }

/* upright phones: the 404 spans the column, the crab takes the band below */
@media (max-width: 720px) and (orientation: portrait) {
  .nf-body { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: max(12px, calc(8vh - 22px)); }
  .nf-code { font-size: min(52vw, 300px); }
  .nf-copy { padding-bottom: 0; }
  .nf-line { font-size: 28px; }
}
/* phones on their side: a smaller 404 leaves the crab a band it can read in */
@media (orientation: landscape) and (max-height: 500px) {
  .nf-body { padding-top: 4px; }
  .nf-code { font-size: clamp(96px, 34vh, 200px); }
  .nf-copy { padding-bottom: 6px; }
  .nf-line { font-size: clamp(22px, 7vh, 30px); }
  .nf-home { height: 46px; margin-top: 14px; }
}
