/* ============================================================
   Base — Reset, Typography, Utilities
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--color-accent-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.25;
  color: var(--color-primary);
  margin: 0 0 var(--space-sm);
  text-wrap: balance;
  font-synthesis: none;
}

p { text-wrap: pretty; }

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin: 0 0 var(--space-sm); }
p:last-child { margin-bottom: 0; }

/* ---- Layout ---- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.section {
  padding: 4rem 0;
}

.section--alt {
  background: var(--color-off-white);
}

/* ---- Editorial Utilities ---- */

.section-eyebrow {
  font-family: var(--font-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1.5px;
  background: var(--color-accent);
}

.section-lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.8;
  color: var(--color-text-light);
  max-width: 560px;
}

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header--center {
  text-align: center;
}
.section-header--center .section-eyebrow {
  justify-content: center;
}
.section-header--center .section-lead {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  text-align: center;
  transition: background-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
  letter-spacing: 0.025em;
  position: relative;
  box-shadow:
    0 0 0 0.5px rgba(17, 24, 39, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 1px 2px rgba(17, 24, 39, 0.06),
    0 2px 4px rgba(17, 24, 39, 0.04),
    0 4px 8px rgba(17, 24, 39, 0.03);
}
.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-primary-dark);
  box-shadow:
    0 0 0 0.5px rgba(17, 24, 39, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 2px rgba(17, 24, 39, 0.1),
    0 2px 4px rgba(17, 24, 39, 0.06),
    0 4px 8px rgba(17, 24, 39, 0.03);
  text-shadow: 0 1px 1px rgba(17, 24, 39, 0.1);
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to bottom, rgba(255,255,255,0.06), transparent);
  pointer-events: none;
}
.btn--primary:hover {
  background-color: color-mix(in srgb, var(--color-accent) 88%, black);
  color: var(--color-primary-dark);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  box-shadow:
    0 1px 2px rgba(17, 24, 39, 0.06),
    0 2px 4px rgba(17, 24, 39, 0.04),
    0 4px 8px rgba(17, 24, 39, 0.03);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--outline-light {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: var(--color-white);
}
.btn--outline-light:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

.btn--white {
  background: var(--color-white);
  color: var(--color-primary);
}
.btn--white:hover {
  background: var(--color-off-white);
  color: var(--color-primary);
}

/* ---- Utilities ---- */

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

/* ---- Image Placeholder ---- */

.img-placeholder {
  background: var(--color-light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-mid-gray);
  font-size: 0.875rem;
  font-family: var(--font-accent);
  overflow: hidden;
  position: relative;
}
.img-placeholder::after {
  content: attr(data-label);
  position: absolute;
  font-size: 0.8125rem;
  color: var(--color-mid-gray);
  letter-spacing: 0.05em;
}

/* ---- WeChat Popover ---- */

.wechat-popover-anchor {
  position: relative;
  display: inline-block;
}

.wechat-popover {
  position: absolute;
  bottom: calc(100% + var(--space-sm));
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--color-white);
  border-radius: 0px;
  padding: 6px;
  text-align: center;
  width: max-content;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) ease-out,
              transform var(--duration-normal) ease-out;
  box-shadow:
    0 1px 2px rgba(17, 24, 39, 0.06),
    0 4px 8px rgba(17, 24, 39, 0.04),
    0 12px 24px rgba(17, 24, 39, 0.03);
  z-index: 50;
}

.wechat-popover::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--color-white);
}

.wechat-popover[hidden] {
  display: block;
}

.wechat-popover--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.wechat-popover-qr img {
  display: block;
}

.wechat-popover-id { display: none; }

@media (max-width: 768px) {
  .wechat-popover-qr { display: none; }
  .wechat-popover-id { display: block; }
}

/* ---- WeChat ID Copy ---- */

.wechat-id-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.wechat-id-value {
  font-family: var(--font-accent);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-primary);
  letter-spacing: 0.02em;
  user-select: all;
}

.wechat-copy-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--color-mid-gray);
  cursor: pointer;
  transition: color var(--duration-fast) ease-out;
}
.wechat-copy-btn:hover {
  color: var(--color-primary);
}
.wechat-copy-btn:active {
  transform: scale(0.96);
}
.wechat-copy-btn svg {
  width: 16px;
  height: 16px;
}

.wechat-copy-btn .wechat-check-icon {
  display: none;
}

.wechat-copy-btn.is-copied {
  color: #16a34a;
}
.wechat-copy-btn.is-copied .wechat-copy-icon {
  display: none;
}
.wechat-copy-btn.is-copied .wechat-check-icon {
  display: flex;
}

/* ---- Responsive ---- */
/* Breakpoints: 576px (mobile), 768px (tablet), 992px (desktop) */
