.contact-page {
  --contact-hero-dark: #0c1816;
  --contact-hero-fade: clamp(3rem, 8vw, 4.5rem);
  --contact-hero-min-h: clamp(420px, 52vh, 560px);
  --contact-page-major-gap: clamp(2rem, 4vw, 3rem);
  --contact-org-card-extra-h: 20px;
  --contact-frame-radius: 1.25rem;
  --contact-frame-glow:
    0 0 0 1px rgb(15 118 110 / 0.42),
    0 14px 44px rgb(15 118 110 / 0.22),
    0 28px 72px rgb(15 118 110 / 0.14);
  --contact-frame-glow-hover:
    0 0 0 1px rgb(17 94 89 / 0.58),
    0 18px 56px rgb(15 118 110 / 0.32),
    0 36px 96px rgb(17 94 89 / 0.22);
  --contact-card-shadow:
    0 1px 0 rgb(255 255 255 / 0.95) inset,
    0 18px 48px rgb(15 23 42 / 0.06);
}

/* ── Hero ── */
.contact-page__hero {
  position: relative;
  overflow: hidden;
  min-height: var(--contact-hero-min-h);
  height: auto;
  display: grid;
  align-items: start;
  color: #fff;
  background: var(--contact-hero-dark);
  z-index: 1;
}

.contact-page__hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.contact-page__hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      112deg,
      rgb(10 18 32 / 0.82) 0%,
      rgb(12 24 22 / 0.58) 42%,
      rgb(15 118 110 / 0.22) 100%
    ),
    linear-gradient(
      to top,
      rgb(12 24 22 / 0.92) 0%,
      rgb(12 24 22 / 0.35) 38%,
      transparent 72%
    );
}

.contact-page__hero-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 46%;
  transform: translate3d(0, var(--about-parallax-hero-y, 0px), 0) scale(1.05);
  will-change: transform;
}

.contact-page__hero-bridge {
  position: relative;
  z-index: 4;
  height: 0;
  margin-top: 0;
  pointer-events: none;
}

.contact-page__hero-inner {
  position: relative;
  z-index: 4;
  box-sizing: border-box;
  min-width: 0;
  padding-top: var(--site-page-head-pad-top);
  padding-bottom: clamp(1.75rem, 4vw, 2.75rem);
  min-height: var(--contact-hero-min-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.contact-page__hero-inner .site-breadcrumbs {
  position: absolute;
  top: var(--site-page-head-pad-top);
  left: 0;
  margin: 0;
}

.contact-page__hero-title,
.contact-page__hero-lead {
  text-shadow: 0 1px 14px rgb(10 18 32 / 0.55);
}

.contact-page__hero-title {
  margin: 1rem 0 0;
  max-width: 12ch;
  font-family: var(--font-display), var(--font-sans), ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
  color: #fff;
}

.contact-page__hero-lead {
  margin: 1.25rem 0 0;
  max-width: min(42rem, 54vw);
  font-size: var(--text-lead);
  line-height: 1.7;
  text-wrap: pretty;
  color: rgb(203 213 225);
}

@media (max-width: 959px) {
  .contact-page__hero {
    align-items: start;
  }

  .contact-page__hero-inner {
    justify-content: flex-start;
    padding-bottom: calc(clamp(2rem, 5.5vw, 3rem) + var(--contact-hero-fade));
  }

  .contact-page__hero-title {
    max-width: none;
    margin-top: calc(0.9rem + 1em + 1rem);
  }

  .contact-page__hero-lead {
    max-width: min(36rem, 100%);
  }

  .contact-page__hero-bg {
    transform: translate3d(0, var(--about-parallax-hero-y, 0px), 0);
  }
}

@media (max-width: 767px) {
  .contact-page {
    --contact-hero-min-h: clamp(17rem, 48vh, 22rem);
    --contact-hero-fade: clamp(2rem, 6vw, 2.75rem);
  }

  .contact-page__hero {
    min-height: var(--contact-hero-min-h);
    height: auto;
  }

  .contact-page__hero-inner {
    min-height: 0;
    padding-bottom: calc(clamp(2rem, 6vw, 2.75rem) + var(--contact-hero-fade));
  }

  .contact-page__hero-lead {
    max-width: 100%;
  }
}

/* ── Content shell ── */
.contact-page__content-shell {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  background:
    linear-gradient(180deg, #f8fafc 0%, rgb(241 245 249) 100%);
}

.contact-page__content-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 18% 0%, rgb(45 212 191 / 0.08), transparent 58%),
    radial-gradient(ellipse 60% 40% at 88% 12%, rgb(15 118 110 / 0.06), transparent 52%);
}

.contact-page__content {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.contact-page__grid {
  display: grid;
  gap: var(--contact-page-major-gap);
}

.contact-page__intro {
  display: grid;
  gap: var(--contact-page-major-gap);
}

.contact-page__section-kicker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
  font-size: var(--text-caption);
  font-family: var(--font-display), var(--font-sans), ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(15 118 110);
}

.contact-page__section-kicker::before {
  content: "";
  flex-shrink: 0;
  width: 1.75rem;
  height: 2px;
  background: linear-gradient(90deg, rgb(45 212 191), rgb(15 118 110));
}

/* ── Shared card surface ── */
.contact-page__card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 2px;
  border: 0;
  border-radius: var(--contact-frame-radius);
  background: linear-gradient(
    145deg,
    rgb(15 118 110 / 0.92) 0%,
    rgb(17 94 89 / 0.86) 48%,
    rgb(15 118 110 / 0.72) 100%
  );
  color: var(--foreground);
  box-shadow: var(--contact-frame-glow);
  transition: box-shadow 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-page__card::before,
.contact-page__card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  border: 1px solid rgb(15 118 110 / 0.55);
  pointer-events: none;
  opacity: 0;
  transform: scale(1);
  transform-origin: center;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.contact-page__card::before {
  animation: contact-page-card-wave-ring 5.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.contact-page__card::after {
  border-color: rgb(17 94 89 / 0.42);
  animation: contact-page-card-wave-ring 5.6s cubic-bezier(0.22, 1, 0.36, 1) 2.8s infinite;
}

.contact-page__card:hover {
  box-shadow:
    0 0 0 1px rgb(17 94 89 / 0.58),
    0 14px 44px rgb(15 118 110 / 0.3),
    0 28px 72px rgb(17 94 89 / 0.2);
}

.contact-page__org-card,
.contact-page__info-card {
  padding: 0;
}

.contact-page__card-inner {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: calc(var(--contact-frame-radius) - 2px);
  background:
    linear-gradient(165deg, rgb(255 255 255 / 0.98) 0%, rgb(248 250 252 / 0.94) 100%);
  box-shadow: var(--contact-card-shadow);
  padding:
    clamp(1.65rem, 3vw, 2.15rem)
    clamp(1.5rem, 3vw, 2rem)
    var(--contact-org-card-extra-h);
}

.contact-page__card-inner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgb(15 118 110) 0%,
    rgb(17 94 89) 42%,
    rgb(15 118 110) 100%
  );
  box-shadow: 0 3px 12px rgb(15 118 110 / 0.28);
  pointer-events: none;
}

.contact-page__org-row--address {
  padding-bottom: 0;
}

.contact-page__org-short {
  margin: 0;
  font-family: var(--font-display), var(--font-sans), ui-sans-serif, system-ui, sans-serif;
  font-size: var(--text-elevated);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foreground);
}

.contact-page__org-full {
  margin: 0.45rem 0 0;
  font-size: var(--text-ui);
  line-height: 1.55;
  color: var(--muted);
}

.contact-page__org-meta {
  margin: 1.35rem 0 0;
  display: grid;
  gap: 0;
}

.contact-page__connect {
  margin-top: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-page__connect .contact-page__org-meta {
  margin: 0;
}

.contact-page__connect-list {
  margin: 0;
}

.contact-page__connect-group .contact-page__connect-item {
  border-top: 0;
  padding: 0;
  align-self: start;
}

.contact-page__connect-group_emails {
  border-top: 1px solid rgb(226 232 240 / 0.9);
  padding-top: 0.95rem;
  margin-top: 0.95rem;
}

.contact-page__connect-group_emails:only-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

@media (min-width: 960px) {
  .contact-page__connect-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(1.25rem, 3vw, 2rem);
    row-gap: 0;
    align-items: start;
  }

  .contact-page__connect-group_emails {
    margin-top: 0.95rem;
    padding-top: 0.95rem;
  }
}

.contact-page__org-row {
  margin: 0;
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 0;
  border-top: 1px solid rgb(226 232 240 / 0.9);
}

.contact-page__org-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.contact-page__org-row dt {
  margin: 0;
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(15 118 110);
}

.contact-page__org-row dd {
  margin: 0;
  font-size: var(--text-ui);
  line-height: 1.55;
  color: var(--muted);
}

.contact-page__org-row dd a {
  color: inherit;
  text-decoration: none;
  transition: color 0.22s ease;
}

.contact-page__org-row dd a:hover {
  color: rgb(15 118 110);
}

.contact-page__org-row dd a:focus-visible {
  outline: 2px solid rgb(45 212 191);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Form column ── */
.contact-page__form-col {
  scroll-margin-top: 6.5rem;
}

.contact-page__form-shell {
  position: relative;
  isolation: isolate;
  overflow: visible;
  width: 100%;
  padding: 2px;
  border-radius: 1.5rem;
  background: linear-gradient(
    145deg,
    rgb(15 118 110 / 0.95) 0%,
    rgb(17 94 89 / 0.88) 48%,
    rgb(15 118 110 / 0.78) 100%
  );
  box-shadow: var(--contact-frame-glow);
  animation: contact-page-frame-glow 5.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  will-change: box-shadow;
}

.contact-page__form-shell-glow {
  position: absolute;
  inset: -2.25rem;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 72% 58% at 50% 36%, rgb(15 118 110 / 0.24), transparent 68%),
    radial-gradient(ellipse 48% 38% at 84% 76%, rgb(17 94 89 / 0.16), transparent 72%);
  filter: blur(10px);
  animation: contact-page-ambient-glow 5.6s ease-in-out infinite;
}

@media (max-width: 1023px) {
  .contact-page__form-shell-glow {
    inset: -0.75rem;
    filter: blur(8px);
  }
}

.contact-page__form-shell::before,
.contact-page__form-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  border: 1px solid rgb(15 118 110 / 0.55);
  pointer-events: none;
  opacity: 0;
  transform: scale(1);
  transform-origin: center;
  will-change: transform, opacity;
}

.contact-page__form-shell::before {
  animation: contact-page-wave-ring 5.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.contact-page__form-shell::after {
  border-color: rgb(17 94 89 / 0.42);
  animation: contact-page-wave-ring 5.6s cubic-bezier(0.22, 1, 0.36, 1) 2.8s infinite;
}

.contact-page__form-shell:hover {
  box-shadow: var(--contact-frame-glow-hover);
  animation: contact-page-frame-glow-strong 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.contact-page__form-shell:hover::before {
  animation: contact-page-wave-ring-strong 1.85s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.contact-page__form-shell:hover::after {
  animation: contact-page-wave-ring-strong 1.85s cubic-bezier(0.22, 1, 0.36, 1) 0.55s infinite;
}

.contact-page__form-shell:hover .contact-page__form-shell-glow {
  animation: contact-page-ambient-glow-strong 2.4s ease-in-out infinite;
}

.contact-page__form-shell .contact-form {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 0;
  border-radius: calc(1.5rem - 2px);
  background:
    linear-gradient(
      180deg,
      rgb(255 255 255 / 1) 0%,
      rgb(248 250 252 / 0.98) 100%
    );
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.95) inset,
    0 18px 48px rgb(15 23 42 / 0.06);
}

.contact-page__form-shell .contact-form__title {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  letter-spacing: -0.025em;
}

.contact-page__form-shell .contact-form__input,
.contact-page__form-shell .contact-form__textarea,
.contact-page__form-shell .contact-form__file {
  border-color: rgb(203 213 225 / 0.95);
  background: rgb(248 250 252 / 0.72);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.contact-page__form-shell .contact-form__input:focus,
.contact-page__form-shell .contact-form__textarea:focus {
  border-color: rgb(45 212 191 / 0.55);
  background: #fff;
  box-shadow: none;
  outline: 2px solid rgb(45 212 191 / 0.35);
  outline-offset: 0;
}

.contact-page__form-shell .contact-form__submit {
  min-width: 11rem;
  padding: 0.85rem 2.25rem;
  background: linear-gradient(145deg, rgb(15 118 110), rgb(17 94 89));
  box-shadow:
    0 10px 30px rgb(15 118 110 / 0.28),
    0 0 0 1px rgb(15 118 110 / 0.22);
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.contact-page__form-shell .contact-form__submit:hover {
  background: linear-gradient(145deg, rgb(17 94 89), rgb(13 94 89));
  transform: translateY(-1px);
  box-shadow:
    0 14px 36px rgb(15 118 110 / 0.34),
    0 0 0 1px rgb(17 94 89 / 0.35);
}

.contact-page__form-shell .contact-form__legal {
  max-width: none;
  padding-top: 0.15rem;
  border-top: 1px solid rgb(226 232 240 / 0.85);
}

.contact-page__intro-spacer {
  display: none;
}

@media (min-width: 1024px) {
  .contact-page__grid {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: stretch;
  }

  .contact-page__form-col {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .contact-page__form-shell {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
  }

  .contact-page__form-shell .contact-form {
    flex: 1 1 auto;
    min-height: 0;
  }

  .contact-page__intro {
    display: grid;
    grid-template-rows: auto minmax(clamp(1rem, 2vw, 1.75rem), 1fr) auto;
    height: 100%;
    min-height: 0;
    gap: 0;
  }

  .contact-page__intro-spacer {
    display: block;
    min-height: 0;
  }

  .contact-page__org-card,
  .contact-page__info-card {
    align-self: stretch;
  }

  .contact-page__hero-lead {
    max-width: min(36rem, 48vw);
  }
}

@keyframes contact-page-frame-glow {
  0%, 100% {
    box-shadow: var(--contact-frame-glow);
  }

  50% {
    box-shadow:
      0 0 0 1px rgb(17 94 89 / 0.52),
      0 18px 52px rgb(15 118 110 / 0.28),
      0 34px 88px rgb(15 118 110 / 0.2);
  }
}

@keyframes contact-page-frame-glow-strong {
  0%, 100% {
    box-shadow: var(--contact-frame-glow-hover);
  }

  50% {
    box-shadow:
      0 0 0 1px rgb(17 94 89 / 0.72),
      0 22px 64px rgb(15 118 110 / 0.42),
      0 42px 108px rgb(17 94 89 / 0.3);
  }
}

@keyframes contact-page-card-wave-ring {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.018);
  }
}

@keyframes contact-page-wave-ring {
  0% {
    opacity: 0.68;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.045);
  }
}

@keyframes contact-page-wave-ring-strong {
  0% {
    opacity: 0.88;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.065);
  }
}

@keyframes contact-page-ambient-glow {
  0%, 100% {
    opacity: 0.72;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes contact-page-ambient-glow-strong {
  0%, 100% {
    opacity: 0.88;
    transform: scale(1.02);
  }

  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-page__hero-bg {
    transform: none;
  }

  .contact-page__card,
  .contact-page__form-shell,
  .contact-page__form-shell-glow,
  .contact-page__form-shell .contact-form__submit {
    animation: none !important;
    transition: none;
  }

  .contact-page__card::before,
  .contact-page__card::after,
  .contact-page__form-shell::before,
  .contact-page__form-shell::after {
    animation: none !important;
    opacity: 0.35;
    transform: none;
  }

  .contact-page__form-shell .contact-form__submit:hover {
    transform: none;
  }
}

.site-layout__main:has(.contact-page) + .site-footer {
  margin-top: 0;
}
