/* ============================================================
   PORTFÓLIO — estende o design system de style.css
   ============================================================ */

/* ---------- Hero: índice em cartões (estilo "table of content") ---------- */
.pf-index {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 48px;
}
.pf-index a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(243, 239, 226, .05);
  transition: background .25s, border-color .25s, transform .25s var(--ease);
}
.pf-index a:hover { background: rgba(243, 239, 226, .1); border-color: var(--accent); transform: translateY(-3px); }
.pf-index .n { font-family: var(--display); font-weight: 800; color: var(--accent); font-size: .9rem; }
.pf-index b { font-family: var(--display); font-weight: 700; font-size: 1.12rem; color: var(--cream); line-height: 1.15; }
.pf-index span { font-size: .82rem; color: var(--muted); }

/* ---------- O que fazemos ---------- */
.pf-do {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1.5px solid var(--ink);
}
.pf-do > div { padding: 26px 24px 8px 0; }
.pf-do > div + div { padding-left: 24px; border-left: 1px solid var(--line-d); }
.pf-do .n { font-family: var(--display); font-weight: 800; font-size: .85rem; color: var(--accent-d); }
.pf-do h3 { font-size: 1.3rem; margin: 10px 0 10px; }
.pf-do p { color: var(--muted-d); font-size: .94rem; }

/* ---------- Cabeçalho de seção numerada ---------- */
.pf-sec { padding: 110px 0; position: relative; z-index: 2; }
.pf-sec.dark { background: var(--ink); color: var(--cream); }
.pf-sec.green { background: var(--green-dd); color: var(--cream); }
.pf-sec.alt { background: var(--cream2); }

.pf-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-d);
}
.dark .pf-label, .green .pf-label { color: var(--accent); }
.pf-label::after {
  content: "";
  flex: 1;
  max-width: 260px;
  height: 1px;
  background: currentColor;
  opacity: .5;
}
.pf-label i {
  order: 2;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: grid; place-items: center;
  font-style: normal;
  font-size: .8rem;
  letter-spacing: 0;
}

.pf-head { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: end; margin: 26px 0 64px; }
.pf-head .big {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4.5rem, 12vw, 9rem);
  line-height: .8;
  letter-spacing: -.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--green);
}
.dark .pf-head .big, .green .pf-head .big { -webkit-text-stroke-color: var(--accent); }
.pf-head h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); margin-bottom: 12px; }
.pf-head p { color: var(--muted-d); font-size: 1.05rem; max-width: 56ch; }
.dark .pf-head p, .green .pf-head p { color: var(--muted); }

/* ---------- Bloco de projeto (texto + mídia) ---------- */
.pf-project {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  padding: 56px 0;
  border-top: 1px solid var(--line-d);
}
.dark .pf-project, .green .pf-project { border-top-color: var(--line); }
.pf-project:first-of-type { border-top: 0; padding-top: 0; }
.pf-info { align-self: start; position: sticky; top: 110px; }
.pf-info .seg { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-d); font-weight: 600; }
.dark .pf-info .seg, .green .pf-info .seg { color: var(--accent); }
.pf-info h3 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin: 10px 0 14px; }
.pf-info h3 .serif { font-weight: 400; }
.pf-stat { display: flex; flex-direction: column; gap: 4px; margin: -2px 0 16px; }
.pf-stat strong { font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 3.4vw, 2.6rem); line-height: 1; letter-spacing: -.03em; color: var(--accent); white-space: nowrap; }
.pf-stat span { font-size: .95rem; color: var(--muted-d); }
.dark .pf-stat span, .green .pf-stat span { color: var(--muted); }
.pf-info p { color: var(--muted-d); font-size: .98rem; margin-bottom: 18px; }
.dark .pf-info p, .green .pf-info p { color: var(--muted); }
.pf-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.pf-tags span {
  font-size: .76rem;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 100px;
  border: 1px solid var(--line-d);
  color: var(--green-d);
}
.dark .pf-tags span, .green .pf-tags span { border-color: var(--line); color: var(--cream); }
.pf-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--green-d);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
}
.dark .pf-link, .green .pf-link { color: var(--cream); }
.pf-link:hover { color: var(--accent-d); }

/* ---------- Celular com vídeo ---------- */
.reels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.reels.few { grid-template-columns: repeat(var(--n), 1fr); max-width: calc(var(--n) * 200px); }
.reel { margin: 0; }
.reel figcaption { margin-top: 14px; font-size: .86rem; line-height: 1.35; }
.reel figcaption b { display: block; font-weight: 600; }
.reel figcaption span { color: var(--muted-d); font-size: .8rem; }
.dark .reel figcaption span, .green .reel figcaption span { color: var(--muted); }

.phone {
  position: relative;
  display: block;
  width: 100%;
  padding: 7px;
  border-radius: 30px;
  background: #0A0C07;
  border: 0;
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .55), inset 0 0 0 1.5px rgba(255, 255, 255, .09);
  cursor: pointer;
  text-align: left;
  transition: transform .35s var(--ease);
}
.phone:hover { transform: translateY(-6px) rotate(-1deg); }
.phone .screen {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  overflow: hidden;
  background: #222 center / cover no-repeat;
}
.phone video, .phone .screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone .play {
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 7px 12px 7px 10px;
  border-radius: 100px;
  background: rgba(20, 24, 13, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--cream);
  font-size: .72rem;
  font-weight: 600;
  pointer-events: none;
  transition: background .2s;
}
.phone:hover .play { background: var(--accent); color: var(--ink); }
.phone .play svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- Marca (grade estilo apresentação) ---------- */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: auto;
  gap: 14px;
}
.brand-grid .tile {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 0;
  padding: 0;
  background: var(--cream2);
  cursor: zoom-in;
  aspect-ratio: 4 / 5;
}
.brand-grid .tile.big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.brand-grid .tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.brand-grid .tile:hover img { transform: scale(1.04); }
.brand-grid .tile.reel-tile { background: transparent; cursor: default; aspect-ratio: auto; display: grid; place-items: center; }
.brand-grid .tile.reel-tile .phone { max-width: 210px; }

.ads-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ad { margin: 0; }
.ad button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
  aspect-ratio: 4 / 5;
  box-shadow: 0 24px 40px -30px rgba(44, 58, 28, .5);
}
.ad img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.ad button:hover img { transform: scale(1.04); }
.ad figcaption { margin-top: 12px; font-size: .86rem; line-height: 1.35; }
.ad figcaption b { display: block; font-weight: 600; }
.ad figcaption span { color: var(--muted-d); font-size: .8rem; }

/* ---------- Sites: navegador + celular ---------- */
.sites { display: grid; grid-template-columns: repeat(2, 1fr); gap: 72px 44px; }
.site { margin: 0; }
.site .shot { position: relative; padding: 0 22px 30px 0; }
.browser {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 60px -34px rgba(20, 24, 13, .5), 0 0 0 1px var(--line-d);
}
.browser .bar {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: #ECE7D8;
}
.browser .bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(20, 24, 13, .18); }
.browser .bar i:first-child { background: var(--accent); }
.browser .bar span {
  margin-left: 10px;
  flex: 1;
  max-width: 70%;
  font-size: .7rem;
  color: var(--muted-d);
  background: rgba(255, 255, 255, .7);
  border-radius: 100px;
  padding: 3px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.mini-phone {
  position: absolute;
  right: 0; bottom: 0;
  width: 23%;
  padding: 4px;
  border-radius: 18px;
  background: #0A0C07;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .55);
}
.mini-phone img { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: 14px; }
.site figcaption { margin-top: 10px; }
.site .seg { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-d); font-weight: 600; }
.site h3 { font-size: 1.45rem; margin: 6px 0 8px; }
.site p { color: var(--muted-d); font-size: .95rem; max-width: 52ch; }
.site .pf-link { margin-top: 12px; }
.site .soon { display: inline-block; margin-top: 12px; font-size: .82rem; color: var(--muted-d); }

/* ---------- Produtos digitais ---------- */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.product {
  margin: 0;
  border-radius: var(--radius);
  background: rgba(243, 239, 226, .05);
  border: 1px solid var(--line);
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
}
.product .media { display: flex; justify-content: center; gap: 14px; margin-bottom: 26px; min-height: 0; }
.product .media .phone, .product .media .mini { width: 46%; max-width: 190px; }
.product .media .mini {
  padding: 6px;
  border-radius: 26px;
  background: #0A0C07;
  box-shadow: 0 26px 50px -26px rgba(0, 0, 0, .6), inset 0 0 0 1.5px rgba(255, 255, 255, .09);
}
.product .media .mini img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; object-position: top; border-radius: 20px; }
.product .seg { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.product h3 { font-size: 1.5rem; margin: 8px 0 10px; }
.product p { color: var(--muted); font-size: .95rem; }
.product .pf-link { align-self: flex-start; margin-top: auto; padding-top: 16px; border-bottom: 0; }
.product .pf-link span { border-bottom: 1.5px solid var(--accent); }

/* ---------- Lightbox ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 56px 16px 24px;
  background: rgba(10, 12, 7, .92);
}
.lb.open { display: flex; }
.lb-body { max-width: min(92vw, 980px); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb video { max-height: calc(100vh - 140px); max-width: 100%; aspect-ratio: 9 / 16; border-radius: 18px; background: #000; }
.lb img { max-height: calc(100vh - 140px); max-width: 100%; border-radius: 12px; object-fit: contain; }
.lb-cap { color: var(--cream); font-size: .9rem; text-align: center; }
.lb-cap span { color: var(--muted); }
.lb-close {
  position: absolute;
  top: 14px; right: 16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(243, 239, 226, .08);
  color: var(--cream);
  font-size: 1.4rem;
  line-height: 1;
}
.lb-close:hover { background: var(--accent); color: var(--ink); }
body.lb-on { overflow: hidden; }

/* ---------- Responsivo ---------- */
@media (max-width: 1020px) {
  .pf-project { grid-template-columns: 1fr; gap: 32px; }
  .pf-info { position: static; max-width: 620px; }
  .products { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .pf-index { grid-template-columns: 1fr 1fr; }
  .pf-do { grid-template-columns: 1fr 1fr; border-top: 0; }
  .pf-do > div, .pf-do > div + div { padding: 22px 0 18px; border-left: 0; border-top: 1.5px solid var(--ink); }
  .pf-do > div:nth-child(even) { padding-left: 20px; }
  .sites { grid-template-columns: 1fr; gap: 64px; }
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .ads-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .pf-sec { padding: 80px 0; }
  .pf-head { grid-template-columns: 1fr; gap: 6px; margin-bottom: 40px; }
  .pf-head .big { font-size: 4.6rem; }
  .pf-index { margin-top: 36px; gap: 10px; }
  .pf-index a { padding: 14px 14px 16px; }
  .pf-index b { font-size: 1rem; }
  .pf-do { grid-template-columns: 1fr; }
  .pf-do > div:nth-child(even) { padding-left: 0; }
  /* vídeos em carrossel lateral no celular */
  .reels, .reels.few {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 62%;
    max-width: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    margin: 0 -24px;
    padding: 4px 24px 12px;
    scrollbar-width: none;
  }
  .reels::-webkit-scrollbar { display: none; }
  .reel { scroll-snap-align: center; }
  .brand-grid { gap: 10px; }
  .ads-grid { gap: 12px; }
  .site .shot { padding: 0 14px 22px 0; }
  .mini-phone { width: 27%; border-radius: 14px; padding: 3px; }
  .mini-phone img { border-radius: 11px; }
  .products { grid-template-columns: 1fr; }
  .lb video { max-height: calc(100vh - 150px); }
}
@media (prefers-reduced-motion: reduce) {
  .phone, .phone:hover, .ad img, .brand-grid .tile img { transition: none; transform: none; }
}
