/* Aprove Petgraf: art approval pages. Petgraf brand: Raleway, coral #dd5c63, red #bb404d, dark #39312d, cream #faf6f0.
   Every piece opens with "aproximar para aprovar": it comes toward the screen, straightens and faces the reader. */
:root { --coral: #dd5c63; --vermelho: #bb404d; --escuro: #39312d; --creme: #faf6f0; --linha: #e6ddd2; --suave: #72675f;
  --fonte: Raleway, "Helvetica Neue", Arial, sans-serif; }
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; overflow-x: clip; }
body { margin: 0; background: var(--creme); color: var(--escuro); font: 400 16px/1.65 var(--fonte); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--vermelho); outline-offset: 3px; }

/* top bar */
.ap-topo { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--creme) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linha); }
.ap-topo img { width: 132px; }
.ap-topo span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--vermelho); }

/* opening */
.ap-abertura { max-width: 1180px; margin: 0 auto; padding: 120px clamp(16px, 4vw, 40px) 48px; }
.ap-linha { display: flex; justify-content: space-between; gap: 16px; margin: 0 0 32px; padding: 12px 0; border-top: 1px solid var(--linha); border-bottom: 1px solid var(--linha);
  font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--suave); }
.ap-linha span:first-child { color: var(--vermelho); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ap-abertura h1 { margin: 0 0 18px; font-size: clamp(36px, 5.4vw, 64px); line-height: 1.05; font-weight: 600; letter-spacing: -.02em; }
.ap-abertura h1 em { font-style: normal; color: var(--vermelho); }
.ap-abertura p { max-width: 62ch; margin: 0 0 14px; font-size: 18px; color: var(--suave); }
.ap-indice { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.ap-indice a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--linha); border-radius: 99px;
  text-decoration: none; font-size: 14px; font-weight: 600; background: #fff; }
.ap-indice b { color: var(--vermelho); font-size: 12px; letter-spacing: .08em; }

/* one piece: a tall section with a pinned screen; the story runs with the scroll */
.ap-sec { position: relative; height: 320svh; border-top: 1px solid var(--linha); }
.ap-pin { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: minmax(300px, 400px) 1fr; overflow: hidden; }
.ap-texto { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 14px; padding: 104px clamp(16px, 3vw, 36px) 28px; background: var(--creme); }
.ap-num { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--vermelho); }
.ap-texto h2 { margin: 0; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.12; font-weight: 600; letter-spacing: -.015em; }
.ap-texto > p { margin: 0; color: var(--suave); }
.ap-confira { margin: 4px 0 0; padding: 14px 0 0; border-top: 1px solid var(--linha); list-style: none; display: grid; gap: 8px; font-size: 14px; }
.ap-confira li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; }
.ap-confira li::before { content: ""; width: 14px; height: 14px; margin-top: 4px; border: 1.5px solid var(--vermelho); border-radius: 4px; }
.ap-acoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 12px; }
.ap-botao { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; border-radius: 99px; border: 1.5px solid var(--vermelho);
  font-size: 15px; font-weight: 700; text-decoration: none; color: var(--vermelho); background: #fff; }
.ap-botao--aprovar { background: var(--vermelho); color: #fff; }
@media (hover: hover) and (pointer: fine) { .ap-botao:hover { background: var(--coral); border-color: var(--coral); color: #fff; } }

.ap-palco { position: relative; perspective: 1600px; }
.ap-obj { position: absolute; inset: 6% 4%; display: grid; place-items: center; transform-style: preserve-3d; }
.ap-zoom { position: absolute; inset: 0; display: grid; place-items: center; transform-style: preserve-3d;
  transform: translate(calc(var(--zx, 0) * 1px), calc(var(--zy, 0) * 1px)) scale(var(--zs, 1)); }
.ap-veu { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: var(--k, 0); background: rgba(28, 24, 20, .84);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ap-perto .ap-palco { z-index: 4; }

/* faces */
.ap-face { position: absolute; inset: 0; background: #fff center / 100% 100% no-repeat; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ap-peca { position: relative; transform-style: preserve-3d; }
.ap-retrato { height: 100%; max-width: 100%; }
.ap-paisagem { width: 100%; max-height: 100%; }
.ap-sombra { box-shadow: 0 30px 50px -30px rgba(40, 30, 15, .5), 0 0 0 .5px rgba(80, 70, 60, .18); }

/* frente e verso: a card that turns, then front and back side by side */
.ap-carta { position: absolute; inset: 0; transform-style: preserve-3d; }
.ap-carta .ap-verso { transform: rotateY(180deg); }
.ap-copia { position: absolute; inset: 0; opacity: 0; }

/* folded pieces (Duo, Trio) */
.ap-dobra { position: relative; display: grid; transform-style: preserve-3d; }
.ap-painel { position: relative; transform-style: preserve-3d; }
.ap-painel .ap-face { background-repeat: no-repeat; }
.ap-painel .ap-dentro { transform: rotateY(180deg); }
.ap-plano { position: absolute; inset: 0; opacity: 0; background: #fff center / 100% 100% no-repeat; }
.ap-painel .ap-face::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, rgb(45 30 20 / var(--sl, 0)) 0, rgb(45 30 20 / 0) 3%), linear-gradient(to left, rgb(45 30 20 / var(--sr, 0)) 0, rgb(45 30 20 / 0) 3%); }

/* passport */
.ap-livro { position: relative; transform-style: preserve-3d; transform: translateX(-25%); }
.ap-folha { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; transform-style: preserve-3d; transform-origin: left center; }
.ap-folha .ap-face { background-size: cover; }
.ap-folha .ap-v { transform: rotateY(180deg); }

/* end */
.ap-fim { max-width: 1180px; margin: 0 auto; padding: 72px clamp(16px, 4vw, 40px) 96px; border-top: 1px solid var(--linha); }
.ap-fim h2 { margin: 0 0 12px; font-size: clamp(26px, 3vw, 36px); font-weight: 600; }
.ap-fim p { max-width: 62ch; margin: 0 0 12px; color: var(--suave); }
.ap-rodape { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; justify-content: space-between; max-width: 1180px; margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 40px) 40px; border-top: 1px solid var(--linha); font-size: 13px; color: var(--suave); }
.ap-rodape img { width: 120px; }

@media (max-width: 860px) {
  .ap-pin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .ap-texto { position: static; z-index: auto; padding: 84px 16px 8px; gap: 8px; }   /* the buttons then sit on the pinned screen, over the veil */
  .ap-texto > p, .ap-confira { display: none; }
  .ap-texto h2 { font-size: 24px; }
  .ap-acoes { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 6; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    opacity: var(--acoes, 0); pointer-events: var(--acoes-pe, none); transform: translateY(calc((1 - var(--acoes, 0)) * 12px)); }
  .ap-botao { min-height: 46px; padding: 10px 12px; font-size: 14px; }
  .ap-obj { inset: 2% 4% 12%; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-sec { height: auto; }
  .ap-pin { position: relative; height: auto; min-height: 100svh; }
  .ap-acoes { position: static; opacity: 1; pointer-events: auto; transform: none; }
}

/* ---------- effects (08/11): contact shadow, card finishes, passport staples and gutter, envelope, spec callouts ---------- */
.ap-peca::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: -7%; height: 10%; transform: translateZ(-2px); pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(40, 30, 15, .28), transparent 72%); }
.ap-cartao .ap-face { border-radius: 7.143% / 12.5%; overflow: hidden; box-shadow: 0 0 0 .5px rgba(60, 50, 40, .25), 0 26px 40px -26px rgba(40, 30, 15, .55); }
.ap-uv { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; mix-blend-mode: screen;
  background: linear-gradient(110deg, rgba(255,255,255,0) calc(var(--luz, 50) * 1% - 22%), rgba(255,255,255,.7) calc(var(--luz, 50) * 1%), rgba(255,255,255,0) calc(var(--luz, 50) * 1% + 22%)); }
.ap-filme { position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background: radial-gradient(120% 100% at 30% 20%, rgba(255,255,255,.0), rgba(60,50,40,.08)); }
.ap-folha .ap-face::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, rgb(45 30 20 / .16) 0, rgb(45 30 20 / .05) 3%, rgb(45 30 20 / 0) 8%); }
.ap-folha .ap-v::after { background: linear-gradient(to left, rgb(45 30 20 / .16) 0, rgb(45 30 20 / .05) 3%, rgb(45 30 20 / 0) 8%); }
.ap-capa .ap-face { box-shadow: 0 0 0 .5px rgba(30, 30, 30, .3); }
.ap-capa .ap-face:not(.ap-v)::before { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.16) 46%, transparent 62%); }
.ap-grampos { position: absolute; left: 50%; top: 0; bottom: 0; width: 7px; translate: -50% 0; opacity: 0; transform: translateZ(3px); pointer-events: none;
  background: linear-gradient(90deg, #6f757d, #fbfcfd 42%, #c9cdd2 60%, #7d838b) 0 22% / 100% 13% no-repeat, linear-gradient(90deg, #6f757d, #fbfcfd 42%, #c9cdd2 60%, #7d838b) 0 78% / 100% 13% no-repeat;
  border-radius: 3px; filter: drop-shadow(1px 2px 1.5px rgba(0,0,0,.45)); }
.ap-env { position: absolute; inset: 0; transform-style: preserve-3d; }
.ap-env-frente { transform: translateZ(2px); box-shadow: 0 0 0 .5px rgba(60,50,40,.2); }
.ap-env-costas { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(180deg) translateZ(2px); }
.ap-env-costas .ap-face { transform: translateZ(1px); box-shadow: 0 0 0 .5px rgba(60,50,40,.2); }
.ap-env-folha { position: absolute; left: 4%; right: 4%; top: 6%; height: 90%; transform: translateY(-78%); background: #fff top / 100% auto no-repeat;
  box-shadow: 0 0 0 .5px rgba(60,50,40,.25); }
.ap-env-boca { position: absolute; left: 0; right: 0; top: 0; height: 34%; transform: translateZ(1.5px); pointer-events: none;
  background: linear-gradient(rgba(40, 30, 15, .22), rgba(40, 30, 15, 0) 45%); }
.ap-env-aba { position: absolute; left: 0; right: 0; top: 0; height: 34%; transform-origin: 50% 0; transform-style: preserve-3d; z-index: 2;
  background: var(--aba); clip-path: polygon(0 0, 100% 0, 100% 18%, 53% 100%, 47% 100%, 0 18%); transform: rotateX(-178deg);
  box-shadow: inset 0 -12px 18px -12px rgba(40,30,15,.25); }
.ap-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin: 4px 0 0; padding: 0; }
.ap-specs div { padding: 8px 0; border-top: 1px solid var(--linha); }
.ap-specs dt { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--vermelho); }
.ap-specs dd { margin: 2px 0 0; font-size: 13px; line-height: 1.4; }
.ap-nota { position: absolute; left: var(--x); top: var(--y); z-index: 5; max-width: 220px; padding: 10px 12px; border-radius: 10px; background: #fff;
  box-shadow: 0 12px 26px -14px rgba(40, 30, 15, .45), 0 0 0 1px var(--linha); opacity: 0; pointer-events: none; font-size: 13px; line-height: 1.35; }
.ap-nota strong { display: block; font-weight: 800; color: var(--vermelho); }
.ap-linhas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; overflow: visible; }
.ap-linhas path { stroke: var(--vermelho); stroke-width: 1.5; fill: none; }
.ap-linhas circle { fill: var(--vermelho); stroke: #fff; stroke-width: 2; }
@media (max-width: 860px) { .ap-specs { display: none; } .ap-nota { max-width: 160px; padding: 7px 9px; font-size: 11.5px; } .ap-perto .ap-nota, .ap-perto .ap-linhas { display: none; } }

.ap-cartao--retas .ap-face { border-radius: 0; }
/* answers: saved per piece, sent together at the end */
.ap-topo .ap-conta { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--escuro); text-decoration: none; letter-spacing: .02em; text-transform: none;
  padding: 8px 12px; border-radius: 99px; border: 1px solid var(--linha); background: #fff; }
.ap-estado { min-height: 1.4em; margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--vermelho); }
.ap-estado[data-estado="aprovada"] { color: #2f6b4a; }
.ap-sec[data-estado="aprovada"] .ap-botao--aprovar { background: #2f6b4a; border-color: #2f6b4a; }
.ap-resumo { list-style: none; margin: 20px 0 24px; padding: 0; display: grid; gap: 0; max-width: 720px; }
.ap-resumo li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--linha); font-size: 15px; }
.ap-resumo li b { font-weight: 600; }
.ap-resumo li span { font-size: 13px; font-weight: 700; color: var(--suave); }
.ap-resumo li[data-estado="aprovada"] span { color: #2f6b4a; }
.ap-resumo li[data-estado="ajuste"] span { color: var(--vermelho); }
.ap-resumo li em { grid-column: 1 / -1; font-style: normal; font-size: 14px; color: var(--suave); }
.ap-resumo li a { color: inherit; }
.ap-enviar[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.ap-dialogo { width: min(520px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(40, 30, 15, .45); font: inherit; color: var(--escuro); }
.ap-dialogo::backdrop { background: rgba(57, 49, 45, .55); }
.ap-dialogo h2 { margin: 0 0 4px; font-size: 22px; font-weight: 600; }
.ap-dialogo p { margin: 0 0 16px; color: var(--suave); font-size: 14px; }
.ap-dialogo label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.ap-dialogo textarea { display: block; width: 100%; min-height: 120px; padding: 12px; border: 1px solid var(--linha); border-radius: 10px; font: inherit; font-size: 16px; resize: vertical; box-sizing: border-box; }
.ap-dialogo textarea:focus-visible { outline: 2px solid var(--vermelho); outline-offset: 2px; }
.ap-dialogo .ap-acoes-d { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.ap-fim, .ap-sec { scroll-margin-top: 72px; }

.ap-pilha .ap-face { box-shadow: 1px 2px #d9d2c4, 2px 4px #f5efe4, 3px 6px #d9d2c4, 4px 8px #efe8da, 10px 18px 26px rgba(60, 50, 35, .22); }

/* carbonless copies */
.ap-via { position: absolute; inset: 0; transform-origin: 50% 0; transform-style: preserve-3d; }
.ap-via .ap-face { box-shadow: 0 0 0 .5px rgba(60, 50, 40, .25), 0 18px 30px -18px rgba(40, 30, 15, .45); }
.ap-via-2 .ap-face { filter: saturate(.85) brightness(.985); }

/* one paper shadow for every piece (09/11): soft, close to the paper, no floating ellipse under the piece */
:root { --sombra-papel: 0 1px 2px rgba(40, 30, 15, .10), 0 12px 26px -14px rgba(40, 30, 15, .30); --borda-papel: 0 0 0 .5px rgba(80, 70, 60, .16); }
.ap-peca::after { display: none; }
.ap-sombra { box-shadow: var(--borda-papel), var(--sombra-papel); }
.ap-cartao .ap-face, .ap-via .ap-face { box-shadow: var(--borda-papel), var(--sombra-papel); }
.ap-pilha .ap-face { box-shadow: 1px 2px #ddd6c9, 2px 4px #f6f1e7, 3px 6px #ddd6c9, var(--sombra-papel); }

/* thick business cards (32 pt), as in american-version: the faces sit at ±t/2 and 13 card-shaped slices fill the thickness,
   so the plain paper edge follows straight sides and rounded corners when the card turns */
.ap-grosso { transform-style: preserve-3d; }
.ap-grosso > .ap-cartao-face:not(.ap-verso) { transform: translateZ(calc(var(--t, 8px) / 2)); }
.ap-grosso > .ap-cartao-face.ap-verso { transform: rotateY(180deg) translateZ(calc(var(--t, 8px) / 2)); }
.ap-copia.ap-grosso { transform-style: preserve-3d; }
.ap-fatia { position: absolute; inset: 0; border-radius: 7.143% / 12.5%; background: linear-gradient(90deg, #e4ded2, #f6f3ec 50%, #e4ded2);
  transform: translateZ(calc((var(--t, 8px) - 1.2px) * (var(--k) / 12 - .5))); }
.ap-fatia:first-child, .ap-fatia:nth-child(13) { background: #e9e4d9; }
.ap-cartao--retas .ap-fatia { border-radius: 0; }

/* bi-fold ending: the two spreads lie flat, inside above, outside below */
.ap-esp { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; opacity: 0; z-index: 2; box-shadow: var(--borda-papel), var(--sombra-papel); }
.ap-esp i { background: #fff center / 100% 100% no-repeat; }
.ap-esp i + i { box-shadow: inset 1px 0 rgba(60, 50, 40, .14); }
/* no callouts: the specs say it in words */
.ap-nota, .ap-linhas { display: none !important; }
/* phone ending: frosted glass instead of grey */
.ap-veu { background: rgba(250, 246, 240, .62) !important; -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1); }
@media (max-width: 860px) {
  /* a tiny spec line under the name of each material */
  .ap-texto .ap-specs { display: flex !important; flex-wrap: wrap; gap: 2px 0; margin: 2px 0 0; font-size: 11.5px; line-height: 1.35; color: var(--suave); }
  .ap-texto .ap-specs div { display: inline; padding: 0; border: 0; }
  .ap-texto .ap-specs dt { display: none; }
  .ap-texto .ap-specs dd { display: inline; margin: 0; font-size: inherit; }
  .ap-texto .ap-specs div + div dd::before { content: " · "; }
  .ap-perto .ap-texto .ap-specs { opacity: 0; }
}

/* card stock, not thin paper: a light shade at the fold only */
.ap-folha .ap-face::after { background: linear-gradient(to right, rgb(45 30 20 / .07) 0, rgb(45 30 20 / .02) 1.6%, rgb(45 30 20 / 0) 3.5%) !important; }
.ap-folha .ap-v::after { background: linear-gradient(to left, rgb(45 30 20 / .07) 0, rgb(45 30 20 / .02) 1.6%, rgb(45 30 20 / 0) 3.5%) !important; }
.ap-painel .ap-face::after { opacity: .45; }
