/* ============================================================
   FG Soluções Online — Portfólio (/portfolio/)
   Vitrine de projetos. Base visual (cores, fontes, botões, nav,
   fundo, rodapé) vem de styles.css do institucional.
   ============================================================ */

.px-wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--pad); }
.px-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px rgba(34, 34, 34, .25); display: inline-block; }
.px .it { padding: 0 .08em; }

/* ===================== HERO ===================== */
.px-hero { position: relative; padding: clamp(118px, 17vh, 170px) 0 clamp(30px, 5vw, 60px); }
.px-kicker { display: inline-flex; align-items: center; gap: 12px; color: var(--soft); margin-bottom: clamp(18px, 2.4vw, 30px); }
.px-h1 { font-family: var(--disp); font-weight: 900; text-transform: uppercase; letter-spacing: -0.055em; line-height: .9; font-size: clamp(2.3rem, 6.3vw, 6.6rem); }
.px-h1 .ln { display: block; overflow: hidden; padding-top: .14em; margin-top: -.14em; padding-bottom: .04em; }
.px-h1 .ln > span { display: inline-block; }
.px-hero-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; margin-top: clamp(26px, 3vw, 42px); }
.px-hero-foot p { font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--soft); }
.px-explore { display: inline-flex; align-items: center; gap: 14px; font-family: var(--disp); font-weight: 800; font-size: 1.02rem; text-decoration: none; }
.px-explore span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); transition: transform .5s var(--ease); }
.px-explore:hover span { transform: translateY(4px); }

/* Índice dos projetos */
.px-index { list-style: none; margin-top: clamp(40px, 5vw, 70px); border-top: 1px solid var(--line); }
.px-index a { position: relative; display: grid; grid-template-columns: 64px 1fr auto 28px; align-items: center; gap: 18px; padding: clamp(16px, 1.8vw, 22px) 6px; border-bottom: 1px solid var(--line); text-decoration: none; isolation: isolate; overflow: hidden; }
.px-index a::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--accent); transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); }
.px-index a:hover::before, .px-index a:focus-visible::before { transform: scaleY(1); }
.px-index b { font-family: var(--disp); font-weight: 800; font-size: .9rem; color: var(--soft); }
.px-index-name { font-family: var(--disp); font-weight: 800; font-size: clamp(1.25rem, 2.4vw, 2.2rem); letter-spacing: -0.04em; line-height: 1.05; transition: transform .5s var(--ease); }
.px-index a:hover .px-index-name { transform: translateX(10px); }
.px-index-seg { font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.px-index svg { width: 20px; height: 20px; transition: transform .5s var(--ease); }
.px-index a:hover svg { transform: translateY(4px); }

/* Prévia que segue o cursor no índice */
.px-peek { position: fixed; left: 0; top: 0; z-index: 60; width: 340px; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; pointer-events: none;
  box-shadow: 0 30px 60px -20px rgba(30, 15, 10, .5); opacity: 0; transition: opacity .35s var(--ease); will-change: transform; }
.px-peek.on { opacity: 1; }
.px-peek img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

/* ===================== PROJETO ===================== */
.px-project { position: relative; padding: clamp(80px, 11vw, 170px) 0 clamp(20px, 3vw, 40px); }
.px-p-head { display: grid; grid-template-columns: 1fr; grid-template-areas: "num" "name" "seg"; align-items: end; }
.px-p-num { grid-area: num; display: flex; align-items: center; gap: 12px; color: var(--soft); margin-bottom: 14px; }
.px-p-num::before { content: ''; width: 30px; height: 3px; background: var(--accent); }
.px-p-name { grid-area: name; font-family: var(--disp); font-weight: 900; text-transform: uppercase; letter-spacing: -0.055em; line-height: .9; font-size: clamp(2.1rem, 6vw, 6rem); }
.px-p-seg { grid-area: seg; margin-top: 12px; font-size: .82rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.px-p-actions { grid-area: actions; display: flex; align-items: center; gap: 22px; }
.px-visit { display: inline-flex; align-items: center; gap: 8px; font-family: var(--disp); font-weight: 800; font-size: .98rem; text-decoration: none; border-bottom: 2px solid var(--ink); padding-bottom: 3px; }
.px-visit svg { transition: transform .4s var(--ease); }
.px-visit:hover svg { transform: translate(3px, -3px); }

/* Palco 3D: o site flutuando */
.px-stage { position: relative; width: min(1240px, calc(100% - 2 * var(--pad)), calc((100vh - 170px) * 1.62)); margin: clamp(36px, 5vw, 70px) auto 0; padding-bottom: 7%; perspective: 1800px; cursor: none; outline: none; }
.px-stage:focus-visible .px-browser { box-shadow: 0 0 0 3px var(--ink), 0 60px 120px -50px var(--glow, rgba(0, 0, 0, .4)); }
.px-float { position: relative; transform-style: preserve-3d; will-change: transform; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(var(--tx, 0px), 0, 0); }
.px-browser { position: relative; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 60px 120px -50px var(--glow, rgba(0, 0, 0, .4)), 0 30px 60px -30px rgba(30, 15, 10, .35); }
.px-bar { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; background: #f3efec; border-bottom: 1px solid var(--line); }
.px-bar i { width: 10px; height: 10px; border-radius: 50%; background: #E6837A; flex: none; }
.px-bar i:nth-child(2) { background: #EBC35A; }
.px-bar i:nth-child(3) { background: #8CC584; }
.px-bar span { margin-left: 14px; flex: 1; min-width: 0; max-width: 460px; padding: 5px 14px; border-radius: 999px; background: #fff; font-size: .76rem; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-vp { position: relative; aspect-ratio: 16 / 9.4; overflow: hidden; background: var(--c3, #fff); }
.px-vp img, .px-phone-vp img { position: absolute; left: 0; top: 0; width: 100%; height: auto; display: block; will-change: transform; transform: translate3d(0, var(--y, 0px), 0); }
.px-phone { position: absolute; right: -3%; bottom: 0; width: 20%; aspect-ratio: 9 / 19.5; border: clamp(5px, .6vw, 9px) solid #121212; border-radius: clamp(22px, 2.6vw, 38px); overflow: hidden; background: #fff;
  transform: translateZ(70px) translateY(var(--py, 0px)); box-shadow: 0 40px 80px -30px rgba(20, 10, 5, .6); }
.px-phone::before { content: ''; position: absolute; top: 6px; left: 50%; z-index: 2; width: 30%; height: 4.5%; max-height: 18px; transform: translateX(-50%); border-radius: 999px; background: #121212; }
.px-phone-vp { position: absolute; inset: 0; overflow: hidden; }
.px-progress { position: absolute; left: 0; right: 24%; bottom: 2%; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.px-progress span { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); }

.px-tags { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: clamp(18px, 2vw, 26px); }
.px-tags li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: .86rem; background: rgba(255, 255, 255, .35); }
.px-tags .px-swatch { padding: 6px 10px; }
.px-swatch { display: inline-flex; align-items: center; }
.px-swatch i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--line); background: var(--c1); }
.px-swatch i:nth-child(2) { background: var(--c2); margin-left: -8px; }
.px-swatch i:nth-child(3) { background: var(--c3); margin-left: -8px; }

/* Cursor "Ver projeto" sobre o palco */
.px-cursor { position: fixed; left: 0; top: 0; z-index: 80; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; display: grid; place-items: center; pointer-events: none;
  background: var(--accent); color: var(--ink); font-family: var(--disp); font-weight: 800; font-size: .82rem; text-align: center;
  transform: translate3d(var(--cx, -200px), var(--cy, -200px), 0) scale(0); transition: transform .35s var(--ease); will-change: transform;
  box-shadow: 0 16px 40px -14px rgba(120, 90, 0, .55); }
.px-cursor.on { transform: translate3d(var(--cx), var(--cy), 0) scale(1); }

/* Índice lateral */
.px-rail { position: fixed; left: clamp(10px, 1.6vw, 26px); top: 50%; z-index: 50; display: flex; flex-direction: column; gap: 6px; transform: translate(-140%, -50%); transition: transform .6s var(--ease); }
.px-rail.in { transform: translate(0, -50%); }
.px-rail a { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 6px 10px 6px 6px; border-radius: 999px; }
.px-rail b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--disp); font-size: .74rem; background: rgba(249, 242, 237, .8); border: 1px solid var(--line); transition: background-color .3s, border-color .3s; }
.px-rail span { font-size: .78rem; font-weight: 600; opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s var(--ease); white-space: nowrap; }
.px-rail a:hover span { opacity: 1; transform: none; }
.px-rail a.on b { background: var(--accent); border-color: var(--ink); }

/* ===================== OBJEÇÕES ===================== */
.px-obj { padding: clamp(90px, 11vw, 160px) 0 clamp(40px, 5vw, 70px); }
.px-obj-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.4vw, 20px); }
.px-obj-card { border-radius: 22px; padding: clamp(22px, 2.2vw, 32px); background: rgba(255, 255, 255, .5); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.px-obj-card h3 { font-family: var(--disp); font-weight: 800; font-size: clamp(1.1rem, 1.5vw, 1.32rem); letter-spacing: -0.035em; line-height: 1.15; }
.px-obj-card p { color: var(--soft); line-height: 1.5; font-size: .98rem; }
.px-obj-card--key { background: var(--accent); border-color: var(--accent); }
.px-obj-card--key p { color: var(--ink); }

/* ===================== AMOSTRA ===================== */
.px-offer { background: var(--ink); color: var(--paper); padding: clamp(90px, 12vw, 180px) 0; margin-top: clamp(40px, 5vw, 70px); overflow: hidden; }
.px-offer-kick { display: inline-flex; align-items: center; gap: 12px; color: var(--d-soft); margin-bottom: clamp(20px, 2.6vw, 34px); }
.px-offer-h { font-family: var(--disp); font-weight: 900; text-transform: uppercase; letter-spacing: -0.055em; line-height: 1; font-size: clamp(2.5rem, 8vw, 8rem); }
.px-offer-h .it { background: var(--accent); color: var(--ink); }
.px-offer-h .lr { padding-top: .06em; margin-top: 0; }
.px-offer-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; margin-top: clamp(34px, 4vw, 56px); padding-top: clamp(26px, 3vw, 36px); border-top: 1px solid var(--d-line); }
.px-offer-points { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: clamp(1.02rem, 1.5vw, 1.25rem); }
.px-offer-points li { display: flex; align-items: center; gap: 10px; color: var(--d-soft); }
.px-offer-points li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.px-offer-points b { color: var(--paper); }

/* ===================== DETALHES (modal) ===================== */
html.modal-open, html.modal-open body { overflow: hidden; }
.px-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(18, 18, 18, .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .4s var(--ease); }
.px-modal.in { opacity: 1; }
.px-modal-in { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; padding: 18px; transform: translateY(24px); transition: transform .5s var(--ease); }
.px-modal.in .px-modal-in { transform: none; }
.pm-view { min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.pm-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pm-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(249, 242, 237, .25); background: transparent; color: var(--paper); font-family: var(--disp); font-weight: 700; font-size: .88rem; cursor: pointer; transition: background-color .3s, color .3s; }
.pm-tabs button[aria-selected="true"] { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.pm-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #ff5a4f; animation: pulse 1.6s infinite; }
.pm-screen { position: relative; flex: 1; min-height: 0; }
.pm-pane { position: absolute; inset: 0; display: none; }
.pm-pane.is-on { display: flex; justify-content: center; }
.pm-browser { width: 100%; height: 100%; display: flex; flex-direction: column; box-shadow: none; }
.pm-scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: #fff; }
.pm-scroll img { display: block; width: 100%; height: auto; }
.pm-phone { position: relative; right: auto; bottom: auto; transform: none; height: 100%; width: auto; max-width: 100%; aspect-ratio: 9 / 19.5; display: flex; }
.pm-phone .pm-scroll { scrollbar-width: none; }
.pm-phone .pm-scroll::-webkit-scrollbar { display: none; }
.pm-live { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; }
.pm-live iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; }
.pm-hint { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(249, 242, 237, .6); text-align: center; }
.pm-side { min-height: 0; overflow-y: auto; border-radius: 22px; background: var(--paper); padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.pm-top { display: flex; align-items: center; justify-content: space-between; }
.pm-top .label { color: var(--soft); }
.pm-close { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); display: grid; place-items: center; cursor: pointer; transition: transform .4s var(--ease); flex: none; }
.pm-close:hover { transform: rotate(90deg); }
.pm-close svg, .pm-nav svg { width: 18px; height: 18px; }
.pm-name { font-family: var(--disp); font-weight: 900; text-transform: uppercase; letter-spacing: -0.05em; line-height: .95; font-size: clamp(1.7rem, 2.4vw, 2.3rem); }
.pm-seg { font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.pm-concept { line-height: 1.55; color: var(--soft); }
.pm-block { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.pm-block .label { color: var(--soft); }
.pm-sections { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-sections button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .84rem; cursor: pointer; transition: background-color .3s, border-color .3s; }
.pm-sections button:hover, .pm-sections button.on { background: var(--accent); border-color: var(--accent); }
.pm-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.pm-list li { position: relative; padding-left: 18px; font-size: .94rem; line-height: 1.4; }
.pm-list li::before { content: ''; position: absolute; left: 0; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px rgba(34, 34, 34, .3); }
.pm-id { flex-direction: row; align-items: center; gap: 12px; font-size: .84rem; color: var(--soft); }
.pm-visit { justify-content: space-between; }
.pm-nav { display: flex; justify-content: space-between; gap: 10px; }
.pm-nav button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; font-family: var(--disp); font-weight: 700; font-size: .86rem; color: var(--ink); padding: 6px 0; }
.pm-nav button span { max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-sample { margin-top: auto; padding: 16px; border-radius: 16px; background: var(--accent); font-family: var(--disp); font-weight: 800; text-decoration: none; text-align: center; }

/* ===================== BARRA FIXA (celular) ===================== */
.pf-bar { display: none; }

/* ===================== RESPONSIVO ===================== */
@media (max-width: 1100px) {
  .px-rail { display: none; }
  .px-obj-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .px-modal-in { grid-template-columns: 1fr; grid-template-rows: auto auto; overflow-y: auto; overflow-x: hidden; }
  .pm-view { height: 76svh; }
  .pm-side { overflow: visible; }
  .pm-close { position: fixed; top: 12px; right: 12px; z-index: 5; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .5); }
}
@media (max-width: 760px) {
  .px-p-head { grid-template-columns: 1fr; grid-template-areas: "num" "name" "seg" "actions"; }
  .px-p-actions { margin-top: 18px; gap: 18px; }
  .px-stage { width: calc(100% - 20px); padding-bottom: 22px; cursor: auto; perspective: none; }
  /* Celular: só o quadro do site (sem o celular desenhado e sem efeito 3D, que piscava em alguns aparelhos) */
  .px-float { transform: none !important; transform-style: flat; will-change: auto; }
  .px-stage .px-phone { display: none; }
  .px-progress { right: 0; bottom: 0; }
  .px-bar { height: 26px; padding: 0 10px; gap: 4px; }
  .px-bar i { width: 7px; height: 7px; }
  .px-bar span { margin-left: 8px; font-size: .62rem; padding: 3px 10px; }
  .px-browser { border-radius: 10px; }
  .px-vp { aspect-ratio: 16 / 11; }
  .px-index a { grid-template-columns: 34px 1fr 20px; gap: 10px; }
  .px-index-seg { display: none; }
  .px-cursor, .px-peek { display: none; }
}
@media (max-width: 640px) {
  .px-hero { padding-top: 100px; }
  .px-h1 { font-size: 9.6vw; line-height: 1; }
  .px-h1 .ln { padding-top: .06em; margin-top: 0; }
  .px-offer-h { line-height: 1; }
  .px-vp { aspect-ratio: 4 / 3.3; }
  .px-hero-foot { flex-direction: column; align-items: flex-start; }
  .px-obj-grid { grid-template-columns: 1fr; }
  .px-offer-foot .btn { width: 100%; justify-content: space-between; }
  .px-modal-in { padding: 10px; gap: 10px; }
  .pm-tabs button { padding: 9px 13px; font-size: .8rem; }
  .pm-view { height: 78svh; }

  .pf-bar { display: flex; flex-direction: column; align-items: center; gap: 6px; position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 700;
    padding: 10px; border-radius: 20px; background: rgba(34, 34, 34, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5); transform: translateY(140%); transition: transform .5s var(--ease); }
  .pf-bar.in { transform: none; }
  .pf-bar a { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border-radius: 14px; background: var(--accent); color: var(--ink); font-family: var(--disp); font-weight: 800; font-size: 1rem; text-decoration: none; }
  .pf-bar a svg { width: 20px; height: 20px; }
  .pf-bar span { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--d-soft); }
  html.modal-open .pf-bar { transform: translateY(140%); }
  footer { padding-bottom: 130px; }
}
@media (prefers-reduced-motion: reduce) {
  .px-float { transform: none !important; }
  .pm-live-dot { animation: none; }
}

/* Botão "Ver o site real, com movimento" sobre a tela do projeto */
.px-live-cta { position: absolute; z-index: 6; top: calc(38px + 16px); left: 18px; display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 18px 8px 8px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(34, 34, 34, .88); color: var(--paper); font-family: var(--disp); font-weight: 700; font-size: .9rem; letter-spacing: -0.01em;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55); transition: background-color .3s, color .3s, transform .4s var(--ease); }
.px-live-cta:hover, .px-live-cta:focus-visible { background: var(--accent); color: var(--ink); transform: translateY(-2px); }
.px-live-ic { position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--ink); flex: none; }
.px-live-ic svg { margin-left: 2px; }
.px-live-ic::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(244, 212, 61, .7); animation: livepulse 2.2s infinite; }
.px-live-cta:hover .px-live-ic { background: var(--ink); color: var(--accent); }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(244, 212, 61, .7); } 70% { box-shadow: 0 0 0 12px rgba(244, 212, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(244, 212, 61, 0); } }
@media (max-width: 760px) {
  .px-live-cta { top: calc(26px + 10px); left: 10px; font-size: .8rem; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) { .px-live-ic::after { animation: none; } }