/* Contact section ----------------------------------------------------------- */
.contact-section {
  --contact-paper-place: 0;
  --contact-paper-settle: 0;
  --contact-form-reveal: 0;
  --contact-form-alpha: 0;
  --contact-social-alpha: 0;
  --contact-form-y: 0px;
  --contact-social-y: 0px;
  min-height: 100svh;
  padding: 0;
  position: relative;
  overflow: clip;
  perspective: none;
  perspective-origin: 50% 50%;
  background: #030303;
  color: rgba(248, 245, 239, 0.92);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.contact-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.contact-section::before {
  background: none;
  opacity: 0;
}

.contact-layout {
  width: 100%;
  min-height: 100svh;
  margin: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.72fr);
  grid-template-rows: 38px minmax(520px, 1fr) minmax(132px, auto) 42px;
  border: 1px solid rgba(248, 245, 239, 0.18);
  background:
    linear-gradient(
      90deg,
      rgba(248, 245, 239, calc(0.014 + var(--contact-paper-settle) * 0.018)),
      transparent 46%
    ),
    #030303;
  transform:
    translate3d(0, calc((1 - var(--contact-paper-place)) * 34px), 0)
    scale(calc(0.986 + var(--contact-paper-settle) * 0.014));
  transform-origin: 50% 44%;
  opacity: calc(0.2 + var(--contact-paper-place) * 0.8);
  box-shadow: none;
  will-change: transform, opacity;
}

.contact-layout::before,
.contact-layout::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.contact-layout::before {
  border: 1px solid rgba(248, 245, 239, calc(var(--contact-paper-settle) * 0.1));
  transform: none;
  opacity: var(--contact-paper-place);
}

.contact-layout::after {
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(248, 245, 239, calc(var(--contact-paper-settle) * 0.028)),
      transparent
    );
  mix-blend-mode: screen;
  opacity: calc(var(--contact-paper-place) * 0.16);
  transform: translate3d(calc((1 - var(--contact-paper-place)) * -18%), 0, 0);
}

.contact-cell {
  position: relative;
  min-width: 0;
}

.contact-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.contact-cell-label,
.contact-cell-status {
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 2vw, 36px);
  border-bottom: 1px solid rgba(248, 245, 239, 0.12);
  opacity: calc(0.34 + var(--contact-form-reveal) * 0.32);
}

.contact-cell-label {
  justify-content: flex-start;
}

.contact-cell-status {
  justify-content: flex-end;
  border-left: 1px solid rgba(248, 245, 239, 0.12);
  text-align: right;
}

.contact-meta,
.contact-form-note {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(248, 245, 239, 0.64);
}

.contact-form-note {
  letter-spacing: 0.08em;
  text-transform: none;
  color: rgba(248, 245, 239, 0.42);
}

.contact-cell-heading {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 22px;
  padding: clamp(36px, 4vw, 64px);
  border-bottom: 1px solid rgba(248, 245, 239, 0.14);
  overflow: hidden;
}

.contact-circular-text {
  --circle-size: clamp(108px, 9vw, 156px);
  --circle-radius: calc(var(--circle-size) * 0.43);
  position: absolute;
  top: clamp(30px, 3.4vw, 62px);
  right: clamp(34px, 4vw, 72px);
  width: var(--circle-size);
  height: var(--circle-size);
  border-radius: 50%;
  color: rgba(248, 245, 239, 0.54);
  font-family: "Major Mono Display", "Satoshi", monospace;
  font-size: clamp(0.46rem, 0.52vw, 0.62rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: contactCircularSpin 26s linear infinite;
  transform-origin: center;
  opacity: calc(0.32 + var(--contact-paper-settle) * 0.58);
  transition: color 220ms ease, opacity 220ms ease, filter 220ms ease;
}

.contact-circular-text::before,
.contact-circular-text::after {
  display: none;
}

.contact-circular-text:hover,
.contact-circular-text:focus-visible {
  color: rgba(53, 217, 192, 0.82);
  opacity: 1;
  filter: drop-shadow(0 0 18px rgba(53, 217, 192, 0.18));
  animation-duration: 6s;
}

.contact-circular-letter {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1ch;
  height: calc(var(--circle-size) / 2);
  display: inline-block;
  text-align: center;
  transform-origin: 50% 0;
  transform:
    rotate(var(--letter-angle))
    translate3d(0, calc(var(--circle-radius) * -1), 0);
}

@keyframes contactCircularSpin {
  to {
    rotate: 360deg;
  }
}

.contact-cell-heading .section-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.42em;
  color: #ff6268;
}

.contact-title {
  --flip-distance: -1lh;
  --flip-duration: 1700ms;
  --flip-delay-factor: 34ms;
  --flip-hover-color: #ff6268;
  margin: 0;
  max-width: 8ch;
  font-family: "Satoshi", "Cabinet Grotesk", "MiSans", Arial, sans-serif;
  font-size: clamp(5.8rem, 16vw, 17.5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.075em;
  color: rgba(248, 245, 239, 0.96);
}

.contact-title.js-flip-text {
  cursor: default;
}

.contact-title.flip-word,
.contact-title .flip-word {
  display: flex;
  width: fit-content;
  overflow: hidden;
  line-height: 1;
  padding-bottom: 0;
}

.contact-title .flip-char {
  --flip-delay: calc(var(--flip-index) * var(--flip-delay-factor));
  display: inline-block;
  color: currentColor;
  transform: translate3d(0, 0, 0);
  transition:
    color 420ms ease,
    transform var(--flip-duration)
      linear(0, 0.011 0.6%, 0.041 1.2%, 0.173 2.6%, 0.894 7.4%, 1.128 9.3%, 1.271 11.1%, 1.311 12%, 1.333 13%, 1.328 14.4%, 1.286 15.9%, 1.031 21%, 0.95 23%, 0.907 24.7%, 0.888 26.5%, 0.89 27.9%, 0.904 29.4%, 1.034 42.5%, 0.997 49.3%, 0.987 53.3%, 1.004 66.5%, 1)
      var(--flip-delay);
  will-change: transform;
}

.contact-title:hover .flip-char,
.contact-title:focus-within .flip-char {
  color: var(--flip-hover-color);
  transform: translate3d(0, -0.05em, 0);
}

.contact-title.is-flipping .flip-char {
  animation: contactTitleColorPulse 1260ms ease both;
  animation-delay: var(--flip-delay);
}

@keyframes contactTitleColorPulse {
  0%,
  100% {
    color: rgba(248, 245, 239, 0.96);
  }

  38%,
  62% {
    color: var(--flip-hover-color);
  }
}

html[lang="zh-CN"] .contact-title {
  max-width: 5ch;
  font-family: "SkyHeart Clear Serif SC", "Songti SC", SimSun, serif;
  font-size: clamp(5rem, 13vw, 13.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.contact-cell-intro {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 28px;
  padding: clamp(36px, 4vw, 64px) clamp(28px, 3.3vw, 56px);
  border-left: 1px solid rgba(248, 245, 239, 0.14);
  border-bottom: 1px solid rgba(248, 245, 239, 0.14);
}

.contact-section .contact-cell-heading[data-reveal],
.contact-section .contact-cell-intro[data-reveal] {
  opacity: calc(var(--contact-paper-settle) * (0.72 + var(--contact-paper-place) * 0.28));
  transform: translateY(calc((1 - var(--contact-paper-settle)) * 18px));
}

.contact-section .contact-cell-heading[data-reveal].is-revealed,
.contact-section .contact-cell-intro[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

.contact-headline {
  margin: 0;
  max-width: 30ch;
  font-size: clamp(1.05rem, 1.25vw, 1.45rem);
  font-weight: 700;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: rgba(248, 245, 239, 0.84);
}

html[lang="zh-CN"] .contact-headline {
  font-family: "SkyHeart Clear Serif SC", "Songti SC", SimSun, serif;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.contact-collab {
  margin: 0;
  max-width: 44ch;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 2;
  letter-spacing: 0.14em;
  color: rgba(248, 245, 239, 0.38);
}

.contact-form {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr) auto;
  gap: clamp(22px, 2.6vw, 44px);
  align-items: end;
  padding: clamp(22px, 2.2vw, 34px) clamp(20px, 2vw, 36px);
  border-bottom: 1px solid rgba(248, 245, 239, 0.12);
}

.contact-form-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: start;
  opacity: calc(0.5 + var(--contact-form-reveal) * 0.35);
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 32px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.contact-field span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: rgba(248, 245, 239, 0.34);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(248, 245, 239, 0.18);
  border-radius: 0;
  background: transparent;
  color: rgba(248, 245, 239, 0.9);
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.6;
  padding: 0 0 12px;
  outline: none;
  transition:
    border-color 180ms ease,
    color 180ms ease;
}

.contact-field textarea {
  min-height: 64px;
  resize: vertical;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: #ff6268;
}

.contact-field-message {
  grid-column: 1 / -1;
}

.contact-submit {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 154px;
  min-height: 42px;
  border: 1px solid rgba(255, 98, 104, 0.7);
  border-radius: 0;
  background: transparent;
  color: #ff6268;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.contact-submit:hover,
.contact-submit:focus-visible {
  background: #ff6268;
  color: #030303;
  border-color: #ff6268;
  outline: none;
  transform: translateY(-1px);
}

.contact-submit:active {
  transform: translateY(0);
}

.contact-submit-arrow {
  display: inline-block;
  transition: transform 180ms ease;
}

.contact-submit:hover .contact-submit-arrow,
.contact-submit:focus-visible .contact-submit-arrow {
  transform: translate(2px, -2px);
}

.contact-social {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 42px;
}

.contact-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 0;
  border-right: 1px solid rgba(248, 245, 239, 0.12);
  background: transparent;
  color: rgba(248, 245, 239, 0.42);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    color 180ms ease,
    background 180ms ease;
}

.contact-social-icon:last-child {
  border-right: 0;
}

.contact-social-icon:hover,
.contact-social-icon:focus-visible {
  color: #ff6268;
  background: rgba(255, 98, 104, 0.045);
  outline: none;
}

.contact-social-icon span {
  display: none;
}

.contact-social-icon svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: block;
  overflow: visible;
}

.contact-wechat-trigger {
  font-family: inherit;
}

/* WeChat QR modal */
.wechat-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.wechat-qr-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.wechat-qr-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.wechat-qr-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 28px 20px;
  background: #111;
  border: 1px solid rgba(255, 98, 104, 0.38);
}

.wechat-qr-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  display: block;
}

.wechat-qr-id {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(248, 245, 239, 0.66);
  letter-spacing: 0.08em;
}

.wechat-qr-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(248, 245, 239, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(248, 245, 239, 0.62);
  font-size: 0.9rem;
  cursor: pointer;
}

.wechat-qr-close:hover,
.wechat-qr-close:focus-visible {
  color: #ff6268;
  border-color: rgba(255, 98, 104, 0.46);
  outline: none;
}

.contact-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 12px);
  z-index: 610;
  padding: 9px 14px;
  background: rgba(255, 98, 104, 0.92);
  color: #030303;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.contact-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .contact-section {
    padding: 0;
  }

  .contact-layout {
    min-height: 100svh;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .contact-cell-label,
  .contact-cell-status,
  .contact-cell-heading,
  .contact-cell-intro,
  .contact-form,
  .contact-social {
    grid-column: 1;
    border-left: 0;
  }

  .contact-cell-label,
  .contact-cell-status {
    min-height: 42px;
  }

  .contact-cell-status {
    justify-content: flex-start;
    text-align: left;
  }

  .contact-cell-heading {
    min-height: 42svh;
  }

  .contact-circular-text {
    --circle-size: clamp(88px, 22vw, 124px);
    top: 24px;
    right: 22px;
  }

  .contact-title,
  html[lang="zh-CN"] .contact-title {
    font-size: clamp(4.2rem, 20vw, 8rem);
  }

  .contact-cell-intro {
    padding: 28px 22px;
  }

  .contact-form {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 28px 22px;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }

  .contact-social {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-social-icon {
    min-height: 48px;
    border-top: 1px solid rgba(248, 245, 239, 0.32);
  }

  .contact-social-icon:nth-child(2n) {
    border-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-section {
    --contact-paper-place: 1;
    --contact-paper-settle: 1;
  }

  .contact-layout,
  .contact-layout::before,
  .contact-layout::after {
    transform: none;
  }

  .contact-circular-text {
    animation: none;
  }

  .contact-title .flip-char {
    transition: color 180ms ease;
  }

  .contact-title:hover .flip-char,
  .contact-title.is-flipping .flip-char,
  .contact-title:focus-within .flip-char {
    color: var(--flip-hover-color);
    transform: none;
  }
}

@media (max-width: 560px) {
  .contact-section {
    padding-inline: 0;
  }

  .contact-cell-heading {
    padding: 28px 18px;
  }

  .contact-circular-text {
    --circle-size: 82px;
    top: 20px;
    right: 18px;
    font-size: 0.42rem;
    opacity: 0.72;
  }

  .contact-cell-intro,
  .contact-form {
    padding: 24px 18px;
  }

  .contact-social {
    grid-template-columns: 1fr;
  }

  .contact-social-icon {
    justify-content: space-between;
    padding: 0 18px;
    border-right: 0;
  }
}

/* Warm contact surface ------------------------------------------------------ */
.contact-section {
  background: #030303;
  color: rgba(248, 245, 239, 0.92);
}

.contact-section::before {
  background: none;
  opacity: 0;
}

.contact-layout {
  border-color: rgba(248, 245, 239, 0.18);
  background:
    linear-gradient(90deg, rgba(248, 245, 239, 0.026), transparent 46%),
    #030303;
  box-shadow: none;
}

.contact-layout::before {
  border-color: rgba(248, 245, 239, calc(var(--contact-paper-settle) * 0.1));
}

.contact-layout::after {
  background:
    linear-gradient(90deg, transparent, rgba(248, 245, 239, calc(var(--contact-paper-settle) * 0.028)), transparent);
  mix-blend-mode: screen;
  opacity: calc(var(--contact-paper-place) * 0.16);
}

.contact-cell-label,
.contact-cell-status,
.contact-cell-heading,
.contact-cell-intro,
.contact-form {
  border-color: rgba(248, 245, 239, 0.14);
}

.contact-social-icon {
  border-right-color: rgba(248, 245, 239, 0.12);
}

.contact-meta {
  color: rgba(248, 245, 239, 0.54);
}

.contact-form-note,
.contact-field span,
.contact-collab {
  color: rgba(248, 245, 239, 0.34);
}

.contact-circular-text {
  color: rgba(248, 245, 239, 0.54);
}

.contact-title {
  color: rgba(248, 245, 239, 0.96);
}

.contact-headline {
  color: rgba(248, 245, 239, 0.84);
}

.contact-field input,
.contact-field textarea {
  border-bottom-color: rgba(248, 245, 239, 0.18);
  color: rgba(248, 245, 239, 0.9);
}

.contact-submit:hover,
.contact-submit:focus-visible {
  color: var(--warm-ink);
}

.contact-social-icon {
  color: rgba(248, 245, 239, 0.42);
}

.contact-social-icon:hover,
.contact-social-icon:focus-visible {
  background: rgba(255, 98, 104, 0.045);
}

@media (max-width: 980px) {
  .contact-social-icon {
    border-top-color: rgba(248, 245, 239, 0.14);
  }
}
