/* Renova Upgrades: the lender's file */

@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url(assets/fonts/public-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url(assets/fonts/public-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 800; font-display: swap; src: url(assets/fonts/public-sans-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 900; font-display: swap; src: url(assets/fonts/public-sans-latin-900-normal.woff2) format("woff2"); }
@font-face { font-family: "Overpass Mono"; font-weight: 400; font-display: swap; src: url(assets/fonts/overpass-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Overpass Mono"; font-weight: 600; font-display: swap; src: url(assets/fonts/overpass-mono-latin-600-normal.woff2) format("woff2"); }

:root {
  /* brand: sampled from the RU logo */
  --navy: #06294c;
  --navy-ink: #041d36;
  --navy-hi: #0d3966;
  --slate: #6a6b70;
  --slate-deep: #55585e; /* slate darkened for text on the desk */

  --paper: #ffffff;
  --desk: #e4e9ef;
  --tint: #f2f5f8;
  --rule: rgb(6 41 76 / 0.28);
  --rule-soft: rgb(6 41 76 / 0.14);
  --band-text: #d5dee8;
  --band-muted: #9fb3c8;

  --todo-bg: #ffe9a3;
  --todo-ink: #5a4300;
  --todo-line: #b88a00;

  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Overpass Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(12px, 3vw, 40px);
  --page: 1240px;
  --tabs-h: 46px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; scrollbar-color: var(--navy) var(--desk); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--desk);
  color: var(--navy-ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: var(--navy); color: #fff; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.band :focus-visible, .tabs :focus-visible { outline-color: #fff; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: #fff; color: var(--navy); padding: 10px 14px; font-weight: 800; }
.skip:focus { top: 12px; }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------- File band ---------- */
.band { position: sticky; top: 0; z-index: 30; background: var(--navy); color: #fff; }
.band__row {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 20px;
  transition: padding 0.3s var(--ease-out);
}
.band.is-compact .band__row { padding-top: 7px; padding-bottom: 7px; }
.band.is-compact .mark img { height: 30px; }
.mark { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.mark img { height: 38px; width: auto; transition: height 0.3s var(--ease-out); }
.mark__name { font-weight: 900; font-size: 18px; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1; }
.mark__llc { color: var(--band-muted); font-weight: 600; }
.band__meta { margin: 0 0 0 auto; font-size: 13px; line-height: 1; color: var(--band-text); }

/* ---------- Folder tabs (sticky) ---------- */
.tabs { background: var(--navy); }
.tabs__list {
  list-style: none; margin: 0 auto; padding: 0 var(--gutter);
  max-width: calc(var(--page) + 2 * var(--gutter));
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  height: var(--tabs-h); align-items: flex-end;
}
.tabs__list::-webkit-scrollbar { display: none; }
.tab {
  display: flex; align-items: baseline; gap: 8px;
  padding: 11px 16px 10px;
  background: var(--navy-hi); color: var(--band-text);
  border-radius: 6px 6px 0 0;
  font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.tab:hover { background: #144679; color: #fff; }
.tab__no { font: 400 12px/1 var(--mono); color: var(--band-muted); }
.tab[aria-current] { background: var(--desk); color: var(--navy); }
.tab[aria-current] .tab__no { color: var(--slate-deep); }

/* ---------- Desk + sheets ---------- */
.desk { padding: clamp(16px, 3vw, 36px) var(--gutter) 8px; }
.files { display: contents; }
.sheet {
  max-width: var(--page);
  margin: 0 auto clamp(18px, 3vw, 32px);
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  padding: clamp(16px, 3vw, 40px);
  box-shadow: 0 1px 2px rgb(6 41 76 / 0.06), 0 18px 40px -22px rgb(6 41 76 / 0.28);
}

.sheet__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.sheet__address, .sheet__title {
  margin: 0; color: var(--navy);
  font-weight: 900; text-transform: uppercase; letter-spacing: -0.015em; line-height: 0.92;
  text-wrap: balance;
}
.sheet__address { font-size: clamp(2.1rem, 1.1rem + 4vw, 4.25rem); }
.sheet__title { font-size: clamp(1.7rem, 1rem + 2.4vw, 2.75rem); margin-bottom: 14px; }

/* Ruled form fields: printed label, typed entry */
.fields {
  margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 4px solid var(--navy);
  border-left: 1px solid var(--rule);
}
.field { padding: 8px 12px 10px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field dt { font-weight: 600; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); }
.field dd { margin: 4px 0 0; font: 400 16px/1.35 var(--mono); color: var(--navy-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.field dd .prose { font-family: var(--sans); }
.field--status dd { display: flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 600; }
.field--status .ico { width: 19px; height: 19px; }

.sheet__foot {
  margin: clamp(16px, 2vw, 22px) 0 0; padding-top: 10px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 4px 22px;
  font-size: 12.5px; line-height: 1.45; color: var(--slate);
}

/* ---------- Plate + photo addendum ---------- */
.sheet__body { align-items: stretch; display: grid; grid-template-columns: minmax(0, 1fr) clamp(250px, 26vw, 310px); gap: clamp(16px, 2vw, 24px); margin-top: clamp(16px, 2vw, 24px); }

.plate { align-self: start; margin: 0; border: 1px solid var(--navy); background: var(--paper); min-width: 0; }
.stage {
  --pos: 50%;
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--navy-ink);
  cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.stage:has(.stage__range:focus-visible) { outline: 3px solid var(--navy); outline-offset: 3px; }
.stage__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.18s var(--ease-out), filter 0.18s var(--ease-out); -webkit-user-drag: none; }
.stage__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.stage.is-swapping .stage__img { opacity: 0.25; filter: blur(4px); }
.stage__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; margin: 0; }

.seam { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 4px; margin-left: -2px; background: linear-gradient(90deg, rgb(4 29 54 / 0.35) 0 1px, #fff 1px 3px, rgb(4 29 54 / 0.35) 3px); pointer-events: none; }
.seam__knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--navy); color: #fff; border: 2px solid #fff;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.32);
  transition: transform 0.25s var(--ease-out);
}
.stage:hover .seam__knob, .stage.is-dragging .seam__knob { transform: translate(-50%, -50%) scale(1.08); }
.plate.is-playing .seam__knob { transform: translate(-50%, -50%) scale(0.86); }

.tag {
  position: absolute; top: 12px; padding: 6px 9px 5px;
  font-weight: 800; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1; color: #fff;
  transition: opacity 0.25s var(--ease-out);
  pointer-events: none;
}
.tag--before { left: 12px; background: var(--slate); }
.tag--after { right: 12px; background: var(--navy); }
.stage[data-side="after"] .tag--before, .stage[data-side="before"] .tag--after { opacity: 0; }

.plate__bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: stretch; border-top: 1px solid var(--navy); min-height: 52px; }
.plate__no { display: flex; align-items: center; padding: 0 14px; border-right: 1px solid var(--rule); font: 400 14px/1 var(--mono); color: var(--slate); font-variant-numeric: tabular-nums; }
.plate__no b { color: var(--navy); font-weight: 600; }
.plate__room { display: flex; align-items: center; padding: 0 14px; font-weight: 800; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--navy); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.plate__ctrl { display: flex; }
.ctl {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 52px; padding: 0 12px; border: 0; border-left: 1px solid var(--rule);
  background: var(--paper); color: var(--navy); cursor: pointer;
  font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out);
}
.ctl:hover { background: var(--tint); }
.ctl--play { padding: 0 16px; min-width: 128px; }
.ctl--play[aria-pressed="true"] { background: var(--navy); color: #fff; }
.ctl--play .ico { width: 16px; height: 16px; }

.addendum { display: flex; flex-direction: column; border: 1px solid var(--navy); min-height: 0; min-width: 0; }
.addendum__title { margin: 0; padding: 11px 14px 10px; background: var(--navy); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1; }
.addendum__list { list-style: none; margin: 0; padding: 0; }
.room {
  width: 100%; display: grid; grid-template-columns: 22px 56px minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 5px 12px; border: 0; border-bottom: 1px solid var(--rule-soft);
  background: var(--paper); color: var(--navy-ink); text-align: left; cursor: pointer;
  font-weight: 600; font-size: 14px; line-height: 1.25;
  transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out);
}
.room:hover { background: var(--tint); }
.room__no { font: 400 12px/1 var(--mono); color: var(--slate); }
.room__thumb { width: 56px; height: 42px; object-fit: cover; background: var(--tint); }
.room[aria-current] { background: var(--navy); color: #fff; }
.room[aria-current] .room__no { color: var(--band-muted); }

/* ---------- Contractor + contact ---------- */
.contractor { display: grid; grid-template-columns: clamp(140px, 18vw, 220px) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.contractor__logo { width: 100%; height: auto; }
.lede { margin: 0 0 22px; max-width: 62ch; font-size: clamp(16px, 0.95rem + 0.3vw, 19px); line-height: 1.55; color: var(--navy-ink); text-wrap: pretty; }
.fields--contractor { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
@media (min-width: 700px) { .fields--contractor { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.contact { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 20px;
  border: 2px solid var(--navy); text-decoration: none;
  font-weight: 800; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1;
  transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-hi); border-color: var(--navy-hi); }
.btn--line { background: var(--paper); color: var(--navy); }
.btn--line:hover { background: var(--tint); }
.btn--paper { background: #fff; color: var(--navy); border-color: #fff; min-height: 42px; padding: 0 18px; font-size: 13px; }
.btn--paper:hover { background: #e3eaf2; border-color: #e3eaf2; }
.btn.is-pending { border-style: dashed; cursor: default; }
.btn.is-pending:hover { background: inherit; }

.todo {
  background: var(--todo-bg); color: var(--todo-ink);
  border: 1px dashed var(--todo-line);
  padding: 2px 7px; font: 700 12px/1.4 var(--sans); letter-spacing: 0.04em; text-transform: uppercase;
}

/* ---------- Footer ---------- */
.foot {
  max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 8px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  font-size: 12.5px; line-height: 1.5; color: var(--slate-deep);
}
.foot p { margin: 0; }
.noscript { max-width: var(--page); margin: 0 auto 24px; padding: 16px; background: var(--todo-bg); color: var(--todo-ink); }

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .band__meta { display: none; }
  .btn--paper { margin-left: auto; }
  .sheet__body { grid-template-columns: minmax(0, 1fr); }
  .addendum__list { display: flex; overflow-x: auto; scrollbar-width: thin; overflow-y: hidden; scroll-snap-type: x proximity; flex: none; }
  .addendum__list li { flex: 0 0 auto; scroll-snap-align: start; }
  .room { width: 128px; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 6px 6px; padding: 8px; border-bottom: 0; border-right: 1px solid var(--rule-soft); height: 100%; align-items: start; }
  .room__thumb { grid-column: 1 / -1; width: 100%; height: 72px; }
  .room__no { grid-row: 2; padding-top: 2px; }
  .room__label { grid-row: 2; font-size: 13px; }
}
@media (max-width: 600px) {
  .mark__name { font-size: 15px; white-space: nowrap; }
  .mark__llc { display: none; }
  .mark img { height: 32px; }
  .stage { aspect-ratio: 1 / 1; }
  .plate__bar { grid-template-columns: auto minmax(0, 1fr); }
  .plate__ctrl { grid-column: 1 / -1; border-top: 1px solid var(--rule); }
  .plate__ctrl .ctl { flex: 1; min-height: 48px; }
  .plate__ctrl .ctl:first-child { border-left: 0; }
  .ctl--play { flex: 2 !important; }
  .contractor { grid-template-columns: minmax(0, 1fr); }
  .contractor__logo { width: 140px; }
}
