/* Cartão de visita 3D — gabrueldev.com/card/
   Mesma marca do portfólio (azul #2f5bff, Bricolage + Poppins), mas em
   fundo noturno: o vidro fosco só aparece bem com luz colorida atrás. */

:root {
  --bg: #070a1a;
  --bg-2: #0c1130;
  --text: #f4f6ff;
  --text-soft: rgba(232, 236, 255, 0.72);
  --text-mute: rgba(232, 236, 255, 0.5);
  --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-hover: rgba(255, 255, 255, 0.11);
  --brand: #2f5bff;
  --brand-deep: #1c3fd9;
  --brand-soft: #8fa6ff;
  --ok: #3ddc97;
  --font-display: "Bricolage Grotesque", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-sans: "Poppins", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--brand); color: #fff; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 10px 14px; border-radius: 10px;
  background: var(--brand); color: #fff; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- topo ---------- */
.top {
  position: absolute; inset: 0 0 auto; z-index: 3;
  display: flex; justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 16px 0;
}
.brand {
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--text-soft); text-decoration: none;
  transition: color 0.3s var(--ease);
}
.brand b { font-weight: 600; color: var(--text); }
.brand:hover { color: var(--text); }

/* ---------- palco do cartão ---------- */
.stage {
  position: relative;
  height: min(60svh, 560px);
  min-height: 380px;
  overflow: hidden;
}
/* luz de fundo em CSS: aparece antes do WebGL e some por baixo dele */
.stage-glow {
  position: absolute; inset: 0;
  background: var(--bg);
}
.stage canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: pan-y;          /* rolar a página continua funcionando */
  cursor: grab;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.stage canvas.is-ready { opacity: 1; }
.stage canvas.is-dragging { cursor: grabbing; }
.stage canvas:focus-visible { outline-offset: -6px; border-radius: 18px; }
/* fundo da página emendado com o palco */
.stage::after {
  content: ""; position: absolute; inset: auto 0 0; height: 90px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hint {
  position: absolute; left: 0; right: 0; bottom: 26px; z-index: 2;
  margin: 0; text-align: center;
  font-size: 13px; color: var(--text-mute);
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.hint.is-gone { opacity: 0; }

/* sem WebGL: a frente do cartão (prata) vira imagem */
.stage-fallback {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: min(86vw, 480px); height: auto;
  transform: translate(-50%, -50%);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

/* ---------- informações ---------- */
.info {
  position: relative; z-index: 2;
  max-width: 560px;
  margin: -24px auto 0;
  padding: 0 16px 56px;
}
.intro { text-align: center; }
.info h1 {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 8vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.role { margin: 0; font-size: 1.05rem; font-weight: 500; color: var(--brand-soft); }
.pitch { margin: 14px auto 0; max-width: 30em; color: var(--text-soft); font-size: 0.98rem; }

.actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 28px 0 0;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.95rem; font-weight: 500; text-decoration: none;
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { background: var(--glass-hover); border-color: rgba(255, 255, 255, 0.18); }
.btn:active { transform: scale(0.98); }
.btn-primary {
  grid-column: 1 / -1;
  min-height: 56px;
  font-size: 1rem; font-weight: 600;
  background: var(--brand);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 14px 34px -12px rgba(47, 91, 255, 0.8);
}
.btn-wide { grid-column: 1 / -1; }
.btn-primary:hover { background: var(--brand-deep); border-color: rgba(255, 255, 255, 0.24); }

.block { margin-top: 44px; }
.block h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
/* sites que eu fiz: print + nome; vira link quando o site estiver no ar */
.sites { display: grid; gap: 14px; }
.site {
  display: block; overflow: hidden;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: border-color 0.3s var(--ease), transform 0.4s var(--ease);
}
.site-shot { position: relative; aspect-ratio: 1000 / 454; overflow: hidden; background: var(--bg-2); }
.site-shot img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: top;
  transition: transform 0.7s var(--ease);
}
.site-info { position: relative; padding: 14px 16px 16px; }
.site h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.site p { margin: 2px 0 10px; font-size: 0.9rem; color: var(--text-soft); }
.site-tag {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 0.78rem; color: var(--text-soft);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
}
a.site .site-info::after {
  content: ""; position: absolute; right: 16px; top: 16px;
  width: 20px; height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.6;
}
@media (hover: hover) {
  a.site:hover { border-color: rgba(255, 255, 255, 0.2); }
  a.site:hover .site-shot img { transform: scale(1.03); }
}

.foot {
  padding: 0 16px max(28px, env(safe-area-inset-bottom));
  text-align: center; font-size: 13px; color: var(--text-mute);
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

/* entrada das informações: sobe junto com o cartão */
.rise { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.is-in .rise { opacity: 1; transform: none; }
.is-in .rise:nth-child(2) { transition-delay: 0.08s; }
.is-in .rise:nth-child(3) { transition-delay: 0.16s; }
.is-in .rise:nth-child(4) { transition-delay: 0.24s; }

@media (min-width: 900px) {
  .stage { height: min(78svh, 760px); }
}

@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
  .stage canvas { transition: none; }
  .site, .site-shot img { transition: none; }
}

/* ?og=1 — só para gerar a imagem de prévia do link (card/og.jpg) */
.og-shot .stage { height: 100svh; min-height: 0; }
.og-shot .stage canvas { pointer-events: none; }
.og-shot .stage::after, .og-shot .hint, .og-shot .top, .og-shot .info, .og-shot .foot { display: none; }
