/* ==========================================================================
   NEXORA DIGITAL — frames.css
   Device frames + the "virtual viewport" used everywhere a project appears.
   A viewport renders its content at a real device width (e.g. 1440px) and is
   scaled down with --s, so the project's own responsive layout is preserved.
   ========================================================================== */

/* ---------- Browser window ---------- */
.frame {
  position: relative;
  border-radius: 12px;
  background: #0E0E11;
  box-shadow: var(--shadow-float), 0 0 0 1px rgba(255, 255, 255, .07);
  overflow: hidden;
  isolation: isolate;
}
.frame::after { /* glass reflection */
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .03) 100%);
}
.frame__bar {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: .9rem;
  height: 30px; padding: 0 .8rem;
  background: linear-gradient(#1C1C21, #16161A);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.frame__dots { display: flex; gap: 5px; }
.frame__dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.frame__url {
  flex: 1; max-width: 300px; margin-inline: auto;
  height: 18px; padding: 0 .7rem; border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  font-size: 10px; line-height: 18px; color: rgba(244, 240, 232, .45);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: .02em;
}

/* ---------- Phone ---------- */
.phone {
  position: relative;
  padding: 7px;
  border-radius: 30px;
  background: linear-gradient(145deg, #2A2A30, #121215 55%, #24242A);
  box-shadow: var(--shadow-float), inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.phone > .vp { border-radius: 24px; }
.phone::before { /* speaker */
  content: ""; position: absolute; z-index: 4; top: 13px; left: 50%;
  width: 30%; height: 13px; border-radius: 10px; background: #08080A; transform: translateX(-50%);
}
.phone::after {
  content: ""; position: absolute; inset: 7px; z-index: 3; border-radius: 24px; pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, .12), transparent 35%);
}

/* ---------- Virtual viewport ---------- */
.vp {
  --w: 1440; --h: 900; --s: .3;
  position: relative;
  width: 100%;
  aspect-ratio: var(--w) / var(--h);
  overflow: hidden;
  background: #121214;
}
.vp__canvas {
  position: absolute; top: 0; left: 0;
  width: calc(var(--w) * 1px);
  height: calc(var(--h) * 1px);
  transform: scale(var(--s));
  transform-origin: 0 0;
}
.vp__live > iframe {
  display: block; width: 100%; height: 100%; border: 0; background: #fff;
}
.vp__poster, .vp__live { position: absolute; inset: 0; }
.vp__poster { transition: opacity .8s var(--ease); }
.vp__live { opacity: 0; transition: opacity .8s var(--ease); }
.vp.is-live .vp__live { opacity: 1; }
.vp.is-live .vp__poster { opacity: 0; pointer-events: none; }

/* loading shimmer while a live preview boots */
.vp__loading {
  position: absolute; inset: auto 0 0; z-index: 5; height: 2px; overflow: hidden;
  opacity: 0; transition: opacity .3s;
}
.vp__loading::after {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: vpload 1.2s var(--ease-io) infinite;
}
.vp.is-loading .vp__loading { opacity: 1; }
@keyframes vpload { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ---------- Posters: identity renderings built from each project's own
   palette, type, navigation and hero copy (js/core.js → NX.poster) ---------- */
.poster {
  position: absolute; inset: 0; overflow: hidden;
  background: var(--p-bg); color: var(--p-fg);
  font-family: var(--p-body);
}
.poster__nav {
  position: absolute; z-index: 3; inset: 0 0 auto;
  display: flex; align-items: center; gap: 34px;
  height: 92px; padding: 0 64px;
}
.poster__brand { margin-right: auto; font-family: var(--p-display); font-size: 27px; letter-spacing: .12em; text-transform: uppercase; }
.poster__nav span { font-size: 16px; opacity: .78; }
.poster__nav b {
  font-weight: 500; font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  padding: 14px 26px; border-radius: var(--p-radius, 999px);
  background: var(--p-accent); color: var(--p-on-accent);
}
.poster__img { position: absolute; background-size: cover; background-position: center; background-color: var(--p-alt); }
.poster__eyebrow { font-size: 18px; letter-spacing: .14em; text-transform: uppercase; color: var(--p-accent-ink, var(--p-accent)); margin-bottom: 26px; }
.poster__title { font-family: var(--p-display); font-weight: var(--p-dw, 400); font-size: var(--p-ds, 92px); line-height: var(--p-lh, 1); letter-spacing: var(--p-ls, -.01em); text-transform: var(--p-tt, none); margin-bottom: 30px; }
.poster__title em { font-style: var(--p-em, italic); }
.poster__sub { font-size: 21px; line-height: 1.55; max-width: 34ch; opacity: .8; margin-bottom: 40px; }
.poster__btns { display: flex; gap: 16px; }
.poster__btns span {
  padding: 18px 32px; border-radius: var(--p-radius, 999px); font-size: 15px; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid currentColor;
}
.poster__btns span:first-child { background: var(--p-accent); border-color: var(--p-accent); color: var(--p-on-accent); }

/* overlay layout: copy over a full-bleed photo */
.poster--overlay .poster__img { inset: 0; }
.poster--overlay .poster__img::after { content: ""; position: absolute; inset: 0; background: var(--p-scrim); }
.poster--overlay .poster__copy { position: absolute; z-index: 2; left: 64px; bottom: 96px; max-width: 900px; }
/* split layout: copy left, framed photo right */
.poster--split .poster__copy { position: absolute; z-index: 2; left: 64px; top: 50%; transform: translateY(-44%); width: 640px; }
.poster--split .poster__img { right: 64px; top: 140px; bottom: 70px; width: 520px; border-radius: var(--p-img-radius, 0); }
/* mobile layout */
.poster--mobile .poster__nav { height: 92px; padding: 0 26px; }
.poster--mobile .poster__nav span, .poster--mobile .poster__nav b { display: none; }
.poster--mobile .poster__nav::after { content: ""; width: 34px; height: 12px; border-block: 2px solid currentColor; }
.poster--mobile .poster__brand { font-size: 20px; }
.poster--mobile .poster__copy { position: absolute; z-index: 2; left: 26px; right: 26px; top: 120px; }
.poster--mobile .poster__title { font-size: var(--p-ds-m, 52px); }
.poster--mobile .poster__sub { font-size: 17px; margin-bottom: 26px; }
.poster--mobile .poster__btns span { padding: 15px 20px; font-size: 12px; }
.poster--mobile .poster__btns span + span { display: none; }
.poster--mobile .poster__img { left: 26px; right: 26px; bottom: 26px; height: 300px; border-radius: var(--p-img-radius, 0); }

/* pending projects */
.poster--pending {
  display: grid; place-items: center; text-align: center;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 22px),
    #101013;
  color: var(--ivory-3);
}
.poster--pending .poster__pending { display: grid; gap: 22px; justify-items: center; font-family: var(--display); }
.poster--pending .poster__pending strong { font-weight: 300; font-size: 64px; letter-spacing: .06em; text-transform: uppercase; color: var(--ivory-2); }
.poster--pending .poster__pending span { font-size: 22px; font-family: var(--body); }
.poster--pending .poster__ring { width: 120px; height: 120px; border-radius: 50%; border: 1px dashed rgba(198, 161, 91, .5); }
