/* Bluconta landing: the phone in the hero and the portal's phone layout inside it, in the portal's own
   palette and type (static/css/tokens.css, fonts.css). Decorative; markup in partials/landing/_portal.html.
   The product demos further down (06-app.css, 07-demos.css) reuse --pw-* through .ui. */
/* InterLanding.woff2 is InterVariable cut to Latin + the few symbols the replicas use (58 KB vs 352 KB). */
@font-face {
  font-family: 'Inter';
  src: url('../../fonts/inter/InterLanding.woff2') format('woff2-variations'), url('../../fonts/inter/InterLanding.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* Product surface: everything drawn as "the app" shares these. */
.phone-screen, .ui {
  --pw-ink: #101828; --pw-body: #3C465C; --pw-muted: #6A7387; --pw-line: #E7E9EE; --pw-soft: #F5F6F8;
  --pw-brand: #2F7BE9; --pw-brand-dark: #1F5FC4; --pw-brand-soft: #E8F2FF;
  --pw-in: #2FAE5E; --pw-out: #EC9468; --pw-ok: #15803D; --pw-ok-soft: #DCFCE7; --pw-red: #E5484D;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.4;
  color: var(--pw-ink); text-align: left; font-feature-settings: 'cv11', 'ss01';
}
.phone-screen b, .ui b { font-weight: 600; }

/* Phone */
.phone {
  position: relative; width: 304px; max-width: 100%; height: 622px; margin-inline: auto; padding: 9px;
  border-radius: 50px; background: #0A1020;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.16), 0 2px 4px rgba(16, 24, 40, 0.1), 0 60px 90px -40px rgba(16, 24, 40, 0.55);
}
.phone-screen { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 41px; background: var(--white); font-size: 11.5px; }
.pw svg, .wa-app svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* Status bar: just the camera island (no clock or signal icons). */
.phone-status { position: relative; flex-shrink: 0; height: 36px; }
.phone-status::after { content: ""; position: absolute; left: 50%; top: 9px; width: 84px; height: 24px; border-radius: 14px; background: #0A1020; transform: translateX(-50%); }

/* Portal app: top bar, page, bottom tab bar. */
.pw { position: relative; display: grid; flex: 1; grid-template-rows: 46px minmax(0, 1fr) 54px; min-height: 0; }
.pw-top { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 12px 0 14px; border-bottom: 1px solid var(--pw-line); }
.pw-title { margin-right: auto; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.pw-ib { position: relative; display: grid; place-items: center; width: 28px; height: 28px; color: var(--pw-body); }
.pw-ib svg { width: 16px; height: 16px; }
.pw-bell > span { position: absolute; top: -2px; right: -2px; min-width: 13px; height: 13px; padding: 0 3px; border-radius: 7px; background: #EF4444; color: var(--white); font-size: 8px; font-weight: 700; line-height: 13px; text-align: center; }
.pw-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--pw-brand); color: var(--white); font-size: 11px; font-weight: 600; }
.pw-body { position: relative; min-width: 0; overflow: hidden; }
.pw-tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; padding-bottom: 4px; border-top: 1px solid var(--pw-line); background: var(--white); }
.pw-tab { display: grid; justify-items: center; gap: 2px; font-size: 8.5px; color: var(--pw-muted); }
.pw-tab svg { width: 16px; height: 16px; }
.pw-tab.is-on { color: var(--pw-brand-dark); font-weight: 600; }
.pw-tab--new > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--pw-brand); color: var(--white); font-size: 17px; line-height: 1; }

/* A fingertip that taps through the scenes (landing-scenes.js moves it). */
.pw-cursor {
  position: absolute; z-index: 30; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; pointer-events: none;
  border-radius: 50%; background: rgba(16, 24, 40, 0.18); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 4px 12px rgba(16, 24, 40, 0.25);
  opacity: 0; transition: transform 380ms var(--ease), opacity 200ms ease;
}
.pw-cursor.is-on { opacity: 1; }
.pw-cursor::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--pw-brand); opacity: 0; transform: scale(0.5); }
.pw-cursor.is-click::after { animation: pw-click 420ms ease-out; }
@keyframes pw-click { 30% { opacity: 1; } to { opacity: 0; transform: scale(1.5); } }

/* Page pieces */
.pw-body > .scene { padding: 14px 12px; }
.pg-head { margin-bottom: 12px; }
.pg-h { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.pg-sub { margin: 2px 0 0; font-size: 11px; color: var(--pw-body); }
.kp-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.kp { display: grid; gap: 2px; min-width: 0; padding: 10px 11px; border: 1px solid var(--pw-line); border-radius: 11px; }
.kp--wide { grid-column: 1 / -1; }
.kp span { font-size: 10.5px; color: var(--pw-body); }
.kp b { font-size: 15px; font-weight: 700; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Lists (Facturas), as stacked rows like the portal on a phone. */
.tb-row { display: flex; align-items: center; margin-bottom: 10px; border-bottom: 1px solid var(--pw-line); }
.tb-tabs { display: flex; gap: 12px; font-size: 11.5px; color: var(--pw-body); }
.tb-tabs span { padding: 6px 0 8px; white-space: nowrap; }
.tb-tabs .on { color: var(--pw-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--pw-ink); }
.pw-btn-primary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; background: var(--pw-brand); color: var(--white); font-size: 11.5px; font-weight: 600; white-space: nowrap; transition: transform 150ms ease, background-color 200ms ease; }
.tbl { overflow: hidden; border: 1px solid var(--pw-line); border-radius: 12px; }
.tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 11px; border-top: 1px solid var(--pw-line); }
.tr:first-child { border-top: 0; }
.td-name, .td-tot { display: grid; min-width: 0; }
.td-name b { overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.td-name small { display: flex; align-items: center; gap: 5px; overflow: hidden; font-size: 10px; color: var(--pw-body); white-space: nowrap; }
.td-tot { text-align: right; }
.td-tot b { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.td-tot small { font-size: 10px; color: var(--pw-muted); }
.tag { flex-shrink: 0; padding: 0 4px; border: 1px solid #DFE2E8; border-radius: 4px; font-size: 8.5px; font-weight: 600; line-height: 14px; color: var(--pw-body); }
.tag--ppd { border-color: #F6D4AD; background: #FFF7ED; color: #B45309; }

/* Toast shown at the end of a flow */
.pw-toast {
  position: absolute; z-index: 20; left: 50%; bottom: 10px; display: flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 11px; background: var(--pw-ink); color: var(--white); font-size: 10.5px; font-weight: 500;
  white-space: nowrap; box-shadow: 0 10px 30px -10px rgba(16, 24, 40, 0.5); transform: translateX(-50%);
}
.pw-toast svg { width: 14px; height: 14px; color: #4ADE80; stroke-width: 2.4; }

@media (max-width: 640px) {
  .phone { width: 288px; height: 590px; border-radius: 46px; }
  .phone-screen { border-radius: 38px; }
}
