body { display: flex; flex-direction: column; min-height: 100vh; }
footer { margin-top: auto; }

#canopy-glass {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100vw - 40px), 1160px);
  height: 100%;
  background: linear-gradient(90deg, rgba(10,4,8,0) 0%, rgba(196,30,58,.025) 20%, rgba(212,175,55,.06) 50%, rgba(196,30,58,.025) 80%, rgba(10,4,8,0) 100%);
  border-left: 1px solid rgba(212,175,55,.06);
  border-right: 1px solid rgba(212,175,55,.06);
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 768px) { #canopy-glass { display: none; } }

/* ── CENTERED CONTAINER — both boxes as one unit ── */
.contact-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 3rem 2rem;
  width: 100%;
}

/* Override section-label for contact page */
.contact-hero-box .section-label {
  color: var(--ocean-light);
  font-weight: 700;
}

/* ── HERO BOX ── */
.contact-hero-box {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    145deg,
    rgba(212,175,55,0.18) 0%,
    rgba(180,145,30,0.12) 50%,
    rgba(212,175,55,0.16) 100%
  );
  border: 1px solid rgba(212,175,55,0.45);
  border-radius: 22px;
  padding: 3.5rem 4.5rem;
  text-align: center;
  max-width: 580px;
  width: 100%;
  box-shadow:
    0 0 80px rgba(212,175,55,0.1),
    0 0 140px rgba(212,175,55,0.05),
    inset 0 0 40px rgba(212,175,55,0.04),
    0 20px 60px rgba(0,0,0,0.45);
}

/* Jade diagonal beam — sweeps corner to corner */
.contact-hero-box::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -80%;
  width: 55%;
  height: 260%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(212,175,55,0.18),
    rgba(212,175,55,0.42),
    rgba(212,175,55,0.18),
    transparent
  );
  transform: rotate(-25deg);
  animation: jade-beam 5s ease-in-out infinite;
  pointer-events: none;
}

/* Second beam — offset for depth */
.contact-hero-box::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -80%;
  width: 28%;
  height: 260%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(212,175,55,0.1),
    rgba(212,175,55,0.22),
    rgba(212,175,55,0.1),
    transparent
  );
  transform: rotate(-25deg);
  animation: jade-beam 5s ease-in-out infinite 0.7s;
  pointer-events: none;
}

@keyframes jade-beam {
  0%   { left: -80%; }
  50%  { left: 160%; }
  100% { left: -80%; }
}

.contact-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  color: var(--text);
  margin: 0.75rem 0 0.6rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  position: relative;
}

.contact-title span { color: var(--jade); }

.contact-sub {
  font-size: 0.95rem;
  color: var(--ocean-light);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.06em;
  position: relative;
}

/* ── GLASSMORPHIC EMAIL CARD ── */
.contact-glass {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 2rem 3rem;
  text-align: center;
  max-width: 440px;
  width: 100%;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.4),
    0 2px 8px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.07);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.contact-glass:hover {
  box-shadow:
    0 12px 48px rgba(0,0,0,0.5),
    0 0 30px rgba(212,175,55,0.08),
    inset 0 1px 0 rgba(255,255,255,0.1);
  border-color: rgba(212,175,55,0.25);
}

.contact-glass-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ocean-light);
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.contact-email-link {
  font-size: 1.15rem;
  color: var(--jade);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
  display: block;
}

.contact-email-link:hover { color: var(--jade-dark); }

/* ── CONTACT PEONY + ORBIT ZONE ── */
.contact-peony-zone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.5rem 0;
  pointer-events: none;
  user-select: none;
}

.contact-peony-svg {
  width: 200px;
  height: 175px;
  overflow: visible;
}

/* Orbit scene centred over peony via CSS — no JS positioning needed */
.contact-orbit-scene {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  overflow: visible;
  pointer-events: none;
}

#contact-orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
}

/* Orbit letter styles (index-page.css not loaded here) */
.contact-orbit-scene .orbit-letter {
  position: absolute;
  top: 0;
  left: 0;
  font-family: 'Permanent Marker', cursive;
  font-size: 1.4rem;
  font-weight: 400;
  color: #FFB7C5;
  transform-origin: 50% 50%;
  text-shadow:
    0 0 12px rgba(255, 126, 168, 0.9),
    0 0 28px rgba(255, 126, 168, 0.45),
    0 0 2px rgba(192, 24, 80, 0.5);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  will-change: transform, opacity;
}

.contact-orbit-scene .orbit-heart {
  color: #D4AF37;
  text-shadow:
    0 0 10px rgba(212, 175, 55, 0.95),
    0 0 24px rgba(212, 175, 55, 0.50),
    0 0 2px rgba(160, 120, 10, 0.6);
}

/* Peony rotation + breath (keyframes defined in style.css) */
#cp-apex-star {
  transform-box: fill-box;
  transform-origin: center;
  animation: starRotate 32s linear infinite, starBreath 4s ease-in-out infinite;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  #cp-apex-star { animation: none; opacity: 1; }
}

/* ── IOSEVKA — contact page typographic refresh ──
   Mirrors the home page rule: body text + chrome in Iosevka,
   .contact-title (Cinzel display) is intentionally untouched. */
.contact-hero-box .section-label,
.contact-sub,
.contact-glass-label,
.contact-email-link,
footer .footer-logo,
footer .footer-tagline,
footer .footer-links a,
footer .footer-bottom {
  font-family: 'Iosevka', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .contact-hero-box {
    padding: 2.5rem 2rem;
    border-radius: 16px;
  }
  .contact-glass {
    padding: 1.5rem 1.5rem;
  }
  .contact-email-link { font-size: 0.95rem; }
  .contact-peony-svg { width: 160px; height: 140px; }
  .contact-orbit-scene { width: 180px; height: 180px; }
  .contact-orbit-scene .orbit-letter { font-size: 1.1rem; }
}
