/* Compatibility polish for the existing PHP forms and career templates. */
body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

body > main {
  width: 100%;
  flex: 1 0 auto;
}

.site-footer {
  width: 100%;
  flex: 0 0 auto;
}

.site-footer__brand {
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
}

.site-footer__brand img {
  width: auto;
  max-width: 100%;
  height: 132px;
  object-fit: contain;
}

.site-footer__bottom {
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}

.site-footer__bottom p:first-child {
  text-align: left;
}

.site-footer__bottom p:last-child {
  margin-left: auto;
  text-align: right;
}

.site-footer__bottom a {
  color: var(--brass-light);
  text-underline-offset: 0.22em;
}

.home-page .hero__card {
  width: min(570px, 50vw);
  margin-left: clamp(-54px, -3.4vw, -24px);
}

.home-page .hero__card h1 {
  font-size: clamp(3.7rem, 5.9vw, 6.35rem);
  line-height: 0.93;
}

.scope-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.scope-item__icon {
  width: 58px;
  height: 42px;
  display: block;
  margin: 0 auto 0.75rem;
  object-fit: contain;
}

/* Keep long-form pages compact and prevent the contents panel from stretching section rows. */
.page-legal main.section,
.page-careers main.section {
  padding-block: clamp(40px, 5vw, 70px);
}

.page-intro {
  padding: clamp(18px, 2.5vw, 34px) 0 clamp(24px, 3.5vw, 44px);
}

.legal {
  grid-template-columns: minmax(220px, 285px) minmax(0, 760px);
  gap: clamp(32px, 5vw, 72px);
  padding-bottom: clamp(40px, 5vw, 70px);
}

.legal > .legal__toc {
  grid-column: 1;
  grid-row: 1;
}

.legal > .legal__content {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
}

.legal > .legal__content > section {
  padding: 0 0 1.4rem;
  margin: 0 0 1.4rem;
  border-bottom: 1px solid var(--line-gold);
  scroll-margin-top: calc(var(--header-height) + 30px);
}

.legal > .legal__content > section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.page-legal main.section > .wrap > .lead + .legal {
  margin-top: clamp(26px, 3.5vw, 44px);
}

.legal section h2 {
  margin-bottom: 0.8rem;
}

.legal section h3 {
  margin-top: 1.2rem;
}

.legal section p,
.legal section ul,
.legal section ol {
  margin-bottom: 0.72rem;
  line-height: 1.62;
}

.page-masthead {
  padding-block: clamp(54px, 7vw, 94px);
}

.apply-section {
  padding-block: clamp(46px, 6vw, 80px);
}

.career-lead {
  margin-bottom: 1.8rem;
}

.career-list {
  padding-bottom: clamp(42px, 5vw, 72px);
}

.career-form {
  margin-bottom: clamp(46px, 6vw, 80px);
}

/* Membership card motion and focus treatment. */
.membership-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition:
    transform 440ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 440ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 400ms ease,
    background-color 400ms ease;
}

.membership-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(115deg, transparent 22%, rgba(215, 161, 95, 0.13) 48%, transparent 74%);
  opacity: 0;
  transform: translateX(-65%);
  transition: opacity 360ms ease, transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.membership-card__key,
.membership-card .button span {
  display: inline-block;
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .membership-card:hover {
    z-index: 2;
    border-color: var(--brass);
    box-shadow: 0 24px 52px rgba(17, 26, 49, 0.17);
    transform: translateY(-6px) scale(1.012);
  }

  .membership-card:hover::before {
    opacity: 1;
    transform: translateX(65%);
  }

  .membership-card:hover .membership-card__key {
    transform: rotate(-5deg) scale(1.1);
  }

  .membership-card:hover .button span {
    transform: translateX(4px);
  }
}

.career-form .row-2:has(input[name="concierge_years"]) > div {
  display: flex;
  flex-direction: column;
}

.career-form .row-2:has(input[name="concierge_years"]) label {
  min-height: 3.4em;
  display: flex;
  align-items: flex-end;
}

.btn,
.actions button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.8rem 1.45rem;
  color: var(--brass);
  background: transparent;
  border: 1px solid var(--line-gold);
  border-radius: 0;
  appearance: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.btn:hover,
.actions button:hover {
  color: var(--cream);
  background: var(--midnight);
  transform: translateY(-2px);
}

.career-row__cta {
  min-width: 118px;
}

.career-form .consents {
  margin-top: 1.4rem;
}

.career-form .check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.55;
  text-transform: none;
}

.career-form .check input {
  margin-top: 0.18rem;
}

.kicker {
  color: var(--brass);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.security-message {
  margin-top: 0.65rem;
  color: #8d3f3a;
}

@media (max-width: 980px) {
  .home-page .hero__card {
    width: min(540px, 70vw);
    margin-left: 0;
  }

  .home-page .hero__card h1 {
    font-size: clamp(3.45rem, 7vw, 5.5rem);
  }

  .scope-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scope-item:nth-child(3) {
    border-left: 0;
  }

  .scope-item:nth-child(4) {
    border-left: 1px solid var(--line-gold);
  }

  .legal {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .legal > .legal__toc,
  .legal > .legal__content {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 700px) {
  .btn,
  .actions button {
    width: 100%;
  }

  .home-page .hero__card {
    width: calc(100% - 18px);
    margin-left: 0;
  }

  .home-page .hero__card h1 {
    font-size: clamp(3.2rem, 14.5vw, 4.9rem);
  }

  .scope-grid {
    grid-template-columns: 1fr;
  }

  .scope-item,
  .scope-item:nth-child(3),
  .scope-item:nth-child(4) {
    border-left: 0;
  }

  .legal > .legal__content > section {
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
  }

  .site-footer__brand {
    width: 100px;
    height: 118px;
  }

  .site-footer__brand img {
    height: 102px;
  }

  .site-footer__bottom {
    align-items: flex-start;
  }

  .site-footer__bottom p,
  .site-footer__bottom p:last-child {
    margin-left: 0;
    text-align: left;
  }
}
