/* ==========================================================================
   CONTACT — AmberNord
   Scope: .contact-page-container and children.
   Tokens: --color-gold --color-bg --color-text --color-border-gold
           --color-surface --nav-height --font-serif --font-sans
           --container-pad --t-fast --t-slow
   ========================================================================== */

/* --------------------------------------------------------------------------
   ROOT — page wrapper providing top padding to clear the fixed nav.
   -------------------------------------------------------------------------- */

.contact-page-container {
  padding: calc(var(--nav-height) + 60px) 0 120px;
  position: relative;
  z-index: 10;
}

/* --------------------------------------------------------------------------
   ENTRANCE — one-shot reveal animation fired when the fragment mounts.
   -------------------------------------------------------------------------- */

@keyframes contactReveal {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.contact-page-container {
  animation: contactReveal 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* --------------------------------------------------------------------------
   SCROLL REVEAL — JS adds .page-reveal; IntersectionObserver adds .is-visible.
   -------------------------------------------------------------------------- */

.page-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.page-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   REDUCED MOTION — disables all animations for users who prefer it.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .page-reveal,
  .contact-page-container {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   SECTION LAYOUT — shared max-width, horizontal padding and bottom margin.
   -------------------------------------------------------------------------- */

.contact-intro,
.contact-card-section,
.contact-form-section {
  max-width: 1000px;
  padding: 0 var(--container-pad);
  margin: 0 auto 80px;
}

/* --------------------------------------------------------------------------
   UTILITY — visually hidden element accessible to screen readers only.
   -------------------------------------------------------------------------- */

.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;
}

/* --------------------------------------------------------------------------
   SUBPAGE HEADER — centred eyebrow label and h1 above the main content.
   -------------------------------------------------------------------------- */

.subpage-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 80px;
  padding: 0 var(--container-pad);
}

.subpage-subtitle {
  display: inline-block;
  color: var(--color-gold);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(237, 163, 35, 0.4);
  padding-bottom: 10px;
}

.subpage-header h1 {
  color: var(--color-text);
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

.subpage-header h1 span {
  font-style: italic;
  color: var(--color-gold);
}

/* --------------------------------------------------------------------------
   SKIP LINK — visible on keyboard focus, hidden otherwise.
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-gold);
  color: #000;
  padding: 0.5rem 1rem;
  font-weight: 700;
  z-index: 9999;
  border-radius: 4px;
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   FOCUS — global gold focus ring for keyboard navigation.
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   BODY TEXT — shared paragraph style across intro and form header.
   -------------------------------------------------------------------------- */

.contact-body {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  color: #d0d0d0;
  max-width: 680px;
  margin: 0 auto 20px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   INTRO — centres the two lead paragraphs.
   -------------------------------------------------------------------------- */

.contact-intro__inner {
  text-align: center;
}

/* --------------------------------------------------------------------------
   CONTACT CARD — glass card displaying email and postal address side by side.
   -------------------------------------------------------------------------- */

.contact-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(237, 163, 35, 0.2);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 50px 40px;
  transition: border-color var(--t-slow), transform var(--t-slow), box-shadow var(--t-slow);
}

.contact-card:hover {
  border-color: rgba(237, 163, 35, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(237, 163, 35, 0.07);
}

.contact-card__heading {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 400;
  color: var(--color-gold);
  text-align: center;
  margin: 0 0 40px;
}

/* --------------------------------------------------------------------------
   CONTACT GRID — two-column layout inside the glass card.
   -------------------------------------------------------------------------- */

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-around;
}

.contact-col {
  flex: 1 1 240px;
  min-width: 220px;
}

.contact-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-weight: 500;
  margin-bottom: 12px;
}

.contact-value {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-text);
  line-height: 1.7;
  margin: 0;
}

.contact-email-link {
  display: inline-block;
  font-size: 18px;
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--t-fast);
}

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

.contact-subtext {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  color: #888;
  margin: 8px 0 0;
  line-height: 1.5;
}

.contact-address {
  font-style: normal;
  font-size: 16px;
  color: var(--color-text);
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   FORM HEADER — centred heading and lead text above the input fields.
   -------------------------------------------------------------------------- */

.contact-form-header {
  text-align: center;
  margin-bottom: 40px;
}

.contact-form-header__heading {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 400;
  color: var(--color-text);
  margin: 0 0 20px;
}

/* --------------------------------------------------------------------------
   FORM FIELDS — input and textarea styled with gold focus state.
   -------------------------------------------------------------------------- */

.contact-form__group {
  margin-bottom: 24px;
}

.contact-form__input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(13, 13, 13, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  border-radius: 4px;
  box-sizing: border-box;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.contact-form__input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 12px rgba(237, 163, 35, 0.06);
}

.contact-form__input::placeholder {
  color: #555;
  font-weight: 300;
}

.contact-form__textarea {
  resize: vertical;
  min-height: 200px;
}

/* --------------------------------------------------------------------------
   SUBMIT BUTTON — outlined gold CTA that fills on hover.
   -------------------------------------------------------------------------- */

.contact-form__actions {
  margin-top: 8px;
}

.contact-btn {
  display: inline-block;
  padding: 16px 44px;
  background: transparent;
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background var(--t-fast), color var(--t-fast);
}

.contact-btn:hover:not(:disabled) {
  background: var(--color-gold);
  color: #000;
}

.contact-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   SUCCESS MESSAGE — revealed after a successful form submission.
   -------------------------------------------------------------------------- */

.contact-success {
  margin-top: 32px;
  padding: 16px 22px;
  background: rgba(237, 163, 35, 0.05);
  border-left: 2px solid var(--color-gold);
  border-radius: 2px;
}

.contact-success p {
  color: #d0d0d0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
}

/* --------------------------------------------------------------------------
   WILL-CHANGE — applied only while the entrance animation is active.
   -------------------------------------------------------------------------- */

.contact-page-container.animating {
  will-change: opacity, transform;
}

/* --------------------------------------------------------------------------
   TABLET — 991px: reduce card padding.
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
  .contact-card {
    padding: 40px 30px;
  }
}

/* --------------------------------------------------------------------------
   MOBILE — 768px: stack grid, full-width button, tighten card.
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .contact-card {
    padding: 30px 20px;
  }

  .contact-grid {
    flex-direction: column;
    gap: 28px;
  }

  .contact-col {
    min-width: 100%;
  }

  .contact-email-link {
    font-size: 16px;
  }

  .contact-btn {
    width: 100%;
    text-align: center;
  }
}
