/* =========================================================================
   Tenant Portal — branded sign-in + portal preview
   ========================================================================= */

/* ---------- Sign in: split screen ---------- */
.page-tenant-portal { --tp-muted: #6b635a; } /* AA (≥5:1) on ivory and linen for small text */
.tp-login .muted, .tp-preview__caption { color: var(--tp-muted); }

/* Bigger touch targets without changing the look: an invisible 44px-tall hit area */
.tp-hit { position: relative; }
.tp-hit::before { content: ""; position: absolute; left: -.4rem; right: -.4rem; top: 50%; height: 44px; min-height: 100%; transform: translateY(-50%); }
.tp-login {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  min-height: 100vh; min-height: 100svh; max-height: 1300px;
  padding-top: var(--header-h); background: var(--ivory);
}
.tp-login__media { position: relative; min-height: 0; }
.tp-login__frame { position: absolute; inset: 0; background: var(--sand); }
.tp-login__frame img { object-position: 50% 42%; }
/* Load choreography (above the fold, so it keys off the page curtain, not the scroll observer):
   the photograph settles from a slight zoom, then the welcome lines rise. Content is visible without JS. */
.motion-ok .tp-login__frame img { transform: scale(1.08); transition: transform 2.6s var(--ease-out) .1s; }
.motion-ok .tp-login__welcome .line__inner { transform: translate3d(0, 108%, 0); transition: transform 1.4s var(--ease-out) .45s; }
.motion-ok .tp-login__welcome .tp-login__line .line__inner { transition-delay: .58s; }
.motion-ok .tp-login__cap { opacity: 0; transform: translateY(10px); transition: opacity 1.1s var(--ease-out) .9s, transform 1.2s var(--ease-out) .9s; }
.motion-ok.is-loaded .tp-login__frame img, .motion-ok.is-loaded .tp-login__welcome .line__inner { transform: none; }
.motion-ok.is-loaded .tp-login__cap { opacity: 1; transform: none; }
.tp-login__frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(10, 9, 8, .66) 0%, rgba(10, 9, 8, .28) 32%, rgba(10, 9, 8, 0) 58%);
}
.tp-login__welcome {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(2rem, 4.5vw, 4rem); z-index: 1;
  color: #fff; display: grid; gap: .5rem; justify-items: start;
}
.tp-login__script { font-family: var(--f-display); font-size: clamp(3rem, 6vw, 6.2rem); line-height: .9; text-transform: uppercase; color: #fff; }
.tp-login__line { font-family: var(--f-display); font-size: clamp(1.5rem, 2.3vw, 2.3rem); line-height: 1.1; color: rgba(255,255,255,.92); }
.tp-login__line em { color: var(--blush); }
.tp-login__welcome .caption { color: rgba(255,255,255,.78); margin-top: 1.1rem; }
.tp-login__welcome .line { padding-bottom: .08em; margin-bottom: -.08em; }
.tp-login__welcome .caption .index-num { color: var(--blush); }

.tp-login__panel {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(2.5rem, 3.6vw, 4rem) var(--gutter) clamp(2.5rem, 4vw, 4rem);
}
/* Below the shared launch band the login no longer needs to fill the screen on its own */
.launch-band + .tp-login { min-height: min(calc(100svh - var(--header-h)), 900px); }
@media (min-width: 901px) { .launch-band + .tp-login .tp-login__panel { align-items: flex-start; padding-top: clamp(2.5rem, 4vw, 4.5rem); } }
.tp-views { width: 100%; max-width: 30rem; min-width: 0; }
.tp-login__panel { min-width: 0; }
.tp-form .field, .tp-form .input { min-width: 0; }
.tp-view { opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity .7s var(--ease-out), transform .9s var(--ease-out); }
.tp-view.is-active, html:not(.js) .tp-view { opacity: 1; transform: none; }
.tp-view__title { margin-top: 1.1rem; font-size: clamp(3.2rem, 4.8vw, 5rem); line-height: .9; }
.tp-view__title:focus { outline: none; }
.tp-view__intro { margin-top: .9rem; font-size: 1.02rem; }
.tp-view__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line);
}
.tp-back {
  display: flex; width: max-content; gap: .6rem; align-items: center; margin-bottom: 2.4rem; padding-block: .3rem;
  font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--tp-muted);
  transition: color .3s var(--ease-out);
}
.tp-back:hover { color: var(--ink); }

.tp-form { display: grid; gap: 1.5rem; margin-top: clamp(1.8rem, 2.8vw, 2.4rem); }
.tp-form--two { grid-template-columns: 1fr 1fr; column-gap: 1.6rem; }
.tp-form__wide { grid-column: 1 / -1; }
.tp-form__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-block: -.6rem -.3rem; }
.tp-check { min-height: 44px; align-items: center; }
.tp-check input { margin-top: 0; }
.tp-form__aside { font-size: .9rem; color: var(--ink-2); }
.tp-form .btn { margin-top: .3rem; }
.tp-form__note { line-height: 1.55; margin-top: -.6rem; }
.field__error:empty { display: none; }

.tp-pass { position: relative; }
.tp-pass .input { padding-right: 4.2rem; }
.tp-pass__toggle {
  position: absolute; right: 0; top: 0; bottom: 0; min-width: 3.6rem; padding: 0 0 0 .8rem;
  display: flex; align-items: center; justify-content: flex-end;
  font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--tp-muted);
  transition: color .3s;
}
.tp-pass__toggle:hover, .tp-pass__toggle[aria-pressed="true"] { color: var(--ink); }

.tp-status {
  font-size: .95rem; line-height: 1.6; color: var(--ink-2);
  padding: 1rem 1.2rem; background: var(--linen); border-left: 1px solid var(--brass);
}
.tp-status.is-in { animation: tp-in .7s var(--ease-out); }
.tp-status strong { color: var(--ink); font-weight: 600; }
.tp-status.is-ok { border-left-color: var(--ink); }
@keyframes tp-in { from { opacity: 0; transform: translateY(8px); } }


/* ---------- Preview ---------- */
.tp-preview__head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(1rem, 2.2vw, 2.25rem); align-items: end;
}
.tp-preview__head > div { grid-column: 1 / span 8; }
.tp-preview__title { margin-top: 1.6rem; font-size: clamp(3.2rem, 8.4vw, 8.8rem); }
.tp-preview__lead { grid-column: 9 / span 4; font-size: clamp(1.02rem, 1.2vw, 1.15rem); color: var(--ink-2); }

.tp-badge {
  display: inline-flex; align-items: center; gap: .7rem; padding: .55rem 1rem .5rem;
  border: 1px solid var(--brass); border-radius: 999px;
  font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #74572f; /* darker brass: AA on linen */
}
.tp-badge__dot { width: .4rem; height: .4rem; transform: rotate(45deg); background: var(--blush-2); }

.tp-dash {
  margin-top: clamp(3rem, 6vw, 5.5rem); background: var(--paper);
  padding: clamp(1.25rem, 3.2vw, 3.4rem);
  box-shadow: 0 50px 110px -70px rgba(60, 40, 20, .45), 0 0 0 1px rgba(21, 19, 15, .04);
}
.tp-dash__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.tp-dash__sample {
  display: inline-block; padding: .28rem .6rem .24rem; border: 1px solid rgba(168, 131, 79, .55);
  font-size: .6rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--brass-2); line-height: 1.2; white-space: nowrap;
}
.tp-dash__hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-block: clamp(2rem, 3.5vw, 3rem); }
.tp-dash__hello .h3 { font-size: clamp(1.9rem, 3vw, 2.8rem); }
.tp-dash__hello .small { margin-top: .5rem; }
.tp-dash__ill { font-style: italic; }

/* quick-access tiles — hairlines, not boxes */
.tp-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tp-tile {
  position: relative; display: grid; align-content: start; gap: .4rem;
  padding: 1.6rem clamp(.9rem, 1.4vw, 1.5rem) 1.7rem; border-left: 1px solid var(--line);
  transition: background-color .6s var(--ease-out);
}
.tp-tile:first-child { border-left: 0; }
.tp-tile:hover { background: var(--ivory); }
.tp-tile__icon { width: 2.6rem; height: 2.6rem; color: var(--brass); margin-bottom: 1.4rem; transition: transform .9s var(--ease-out); }
.tp-tile:hover .tp-tile__icon { transform: translateY(-3px); }
.tp-tile .index-num { position: absolute; top: 1.3rem; right: 1.1rem; font-size: 1rem; }
.tp-tile__title { font-family: var(--f-display); font-size: clamp(1.25rem, 1.5vw, 1.5rem); line-height: 1.1; color: var(--ink); }
.tp-tile__text { font-size: .84rem; line-height: 1.45; color: var(--stone); }
.tp-tile::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease-out); }
.tp-tile:hover::after, .tp-tile:focus-visible::after { transform: scaleX(1); }

.tp-dash__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(1.5rem, 3.5vw, 4rem); margin-top: clamp(2.8rem, 5vw, 4.5rem); }
.tp-panel--service { grid-column: 1 / span 7; }
.tp-dash__side { grid-column: 8 / span 5; display: grid; gap: clamp(2.5rem, 4vw, 3.5rem); align-content: start; }
.tp-dash__grid--lower > :nth-child(1) { grid-column: 1 / span 5; }
.tp-dash__grid--lower > :nth-child(2) { grid-column: 6 / span 4; }
.tp-dash__grid--lower > :nth-child(3) { grid-column: 10 / span 3; }
.tp-panel { scroll-margin-top: calc(var(--header-h-sm) + 1.5rem); }
.tp-panel__head { display: flex; align-items: baseline; gap: .8rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line-strong); margin-bottom: 1.4rem; }
.tp-panel__head .h4 { font-size: clamp(1.4rem, 1.8vw, 1.75rem); }
.tp-panel__head .tp-dash__sample { margin-left: auto; align-self: center; }

/* service request mock */
.tp-sr { display: grid; grid-template-columns: 1fr 1fr; gap: 1.7rem 2rem; }
.tp-sr__wide { grid-column: 1 / -1; }
.tp-sr .textarea { min-height: 5.5rem; }
.tp-urgency { border: 0; padding: 0; min-width: 0; }
.tp-urgency legend { margin-bottom: .8rem; padding: 0; font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.tp-urgency__opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.tp-urgency__opt { position: relative; cursor: pointer; }
.tp-urgency__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tp-urgency__opt span {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.2rem; border: 1px solid var(--line-strong);
  font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
  transition: background-color .4s var(--ease-out), color .4s var(--ease-out), border-color .4s var(--ease-out);
}
.tp-urgency__opt:hover span { border-color: var(--ink); }
.tp-urgency__opt input:checked + span { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.tp-urgency__opt input:focus-visible + span { outline: 1.5px solid var(--brass); outline-offset: 3px; }

.tp-drop__zone {
  display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.3rem; cursor: pointer;
  border: 1px dashed var(--line-strong); font-size: .95rem; color: var(--ink-2);
  transition: border-color .4s var(--ease-out), background-color .4s var(--ease-out);
}
.tp-drop__zone svg { width: 2.1rem; height: 2.1rem; color: var(--brass); flex: none; }
.tp-drop__zone strong { font-weight: 600; color: var(--ink); }
.tp-drop__zone:hover, .tp-drop.is-over .tp-drop__zone { border-color: var(--ink); background: var(--ivory); }
.tp-drop input:focus-visible + .tp-drop__zone { outline: 1.5px solid var(--brass); outline-offset: 3px; }
.tp-drop__err { margin-top: .6rem; }
.tp-drop__err:empty { display: none; }
.tp-drop__preview { display: flex; align-items: center; gap: 1rem; margin-top: .9rem; }
.tp-drop__preview img { width: 3.6rem; height: 3.6rem; object-fit: cover; background: var(--linen); }
.tp-drop__preview [data-tp-file-name] { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-sr__foot { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }

.tp-track { margin-top: 2.6rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.tp-track__steps { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 1.1rem; }
.tp-track__steps li { position: relative; display: grid; gap: .7rem; font-size: .82rem; color: var(--stone); }
.tp-track__steps li::before { content: ""; position: absolute; top: .3rem; left: .7rem; right: 0; height: 1px; background: var(--line-strong); }
.tp-track__steps li:last-child::before { display: none; }
.tp-track__steps span { position: relative; width: .65rem; height: .65rem; border-radius: 50%; border: 1px solid var(--stone-2); background: var(--paper); }
.tp-track__steps .is-done span { background: var(--ink); border-color: var(--ink); }
.tp-track__steps .is-done::before { background: var(--ink); }
.tp-track__steps .is-current span { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(168, 131, 79, .18); }
.tp-track__steps .is-done, .tp-track__steps .is-current { color: var(--ink); }

/* notices & documents */
.tp-list li { border-bottom: 1px solid var(--line); }
.tp-notice { display: grid; grid-template-columns: 5.2rem 1fr; gap: 1rem; padding: 1.05rem 0; }
.tp-notice__date { display: grid; gap: .1rem; }
.tp-notice__date em { font-family: var(--f-display); font-size: 1.25rem; line-height: 1.1; color: var(--brass-2); }
.tp-notice__date span { font-size: .64rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--stone); }
.tp-notice__title { display: block; color: var(--ink); font-weight: 500; line-height: 1.4; }
.tp-notice .small { display: block; line-height: 1.5; margin-top: .2rem; }
.tp-doc { display: flex; align-items: center; gap: .9rem; padding: .95rem 0; }
.tp-doc svg { width: 1.35rem; height: 1.35rem; color: var(--brass); flex: none; }
.tp-doc__name { flex: 1; min-width: 0; color: var(--ink); font-size: .96rem; line-height: 1.35; }
.tp-doc__meta { font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--stone); white-space: nowrap; }

/* building info */
.tp-facts > div { display: grid; grid-template-columns: 6.8rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.tp-facts dt { padding-top: .3rem; }
.tp-facts dd { color: var(--ink); line-height: 1.55; }
.tp-facts dd .text-link { margin-left: .5rem; }
.tp-facts__links { display: flex; flex-wrap: wrap; gap: .55rem 1.1rem; }
.tp-facts__links .text-link { margin-left: 0 !important; font-size: .96rem; }

/* management contact */
.tp-contact__body { display: grid; grid-template-columns: minmax(0, 7.5rem) 1fr; gap: 1.3rem; align-items: start; }
.tp-contact__img { aspect-ratio: 3 / 4; }
.tp-contact__img img { object-position: 30% 50%; }
.tp-contact__tba { margin-top: .5rem; color: var(--ink); }
.tp-contact__text .small { margin-top: .6rem; line-height: 1.5; }
.tp-contact__list { margin-top: .7rem; display: grid; gap: .3rem; font-size: .92rem; overflow-wrap: anywhere; }
.tp-contact__list strong { color: var(--ink); font-weight: 600; }

/* resources */
.tp-res li { border-bottom: 1px solid var(--line); }
.tp-res a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem 0; font-family: var(--f-display); font-size: 1.3rem; color: var(--ink); }
.tp-res .arrow { color: var(--brass); transition: transform .7s var(--ease-out); }
.tp-res a:hover .arrow { transform: translateX(5px); }

.tp-preview__caption { margin-top: 1.4rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .tp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tp-tile:nth-child(4) { border-left: 0; }
  .tp-tile:nth-child(n+4) { border-top: 1px solid var(--line); }
  .tp-dash__grid--lower > :nth-child(1) { grid-column: 1 / span 7; }
  .tp-dash__grid--lower > :nth-child(2) { grid-column: 8 / span 5; }
  .tp-dash__grid--lower > :nth-child(3) { grid-column: 1 / -1; margin-top: 3rem; }
  .tp-res { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; }
}
@media (max-width: 900px) {
  .tp-login { grid-template-columns: minmax(0, 1fr); min-height: 0; max-height: none; }
  .tp-login__media { height: 62vh; height: 62svh; min-height: 360px; max-height: 560px; }
  .launch-band + .tp-login { min-height: 0; }
  .launch-band + .tp-login .tp-login__media { height: 36vh; height: 36svh; min-height: 260px; max-height: 380px; }
  .tp-login__panel { padding-top: 2.4rem; padding-bottom: 4rem; justify-content: flex-start; }
  .tp-views { max-width: 34rem; }
  .tp-preview__head > div, .tp-preview__lead { grid-column: 1 / -1; }
  .tp-preview__lead { margin-top: 1.6rem; }
  .tp-panel--service, .tp-dash__side, .tp-dash__grid--lower > * { grid-column: 1 / -1 !important; }
  .tp-dash__side, .tp-dash__grid--lower > :nth-child(n+2) { margin-top: 3rem; }
}
@media (max-width: 640px) {
  .tp-tiles { grid-template-columns: 1fr 1fr; }
  .tp-tile:nth-child(n) { border-left: 1px solid var(--line); border-top: 0; }
  .tp-tile:nth-child(odd) { border-left: 0; }
  .tp-tile:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tp-tile { padding: 1.3rem .9rem 1.4rem; }
  .tp-tile:nth-child(even) { padding-left: 1.1rem; }
  .tp-tile__icon { width: 2.2rem; height: 2.2rem; margin-bottom: 1rem; }
  .tp-tile .index-num { top: 1.1rem; right: .6rem; }
  .tp-sr, .tp-form--two { grid-template-columns: 1fr; }
  .tp-res { grid-template-columns: 1fr; }
  .tp-dash { margin-inline: calc(var(--gutter) * -0.5); }
  .tp-facts > div { grid-template-columns: 1fr; gap: .3rem; }
  .tp-dash__hello .label { display: none; }
  .tp-doc__meta { display: none; }
  .tp-contact__body { grid-template-columns: 1fr; }
  .tp-contact__img { aspect-ratio: 16 / 9; }
}

/* The phone "Schedule a tour" bar is for prospects; tenants here need the form unobstructed */
.page-tenant-portal .mobile-cta { display: none !important; }

/* QA (?qa): freeze viewport-relative heights for full-page screenshots */
@media (min-width: 901px) {
  .qa .tp-login { min-height: 900px; height: auto; }
  .qa .launch-band + .tp-login { min-height: 808px; } /* = 900px viewport minus the header */
}
@media (max-width: 900px) {
  .qa .tp-login__media { height: 520px; }
  .qa .launch-band + .tp-login .tp-login__media { height: 304px; }
}
/* inline link rows: keep hit areas from overlapping the next row */
.tp-facts__links .tp-hit::before { height: calc(100% + .55rem); }
