/* XinHammer Contact (/contact/) — Calm, Direct Editorial Contact Stage */

.contact-page-main {
  padding-block: clamp(1.6rem, 3.8vw, 3.1rem) clamp(3rem, 6vw, 5rem);
}

/* Centered Editorial Header */
.contact-hero {
  max-width: 44rem;
  margin: 0 auto clamp(1.75rem, 3.6vw, 2.55rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  padding: .28rem .82rem;
  border: 1px solid rgba(35, 80, 220, .14);
  border-radius: 9999px;
  background: rgba(255, 255, 255, .9);
  color: #2350dc;
  font-size: .75rem;
  font-weight: 560;
  letter-spacing: .04em;
  box-shadow: 0 2px 10px -4px rgba(15, 23, 42, .06);
}

.contact-eyebrow-dot {
  width: .42rem;
  height: .42rem;
  border-radius: 9999px;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .18);
}

.contact-h1 {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: .28rem .42rem;
  margin: .85rem 0 0;
  color: #0f172a;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 660;
  line-height: 1.18;
  letter-spacing: -.025em;
}

.contact-h1-prefix {
  color: #64748b;
  font-size: .62em;
  font-weight: 520;
  letter-spacing: .02em;
}

.contact-h1-name {
  font-size: clamp(2.35rem, 4.7vw, 3.45rem);
  line-height: 1.06;
  color: #0f172a;
}

.contact-h1-seal {
  align-self: center;
  transform: translateY(.08em);
}

.contact-lead {
  margin: .85rem auto 0;
  max-width: 34em;
  color: #475569;
  font-size: clamp(.94rem, 1.1vw, 1.03rem);
  line-height: 1.75;
}

/* Optional Inbound Context Pill (Hidden by default; shown ONLY when URL has ?topic=) */
.contact-context-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  margin: 1.15rem auto 0;
  padding: .48rem .75rem .48rem .9rem;
  max-width: 100%;
  border: 1px solid rgba(35, 80, 220, .18);
  border-radius: 9999px;
  background: rgba(239, 246, 255, .88);
  box-shadow: 0 8px 20px -12px rgba(35, 80, 220, .2);
  font-size: .84rem;
  color: #1e293b;
}

.contact-context-bar[hidden] {
  display: none;
}

.contact-context-tag {
  color: #2350dc;
  font-weight: 600;
}

.contact-context-sep {
  color: rgba(35, 80, 220, .3);
}

.contact-context-copy {
  padding: .22rem .66rem;
  border: 1px solid rgba(35, 80, 220, .24);
  border-radius: 9999px;
  background: #ffffff;
  color: #1d4ed8;
  font: inherit;
  font-size: .79rem;
  font-weight: 560;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.contact-context-copy:hover {
  background: #2350dc;
  border-color: #2350dc;
  color: #ffffff;
}

.contact-context-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: #64748b;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.contact-context-close:hover {
  background: rgba(15, 23, 42, .07);
  color: #0f172a;
}

/* Main 2-Column Architectural Bento */
.contact-bento {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "wechat founder"
    "wechat email";
  gap: 1.15rem;
  align-items: stretch;
}

.contact-card {
  position: relative;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 22px 48px -26px rgba(15, 23, 42, .14), inset 0 1px 0 rgba(255, 255, 255, .95);
}

/* Left Primary Card: WeChat QR */
.contact-card--wechat {
  grid-area: wechat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1.15rem;
  padding: 1.45rem 1.5rem 1.35rem;
  overflow: hidden;
}

.contact-card--wechat::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle 220px at 88% 8%, rgba(22, 163, 74, .07), transparent 72%),
    radial-gradient(circle 200px at 12% 94%, rgba(35, 80, 220, .06), transparent 70%);
}

.contact-card-head {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.contact-channel-id {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.contact-icon-badge {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: .8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon-badge--wechat {
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, .16);
}

.contact-icon-badge--mail {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: .88rem;
  background: #eff6ff;
  color: #2350dc;
  border: 1px solid rgba(35, 80, 220, .14);
}

.contact-channel-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.04rem;
  font-weight: 640;
  line-height: 1.25;
}

.contact-channel-sub {
  margin: .14rem 0 0;
  color: #64748b;
  font-size: .78rem;
  line-height: 1.3;
}

.contact-fast-tag {
  padding: .22rem .66rem;
  border-radius: 9999px;
  background: #ecfdf5;
  border: 1px solid rgba(22, 163, 74, .18);
  color: #15803d;
  font-size: .74rem;
  font-weight: 580;
  white-space: nowrap;
}

.contact-qr-frame {
  position: relative;
  z-index: 1;
  padding: .55rem;
  border-radius: 1.25rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, .07);
  box-shadow: 0 18px 36px -20px rgba(15, 31, 68, .24), 0 4px 12px -4px rgba(15, 23, 42, .06);
  max-width: 16.8rem;
  width: 100%;
}

.contact-qr-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: .86rem;
}

.contact-card-foot {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(15, 23, 42, .06);
}

.contact-qr-hint {
  margin: 0;
  color: #64748b;
  font-size: .81rem;
  line-height: 1.4;
}

.contact-save-link {
  display: inline-flex;
  align-items: center;
  gap: .36rem;
  padding: .36rem .78rem;
  border: 1px solid rgba(15, 23, 42, .11);
  border-radius: 9999px;
  background: rgba(248, 250, 252, .9);
  color: #0f172a;
  font-size: .8rem;
  font-weight: 540;
  text-decoration: none;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.contact-save-link:hover {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Right Top Card: Founder Editorial Greeting & Portrait */
.contact-card--founder {
  grid-area: founder;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(244, 247, 255, .96) 0%, rgba(255, 251, 243, .95) 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  align-items: end;
  min-height: 19.5rem;
}

.contact-card--founder::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle 220px at 82% 28%, rgba(35, 80, 220, .12), transparent 68%),
    radial-gradient(circle 190px at 14% 20%, rgba(245, 158, 11, .11), transparent 68%),
    linear-gradient(to right, rgba(15, 23, 42, .024) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, .024) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px, 28px 28px;
}

.contact-founder-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 1.75rem .4rem 1.75rem 1.75rem;
}

.contact-live-pill {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .24rem .68rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(15, 23, 42, .07);
  color: #334155;
  font-size: .75rem;
  font-weight: 540;
}

.contact-live-dot {
  width: .42rem;
  height: .42rem;
  border-radius: 9999px;
  background: #16a34a;
}

.contact-founder-copy h2 {
  margin: .9rem 0 0;
  color: #0f172a;
  font-size: clamp(1.24rem, 1.9vw, 1.54rem);
  font-weight: 660;
  line-height: 1.32;
  letter-spacing: -.02em;
}

.contact-founder-copy p {
  margin: .72rem 0 0;
  color: #475569;
  font-size: .91rem;
  line-height: 1.76;
}

.contact-founder-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .95rem;
  margin-top: 1.1rem;
  padding-top: .95rem;
  border-top: 1px solid rgba(15, 23, 42, .07);
  color: #64748b;
  font-size: .79rem;
}

.contact-founder-figure {
  position: relative;
  z-index: 2;
  align-self: end;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 100%;
  padding: 1rem .75rem 0 0;
}

.contact-founder-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 20.5rem;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(15, 31, 68, .13));
}

/* Right Bottom Card: Clean Email Bar */
.contact-card--email {
  grid-area: email;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-email-main {
  display: flex;
  align-items: center;
  gap: .95rem;
  min-width: 0;
}

.contact-email-stack {
  min-width: 0;
}

.contact-email-label {
  margin: 0;
  color: #64748b;
  font-size: .78rem;
  line-height: 1.35;
}

.contact-email-link {
  display: inline-block;
  margin-top: .18rem;
  color: #0f172a;
  font-size: clamp(1.06rem, 1.45vw, 1.22rem);
  font-weight: 640;
  letter-spacing: -.01em;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .16s ease;
}

.contact-email-link:hover {
  color: #2350dc;
  text-decoration: underline;
  text-underline-offset: .22em;
}

.contact-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .36rem;
  min-height: 2.45rem;
  padding: .46rem 1.05rem;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 9999px;
  background: #0f172a;
  color: #ffffff;
  font: inherit;
  font-size: .84rem;
  font-weight: 560;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.contact-copy-btn:hover {
  background: #2350dc;
  border-color: #2350dc;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -10px rgba(35, 80, 220, .55);
}

.contact-copy-btn[data-copied="true"] {
  background: #15803d;
  border-color: #15803d;
}

/* Quiet Orientation Strip Below (Zero Chip Clutter) */
.contact-guides {
  max-width: 64rem;
  margin: clamp(2.1rem, 4.4vw, 3.1rem) auto 0;
  padding-top: clamp(1.6rem, 3vw, 2.2rem);
  border-top: 1px solid rgba(15, 23, 42, .07);
}

.contact-guides-title {
  margin: 0 0 1.05rem;
  color: #64748b;
  font-size: .82rem;
  font-weight: 580;
  letter-spacing: .05em;
}

.contact-guides-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
}

.contact-guide-item {
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(15, 23, 42, .07);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, .74);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.contact-guide-item:hover {
  border-color: rgba(35, 80, 220, .18);
  background: rgba(255, 255, 255, .96);
  transform: translateY(-2px);
}

.contact-guide-num {
  color: #2350dc;
  font-size: .74rem;
  font-weight: 660;
  font-variant-numeric: tabular-nums;
  opacity: .75;
}

.contact-guide-item h3 {
  margin: .38rem 0 0;
  color: #0f172a;
  font-size: .96rem;
  font-weight: 630;
  line-height: 1.35;
}

.contact-guide-item p {
  margin: .42rem 0 0;
  color: #64748b;
  font-size: .83rem;
  line-height: 1.62;
}

.contact-guide-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-top: auto;
  padding-top: .72rem;
  color: #2350dc;
  font-size: .8rem;
  font-weight: 560;
  text-decoration: none;
}

.contact-guide-link:hover {
  text-decoration: underline;
  text-underline-offset: .22em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tablet */
@media (max-width: 60rem) {
  .contact-bento {
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  }
  .contact-guides-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile: WeChat -> Email -> Founder -> Guides */
@media (max-width: 52rem) {
  .contact-bento {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "wechat"
      "email"
      "founder";
    gap: .95rem;
  }

  .contact-card--wechat {
    padding: 1.25rem 1.2rem 1.2rem;
  }

  .contact-qr-frame {
    max-width: 15.6rem;
  }

  .contact-card--founder {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    min-height: 14.5rem;
  }

  .contact-founder-copy {
    padding: 1.35rem .35rem 1.35rem 1.25rem;
  }

  .contact-founder-figure {
    padding: .75rem .4rem 0 0;
  }

  .contact-founder-figure img {
    max-height: 15.5rem;
  }

  .contact-card--email {
    padding: 1.15rem 1.2rem;
  }
}

@media (max-width: 30rem) {
  .contact-hero {
    align-items: flex-start;
    text-align: left;
  }

  .contact-h1 {
    justify-content: flex-start;
  }

  .contact-context-bar {
    margin-inline: 0;
    border-radius: 1rem;
    justify-content: flex-start;
  }

  .contact-card-foot {
    flex-wrap: wrap;
  }

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

  .contact-founder-copy {
    padding: 1.3rem 1.2rem .4rem;
  }

  .contact-founder-figure {
    padding: .25rem 1.2rem 0;
  }

  .contact-founder-figure img {
    max-height: 13.5rem;
  }

  .contact-card--email {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-copy-btn {
    width: 100%;
  }

  .contact-guides-grid {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  .contact-eyebrow {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(147, 197, 253, .22);
    color: #93c5fd;
    box-shadow: none;
  }

  .contact-h1,
  .contact-h1-name,
  .contact-channel-title,
  .contact-founder-copy h2,
  .contact-email-link,
  .contact-guide-item h3 {
    color: #f8fafc;
  }

  .contact-h1-prefix,
  .contact-lead,
  .contact-channel-sub,
  .contact-qr-hint,
  .contact-founder-copy p,
  .contact-founder-meta,
  .contact-email-label,
  .contact-guides-title,
  .contact-guide-item p {
    color: #94a3b8;
  }

  .contact-context-bar {
    background: rgba(30, 58, 138, .28);
    border-color: rgba(147, 197, 253, .24);
    color: #e2e8f0;
    box-shadow: none;
  }

  .contact-context-tag {
    color: #93c5fd;
  }

  .contact-context-copy {
    background: rgba(15, 23, 42, .65);
    border-color: rgba(147, 197, 253, .3);
    color: #bfdbfe;
  }

  .contact-context-copy:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
  }

  .contact-context-close {
    color: #94a3b8;
  }

  .contact-context-close:hover {
    background: rgba(255, 255, 255, .08);
    color: #f8fafc;
  }

  .contact-card {
    background: rgba(19, 27, 45, .86);
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 24px 52px -28px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .05);
  }

  .contact-card--wechat::before {
    background:
      radial-gradient(circle 220px at 88% 8%, rgba(34, 197, 94, .09), transparent 72%),
      radial-gradient(circle 200px at 12% 94%, rgba(59, 130, 246, .09), transparent 70%);
  }

  .contact-icon-badge--wechat {
    background: rgba(22, 163, 74, .16);
    border-color: rgba(74, 222, 128, .22);
    color: #4ade80;
  }

  .contact-icon-badge--mail {
    background: rgba(59, 130, 246, .16);
    border-color: rgba(147, 197, 253, .22);
    color: #93c5fd;
  }

  .contact-fast-tag {
    background: rgba(22, 163, 74, .15);
    border-color: rgba(74, 222, 128, .22);
    color: #86efac;
  }

  /* Keep QR backing pure white so WeChat scanner reads reliably in dark mode */
  .contact-qr-frame {
    background: #ffffff;
    border-color: rgba(255, 255, 255, .18);
    box-shadow: 0 20px 42px -20px rgba(0, 0, 0, .65);
  }

  .contact-card-foot {
    border-top-color: rgba(255, 255, 255, .08);
  }

  .contact-save-link {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .12);
    color: #e2e8f0;
  }

  .contact-save-link:hover {
    background: #f8fafc;
    border-color: #f8fafc;
    color: #0f172a;
  }

  .contact-card--founder {
    background: linear-gradient(150deg, rgba(22, 33, 58, .94) 0%, rgba(16, 23, 40, .96) 100%);
  }

  .contact-card--founder::before {
    background:
      radial-gradient(circle 220px at 82% 28%, rgba(59, 130, 246, .18), transparent 68%),
      radial-gradient(circle 190px at 14% 20%, rgba(251, 191, 36, .1), transparent 68%),
      linear-gradient(to right, rgba(255, 255, 255, .03) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(255, 255, 255, .03) 1px, transparent 1px);
    background-size: auto, auto, 28px 28px, 28px 28px;
  }

  .contact-live-pill {
    background: rgba(15, 23, 42, .65);
    border-color: rgba(255, 255, 255, .1);
    color: #cbd5e1;
  }

  .contact-founder-meta {
    border-top-color: rgba(255, 255, 255, .08);
  }

  .contact-email-link:hover {
    color: #93c5fd;
  }

  .contact-copy-btn {
    background: #f8fafc;
    border-color: #f8fafc;
    color: #0f172a;
  }

  .contact-copy-btn:hover {
    background: #93c5fd;
    border-color: #93c5fd;
    color: #0b1120;
    box-shadow: 0 8px 18px -10px rgba(147, 197, 253, .45);
  }

  .contact-copy-btn[data-copied="true"] {
    background: #22c55e;
    border-color: #22c55e;
    color: #052e16;
  }

  .contact-guides {
    border-top-color: rgba(255, 255, 255, .08);
  }

  .contact-guide-item {
    background: rgba(19, 27, 45, .64);
    border-color: rgba(255, 255, 255, .07);
  }

  .contact-guide-item:hover {
    background: rgba(24, 34, 56, .92);
    border-color: rgba(147, 197, 253, .22);
  }

  .contact-guide-num,
  .contact-guide-link {
    color: #93c5fd;
  }
}
