/* Contact: "Reach Out", after the TD Alexfolio contact page. Reached from the nav via the wipe (wipe.js). */
body.contact-page, html:has(body.contact-page) { background: var(--bg); }
.ct { position: relative; min-height: 100vh; min-height: 100svh; padding: 0 28px 120px; background: var(--bg); }
.ct-nav { mix-blend-mode: normal; }
.ct-nav a[aria-current]::after { transform: scaleX(1); }

.ct-title { padding-top: 180px; font-weight: 600; font-size: clamp(72px, 11.6vw, 200px); line-height: .9; letter-spacing: -0.055em; margin-left: -.04em; }
.ct-title > span { display: block; overflow: hidden; padding-bottom: .06em; }
.ct-title > span > span { display: block; }

/* the right-hand column starts at the second nav item, like the reference */
.ct-body { margin: 110px 0 0 37.5%; max-width: 880px; }
.ct-lede { font-weight: 600; font-size: clamp(30px, 2.6vw, 44px); line-height: 1.08; letter-spacing: -0.035em; max-width: 21ch; }

/* form: underlined fields, the label sits in the field and lifts when you type */
.ct-form { margin-top: 56px; }
.ct-field { position: relative; border-bottom: 1px solid var(--rule); transition: border-color .3s ease; }
.ct-field::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.22,.8,.24,1); }
.ct-field:focus-within::after { transform: scaleX(1); }
.ct-field input, .ct-field textarea { display: block; width: 100%; padding: 30px 0 14px; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 18px; resize: none; }
.ct-field textarea { min-height: 72px; overflow: hidden; field-sizing: content; }
.ct-field label { position: absolute; left: 0; top: 30px; color: var(--muted); pointer-events: none; transform-origin: 0 0; transition: transform .3s cubic-bezier(.22,.8,.24,1), color .3s ease; }
.ct-field input:focus + label, .ct-field input:not(:placeholder-shown) + label,
.ct-field textarea:focus + label, .ct-field textarea:not(:placeholder-shown) + label { transform: translateY(-22px) scale(.72); }
.ct-field.bad { border-color: var(--accent); }
.ct-field.bad label { color: var(--accent); }

.ct-send { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 44px; }
.pill.solid { margin: 0; border: 0; background: var(--text); font: inherit; font-size: 18px; cursor: pointer; }
.pill.solid span::before { color: var(--bg); }
.pill.solid span::after { color: #fff; }
.pill.solid:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ct-status { color: var(--muted); font-size: 16px; max-width: 36ch; }
.ct-status a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.ct-details { display: grid; gap: 10px; margin-top: 110px; font-size: 18px; }
.ct-details div { display: flex; gap: 8px; }
.ct-details dt { font-weight: 600; }
.ct-details dt::after { content: ":"; }
.ct-details dd { color: var(--muted); }
.ct-details a, .ct-social a { position: relative; transition: color .3s ease; }
.ct-details a:hover { color: var(--text); }

.ct-social { list-style: none; display: flex; flex-wrap: wrap; gap: 28px; margin-top: 64px; font-size: 18px; }
.ct-social a { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.ct-social a:hover { color: var(--text); }
.ct-social svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .4s cubic-bezier(.22,.8,.24,1); }
.ct-social a:hover svg { transform: translateY(-3px); }

.ct-foot { display: flex; justify-content: space-between; gap: 24px; padding: 28px; border-top: 1px solid var(--rule); background: var(--bg); color: var(--muted); font-size: 14px; }
.ct-foot a:hover { color: var(--text); }

/* arrival: the title rises out of its line and the column follows, timed to the wipe lifting */
.js:not(.wipe-cover) .ct-title > span > span { animation: ct-rise 1.1s cubic-bezier(.22,.8,.24,1) .15s both; }
.js:not(.wipe-cover) .rise { animation: ct-fade 1s cubic-bezier(.22,.8,.24,1) both; }
.js:not(.wipe-cover) .rise:nth-child(1) { animation-delay: .35s; }
.js:not(.wipe-cover) .rise:nth-child(2) { animation-delay: .45s; }
.js:not(.wipe-cover) .rise:nth-child(3) { animation-delay: .55s; }
.js:not(.wipe-cover) .rise:nth-child(4) { animation-delay: .62s; }
.wipe-cover .ct-title > span > span { transform: translateY(105%); }
.wipe-cover .rise { opacity: 0; }
@keyframes ct-rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes ct-fade { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) { .ct-body { margin-left: 28%; } }
@media (max-width: 900px) { .ct-body { margin-left: 0; margin-top: 72px; } }
@media (max-width: 760px) {
  .ct { padding: 0 16px 88px; }
  .ct-title { padding-top: 140px; font-size: clamp(64px, 19vw, 110px); }
  .ct-body { margin-top: 48px; }
  .ct-lede { font-size: 28px; }
  .ct-form { margin-top: 36px; }
  .ct-details { margin-top: 72px; font-size: 16px; }
  .ct-details div { flex-direction: column; gap: 2px; }
  .ct-social { gap: 22px; margin-top: 44px; font-size: 16px; }
  .ct-foot { padding: 22px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ct-title > span > span, .rise { animation: none !important; transform: none !important; opacity: 1 !important; }
  .ct-field::after, .ct-field label { transition: none; }
}
