/* Junior join / code login — campus photo + glass (landing grammar) */

body.junior-join-page,
body.junior-login-page {
  --jj-orange: var(--unimart-orange, #f68b1e);
  --jj-orange-deep: var(--unimart-orange-deep, #e96703);
  --jj-slate: var(--unimart-slate, #2c3e50);
  background: var(--jj-slate);
  color: #fff;
}

body.junior-join-page .partners-section,
body.junior-join-page .footer,
body.junior-join-page .dm-fab,
body.junior-join-page .bottom-nav,
body.junior-join-page .unimart-nav,
body.junior-join-page .hybrid-bottom-nav,
body.junior-join-page .pwa-install,
body.junior-login-page .partners-section,
body.junior-login-page .footer,
body.junior-login-page .dm-fab,
body.junior-login-page .bottom-nav,
body.junior-login-page .unimart-nav,
body.junior-login-page .hybrid-bottom-nav,
body.junior-login-page .pwa-install {
  display: none !important;
}

/* Auth pages: no confidence tabs + no slate search strip */
body.junior-join-page.has-hybrid-header .top-nav .nav-links--layers,
body.junior-login-page.has-hybrid-header .top-nav .nav-links--layers,
body.junior-join-page .top-nav .nav-links--layers,
body.junior-login-page .top-nav .nav-links--layers,
body.junior-join-page .search-filter-bar,
body.junior-join-page .search-filter-bar--hybrid,
body.junior-login-page .search-filter-bar,
body.junior-login-page .search-filter-bar--hybrid,
body.junior-join-page .mobile-category-nav,
body.junior-login-page .mobile-category-nav {
  display: none !important;
}

body.junior-join-page.has-hybrid-header,
body.junior-login-page.has-hybrid-header,
body.junior-join-page.has-confidence-nav.has-unimart-nav,
body.junior-login-page.has-confidence-nav.has-unimart-nav {
  --mobile-bottom-nav-height: 0px;
  --search-bar-height: 0px;
  padding-bottom: 0 !important;
}

@media (max-width: 991.98px) {
  body.junior-join-page.has-hybrid-header.header-has-search,
  body.junior-join-page.has-hybrid-header:not(.header-has-search),
  body.junior-login-page.has-hybrid-header.header-has-search,
  body.junior-login-page.has-hybrid-header:not(.header-has-search) {
    padding-top: var(--top-nav-height-mobile, 48px) !important;
  }
}

@media (min-width: 992px) {
  body.junior-join-page.has-hybrid-header.header-has-search,
  body.junior-login-page.has-hybrid-header.header-has-search {
    padding-top: var(--top-nav-height-desktop, 56px) !important;
  }
}

body.junior-join-page .content-wrapper.full-width,
body.junior-join-page .content-wrapper.full-width .content-inner,
body.junior-join-page .content-inner,
body.junior-login-page .content-wrapper.full-width,
body.junior-login-page .content-wrapper.full-width .content-inner,
body.junior-login-page .content-inner {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.junior-join-page .content-wrapper,
body.junior-login-page .content-wrapper {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.jj {
  position: relative;
  min-height: calc(100dvh - var(--top-nav-height-desktop, 56px));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2.5rem;
  isolation: isolate;
  overflow: hidden;
}

@media (max-width: 991px) {
  .jj {
    min-height: calc(100dvh - var(--top-nav-height-mobile, 48px));
  }
}

.jj__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.jj__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.03);
  animation: jjHeroIn 1.1s ease-out both;
  background: #2c3e50;
}

.jj__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      100deg,
      rgba(44, 62, 80, 0.72) 0%,
      rgba(44, 62, 80, 0.42) 45%,
      rgba(246, 139, 30, 0.2) 100%
    ),
    linear-gradient(
      180deg,
      rgba(44, 62, 80, 0.22) 0%,
      rgba(44, 62, 80, 0.18) 40%,
      rgba(44, 62, 80, 0.55) 100%
    );
}

@keyframes jjHeroIn {
  from {
    opacity: 0.65;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1.03);
  }
}

.jj__card {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  padding: 1.85rem 1.65rem 1.65rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    0 24px 60px rgba(26, 26, 46, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  text-align: center;
  color: #fff;
  animation: jjCardIn 0.55s ease-out both;
}

@keyframes jjCardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.jj__eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.jj__voice {
  margin: 0 0 0.45rem;
  font-family: var(--unimart-font-display, "Fraunces", Georgia, serif);
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
}

.jj__prompt {
  margin: 0 0 1.2rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

.jj__hint {
  margin: -0.55rem 0 0.95rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
  word-break: break-all;
}

.jj__error {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(185, 28, 28, 0.22);
  border: 1px solid rgba(254, 202, 202, 0.35);
  color: #fecaca;
  font-size: 0.88rem;
  text-align: center;
}

.jj__ok {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(15, 107, 76, 0.28);
  border: 1px solid rgba(167, 243, 208, 0.35);
  color: #a7f3d0;
  font-size: 0.88rem;
  text-align: center;
}

.jj__step {
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
}

.jj__input,
.jj__select {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.96);
  font-size: 1rem;
  color: #1a1a2e;
  margin-bottom: 0.75rem;
  text-align: center;
  box-shadow:
    0 10px 28px rgba(26, 26, 46, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.jj__select {
  text-align: center;
  text-align-last: center;
  cursor: pointer;
}

.jj__input::placeholder {
  color: #8a93a0;
}

.jj__input:focus,
.jj__select:focus {
  outline: none;
  border-color: rgba(246, 139, 30, 0.85);
  box-shadow:
    0 12px 32px rgba(246, 139, 30, 0.2),
    0 0 0 3px rgba(246, 139, 30, 0.18);
}

.jj__btn {
  width: 100%;
  min-height: 3rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f68b1e, #e96703);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(233, 103, 3, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.jj__btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(233, 103, 3, 0.4);
}

.jj__btn:disabled,
.jj__btn.is-busy {
  opacity: 0.78;
  cursor: wait;
  transform: none;
  box-shadow: 0 8px 18px rgba(233, 103, 3, 0.24);
}

.jj__btn.is-busy::before {
  content: '';
  width: 1em;
  height: 1em;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: jj-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes jj-spin {
  to { transform: rotate(360deg); }
}

.jj__link:disabled {
  opacity: 0.55;
  cursor: wait;
}

.jj__link {
  display: block;
  width: 100%;
  margin-top: 0.65rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.jj__link:hover {
  color: #fff;
}

a.jj__link--anchor {
  display: block;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a.jj__link--anchor:hover {
  color: #ffd089;
}

.jj__foot {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
}

.jj__foot a {
  color: #ffd089;
  font-weight: 700;
  text-decoration: none;
}

.jj__foot a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.jj__dev {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #a7f3d0;
  font-weight: 700;
}

/* ── Mobile auth ── */
@media (max-width: 900px) {
  .jj {
    min-height: calc(100svh - var(--top-nav-height-mobile, 48px));
    min-height: calc(100dvh - var(--top-nav-height-mobile, 48px));
    align-items: center;
    padding: 1rem 0.85rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .jj__card {
    width: 100%;
    max-width: 26rem;
    padding: 1.45rem 1.2rem 1.35rem;
    border-radius: 18px;
  }

  .jj__eyebrow {
    margin-bottom: 0.65rem;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .jj__voice {
    font-size: clamp(1.2rem, 5.4vw, 1.5rem);
    line-height: 1.28;
    margin-bottom: 0.4rem;
  }

  .jj__prompt {
    font-size: 0.98rem;
    margin-bottom: 1rem;
  }

  .jj__input,
  .jj__select,
  .jj__btn {
    min-height: 3.05rem;
    font-size: 16px; /* prevent iOS focus zoom */
  }

  .jj__input,
  .jj__select {
    margin-bottom: 0.65rem;
    border-radius: 11px;
  }

  .jj__btn {
    border-radius: 11px;
  }

  .jj__link {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.35rem;
  }

  .jj__foot {
    margin-top: 1.05rem;
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .jj__shade {
    background:
      linear-gradient(
        180deg,
        rgba(44, 62, 80, 0.28) 0%,
        rgba(44, 62, 80, 0.5) 45%,
        rgba(44, 62, 80, 0.78) 100%
      );
  }
}

@media (max-width: 640px) {
  .jj {
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  }

  .jj__card {
    padding: 1.3rem 1.05rem 1.2rem;
    border-radius: 16px;
  }

  .jj__voice {
    font-size: clamp(1.15rem, 5.8vw, 1.4rem);
  }

  .jj__prompt {
    font-size: 0.94rem;
  }

  .jj__step {
    max-width: none;
  }
}

@media (max-width: 380px) {
  .jj__card {
    padding: 1.15rem 0.9rem 1.1rem;
  }

  .jj__voice {
    font-size: 1.12rem;
  }

  .jj__eyebrow {
    font-size: 0.62rem;
  }
}

/* Short viewports / landscape phones */
@media (max-height: 560px) {
  .jj {
    align-items: flex-start;
    min-height: auto;
    padding-top: 0.75rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .jj__card {
    padding: 1.1rem 1rem 1rem;
  }

  .jj__voice {
    font-size: 1.15rem;
  }

  .jj__prompt {
    margin-bottom: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jj__photo,
  .jj__card {
    animation: none;
  }
}
