/*
 * Bounded usability refinement.
 * Strengthens interaction affordances without changing the accepted cinematic
 * composition or drawer architecture.
 */

.panel--hero .hero__founders-cue {
  font-weight: 400;
}

.panel--hero .hero__founders-invite[aria-hidden="false"] .hero__founders-cue.is-visible {
  opacity: 0.96;
}

.panel--hero .hero__founders-names button::after {
  transform: scaleX(0.28);
  opacity: 0.58;
}

.panel--hero .hero__founders-names button:hover::after,
.panel--hero .hero__founders-names button:focus-visible::after {
  transform: scaleX(1);
  opacity: 0.95;
}

button,
a[href] {
  touch-action: manipulation;
}

.panel--hero .panel__nav-btn:active,
.panel--hero .panel__nav-dropdown-btn:active,
.panel--hero .hero__founders-names button:active,
#phone-burger:active,
#phone-burger-panel button:active,
.panel__back:active,
.founder-reveal__back:active,
.panel__links a:active,
.hero__privacy-link:active,
.panel__partners a:active,
.panel__person-org:active,
.contact-page__submit:active {
  opacity: 0.58 !important;
}

.panel--hero .panel__nav-chevron,
#phone-burger-panel .pbn-chevron {
  opacity: 0.82;
}

/* Keep the directional wipe, but make navigation respond at interface speed. */
.founder-reveal {
  transition-duration: 0.72s;
}

.panel--drawer {
  transition-duration: 0.72s;
}

@media (max-width: 640px) {
  body.founder-open #phone-burger,
  body:has(.panel--person.is-active) #phone-burger,
  body:has(.panel--person.is-revealed) #phone-burger,
  body:has(#contact.is-active) #phone-burger,
  body:has(#contact.is-revealed) #phone-burger {
    color: var(--charcoal);
  }

  #phone-burger-backdrop {
    transition-duration: 0.3s;
  }

  #phone-burger-panel {
    transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.72s;
  }

  body.phone-burger-open #phone-burger-panel {
    transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
  }
}

/* Production lightness pass: preserve the cinematic composition while
   removing visual weight, redundant controls and cramped content. */
.panel--hero .hero__scrim {
  background:
    linear-gradient(
      to bottom,
      rgba(18, 18, 17, 0.16) 0%,
      rgba(18, 18, 17, 0.25) 52%,
      rgba(18, 18, 17, 0.52) 100%
    ),
    radial-gradient(
      ellipse 78% 68% at 50% 42%,
      rgba(18, 18, 17, 0.08) 0%,
      rgba(18, 18, 17, 0.2) 100%
    );
}

.panel--hero .panel__question {
  font-weight: 400;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.38);
}

.panel--drawer:focus,
.founder-reveal:focus {
  outline: none;
}

.panel--drawer .panel__eyebrow {
  margin-bottom: 0.9rem;
  opacity: 0.68;
}

.panel--drawer .panel__body,
.founder-reveal__text {
  text-wrap: pretty;
}

/* Partner and person footers become one quiet line of useful destinations. */
#idea .panel__partners-label,
#idea .panel__partners-logo img,
.panel__person-org img,
.panel__person-footer .panel__link--web {
  display: none !important;
}

#idea .panel__partners-logo,
.panel__person-org {
  font-family: Manrope, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

#idea .panel__partners-logo--okeland::after,
.panel__person-org--okeland::after {
  content: "Okeland Communities";
}

#idea .panel__partners-logo--tempo::after,
.panel__person-org--tempo::after {
  content: "Tempo Advisory";
}

#idea .panel__partners-logo--tempo,
.panel__person-footer:has(.panel__person-org--okeland) .panel__links {
  margin-left: 0;
  transform: none;
}

#idea .panel__partners-logos,
.panel__person-footer,
.panel__person-footer .panel__links {
  gap: clamp(0.75rem, 1.5vw, 1.1rem);
}

.panel__person-footer {
  flex-wrap: wrap;
}

.panel__person-footer .panel__links {
  flex-shrink: 1;
}

/* Project actions read as links, not small boxed controls. */
.panel--project .panel__link--web {
  padding: 0.55rem 0 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.48);
  opacity: 0.9;
}

.panel--project .panel__link-hint {
  display: none;
}

/* Contact is the calm, light conclusion to the experience. */
#contact.panel--contact {
  background: #f3f1eb;
  color: var(--charcoal);
}

#contact .panel__logo img {
  filter: brightness(0);
  opacity: 0.9;
}

#contact .panel__eyebrow,
#contact .contact-page__copy,
#contact .contact-page__field label,
#contact .contact-page__field input,
#contact .contact-page__field textarea,
#contact .panel__back,
#contact .contact-page__success {
  color: var(--charcoal);
}

#contact .contact-page__layout {
  width: min(1000px, 100%);
}

#contact .contact-page__field label {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
  opacity: 0.72;
}

#contact .contact-page__field input,
#contact .contact-page__field textarea {
  border-bottom-color: rgba(33, 33, 32, 0.24);
}

#contact .contact-page__field input:focus,
#contact .contact-page__field textarea:focus,
#contact .contact-page__field input:focus-visible,
#contact .contact-page__field textarea:focus-visible {
  border-bottom-color: rgba(33, 33, 32, 0.72);
}

#contact .contact-page__field input:-webkit-autofill,
#contact .contact-page__field input:-webkit-autofill:hover,
#contact .contact-page__field input:-webkit-autofill:focus,
#contact .contact-page__field input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--charcoal);
  caret-color: var(--charcoal);
  box-shadow: 0 0 0 1000px #f3f1eb inset;
  -webkit-box-shadow: 0 0 0 1000px #f3f1eb inset;
}

#contact .contact-page__submit {
  background: transparent;
  color: var(--charcoal);
  border: 1px solid rgba(33, 33, 32, 0.55);
  padding: 0.8rem 1.8rem;
}

#contact .contact-page__submit:hover,
#contact .contact-page__submit:focus-visible {
  background: var(--charcoal);
  color: var(--cotton);
  opacity: 1;
}

#contact .contact-page__submit:focus-visible,
#contact .panel__back:focus-visible {
  outline-color: var(--charcoal);
}

#contact .panel__back::after {
  background: var(--charcoal);
}

@media (min-width: 641px) {
  /* The accepted composition used text-height hit areas. Enlarge the actual
     controls while cancelling their extra layout footprint, so the visual
     baseline stays fixed and imprecise mouse clicks still land reliably. */
  .panel--hero #nav > .panel__nav-btn,
  .panel--hero #nav > .panel__nav-group > .panel__nav-btn {
    height: auto !important;
    min-height: 44px !important;
    margin-block: -15px !important;
    padding-block: 15px !important;
    display: inline-flex !important;
    align-items: center;
  }

  .panel--hero #nav > .panel__nav-group > .panel__nav-btn {
    padding-right: 1.05em !important;
  }

  .panel--hero #nav > .panel__nav-btn {
    padding-right: 0 !important;
  }

  .panel--hero .hero__founders-names button {
    min-width: 44px;
    min-height: 44px;
    margin: -11px -12px;
    padding: 11px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .panel--hero .panel__nav-dropdown-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .panel__back,
  .founder-reveal__back {
    min-width: 44px;
    min-height: 44px;
  }

  .hero__links.panel__links a,
  .panel__person-footer .panel__links a,
  .panel--project .panel__links a {
    min-width: 44px;
    min-height: 44px;
    padding-block: 13px;
    margin-block: -13px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
  }

  .hero__privacy-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  #idea .panel__partners-logo,
  .panel__person-org {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .panel--hero #nav > .panel__nav-btn,
  .panel--hero #nav .panel__nav-group > .panel__nav-btn {
    font-weight: 500;
  }

  #idea .panel__scrim {
    background:
      linear-gradient(90deg, rgba(33, 33, 32, 0.7) 0%, rgba(33, 33, 32, 0.4) 29%, rgba(33, 33, 32, 0.08) 53%, transparent 76%),
      linear-gradient(to bottom, rgba(33, 33, 32, 0.34) 0%, transparent 35%, rgba(33, 33, 32, 0.12) 100%);
  }

  .panel--person .panel__scrim {
    background:
      linear-gradient(90deg, rgba(33, 33, 32, 0.65) 0%, rgba(33, 33, 32, 0.36) 28%, rgba(33, 33, 32, 0.07) 52%, transparent 72%),
      linear-gradient(to bottom, rgba(33, 33, 32, 0.24) 0%, transparent 34%, rgba(33, 33, 32, 0.1) 100%);
  }

  .panel--person .panel__person-footer {
    margin-top: clamp(1.5rem, 3vh, 2rem);
  }
}

@media (max-width: 640px) {
  #phone-burger-backdrop {
    background: rgba(20, 20, 18, 0.26);
  }

  #phone-burger-panel {
    background: #f3f1eb;
    color: var(--charcoal);
  }

  body.phone-burger-open #phone-burger {
    color: var(--charcoal);
  }

  /* Restore the Idea image now that the copy has been reduced to its essence. */
  #idea.panel--idea {
    background: var(--charcoal);
  }

  #idea .panel__media,
  #idea .panel__scrim {
    display: block !important;
  }

  #idea .panel__scrim {
    background: linear-gradient(
      to top,
      rgba(33, 33, 32, 0.9) 0%,
      rgba(33, 33, 32, 0.72) 28%,
      rgba(33, 33, 32, 0.28) 54%,
      transparent 76%
    ) !important;
  }

  #idea .panel__content {
    top: auto !important;
    bottom: clamp(86px, 12vh, 106px) !important;
  }

  #idea .panel__partners-logo,
  .panel__person-org {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .panel--person .panel__scrim {
    background: linear-gradient(
      to top,
      rgba(33, 33, 32, 0.88) 0%,
      rgba(33, 33, 32, 0.68) 25%,
      rgba(33, 33, 32, 0.3) 49%,
      transparent 72%
    ) !important;
  }

  .panel__person-footer {
    max-width: calc(100vw - 6.75rem) !important;
  }

  #project-filaro.panel--poster .panel__scrim,
  #project-sable.panel--poster .panel__scrim {
    background:
      linear-gradient(to bottom, rgba(33, 33, 32, 0.2) 0%, transparent 32%),
      linear-gradient(to top, rgba(33, 33, 32, 0.9) 0%, rgba(33, 33, 32, 0.62) 30%, rgba(33, 33, 32, 0.12) 56%, transparent 70%) !important;
  }
}
