/*
  File: assets/css/house-intake.css
  Phase: 02B_Index_Page_Intake_Device

  Purpose:
  - Styles the reusable House audience intake component.
  - Preserves the existing landing threshold as the complete first viewport.
  - Keeps the intake transparent, restrained, and native to the Meadnyte universe.

  Modification boundary:
  - Do not tune the threshold, woodmark, sigil, orbital system, room pages, or footer here.
  - Provider and page-specific behavior belongs in house-intake.json and house-intake.js.
*/

body.meadnyte-entry-page.has-house-intake {
  overflow-x: hidden;
  overflow-y: auto;
}

.house-intake {
  position: relative;
  z-index: 10;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding:
    clamp(7rem, 13vh, 10rem)
    clamp(1.25rem, 6vw, 5rem)
    clamp(6rem, 11vh, 8rem);
  isolation: isolate;
  color: var(--color-cream);
  background:
    radial-gradient(circle at 50% 46%, rgba(111, 75, 166, 0.13), transparent 24rem),
    radial-gradient(circle at 50% 62%, rgba(214, 189, 120, 0.045), transparent 16rem),
    linear-gradient(180deg, rgba(3, 3, 10, 0.92), rgba(2, 1, 6, 0.98));
}

.house-intake::before,
.house-intake::after {
  content: "";
  position: absolute;
  left: 50%;
  z-index: -1;
  width: min(64rem, calc(100% - 2.5rem));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(214, 189, 120, 0.24) 28%,
    rgba(242, 234, 217, 0.13) 50%,
    rgba(214, 189, 120, 0.24) 72%,
    transparent
  );
}

.house-intake::before {
  top: clamp(2rem, 6vh, 4rem);
}

.house-intake::after {
  bottom: clamp(2rem, 6vh, 4rem);
}

.house-intake__loading {
  width: 1px;
  height: 1px;
}

.house-intake__inner {
  width: min(100%, 52rem);
  margin: 0 auto;
  text-align: center;
}

.house-intake__title {
  margin: 0 0 clamp(3rem, 8vh, 5.5rem);
  color: rgba(231, 203, 142, 0.9);
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 2.5vw, 1.85rem);
  font-weight: 400;
  letter-spacing: clamp(0.18em, 0.7vw, 0.34em);
  line-height: 1.35;
  text-transform: uppercase;
  text-shadow: 0 0 1.5rem rgba(214, 189, 120, 0.1);
}

.house-intake__form {
  display: grid;
  gap: clamp(2.1rem, 5vh, 3.25rem);
}

.house-intake__identity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 5vw, 4rem);
}

.house-intake__field--email {
  grid-column: 1 / -1;
}

.house-intake__field {
  display: grid;
  gap: 0.65rem;
  text-align: left;
}

.house-intake__label,
.house-intake__legend {
  color: rgba(242, 234, 217, 0.58);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.house-intake__input {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.65rem 0.1rem 0.7rem;
  border: 0;
  border-bottom: 1px solid rgba(214, 189, 120, 0.31);
  border-radius: 0;
  outline: 0;
  color: rgba(255, 248, 231, 0.94);
  background: transparent;
  box-shadow: none;
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.house-intake__input:hover {
  border-bottom-color: rgba(214, 189, 120, 0.55);
}

.house-intake__input:focus-visible {
  border-bottom-color: rgba(244, 217, 133, 0.9);
  box-shadow: 0 0.45rem 0.7rem -0.72rem rgba(244, 217, 133, 0.85);
}

.house-intake__input[aria-invalid="true"] {
  border-bottom-color: rgba(225, 158, 126, 0.82);
}

.house-intake__interests {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.house-intake__legend {
  width: 100%;
  margin-bottom: clamp(1.2rem, 3vh, 1.8rem);
  color: rgba(231, 203, 142, 0.76);
  text-align: center;
}

.house-intake__choices {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem clamp(1.1rem, 3vw, 2.25rem);
  flex-wrap: wrap;
}

.house-intake__choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  color: rgba(242, 234, 217, 0.68);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.house-intake__choice:hover {
  color: rgba(255, 239, 194, 0.92);
}

.house-intake__checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.house-intake__choice-mark {
  position: relative;
  width: 0.74rem;
  height: 0.74rem;
  flex: 0 0 auto;
  transform: rotate(45deg);
  border: 1px solid rgba(214, 189, 120, 0.5);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.house-intake__choice-mark::after {
  content: "";
  position: absolute;
  inset: 0.16rem;
  transform: scale(0);
  background: rgba(244, 217, 133, 0.92);
  box-shadow: 0 0 0.65rem rgba(214, 189, 120, 0.5);
  transition: transform var(--transition-fast);
}

.house-intake__checkbox:checked + .house-intake__choice-mark {
  border-color: rgba(244, 217, 133, 0.9);
  box-shadow: 0 0 0.75rem rgba(214, 189, 120, 0.16);
}

.house-intake__checkbox:checked + .house-intake__choice-mark::after {
  transform: scale(1);
}

.house-intake__checkbox:checked ~ .house-intake__choice-label {
  color: rgba(255, 239, 194, 0.96);
  text-shadow: 0 0 0.85rem rgba(214, 189, 120, 0.14);
}

.house-intake__checkbox:focus-visible + .house-intake__choice-mark {
  outline: 1px solid rgba(244, 217, 133, 0.9);
  outline-offset: 4px;
}

.house-intake__error {
  min-height: 1.15rem;
  margin: 0.15rem 0 0;
  color: rgba(231, 177, 150, 0.9);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

.house-intake__action {
  justify-self: center;
  min-width: min(100%, 17rem);
  padding: 1rem 1.6rem;
  border: 1px solid rgba(214, 189, 120, 0.42);
  color: rgba(237, 213, 161, 0.9);
  background:
    linear-gradient(90deg, transparent, rgba(214, 189, 120, 0.05), transparent),
    rgba(2, 1, 6, 0.12);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.2;
  text-transform: uppercase;
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.house-intake__action:hover,
.house-intake__action:focus-visible {
  border-color: rgba(244, 217, 133, 0.78);
  color: rgba(255, 239, 194, 0.98);
  background: rgba(214, 189, 120, 0.07);
  box-shadow:
    inset 0 0 1.2rem rgba(214, 189, 120, 0.04),
    0 0 1.4rem rgba(214, 189, 120, 0.08);
  outline: 0;
}

.house-intake__action:focus-visible {
  outline: 1px solid rgba(244, 217, 133, 0.8);
  outline-offset: 4px;
}

.house-intake__action[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.6;
}

.house-intake__consent {
  max-width: 38rem;
  margin: -1rem auto 0;
  color: rgba(242, 234, 217, 0.42);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  letter-spacing: 0.035em;
  line-height: 1.65;
}


.house-intake__consent-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  text-align: left;
  cursor: pointer;
}

.house-intake__consent-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.house-intake__consent-mark {
  position: relative;
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.15rem;
  transform: rotate(45deg);
  border: 1px solid rgba(214, 189, 120, 0.5);
}

.house-intake__consent-mark::after {
  content: "";
  position: absolute;
  inset: 0.14rem;
  transform: scale(0);
  background: rgba(244, 217, 133, 0.92);
  transition: transform var(--transition-fast);
}

.house-intake__consent-checkbox:checked + .house-intake__consent-mark::after {
  transform: scale(1);
}

.house-intake__consent-checkbox:focus-visible + .house-intake__consent-mark {
  outline: 1px solid rgba(244, 217, 133, 0.9);
  outline-offset: 4px;
}

.house-intake__consent a {
  color: rgba(242, 234, 217, 0.68);
  text-decoration-color: rgba(214, 189, 120, 0.38);
  text-underline-offset: 0.2em;
}

.house-intake__status {
  max-width: 34rem;
  margin: 0 auto;
  color: rgba(231, 203, 142, 0.82);
  font-size: clamp(1rem, 2vw, 1.2rem);
  letter-spacing: 0.06em;
  line-height: 1.75;
}

.house-intake__provider-link,
.house-intake__noscript a {
  color: rgba(231, 203, 142, 0.82);
  text-decoration-color: rgba(214, 189, 120, 0.35);
  text-underline-offset: 0.25em;
}

.house-intake__honeypot {
  position: absolute !important;
  left: -5000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 700px) {
  .house-intake__identity {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .house-intake__choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 22rem);
    margin: 0 auto;
    gap: 1rem 1.25rem;
    text-align: left;
  }

  .house-intake__choice {
    justify-self: start;
  }
}

@media (max-width: 420px) {
  .house-intake {
    padding-right: 1.15rem;
    padding-left: 1.15rem;
  }

  .house-intake__title {
    letter-spacing: 0.16em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .house-intake *,
  .house-intake *::before,
  .house-intake *::after {
    transition: none !important;
  }
}

/*
  Approved 02B revision — restrained intake chamber.

  The chamber remains a full passage in the page, while the instrument itself
  occupies roughly half the visual scale of the original proposal. The veil is
  deliberately close to the transparency of the orbital field, and the action
  repeats the landing threshold language instead of presenting as a bordered
  form button.
*/
.house-intake {
  padding:
    clamp(3.5rem, 6.5vh, 5rem)
    clamp(1.25rem, 4vw, 2.5rem)
    clamp(3rem, 5.5vh, 4rem);
  background:
    radial-gradient(circle at 50% 46%, rgba(111, 75, 166, 0.055), transparent 24rem),
    radial-gradient(circle at 50% 62%, rgba(214, 189, 120, 0.02), transparent 16rem),
    linear-gradient(180deg, rgba(3, 3, 10, 0.18), rgba(2, 1, 6, 0.28));
}

.house-intake::before,
.house-intake::after {
  width: min(32rem, calc(100% - 2.5rem));
  opacity: 0.52;
}

.house-intake__inner {
  width: min(100%, 32rem);
}

.house-intake__title {
  margin-bottom: clamp(1.5rem, 4vh, 2.75rem);
  font-size: clamp(0.7rem, 1.25vw, 0.925rem);
  letter-spacing: clamp(0.16em, 0.35vw, 0.22em);
}

.house-intake__form {
  gap: clamp(1.05rem, 2.5vh, 1.625rem);
}

.house-intake__identity {
  gap: clamp(0.75rem, 2.5vw, 2rem);
}

.house-intake__field {
  gap: 0.32rem;
}

.house-intake__label,
.house-intake__legend,
.house-intake__choice,
.house-intake__error {
  font-size: 0.58rem;
}

.house-intake__input {
  min-height: 2.15rem;
  padding: 0.32rem 0.05rem 0.36rem;
  font-size: clamp(0.78rem, 1vw, 0.9rem);
}

.house-intake__legend {
  margin-bottom: clamp(0.6rem, 1.5vh, 0.9rem);
}

.house-intake__choices {
  gap: 0.45rem clamp(0.55rem, 1.5vw, 1.125rem);
}

.house-intake__choice {
  gap: 0.4rem;
}

.house-intake__choice-mark {
  width: 0.58rem;
  height: 0.58rem;
}

.house-intake__choice-mark::after {
  inset: 0.12rem;
}

.house-intake__error {
  min-height: 0.7rem;
  margin-top: 0.05rem;
}

.house-intake__action {
  position: relative;
  display: inline-grid;
  justify-items: center;
  grid-template-rows: auto 0.8rem auto;
  min-width: 0;
  padding: 0;
  border: 0;
  color: rgba(237, 213, 161, 0.72);
  background: transparent;
  font-size: clamp(0.58rem, 1vw, 0.68rem);
  letter-spacing: 0.22em;
  line-height: 1;
  opacity: 0.84;
  overflow: visible;
}

.house-intake__action::before,
.house-intake__action::after {
  content: none;
}

.house-intake__action-text {
  grid-row: 1;
  white-space: nowrap;
}

.house-intake__action-mark {
  grid-row: 2;
  align-self: center;
  width: calc(100% + 1.8rem);
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(237, 213, 161, 0.78),
    transparent
  );
  box-shadow:
    0 0 0.45rem rgba(237, 213, 161, 0.24),
    0 1px 0.8rem rgba(111, 75, 166, 0.16);
}

.house-intake__action-reflection {
  grid-row: 3;
  display: block;
  margin-top: -0.18rem;
  transform: scaleY(-1) translateY(-0.04rem);
  transform-origin: 50% 0;
  white-space: nowrap;
  color: rgba(237, 213, 161, 0.32);
  opacity: 0.68;
  filter: blur(0.22px);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.38) 46%, transparent 94%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.38) 46%, transparent 94%);
  pointer-events: none;
}

.house-intake__action:hover .house-intake__action-reflection,
.house-intake__action:focus-visible .house-intake__action-reflection {
  color: rgba(255, 239, 194, 0.4);
  opacity: 0.78;
}

.house-intake__action:hover,
.house-intake__action:focus-visible {
  border: 0;
  color: rgba(255, 239, 194, 0.96);
  background: transparent;
  box-shadow: none;
  opacity: 1;
}

.house-intake__action:hover .house-intake__action-mark,
.house-intake__action:focus-visible .house-intake__action-mark {
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 239, 194, 0.96),
    transparent
  );
  box-shadow:
    0 0 0.65rem rgba(237, 213, 161, 0.38),
    0 1px 1rem rgba(111, 75, 166, 0.22);
}

.house-intake__action:focus-visible {
  outline: 1px solid rgba(244, 217, 133, 0.8);
  outline-offset: 6px;
}

.house-intake__consent {
  max-width: 24rem;
  margin: -0.1rem auto 0;
  font-size: 0.54rem;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .house-intake__identity {
    gap: 0.8rem;
  }

  .house-intake__choices {
    width: min(100%, 18rem);
    gap: 0.55rem 0.8rem;
  }
}
