/* ==========================================================================
   Apex Evergreen Pharma — Contact Page Styles
   --------------------------------------------------------------------------
   Self-contained page styles. Consumes tokens from design-system.css and
   builds on global.css. Redefines the shared components (reveal, node-divider,
   media-frame, orbital-node icons) with identical values so this page looks
   like the same site without loading home.css.

   Sections:
     1. Intro   2. Quick contact + inquiry tags   3. Contact form
     4. Offices   5. Closing reassurance
   ========================================================================== */

/* ==========================================================================
   SHARED — SCROLL REVEAL
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   SHARED — CONNECTIVE NODE DIVIDER
   ========================================================================== */
.node-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding-block: var(--space-2xl);
}
.node-divider--cream  { background-color: var(--color-cream); }
.node-divider--forest { background-color: var(--color-forest); }
.node-divider::before,
.node-divider::after {
  content: "";
  height: 1px;
  width: clamp(48px, 14vw, 180px);
  background: linear-gradient(to right, transparent, rgba(201, 169, 74, 0.45));
}
.node-divider::after { transform: scaleX(-1); }
.node-divider__mark {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.node-divider__mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-box: fill-box;
  transform-origin: center;
}
.node-mark__ring { stroke: var(--color-gold); stroke-width: 1.25; opacity: 0.7; }
.node-mark__core { fill: var(--color-gold); transform-box: fill-box; transform-origin: center; }
@keyframes node-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.15); }
}
.node-mark__core { animation: node-pulse 3.2s var(--ease) infinite; }
@media (prefers-reduced-motion: reduce) {
  .node-mark__core { animation: none; }
}

/* ==========================================================================
   SHARED — MEDIA FRAME (labelled placeholder)
   ========================================================================== */
.media-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(201, 169, 74, 0.35);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
}
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--dark {
  background: linear-gradient(160deg, rgba(30, 58, 42, 0.55), rgba(12, 26, 18, 0.35));
}
.media-frame::before,
.media-frame::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--color-gold);
  opacity: 0.6;
  z-index: 1;
}
.media-frame::before {
  top: var(--space-md);
  left: var(--space-md);
  border-right: 0;
  border-bottom: 0;
}
.media-frame::after {
  bottom: var(--space-md);
  right: var(--space-md);
  border-left: 0;
  border-top: 0;
}
.media-frame__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xl);
  max-width: 44ch;
}
.media-frame__icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-xs);
}
.media-frame__icon svg { width: 100%; height: 100%; overflow: visible; }
.media-frame__kicker {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
}
.media-frame__caption {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-muted-dark);
}
.cap-icon__ring { stroke: var(--color-gold); stroke-width: 1.25; opacity: 0.8; }
.cap-icon__core,
.cap-icon__sats circle { fill: var(--color-gold); }
.cap-icon__sats circle { opacity: 0.9; }

/* Embedded Google Map iframe filling a .media-frame, clipped to the frame's
   rounded corners and sitting below the gold corner brackets (z-index 1). */
.media-frame__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  z-index: 0;
}
/* Let the map receive clicks/drags through the decorative corner brackets. */
.ct-offices__map::before,
.ct-offices__map::after {
  pointer-events: none;
}

/* ==========================================================================
   1. INTRO  (cream) — clears the fixed header
   ========================================================================== */
.ct-intro {
  background-color: var(--color-cream);
  color: var(--color-ink);
  padding-block: calc(var(--header-height) + var(--space-2xl)) var(--space-2xl);
}
.ct-intro__content { max-width: 60ch; }
.ct-intro__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw + 1rem, 4.25rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin-bottom: var(--space-lg);
  text-wrap: balance;
}
.ct-intro__lead {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1.05rem, 0.8vw + 0.9rem, 1.35rem);
  line-height: 1.6;
  color: var(--color-text-muted-light);
  max-width: 64ch;
}

/* ==========================================================================
   2. QUICK CONTACT + INQUIRY TAGS  (forest)
   ========================================================================== */
.ct-quick {
  background-color: var(--color-forest);
  color: var(--color-text-light);
  padding-block: var(--space-lg) var(--space-2xl);
}
.ct-quick .eyebrow { color: var(--color-gold); }

/* Two prominent contact-method cards. */
.ct-quick__methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}
.contact-method {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-radius: var(--radius);
  background-color: rgba(30, 58, 42, 0.3);
  border: 1px solid rgba(201, 169, 74, 0.18);
  color: var(--color-text-light);
  transition:
    transform var(--transition),
    border-color var(--transition),
    background-color var(--transition),
    box-shadow var(--transition);
}
.contact-method:hover {
  transform: translateY(-4px);
  background-color: rgba(30, 58, 42, 0.5);
  border-color: rgba(201, 169, 74, 0.45);
  box-shadow: 0 18px 44px rgba(12, 26, 18, 0.5);
  color: var(--color-text-light);
}
.contact-method__icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.contact-method__icon svg { width: 100%; height: 100%; overflow: visible; }
.contact-method:hover .cap-icon__ring { opacity: 1; }
.contact-method__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.contact-method__label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold);
}
.contact-method__value {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.4vw + 0.8rem, 1.5rem);
  font-weight: 500;
  color: var(--color-text-light);
  word-break: break-word;
}

/* Inquiry-type tags. */
.ct-quick__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}
.ct-quick__tags-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted-dark);
}
.inquiry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}
.inquiry-tag {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted-dark);
  border: 1px solid rgba(201, 169, 74, 0.3);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  white-space: nowrap;
}

/* ==========================================================================
   3. CONTACT FORM  (cream)
   ========================================================================== */
.ct-form-section {
  background-color: var(--color-cream);
  color: var(--color-ink);
  padding-block: var(--space-lg) var(--space-2xl);
}
.ct-form__header {
  max-width: 48ch;
  margin-bottom: var(--space-xl);
}
.ct-form__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw + 0.75rem, 2.75rem);
  line-height: 1.14;
  color: var(--color-ink);
}
.ct-form {
  max-width: 900px;
}
.ct-form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.field--full {
  grid-column: 1 / -1;
}
.field__label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted-light);
}
.field__req { color: var(--color-gold-deep); }

.field__input {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-ink);
  background-color: #fff;
  border: 1px solid var(--color-cream-dark);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field__input::placeholder { color: var(--color-text-muted-light); }
.field__input:hover {
  border-color: rgba(201, 169, 74, 0.5);
}
.field__input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 74, 0.22);
}
.field__textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}
.field__select {
  appearance: none;
  -webkit-appearance: none;
  /* Gold chevron drawn with an inline SVG data URI (design-system gold). */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9A94A' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Invalid-field styling once the user has attempted to submit. */
.ct-form.was-validated .field__input:invalid {
  border-color: #B4462F; /* muted brick red for error — not a brand token */
  box-shadow: 0 0 0 3px rgba(180, 70, 47, 0.15);
}

.ct-form__actions {
  margin-top: var(--space-xl);
}

/* Inline status message after submit. */
.ct-form__status {
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 68ch;
}
.ct-form__status a {
  font-weight: 600;
  text-decoration: underline;
}
.ct-form__status--success {
  background-color: rgba(63, 122, 84, 0.12);
  border: 1px solid rgba(63, 122, 84, 0.4);
  color: var(--color-ink);
}
.ct-form__status--error {
  background-color: rgba(180, 70, 47, 0.1);
  border: 1px solid rgba(180, 70, 47, 0.4);
  color: var(--color-ink);
}

/* ==========================================================================
   4. OFFICES  (forest)
   ========================================================================== */
.ct-offices {
  background-color: var(--color-forest);
  color: var(--color-text-light);
  padding-block: var(--space-lg) var(--space-2xl);
}
.ct-offices .eyebrow { color: var(--color-gold); }
.ct-offices__header {
  max-width: 48ch;
  margin-bottom: var(--space-2xl);
}
.ct-offices__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3vw + 0.75rem, 3rem);
  line-height: 1.12;
  color: var(--color-text-light);
}
.ct-offices__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}
.office-card {
  height: 100%;
  padding: var(--space-lg);
  border-radius: var(--radius);
  background-color: rgba(30, 58, 42, 0.28);
  border: 1px solid rgba(201, 169, 74, 0.18);
}
.office-card__mark {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-gold);
  margin-bottom: var(--space-md);
}
.office-card__mark::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--color-gold);
  border-radius: 50%;
  opacity: 0.4;
}
.office-card__role {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.25rem;
}
.office-card__city {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.15;
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
}
.office-card__address {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted-dark);
  margin-bottom: var(--space-md);
}
.office-card__address--muted {
  font-style: italic;
  opacity: 0.85;
}
.office-card__contacts {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.office-card__link {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-gold);
  word-break: break-word;
  transition: color var(--transition);
}
.office-card__link:hover { color: var(--color-sage-light); }

.ct-offices__map { width: 100%; }

/* ==========================================================================
   5. CLOSING REASSURANCE  (forest, flows into footer)
   ========================================================================== */
.ct-closing {
  background-color: var(--color-forest);
  color: var(--color-text-light);
  padding-block: var(--space-xl) var(--space-3xl);
}
.ct-closing__inner { text-align: center; }
.ct-closing__line {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 1.6vw + 0.9rem, 1.75rem);
  line-height: 1.4;
  color: var(--color-sage-light);
  max-width: 46ch;
  margin-inline: auto;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .ct-offices__grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .ct-quick__methods {
    grid-template-columns: 1fr;
  }
  .ct-form__grid {
    grid-template-columns: 1fr;
  }
  .ct-form__actions .btn {
    width: 100%;
  }
}
