:root {
  --contact-container: min(1040px, calc(100% - 48px));
  --contact-line: rgba(7, 59, 104, .16);
  --contact-glass: rgba(255, 255, 255, .68);
  --contact-shadow: 0 24px 60px rgba(3, 40, 76, .14), inset 0 1px 0 rgba(255, 255, 255, .72);
}

body.contact-page {
  color: var(--color-text);
  background: #eaf1f6;
}

body.contact-page .site-header:not(.is-scrolled) {
  background-color: rgba(255, 255, 255, .08);
  box-shadow: none;
}

.contact-main {
  padding-top: 0;
}

.contact-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: clip;
  padding: var(--header-height) 0 94px;
  background:
    linear-gradient(180deg, rgba(3, 16, 37, .42) 0%, rgba(3, 16, 37, .24) 42%, rgba(3, 16, 37, .56) 100%),
    url("/assets/img/haikei06.png") center center / cover no-repeat;
}

.contact-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 31%),
    radial-gradient(circle at 82% 24%, rgba(64, 179, 213, .13) 0%, rgba(64, 179, 213, 0) 28%);
}

.contact-hero__inner,
.contact-form-section__inner,
.contact-footer__inner {
  width: var(--contact-container);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.contact-hero__inner {
  display: flex;
  justify-content: center;
}

.contact-hero__copy {
  width: 100%;
  padding: 34px 32px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: 0 18px 38px rgba(3, 16, 37, .22), inset 0 1px 0 rgba(255, 255, 255, .26);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.contact-eyebrow {
  margin: 0 0 12px;
  color: var(--color-gold);
  background-image: var(--brand-gold-gradient);
  background-size: 180% 100%;
  background-position: center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .22em;
}

.contact-hero__title {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2.15rem, 3.45vw, 3.7rem);
  line-height: 1.2;
  letter-spacing: 0;
}

.contact-hero__text {
  max-width: 860px;
  margin: 0;
  color: rgba(255, 255, 255, .94);
  font-size: 1.04rem;
  line-height: 1.95;
}

.contact-form-section {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: 108px 0 116px;
}

.contact-form-section__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.contact-form-section__bg::before {
  content: "";
  position: sticky;
  top: 0;
  display: block;
  height: 100svh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .78) 0%, rgba(255, 255, 255, .68) 48%, rgba(255, 255, 255, .82) 100%),
    url("/assets/img/haikei17.png") center center / cover no-repeat;
}

.contact-form-heading {
  width: 100%;
  max-width: none;
  margin: 0 0 38px;
}

.contact-form-heading__title {
  margin: 0 0 16px;
  color: var(--color-navy);
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.3;
  letter-spacing: 0;
}

.contact-form-heading__text {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 1rem;
  line-height: 1.95;
}

.contact-form-panel {
  padding: 42px;
  background: var(--contact-glass);
  border: 1px solid rgba(255, 255, 255, .76);
  box-shadow: var(--contact-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.contact-form {
  display: grid;
  gap: 26px;
}

.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.contact-field {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.contact-field__label,
.contact-topics__legend {
  color: var(--color-navy);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.5;
}

.contact-required {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  color: #fff;
  background: var(--brand-gold-gradient);
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.45;
  vertical-align: .08em;
}

.contact-field__input,
.contact-field__textarea {
  width: 100%;
  border: 1px solid rgba(7, 59, 104, .20);
  border-radius: 0;
  background: rgba(255, 255, 255, .82);
  color: var(--color-text);
  font: inherit;
  line-height: 1.65;
  outline: none;
  transition: border-color .28s ease, box-shadow .28s ease, background-color .28s ease;
}

.contact-field__input {
  min-height: 52px;
  padding: 12px 14px;
}

.contact-field__textarea {
  min-height: 210px;
  padding: 14px;
  resize: vertical;
}

.contact-field__input:focus,
.contact-field__textarea:focus {
  border-color: var(--color-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(51, 147, 209, .13);
}

.contact-topics {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.contact-topics__legend {
  margin-bottom: 12px;
  padding: 0;
}

.contact-topics__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.contact-check {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 11px 14px 11px 46px;
  border: 1px solid rgba(7, 59, 104, .16);
  background: rgba(255, 255, 255, .66);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color .28s ease, background-color .28s ease, box-shadow .28s ease;
}

.contact-check:hover {
  border-color: rgba(7, 59, 104, .34);
  background: rgba(255, 255, 255, .88);
}

.contact-check__input {
  position: absolute;
  left: 15px;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--color-navy);
}

.contact-check:has(.contact-check__input:checked) {
  border-color: var(--color-navy);
  background: rgba(233, 243, 249, .94);
  box-shadow: inset 3px 0 0 var(--color-gold);
}

.contact-topics__error {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: #a33a32;
  font-size: .82rem;
}

.contact-form__note {
  margin: -4px 0 0;
  color: var(--color-text-soft);
  font-size: .9rem;
  line-height: 1.8;
}

.contact-form__actions {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.contact-submit {
  position: relative;
  isolation: isolate;
  min-width: 220px;
  min-height: 58px;
  padding: 14px 58px 14px 28px;
  overflow: hidden;
  border: 1px solid rgba(7, 59, 104, .28);
  border-radius: 0;
  background: rgba(255, 255, 255, .26);
  color: var(--color-navy);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(3, 40, 76, .12), inset 0 1px 0 rgba(255, 255, 255, .58);
  transition: color var(--link-fill-duration) ease, border-color var(--link-fill-duration) ease, box-shadow var(--link-fill-duration) ease;
}

.contact-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--brand-navy-pattern), var(--brand-navy-gradient);
  transform: translateX(-101%);
  transition: transform var(--link-fill-duration) cubic-bezier(.22, 1, .36, 1);
}

.contact-submit::after {
  content: "→";
  position: absolute;
  right: 27px;
  top: 50%;
  transform: translateY(-50%);
}

.contact-submit:hover,
.contact-submit:focus-visible {
  color: #fff;
  border-color: var(--color-navy);
  box-shadow: 0 18px 34px rgba(3, 40, 76, .18);
}

.contact-submit:hover::before,
.contact-submit:focus-visible::before {
  transform: translateX(0);
}

.contact-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.contact-footer {
  padding: 34px 0 38px;
  background: var(--brand-navy-pattern), var(--brand-navy-gradient);
}

.contact-footer__inner {
  text-align: center;
  color: #fff;
}

.contact-footer__brand {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.contact-footer__copy {
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: .9rem;
  letter-spacing: .04em;
}

.contact-reveal-page {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity var(--reveal-duration) ease, transform var(--reveal-duration) cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, transform;
}

.contact-reveal-page.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 767px) {
  :root {
    --contact-container: min(100% - 32px, 1040px);
  }

  .contact-hero {
    padding: var(--header-height) 0 86px;
  }

  .contact-hero__copy {
    padding: 24px 18px;
  }

  .contact-hero__title {
    font-size: 1.78rem;
  }

  .contact-form-heading__title {
    font-size: clamp(1.95rem, 9vw, 2.4rem);
  }

  .contact-hero__text,
  .contact-form-heading__text {
    font-size: .98rem;
  }

  .contact-form-section {
    padding: 74px 0 82px;
  }

  .contact-form-panel {
    padding: 24px 18px;
  }

  .contact-form__grid,
  .contact-topics__grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    gap: 22px;
  }

  .contact-submit {
    width: 100%;
  }
}

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