body { -webkit-font-smoothing: antialiased; }
h1, .contact-form .contact-email {
  font-family: var(--font-body);
  font-size: calc(var(--type-hero) * .52);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.04em;
}
.hero-contact { top: auto; bottom: var(--grid-margin); z-index: 5; pointer-events: none; }
.hero-cta {
  position: relative;
  width: 72px;
  height: 72px;
  min-height: 72px;
  padding: 0;
  background: transparent;
  color: #111;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
  transition: transform 160ms ease;
}
.hero-cta-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  translate: var(--orb-label-x, 0px) var(--orb-label-y, 0px);
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
  pointer-events: none;
  transition: opacity 240ms ease, filter 300ms ease, transform 400ms cubic-bezier(.22, 1, .36, 1);
}
.hero-cta:hover { background: transparent; }
.hero-cta:focus-visible { outline-offset: 6px; }
body:not([data-contact-phase="work"]) .hero-cta { pointer-events: none; }
body:not([data-contact-phase="work"]):not([data-contact-phase="closing"]) .hero-cta-label { opacity: 0; filter: blur(8px); transform: scale(.8); }
body[data-contact-phase="closing"] .hero-cta-label {
  opacity: var(--orb-return-label, 0);
  filter: blur(calc(8px * (1 - var(--orb-return-label, 0))));
  transform: scale(calc(.8 + .2 * var(--orb-return-label, 0)));
  transition: none;
}
.liquid-pill-backdrop { position: fixed; z-index: 2; pointer-events: none; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); mask-size: 100% 100%; -webkit-mask-size: 100% 100%; mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; }
#contact-orbs { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
#contact-orbs canvas { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
#contact-orbs svg { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; }
#contact-orbs-front { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
.hero-description { top: var(--grid-margin); bottom: auto; z-index: 4; }
.screen-back { overflow: visible; }
.contact-back { top: auto; bottom: var(--grid-margin); left: 50%; right: auto; transform: translateX(-50%); z-index: 5; }
.contact-back::before { transition: transform 400ms cubic-bezier(.22, 1, .36, 1); }
.contact-form {
  position: relative;
  z-index: 4;
  width: fit-content;
  max-width: calc(100vw - 112px);
  opacity: 0;
  filter: blur(10px);
  transform: scale(.94);
  pointer-events: none;
  transition: opacity 260ms ease, filter 320ms ease, transform 400ms cubic-bezier(.22, 1, .36, 1);
}
body[data-contact-phase="ready"] .contact-form {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
  pointer-events: auto;
}
.ghost-input { position: relative; width: 300px; max-width: 100%; transition: width 260ms cubic-bezier(.22, 1, .36, 1); }
.contact-form .contact-email {
  position: relative;
  display: block;
  left: 50%;
  translate: -50% 0;
  width: max(100%, var(--email-width, 100%));
  max-width: none;
  padding: 20px 24px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  text-align: center;
  box-shadow: none;
  transition: none;
}
.contact-form .contact-email:placeholder-shown { text-align: left; }
.contact-email::placeholder { color: #9b9b9b; font: inherit; letter-spacing: inherit; }
.contact-form .contact-email:is(:autofill, :-webkit-autofill) {
  /* Browser previews use a smaller font, so headline tracking crowds the letters. */
  letter-spacing: normal;
  -webkit-text-fill-color: #111;
  caret-color: #111;
  -webkit-background-clip: text;
  background-clip: text;
  box-shadow: none;
}
.contact-confirm {
  position: absolute;
  top: 50%;
  left: calc(max(100%, 50% + var(--email-width, 300px) / 2) + 6px);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #111;
  cursor: pointer;
  translate: 0 -50%;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.22, 1, .36, 1);
}
.contact-confirm:disabled { opacity: .4; cursor: default; }
.contact-confirm:hover { background: transparent; }
.contact-confirm:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
.contact-confirm svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.contact-confirm-copy { display: none; white-space: nowrap; }
.contact-form.is-received { outline: none; }
.contact-form.is-received .ghost-input { width: max-content; }
.contact-form.is-received .contact-email,
.contact-form.is-received .contact-confirm svg { display: none; }
.contact-form.is-received .contact-confirm {
  position: relative;
  top: auto;
  left: auto;
  translate: none;
  width: auto;
  padding-inline: 24px;
  border-radius: 999px;
  opacity: 1;
  font: 400 var(--type-label) / 1.2 var(--font-body);
  letter-spacing: -.02em;
}
.contact-form.is-received .contact-confirm-copy { display: block; }

.orb-success { position: absolute; top: 50%; left: 50%; translate: -50% -50%; z-index: 4; display: grid; place-items: center; opacity: 0; filter: blur(8px); pointer-events: none; outline: none; transition: opacity 240ms ease, filter 300ms ease; }
.orb-success svg { width: clamp(36px, 3vw, 52px); height: clamp(36px, 3vw, 52px); transform: scale(.85); transition: transform 400ms cubic-bezier(.22, 1, .36, 1); fill: none; stroke: #111; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.orb-success-copy { position: absolute; top: calc(50% + var(--success-radius, 36px) + 20px); left: 50%; translate: -50% 0; width: min(340px, calc(100vw - 48px)); text-align: center; color: #111; font: 400 16px var(--font-body); letter-spacing: -.02em; opacity: 0; filter: blur(4px); transition: opacity 240ms ease, filter 280ms ease; }
.orb-success-copy p { margin: 0; }
.contact-message { position: absolute; top: 100%; left: 50%; translate: -50% 0; width: min(340px, calc(100vw - 48px)); margin: 12px 0 0; text-align: center; text-wrap: pretty; font: 400 14px/1.4 var(--font-body); color: #555; }
body[data-contact-phase="success"] .orb-success { pointer-events: auto; }
.contact-resolving .orb-success { opacity: 1; filter: blur(0); }
.contact-resolving .orb-success svg { transform: scale(1); }
body[data-contact-phase="closing"] .orb-success { opacity: 0; filter: blur(2px); transition-duration: 250ms; transition-timing-function: cubic-bezier(.22, 1, .36, 1); }
body[data-contact-phase="closing"] .orb-success svg { transform: scale(.25); transition-duration: 250ms; }
body[data-contact-phase="closing"] .orb-success-copy { opacity: 0; filter: blur(2px); transform: translateY(-4px); transition: opacity 150ms cubic-bezier(.22, 1, .36, 1), filter 150ms cubic-bezier(.22, 1, .36, 1), transform 150ms cubic-bezier(.22, 1, .36, 1); }
.contact-resolving .orb-success-copy { opacity: 1; filter: blur(0); transition-delay: 100ms; }
@media (max-width: 767px) {
  :root {
    --mobile-font-size: 16px;
    --mobile-frame-width: min(calc(100vw - 2 * var(--grid-margin)), calc(62dvh * 16 / 9));
    --mobile-frame-height: calc(var(--mobile-frame-width) * 9 / 16);
  }
  .media-stage { grid-column: 1 / -1; width: var(--mobile-frame-width); }
  h1, .hero-description, .hero-cta, .contact-form .contact-email, .contact-form.is-received .contact-confirm, .orb-success-copy, .contact-message { font-size: var(--mobile-font-size); }
  h1 { display: block; text-align: center; }
  body > h1 {
    top: calc(50dvh - var(--mobile-frame-height) / 2 - 20px);
    transform: translateY(-100%);
  }
  .hero-description {
    top: calc(50dvh + var(--mobile-frame-height) / 2 + 20px);
    transform: none;
    line-height: 1.4;
    white-space: normal;
    text-wrap: balance;
  }
  .hero-contact, .contact-back { bottom: calc(var(--grid-margin) + env(safe-area-inset-bottom, 0px)); }
  .hero-cta { width: 64px; height: 64px; min-height: 64px; }
  .contact-form { max-width: calc(100vw - 100px); }
  .contact-email { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-cta, .hero-cta-label, .contact-form, .ghost-input, .contact-confirm, .orb-success, .orb-success svg, .orb-success-copy { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-contact-phase="closing"] :is(.orb-success, .orb-success svg, .orb-success-copy) { transition: none; }
}
