/* ==========================================================================
   BestPDFInTheWorld — Neobrutalism Tilt
   Layout com elementos inclinados, neobrutalism assumido, responsivo.
   ========================================================================== */

/* --- RESET & VARIAVEIS ------------------------------------------------ */
:root {
  --yellow: #FDC800;
  --ink: #1C293C;
  --blue: #432DD7;
  --pink: #FF6B9D;
  --green: #16A34A;
  --coral: #EF4D2E;
  --bg: #FBFBF9;
  --sh: 6px 6px 0 var(--ink);
  --sh-lg: 10px 10px 0 var(--ink);
  --br: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  font-synthesis: none;
}

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* --- HEADER (bar) ----------------------------------------------------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 3px solid var(--ink);
  transform: rotate(-0.3deg);
  margin-bottom: -1px;
}
.bar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 12px;
}
.bar .lf {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 800;
  font-size: 18px; transform: rotate(-1deg);
}
.bar .lf svg { width: 28px; height: 28px; flex-shrink: 0; }
.bar .lf .sub {
  color: var(--blue); font-weight: 700; font-size: 12px;
  background: var(--yellow); padding: 2px 8px;
  border: 2px solid var(--ink); transform: rotate(2deg);
}

/* Navegação desktop */
.navwrap { display: flex; align-items: center; gap: 8px; }
.navlinks { display: flex; align-items: center; gap: 4px; }
.navlinks a {
  text-decoration: none; color: var(--ink); font-weight: 600;
  font-size: 14px; padding: 6px 14px; border-radius: var(--br);
  border: 2px solid transparent; transition: .12s;
}
.navlinks a:hover { border-color: var(--ink); background: var(--yellow); }
.navlinks a.lang {
  font-weight: 700; font-size: 12px; text-transform: uppercase;
  background: var(--yellow); border: 2px solid var(--ink);
  padding: 4px 10px; transform: rotate(2deg);
}

/* Botão Entrar */
.btn-entrar {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 13px;
  padding: 7px 16px; border: 3px solid var(--ink); border-radius: var(--br);
  background: #fff; color: var(--ink); cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(1deg); transition: .12s;
  text-decoration: none; white-space: nowrap;
}
.btn-entrar:hover {
  transform: rotate(0deg) translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink);
  background: var(--yellow);
}

/* Mobile menu hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 4px; cursor: pointer;
  background: none; border: none; padding: 8px;
}
.hamburger span {
  display: block; width: 24px; height: 3px; background: var(--ink);
  border-radius: 2px; transition: .2s;
}

@media (max-width: 768px) {
  .navlinks { display: none; }
  .hamburger { display: flex; }
  .navwrap.mobile-open .navlinks {
    display: flex; flex-direction: column; position: absolute;
    top: 68px; left: 0; right: 0; background: var(--bg);
    border-bottom: 3px solid var(--ink); padding: 12px; gap: 6px;
    z-index: 100;
  }
  .navwrap.mobile-open .navlinks a { display: block; padding: 10px 14px; }
}

/* --- HERO ------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 3px solid var(--ink);
  padding: 48px 0 36px;
  background: linear-gradient(180deg, var(--bg) 0%, #f5f3eb 100%);
}
.hero .wrap { max-width: 960px; text-align: center; }
.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.1; font-weight: 800; margin: 0;
  transform: rotate(-0.5deg);
}
.hero h1 .v {
  color: var(--blue); display: inline-block;
  transform: rotate(2deg); background: var(--yellow);
  padding: 0 8px; border: 3px solid var(--ink);
}
.hero p {
  max-width: 620px; margin: 16px auto 0;
  color: var(--ink); opacity: .7; font-size: clamp(1rem, 1.3vw, 1.15rem);
  transform: rotate(0.3deg);
}
.hero .priv {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--yellow); border: 3px solid var(--ink);
  padding: 8px 16px; transform: rotate(-1deg);
  box-shadow: 3px 3px 0 var(--ink);
}

/* --- BANNER DE APP ---------------------------------------------------- */
.app-banner {
  background: var(--yellow); border-bottom: 3px solid var(--ink);
  padding: 14px 0; transform: rotate(-0.5deg);
  margin-bottom: -2px;
}
.app-banner .wrap {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  flex-wrap: wrap;
}
.app-banner p { margin: 0; font-weight: 600; font-size: 14px; }
.app-banner button {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  background: var(--ink); color: var(--yellow); border: none;
  padding: 8px 18px; border-radius: var(--br); cursor: pointer;
  box-shadow: 3px 3px 0 rgba(0,0,0,.3);
  transform: rotate(1deg); transition: .12s;
}
.app-banner button:hover { transform: rotate(0deg) translate(1px,1px); }
.app-banner .close-banner {
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: var(--ink); padding: 4px;
}

/* --- GRID DE FERRAMENTAS ---------------------------------------------- */
section { padding: 40px 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .grid { grid-template-columns: 1fr; } }

/* Cartões inclinados */
.tool {
  border: 3px solid var(--ink); border-radius: var(--br);
  background: #fff; padding: 22px 18px; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative; overflow: hidden;
  box-shadow: var(--sh);
  text-align: left;
}
.tool:nth-child(odd) { transform: rotate(-1deg); }
.tool:nth-child(even) { transform: rotate(1.5deg); }
.tool:nth-child(3n) { transform: rotate(-1.8deg); }
.tool:nth-child(5n) { transform: rotate(2deg); }

.tool:hover {
  transform: rotate(0deg) scale(1.02) translateY(-4px);
  box-shadow: 10px 10px 0 var(--ink);
  border-color: var(--blue);
}
.tool:active { transform: rotate(0deg) scale(.98); }

.tool .ico {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--yellow); border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.tool .ico svg {
  width: 22px; height: 22px; stroke: var(--ink); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}
.tool h3 {
  margin: 0; font-size: 16px; font-weight: 700;
  font-family: 'Space Grotesk', sans-serif; pointer-events: none;
}
.tool p {
  margin: 6px 0 0; font-size: 13px; color: var(--ink); opacity: .65;
  line-height: 1.45; pointer-events: none;
}

/* Badge PRO inclinado */
.tool .tag {
  position: absolute; top: 12px; right: 12px;
  font-size: 11px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  color: var(--ink); background: var(--pink);
  border: 2px solid var(--ink); border-radius: 6px;
  padding: 2px 8px; transform: rotate(3deg); pointer-events: none;
  box-shadow: 2px 2px 0 var(--ink);
}

/* Estado gratuito (compress) */
.tool.free .tag {
  background: var(--green); color: #fff;
  transform: rotate(-2deg);
}

/* Categoria label (washi tape style) */
.cat-h {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 16px; margin: 0 0 14px 4px;
  background: var(--yellow); border: 2px solid var(--ink);
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 var(--ink);
}

/* --- PANEL (ferramenta ativa) ----------------------------------------- */
.panel { display: none; }
.panel.on { display: block; animation: fadeUp .3s ease; }

.back {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 2px solid var(--ink); border-radius: var(--br);
  color: var(--ink); font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 6px 14px; margin-bottom: 18px;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-1deg); transition: .12s;
}
.back:hover {
  transform: rotate(0deg) translate(1px,1px);
  box-shadow: 1px 1px 0 var(--ink);
  background: var(--yellow);
}
.back svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }

.panel h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.panel .pdesc { color: var(--ink); opacity: .7; margin: 8px 0 24px; max-width: 620px; }

/* --- FOOTER ----------------------------------------------------------- */
footer {
  border-top: 3px solid var(--ink); margin-top: 20px;
  padding: 24px 0; transform: rotate(0.5deg);
}
footer .foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; font-size: 13px;
}
footer .foot .brand {
  font-family: 'Space Grotesk', sans-serif; font-weight: 800;
  font-size: 15px;
}
footer a { color: var(--ink); text-decoration: underline; opacity: .5; }
footer a:hover { opacity: 1; }

/* --- ANIMACOES -------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.tool { animation: fadeUp .4s ease both; }
.tool:nth-child(1) { animation-delay: .05s; }
.tool:nth-child(2) { animation-delay: .1s; }
.tool:nth-child(3) { animation-delay: .15s; }
.tool:nth-child(4) { animation-delay: .2s; }

/* --- REDUCED MOTION --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .tool { transform: none !important; }
  .tool:nth-child(odd),
  .tool:nth-child(even),
  .tool:nth-child(3n),
  .tool:nth-child(5n) { transform: none !important; }
  .tool:hover { transform: translateY(-2px) !important; }
  .bar { transform: none !important; }
  .hero h1, .hero p, .hero .priv, .cat-h, .tool .tag,
  .back, footer { transform: none !important; }
}

/* --- UTILIDADES ------------------------------------------------------- */
.muted { color: var(--ink); opacity: .5; }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
