/* Contact page — layout & components */
.page-contact {
  background-color: var(--bg);
  background-image: url("../assets/bg-texture-large.jpg");
  background-size: cover;
  background-attachment: scroll;
}

.page-contact .footer-grid::after {
  content: none;
}

.page-contact .site-footer > .footer-bottom-section {
  position: relative;
  z-index: 1;
}

/* Hero — match gallery-hero sizing & background */
.contact-hero {
  position: relative;
  padding: 0.5rem 0 40px;
  text-align: center;
  overflow: visible;
}

.contact-hero-inner {
  position: relative;
  z-index: 1;
}

.contact-hero-tree {
  position: absolute;
  inset: -1.5rem 0 -2rem;
  z-index: 0;
  background: url("../assets/services/waist-tree.jpg") calc(50% + 5rem) calc(50% + 3rem) / min(792px, 101.2%) auto no-repeat;
  opacity: 0.42;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(
    ellipse 70% 72% at calc(50% + 5rem) calc(48% + 3rem),
    #000 20%,
    transparent 78%
  );
  mask-image: radial-gradient(
    ellipse 70% 72% at calc(50% + 5rem) calc(48% + 3rem),
    #000 20%,
    transparent 78%
  );
}

.contact-hero-inner > *:not(.contact-hero-tree) {
  position: relative;
  z-index: 1;
}

.contact-hero h1 {
  font-family: var(--font-brand);
  font-size: clamp(2.35rem, 5.5vw, 3.35rem);
  font-weight: 500;
  margin: 50px 0 0.5rem;
}

.contact-hero .deco-square {
  margin: 0 auto 0.85rem;
}

.contact-hero-sub {
  margin: 0 auto;
  max-width: 640px;
  color: #4b4b4b;
  font-size: 15px;
  line-height: 1.55;
}

/* Three-column main */
.contact-main {
  position: relative;
  padding: 0 0 4rem;
  overflow: hidden;
}

.contact-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.contact-panel {
  border: 1px solid #cfbaa4;
  border-radius: 6px;
  padding: 1.35rem 1.25rem 1.5rem;
  min-height: 100%;
}

.contact-info-panel,
.contact-social-panel {
  background: transparent;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.contact-info-panel .info-block {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.contact-info-panel .info-block:last-of-type {
  justify-content: flex-start;
}

.contact-form-panel {
  background: rgba(255, 255, 255, 0.92);
}

/* Left info panel */
.info-top {
  text-align: center;
  margin-bottom: 0;
}

.info-divider {
  height: 0;
  margin: clamp(1.35rem, 2.8vh, 2.1rem) 0;
  border-top: 1px solid rgba(176, 164, 149, 0.45);
  flex-shrink: 0;
}

.info-calendar {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.info-calendar img {
  width: 44px;
  height: 44px;
}

.info-li-icon img {
  width: 22px;
  height: auto;
}

.info-li-icon img[src*="icon-location"] {
  width: 18px;
}

.info-appointment {
  font-family: var(--font-brand);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.35rem;
}

.info-tagline {
  width: 250px;
  margin: 0 auto;
  color: #4b4b4b;
  font-size: 14.5px;
  line-height: 1.65;
  text-align: center;
}

.contact-hero .deco-line {
  width: 200px;
  margin: 0 auto 0.85rem;
}

.btn-submit--svg {
  position: relative;
  display: flex;
  width: auto;
  min-width: 200px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0.85rem 1.5rem;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: hidden;
  min-height: 48px;
  /* 与 SVG 圆角比例一致（viewBox 156.8×42.99，rx/ry 5.67） */
  border-radius: 3.62% / 13.19%;
}

.btn-submit--svg:hover,
.btn-submit--svg:active,
.btn-submit--svg:focus {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #fff;
}

.btn-submit--svg:focus {
  outline: none;
}

.btn-submit--svg:focus-visible {
  outline: 2px solid rgba(140, 54, 50, 0.55);
  outline-offset: 2px;
}

.btn-submit-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.btn-submit--svg span {
  position: relative;
  z-index: 1;
  color: #fff;
  font-weight: 700;
}

.qr-card--small .qr-meta {
  display: grid;
  grid-template-columns: 30px 1fr;
  row-gap: 0;
  column-gap: 0;
  align-items: center;
  height: 50px;
  margin-left: 10px;
}

.qr-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: unset;
}

.qr-brand img {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.qr-card--small .qr-meta-logo {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  object-fit: contain;
}

.qr-meta-logo--rednote {
  width: auto;
  height: 16px;
}

.info-block h3 {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 16px;
  color: var(--brown);
  margin: 0 0 0.65rem;
}

.info-accent {
  color: var(--accent);
  margin: 0 0 0.95rem;
  font-size: 0.9rem;
  line-height: 1.65;
}

.info-hours-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  color: #4b4b4b;
  font-size: 0.88rem;
  line-height: 2.15;
}

.info-hours-list li + li {
  margin-top: 0.55rem;
}

.info-note {
  margin: 0.35rem 0 0;
  font-size: 14px;
  color: #4b4b4b;
  line-height: 1.75;
}

.info-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(0.85rem, 2vh, 1.35rem);
}

.info-contact-list li {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 0;
  font-size: 0.88rem;
  color: #4b4b4b;
  line-height: 1.75;
}

/* 电话、邮箱行：图标与文字垂直居中对齐 */
.info-contact-list li:nth-child(-n+2) {
  align-items: center;
}

.info-li-icon {
  color: var(--brown);
  flex-shrink: 0;
  margin-top: 2px;
}

.info-contact-list li:nth-child(-n+2) .info-li-icon {
  margin-top: 0;
}

/* 地址行：图标与首行标题 Studio Visits 垂直居中对齐 */
.info-contact-list li:nth-child(3) .info-li-icon {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  height: 1.75em;
}

.info-contact-list li:nth-child(3) > span:not(.info-li-icon) {
  padding-top: 3px;
}

.info-contact-list a {
  color: #4b4b4b;
  text-decoration: none;
}

.info-contact-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.info-contact-list strong {
  color: var(--brown);
  font-weight: 700;
}

/* Form panel */
.contact-form-panel .form-head {
  text-align: center;
  margin-bottom: 0.15rem;
}

.contact-form-panel .form-title {
  font-family: var(--font-brand);
  font-size: clamp(1.25rem, 2.2vw, 1.45rem);
  margin: 0 0 0.5rem;
  font-weight: 400;
  text-align: center;
}

.contact-form-panel .deco-line {
  margin: 0 auto 0.85rem;
}

.form-required-note {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  text-align: center;
}

.form-required-note span::first-letter {
  color: var(--accent);
}

.quote-form .field {
  display: block;
  margin-bottom: 0.85rem;
}

.quote-form .field > span {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}

.quote-form .field > span::first-letter {
  color: inherit;
}

.quote-form .field:has([required]) > span::after {
  content: none;
}

.quote-form input,
.quote-form textarea {
  width: 100%;
  font-family: var(--font-brand);
  font-size: 0.92rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cfbaa4;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
}

.quote-form input::placeholder,
.quote-form textarea::placeholder {
  color: #9d9b98;
}

.quote-form input:focus,
.quote-form textarea:focus {
  outline: 2px solid rgba(140, 54, 50, 0.25);
  border-color: var(--accent);
}

.form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.upload-zone {
  border: 1.5px dashed #cfbaa4;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.5);
  padding: 1rem;
}

.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  text-align: center;
}

.upload-text {
  font-size: 0.82rem;
  color: #4b4b4b;
  line-height: 1.45;
}

.upload-list {
  list-style: none;
  padding: 0.75rem 0 0;
  margin: 0;
  font-size: 0.82rem;
  color: var(--brown);
}

.upload-list li + li {
  margin-top: 0.25rem;
}

.btn-submit {
  width: 100%;
  padding: 0.85rem;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 0.25rem;
}

/* SVG 按钮按内容宽度居中，避免整行红色底框 */
.btn-submit.btn-submit--svg {
  width: auto;
  min-width: 200px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0.85rem 1.5rem;
}

.form-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  color: var(--brown);
  line-height: 1.4;
  text-align: center;
}

.privacy-icon {
  flex-shrink: 0;
}

.privacy-icon img {
  width: 25px;
  height: 25px;
}

.form-status {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--accent);
}

.form-status.is-error {
  color: #8c3632;
}

/* Invisible honeypot — spam bots fill this, real users never see it */
.quote-form .hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Right social panel */
.social-head {
  text-align: center;
  margin-bottom: 0.15rem;
}

.contact-social-panel h2 {
  font-family: var(--font-brand);
  font-size: clamp(1.25rem, 2.2vw, 1.45rem);
  margin: 0 0 0.5rem;
  font-weight: 400;
  text-align: center;
}

.contact-social-panel .deco-line {
  margin: 0 auto 0.85rem;
}

.social-block-title {
  font-family: var(--font-brand);
  font-size: 16px;
  color: var(--accent);
  margin: 0 0 0.65rem;
  font-weight: 600;
}

.social-block + .social-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #b1a596;
}

.qr-lang {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: var(--ink);
}

.qr-lang--zh {
  font-family: var(--font-zh);
}

.qr-group + .qr-group {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #b1a596;
}

.qr-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.qr-card > img {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
}

.qr-card--large > img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  padding: 4px;
}

.qr-card--small > img {
  width: 85px;
  height: 85px;
  object-fit: contain;
  padding: 3px;
}

.qr-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.82rem;
}

.qr-meta strong {
  color: var(--brown);
  font-weight: 700;
}

.qr-meta strong[data-i18n="rnTitle"] {
  display: flex;
  flex-direction: column;
}

.qr-meta span {
  color: var(--brown);
}

.qr-meta .text-zh {
  color: var(--brown);
  font-family: 楷体;
}

.qr-meta span[data-i18n="wechatSub"],
.qr-meta span[data-i18n="rnSub"] {
  font-family: var(--font-zh);
}

.qr-meta strong[data-i18n="rnTitle"] > span:not(.text-zh) {
  font-weight: 600;
}

.qr-meta span[data-i18n="ttSub"] {
  display: flex;
  flex-direction: column;
  width: 100px;
}

.qr-card--large .qr-meta {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
}

.qr-card--large .qr-meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.qr-card--small .qr-meta > div {
  display: flex;
  flex-direction: column;
  margin-left: 20px;
}

.qr-stack .qr-card + .qr-card {
  margin-top: 0.65rem;
}

.qr-footnote {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 1rem 0 0 5px;
  font-size: 0.75rem;
  line-height: 1.4;
}

.qr-footnote .star {
  color: var(--accent);
  flex-shrink: 0;
}

.qr-note {
  color: var(--ink);
}

/* Responsive */
@media (max-width: 1024px) {
  .contact-columns {
    grid-template-columns: 1fr;
  }

  /* 营业时间 | 联系方式 同一排 */
  .contact-info-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1rem;
    align-items: start;
  }

  .contact-info-panel .info-top {
    grid-column: 1 / -1;
  }

  .contact-info-panel .info-divider {
    display: none;
  }

  .contact-info-panel .info-block {
    flex: none;
    min-width: 0;
  }

  .contact-info-panel .info-block h3 {
    font-size: clamp(0.95rem, 3.2vw, 1.15rem);
  }

  .contact-info-panel .info-block p,
  .contact-info-panel .info-block li,
  .contact-info-panel .info-block a {
    font-size: clamp(0.75rem, 2.5vw, 0.9rem);
    line-height: 1.4;
  }

  /* 主要联系方式 | 关注作品 同一排 */
  .contact-social-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1rem;
    align-items: start;
  }

  .contact-social-panel .social-head {
    grid-column: 1 / -1;
  }

  .contact-social-panel .qr-footnote {
    grid-column: 1 / -1;
    align-items: center;
    margin-left: 0;
    margin-right: 0;
  }

  .contact-social-panel .qr-note {
    white-space: nowrap;
    font-size: clamp(0.62rem, 2.1vw, 0.75rem);
  }

  .contact-social-panel .social-block + .social-block {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  .contact-social-panel .social-block {
    min-width: 0;
  }

  /* Primary Contact 与右侧栏之间多留一点空白 */
  .contact-social-panel > .social-block:first-of-type {
    padding-right: 0.65rem;
  }

  /* WhatsApp / 微信之间的横线：右侧留白，不要贴满 */
  .contact-social-panel .qr-group + .qr-group {
    border-top: none;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    position: relative;
  }

  .contact-social-panel .qr-group + .qr-group::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0.75rem;
    height: 1px;
    background: #b1a596;
  }

  /* 只缩小二维码大图，不要影响品牌小图标 */
  .contact-social-panel .qr-card--large > img,
  .contact-social-panel .qr-card > img {
    width: clamp(72px, 18vw, 110px);
    height: auto;
  }

  /* WhatsApp / 微信品牌图标：约当前尺寸的 150% */
  .contact-social-panel .qr-brand {
    width: 42px;
    height: 42px;
  }

  .contact-social-panel .qr-brand img,
  .contact-social-panel .qr-brand .icon-svg {
    width: 23px;
    height: 23px;
  }

  .contact-social-panel .social-block-title {
    font-size: clamp(0.8rem, 2.6vw, 0.95rem);
  }

  /* 「关注作品」略向左，给文字更多空间、避免换行 */
  .contact-social-panel {
    gap: 0.85rem 0.45rem;
  }

  .contact-social-panel .social-block + .social-block {
    margin-left: -0.35rem;
  }

  .contact-social-panel .qr-meta span[data-i18n="rnSub"],
  .contact-social-panel .qr-meta span[data-i18n="igSub"] {
    white-space: nowrap;
  }

  .contact-social-panel .qr-meta span[data-i18n="ttSub"] {
    white-space: normal;
  }

  .contact-social-panel .qr-card--small .qr-meta > div {
    min-width: 0;
  }

  .contact-social-panel .qr-card--small .qr-meta {
    gap: 0.35rem;
  }
}

@media (max-width: 640px) {
  .form-row.two {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    padding: 1rem;
  }

  .contact-info-panel {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 0.75rem;
  }

  .contact-info-panel .info-block h3 {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
  }

  .contact-info-panel .info-block p,
  .contact-info-panel .info-block li,
  .contact-info-panel .info-block a {
    font-size: 0.72rem;
  }

  .contact-social-panel {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 0.4rem;
  }

  .contact-social-panel .qr-footnote {
    grid-column: 1 / -1;
  }

  .contact-social-panel .qr-note {
    white-space: nowrap;
    font-size: 0.65rem;
  }

  .contact-social-panel .qr-card--large > img,
  .contact-social-panel .qr-card > img {
    width: clamp(64px, 16vw, 96px);
  }

  .contact-social-panel .qr-brand {
    width: 42px;
    height: 42px;
  }

  .contact-social-panel .qr-brand img,
  .contact-social-panel .qr-brand .icon-svg {
    width: 23px;
    height: 23px;
  }

  .contact-social-panel .social-block + .social-block {
    margin-left: -0.4rem;
  }

  .contact-social-panel .qr-meta span[data-i18n="rnSub"],
  .contact-social-panel .qr-meta span[data-i18n="igSub"] {
    white-space: nowrap;
  }

  .contact-social-panel .qr-meta span[data-i18n="ttSub"] {
    white-space: normal;
  }

  .contact-social-panel .social-block-title {
    font-size: 0.78rem;
    margin-bottom: 0.4rem;
  }
}
