/* ==========================================================
   Páginas de projeto (Gestor Chef, MyHome) — depois do style.css.
   Cada página veste a cor do próprio produto (theme-gc, theme-mh);
   header e rodapé continuam da Feng.
   ========================================================== */

/* ---------- temas ---------- */
.pj2 {
  --pp-bg: #fbfaf8;
  --pp-alt: #f3f1ed;
  --pp-ink: #1f2430;
  --pp-muted: #5d6474;
  --pp-accent: #0d7ae0;
  --pp-accent-ink: #ffffff;
  --pp-soft: rgba(13, 122, 224, 0.12);
  --pp-dark: #161b26;
  --pp-head: 'Inter', system-ui, sans-serif;
  --pp-em: 'Fraunces', Georgia, serif;
  /* reaproveita os componentes compartilhados (.pm, botões) com a cor do produto */
  --accent: var(--pp-accent);
  --accent-dark: var(--pp-accent);
  --ink: var(--pp-ink);
  --ink-soft: var(--pp-muted);
  --border: color-mix(in srgb, var(--pp-ink) 14%, transparent);
  background: var(--pp-bg);
  color: var(--pp-ink);
}

.theme-gc {
  --pp-bg: #fff8f3;
  --pp-alt: #fdeee6;
  --pp-ink: #4a2a1a;
  --pp-muted: #85604e;
  --pp-accent: #c2557a;
  --pp-soft: #f9d9e2;
  --pp-dark: #3b2216;
}

.theme-mh {
  --pp-bg: #f8f1e6;
  --pp-alt: #efe3d0;
  --pp-ink: #3d2614;
  --pp-muted: #7a5838;
  --pp-accent: #b9562f;
  --pp-soft: #f1d9c4;
  --pp-dark: #2e1d10;
  --pp-head: 'Fraunces', Georgia, serif;
}

.theme-ac {
  --pp-bg: #fafafa;
  --pp-alt: #f0f1f2;
  --pp-ink: #202327;
  --pp-muted: #62676e;
  --pp-accent: #b93d16;
  --pp-soft: #ffede5;
  --pp-dark: #202327;
  --pp-em: 'Inter', system-ui, sans-serif;
}
.theme-ac .pp-hero h1 em { font-style: normal; font-weight: 800; }
.theme-ac .pp-phone { max-height: 72%; }
/* As capturas longas incluem área abaixo do menu fixo: mostra a janela original. */
.theme-ac .pp-shot-frame > img,
.theme-ac .shot-btn > img:not([src$="/mobile.webp"]),
.theme-ac .lightbox img[src*="/autocheck/"]:not([src$="/mobile.webp"]) {
  aspect-ratio: 1366 / 768;
  height: auto;
  object-fit: cover;
  object-position: top;
}
.theme-ac .pm-shots > img { object-position: top; }
.theme-ac .lightbox img[src*="/autocheck/"]:not([src$="/mobile.webp"]) { width: min(92vw, 1200px); }
.theme-ac .pp-phone img { aspect-ratio: 390 / 780; object-fit: cover; object-position: top; }
.theme-ac .ac-caption,
.theme-ac .ac-note { margin: 28px 0 0; max-width: 75ch; font-size: 14px; line-height: 1.65; color: var(--pp-muted); }
.theme-ac .ac-note strong { color: var(--pp-ink); }
/* Contraste do novo tema; os demais produtos mantêm a regra compartilhada. */
.pj2.theme-ac .pm-tab strong { color: var(--pp-muted); }
.pj2.theme-ac .pm-tab[aria-selected="true"] strong,
.pj2.theme-ac .pm-tab:hover strong { color: var(--pp-ink); }

/* ---------- base da página ---------- */
.pj2 .section { padding: clamp(64px, 8vw, 104px) 0; }
.pp-alt { background: var(--pp-alt); }

.pj2 .section-title {
  margin: 0 0 14px;
  font-family: var(--pp-head);
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-align: left;
  text-wrap: balance;
  color: var(--pp-ink);
}
.theme-mh .section-title { letter-spacing: -0.015em; }
.pj2 .section-sub { margin: 0; max-width: 620px; font-size: clamp(15.5px, 1.3vw, 17px); line-height: 1.6; text-align: left; color: var(--pp-muted); }

.pj2 .sec-head { max-width: 720px; margin: 0 0 clamp(36px, 4vw, 52px); }
.pj2 .sec-head.split { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 64px; align-items: end; }
.pj2 .sec-head.split .section-title { margin: 0; }

.pj2 .text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--pp-accent); }
.pj2 .text-link .ico { transition: transform 0.2s ease; }
.pj2 .text-link:hover .ico { transform: translateX(3px); }

.pj2 .product-kicker { color: var(--pp-accent); }

/* botões no tema */
.pj2 .btn { padding: 14px 24px; font-weight: 700; }
.pj2 .btn .ico { font-size: 18px; }
.pj2 .btn-sm { padding: 10px 16px; }
.pp-btn { background: var(--pp-accent); color: var(--pp-accent-ink); box-shadow: 0 12px 26px -14px var(--pp-accent); }
.pp-btn:hover { filter: brightness(1.06); }
.pp-btn-light { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }
.pp-btn-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }

/* ---------- hero ---------- */
.pp-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 0 clamp(56px, 7vw, 96px);
  background: var(--pp-bg);
}
/* toque de cada produto ao fundo: granulado (confeitaria) e papel de parede listrado (casa) */
.pp-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55; }
.theme-gc .pp-hero::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cg opacity='.6'%3E%3Crect x='20' y='30' width='16' height='5' rx='2.5' fill='%23f3a6b8' transform='rotate(30 28 32)'/%3E%3Crect x='170' y='24' width='16' height='5' rx='2.5' fill='%23a6d5e3' transform='rotate(-25 178 26)'/%3E%3Crect x='96' y='120' width='16' height='5' rx='2.5' fill='%23c3e8d4' transform='rotate(60 104 122)'/%3E%3Crect x='210' y='170' width='16' height='5' rx='2.5' fill='%23f1d3a1' transform='rotate(-50 218 172)'/%3E%3Crect x='44' y='200' width='16' height='5' rx='2.5' fill='%23f7c6d0' transform='rotate(15 52 202)'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
  mask-image: linear-gradient(180deg, #000, transparent 70%);
}
.theme-mh .pp-hero::before {
  background: repeating-linear-gradient(90deg, rgba(156, 107, 65, 0.07) 0 2px, transparent 2px 56px);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
  mask-image: linear-gradient(180deg, #000, transparent 75%);
}
.pp-hero .container { position: relative; }

.pj2 .breadcrumb { margin-bottom: clamp(28px, 4vw, 48px); color: var(--pp-muted); }
.pj2 .breadcrumb li + li::before { color: color-mix(in srgb, var(--pp-muted) 50%, transparent); }
.pj2 .breadcrumb a:hover { color: var(--pp-ink); }
.pj2 .breadcrumb [aria-current] { color: var(--pp-ink); }

.pp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 24px clamp(32px, 5vw, 72px); align-items: end; }

.pp-brand { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 22px; font-family: var(--pp-head); font-size: 20px; font-weight: 700; }
.pp-brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.theme-gc .pp-brand img { background: #fff; padding: 4px; box-shadow: 0 6px 16px -10px rgba(74, 42, 26, 0.5); }
.pp-kicker { margin: 0 0 14px; font-size: 14px; font-weight: 700; color: var(--pp-accent); }

.pp-hero h1 {
  margin: 0;
  font-family: var(--pp-head);
  font-size: clamp(38px, 5.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.theme-mh .pp-hero h1 { font-weight: 700; letter-spacing: -0.02em; }
.pp-hero h1 em { font-family: var(--pp-em); font-style: italic; font-weight: 600; color: var(--pp-accent); letter-spacing: -0.01em; }

.pp-lead { margin: 0 0 26px; font-size: clamp(16px, 1.35vw, 18px); line-height: 1.6; color: var(--pp-muted); }
.pp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.pp-meta { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--pp-muted); }
.pp-meta strong { color: var(--pp-ink); font-weight: 600; }
.pp-meta .live { display: inline-flex; align-items: center; gap: 8px; }
.pp-meta .live i { width: 8px; height: 8px; border-radius: 50%; background: #2fae66; box-shadow: 0 0 0 4px rgba(47, 174, 102, 0.18); }

/* print principal: endireita conforme a rolagem (o JS controla --tilt de 1 a 0) */
.pp-shot { position: relative; max-width: var(--shot-max, none); margin: clamp(40px, 5vw, 64px) auto 0; perspective: 1600px; }
.pp-shot-frame {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 50px 90px -50px color-mix(in srgb, var(--pp-ink) 70%, transparent);
  transform-origin: 50% 0;
  transform: rotateX(calc(var(--tilt, 0) * 14deg)) scale(calc(1 - var(--tilt, 0) * 0.05));
  will-change: transform;
}
.pp-shot-frame img { display: block; width: 100%; height: auto; }
.pp-phone {
  position: absolute;
  right: 3%;
  bottom: -7%;
  width: 15%;
  min-width: 96px;
  border-radius: 22px;
  overflow: hidden;
  border: 5px solid #17130f;
  background: #17130f;
  box-shadow: 0 30px 50px -22px rgba(0, 0, 0, 0.6);
  transform: translateY(calc(var(--tilt, 0) * 40px));
}
.pp-phone img { display: block; width: 100%; height: auto; border-radius: 17px; }

/* entrada do hero */
.pp-hero-text > *:not(h1), .pp-hero-side, .pp-shot { animation: ppIn 0.8s cubic-bezier(.2, .8, .2, 1) both; }
.pp-hero-side { animation-delay: 0.3s; }
.pp-shot { animation-delay: 0.45s; }
@keyframes ppIn { from { opacity: 0; transform: translateY(18px); } }

/* ---------- dor ---------- */
.pp-pains { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.pp-pain { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-content: start; column-gap: 12px; padding: 26px 0; border-top: 1px solid var(--border); }
.pp-n { grid-row: 1 / span 2; padding-top: 4px; font-size: 13px; font-weight: 700; color: var(--pp-accent); font-variant-numeric: tabular-nums; }
.pp-pain h3 { margin: 0 0 8px; font-family: var(--pp-head); font-size: 20px; letter-spacing: -0.01em; }
.pp-pain p { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--pp-muted); }

.pp-bridge {
  max-width: 900px;
  margin: clamp(40px, 5vw, 64px) 0 0;
  font-family: var(--pp-head);
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.pp-bridge em { font-family: var(--pp-em); font-style: italic; font-weight: 600; color: var(--pp-accent); }

/* ---------- como resolve: abas com prints (componente .pm do style.css) ---------- */
.pj2 .pm-tab strong { font-family: var(--pp-head); color: color-mix(in srgb, var(--pp-ink) 55%, transparent); }
.pj2 .pm-tab[aria-selected="true"] strong,
.pj2 .pm-tab:hover strong { color: var(--pp-ink); }
.pj2 .pm-tab span { color: var(--pp-muted); }
.pj2 .pm-tab[aria-selected="true"] span { max-height: 220px; }
.pm-pts { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.pm-pts > span { position: relative; padding-left: 16px; font-size: 14px; color: var(--pp-ink); }
.pm-pts > span::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--pp-accent); }
.pj2 .pm-screen { border-color: var(--border); background: var(--pp-dark); }
.pj2 .pm-shots { aspect-ratio: var(--shot-ratio, 16 / 10); background: var(--pp-alt); }
.pj2 .pm-shots img { object-fit: var(--shot-fit, cover); }

/* versão empilhada (prints largos): abas lado a lado em cima, tela inteira embaixo */
.pm-stack { grid-template-columns: minmax(0, 1fr); gap: 28px; }
.pm-stack .pm-tabs { flex-direction: row; margin: 0; border-top: none; gap: 28px; }
.pm-stack .pm-tab { flex: 1; border-bottom: 2px solid var(--border); }
.pm-stack .pm-tab i { bottom: -2px; }
.pm-stack .pm-screen { order: 0; }

/* ---------- módulos ---------- */
.pp-mods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.pp-mod { padding: 22px 0; border-top: 1px solid var(--border); }
.pp-mod h3 { margin: 0 0 6px; font-family: var(--pp-head); font-size: 17.5px; letter-spacing: -0.01em; }
.pp-mod p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--pp-muted); }

/* ---------- galeria (lightbox do script.js) ---------- */
.pj2 .gallery { grid-auto-rows: 220px; gap: 28px 20px; }
.pj2 .shot { display: flex; flex-direction: column; overflow: visible; box-shadow: none; border-radius: 0; }
.pj2 .shot-btn {
  flex: 1;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.pj2 .shot-btn:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -28px color-mix(in srgb, var(--pp-ink) 70%, transparent); }
.pj2 .shot-btn img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pj2 .shot-tall .shot-btn img { padding: 14px; background: var(--pp-alt); }
.pj2 .shot figcaption { position: static; padding: 10px 2px 0; background: none; color: var(--pp-muted); font-size: 14px; font-weight: 600; pointer-events: auto; }

/* ---------- tecnologia ---------- */
.pp-tech { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.pp-chips { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pp-chips li { padding: 7px 13px; border-radius: 8px; border: 1px solid var(--border); background: var(--pp-bg); font-size: 14px; font-weight: 600; }
.pp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.pp-fact { padding: 22px 0; border-top: 1px solid var(--border); }
.pp-fact strong { display: block; margin-bottom: 6px; font-family: var(--pp-head); font-size: clamp(30px, 3vw, 40px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; color: var(--pp-accent); }
.theme-mh .pp-fact strong { font-weight: 700; }
.pp-fact span { font-size: 14.5px; line-height: 1.5; color: var(--pp-muted); }

/* ---------- CTA final ---------- */
.pp-final {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  gap: 28px 48px;
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 18px;
  background: var(--pp-dark);
  color: #fff;
}
.pj2 .pp-final .section-title { color: #fff; margin-bottom: 12px; }
.pp-final p { margin: 0; max-width: 620px; font-size: clamp(15.5px, 1.3vw, 17px); line-height: 1.6; color: rgba(255, 255, 255, 0.72); }
.pp-final-cta { display: flex; flex-direction: column; gap: 12px; }
.pp-final-cta .btn { justify-content: center; }

/* ---------- outros projetos ---------- */
.pp-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.pp-next.pp-next-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pp-next-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--pp-bg);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pp-next-card:hover { transform: translateY(-4px); box-shadow: 0 28px 50px -32px color-mix(in srgb, var(--pp-ink) 70%, transparent); }
.pp-next-card img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; transition: transform 0.6s ease; }
.pp-next-card:hover img { transform: scale(1.03); }
.pp-next-copy { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px 24px; }
.pp-next-copy strong { font-family: var(--pp-head); font-size: 22px; letter-spacing: -0.01em; }
.pp-next-copy > span:not(.product-kicker):not(.pp-next-link) { font-size: 15px; line-height: 1.55; color: var(--pp-muted); }
.pp-next-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 700; color: var(--pp-accent); }
.pp-next-link .ico { transition: transform 0.2s ease; }
.pp-next-card:hover .pp-next-link .ico { transform: translateX(3px); }

/* ---------- movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  .pp-hero-text > *, .pp-hero-side, .pp-shot { animation: none; }
  .pp-shot-frame, .pp-phone { transform: none !important; }
}

/* =================== Responsivo =================== */
@media (max-width: 960px) {
  .pp-next.pp-next-three { grid-template-columns: minmax(0, 1fr); }
  .pp-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .pp-pains { grid-template-columns: minmax(0, 1fr); }
  .pj2 .sec-head.split { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pp-mods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-tech { grid-template-columns: minmax(0, 1fr); }
  .pp-final { grid-template-columns: minmax(0, 1fr); }
  .pp-final-cta { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .pm-stack .pm-tabs { flex-direction: column; gap: 0; border-top: 1px solid var(--border); }
  .pm-stack .pm-tab { border-bottom-width: 1px; }
  .pm-stack .pm-tab i { bottom: -1px; }
  .pm-stack .pm-screen { order: -1; }
  .pp-next { grid-template-columns: minmax(0, 1fr); }
  .pj2 .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; }
  .pj2 .shot-wide { grid-column: span 2; grid-row: span 1; }
}

@media (max-width: 600px) {
  .pp-cta .btn { flex: 1 1 100%; justify-content: center; }
  .pp-phone { width: 24%; right: 2%; border-width: 4px; border-radius: 16px; }
  .pp-phone img { border-radius: 12px; }
  .pp-mods { grid-template-columns: minmax(0, 1fr); }
  .pp-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; }
  .pj2 .gallery { grid-template-columns: 1fr; grid-auto-rows: 210px; }
  .pj2 .shot-wide { grid-column: auto; }
  .pj2 .shot-tall { grid-row: span 2; }
  .pp-final-cta .btn { flex: 1 1 100%; }
}
