/* Página de links — Thales Rolim
   Estrutura e medidas espelhadas do modelo de referência; roxo trocado pela escala azul do
   Design System Instagram v4. Fonte: Inter Tight (alternativa livre à Stage Grotesk) + Silkscreen. */

:root {
  /* Azul (substitui o roxo do modelo) */
  --p-100: #9fdcfb; /* #B08CFF */
  --p-200: #6fcaf7; /* #9D6CFF */
  --p-300: #45b6f2; /* #8A4DFF */
  --p-400: #1f9ee8; /* #7A3BFF */
  --p-500: #1582c7; /* #631FFF */
  --p-700: #0c4b75; /* #4A12CC */
  --p-rgb: 21, 130, 199;
  --p-light-rgb: 69, 182, 242;

  --bg: #08080a;
  --fg: #ffffff;
  --mut: #a3a3ae;
  --card: rgba(255, 255, 255, .035);
  --cardh: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --tex: rgba(255, 255, 255, .016);
  --glow: rgba(var(--p-rgb), .34);
  --chip: rgba(255, 255, 255, .05);
  --ring: 0 0 50px rgba(var(--p-rgb), .35);
  --active: rgba(255, 255, 255, .12);

  --font: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --pixel: 'Silkscreen', monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

[data-theme="light"] {
  --bg: #fbfafd;
  --fg: #0b1220;
  --mut: #5a6170;
  --card: rgba(255, 255, 255, .72);
  --cardh: #ffffff;
  --line: rgba(11, 18, 32, .09);
  --tex: rgba(11, 18, 32, .01);
  --glow: transparent;
  --ring: none;
  --chip: rgba(11, 18, 32, .05);
  --active: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  min-height: 100vh;
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .5s, color .5s;
}
::selection { background: var(--p-500); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg { display: block; }

/* ---------- Fundo ---------- */
.tex {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, var(--tex) 1px, transparent 1px), linear-gradient(var(--tex) 1px, transparent 1px);
  background-size: 3px 3px;
}
.glow {
  position: absolute;
  left: 50%;
  top: -220px;
  width: 720px;
  height: 520px;
  translate: -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  filter: blur(40px);
  pointer-events: none;
  animation: glowDrift 18s ease-in-out infinite alternate;
}
@keyframes glowDrift {
  0% { transform: translate(-60px, 0) scale(1); opacity: .8; }
  50% { transform: translate(50px, 40px) scale(1.08); opacity: 1; }
  100% { transform: translate(-20px, 90px) scale(.95); opacity: .7; }
}

/* ---------- Animações ---------- */
@keyframes lbBeat {
  0%, 100% { transform: scale(1); box-shadow: 0 18px 40px -18px rgba(var(--p-rgb), .7), 0 0 0 0 rgba(var(--p-light-rgb), .45); }
  50% { transform: scale(1.015); box-shadow: 0 18px 40px -18px rgba(var(--p-rgb), .7), 0 0 0 8px rgba(var(--p-light-rgb), 0); }
}
@keyframes lbSweep {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes lbIn {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.in { animation: lbIn .8s var(--ease) both; }

/* ---------- Página ---------- */
.page {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  padding: 20px 18px 48px;
}

/* ---------- Topo ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 28px;
}
.logo { display: flex; align-items: center; }
.logo img { height: 26px; width: auto; display: block; }
[data-theme="light"] .logo img { filter: brightness(0); }
.top-r { display: flex; align-items: center; gap: 8px; }
.lang {
  display: flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--chip);
  border: 1px solid var(--line);
}
.lang button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--fg);
  font: 500 12px var(--font);
  cursor: pointer;
  transition: background .3s;
}
.lang button[aria-pressed="true"] { background: var(--active); }
.lang svg { border-radius: 2px; }
.theme {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--fg);
  cursor: pointer;
  transition: background .3s, transform .3s;
}
.theme:hover { transform: rotate(-20deg); }
[data-theme="light"] .i-sun, :root:not([data-theme="light"]) .i-moon { display: none; }

/* ---------- Perfil ---------- */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.avatar {
  position: relative;
  width: 116px;
  height: 116px;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--p-200), var(--p-500) 55%, rgba(var(--p-rgb), .15));
  box-shadow: var(--ring);
}
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 40%;
  display: block;
  border: 3px solid var(--bg);
}
/* Linha de disponibilidade em fonte pixel, abaixo do nome */
.avail {
  margin: 20px 0 0;
  font-family: var(--pixel);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--p-100);
  text-shadow: 0 0 12px rgba(var(--p-light-rgb), .45);
}
[data-theme="light"] .avail { color: var(--p-500); text-shadow: none; }

.name {
  margin: 10px 0 0;
  white-space: nowrap;
  /* 40px como no modelo; encolhe só se a tela não comportar em uma linha */
  font-size: min(40px, calc((100vw - 36px) / 10.2));
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
}
.name .sep { color: var(--mut); font-weight: 300; }
.handle {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
  background: linear-gradient(90deg, #fff, var(--p-100), var(--p-400), var(--p-100), #fff) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: lbSweep 6s linear infinite;
}
[data-theme="light"] .handle { background-image: linear-gradient(90deg, var(--p-700), var(--p-400), var(--p-200), var(--p-400), var(--p-700)); }
.bio {
  margin: 14px 0 0;
  max-width: 390px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--mut);
  text-wrap: pretty;
}
.heart { display: inline-block; width: 1em; height: 1em; vertical-align: -.14em; }
.social { margin-top: 20px; display: flex; gap: 8px; }
.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  transition: transform .35s var(--ease), background .3s, color .3s;
}
.social a:hover { transform: translateY(-3px); background: var(--p-500); color: #fff; }

/* ---------- Botão principal ---------- */
.cta-wrap { margin-top: 36px; display: flex; flex-direction: column; gap: 10px; animation-delay: .1s; }
.cta {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--p-400), var(--p-500) 60%, var(--p-700));
  color: #fff;
  box-shadow: 0 18px 40px -18px rgba(var(--p-rgb), .7);
  animation: lbBeat 2.4s ease-in-out infinite;
}
.cta:hover { animation-play-state: paused; }
.cta-ico {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .16);
}
.cta-ico img { width: 26px; height: auto; display: block; }
.cta-txt { position: relative; flex: 1 1 0%; min-width: 0; }
.cta-t { display: block; font-size: 16px; font-weight: 500; letter-spacing: -.01em; }
.cta-s { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .82); }
.cta-arr {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .18);
}

/* Luz que segue o cursor (botão, cartões e linhas) */
.spot {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--p-light-rgb), .16), transparent 65%);
  transition: opacity .4s;
  pointer-events: none;
}
.cta .spot { background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .28), transparent 65%); }
.row .spot { background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--p-light-rgb), .18), transparent 65%); }
.cta:hover .spot, .card-b:hover .spot, .row:hover .spot { opacity: 1; }

/* ---------- Seções ---------- */
.sec { margin-top: 44px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sec-t { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -.03em; }
.sec-k { font-family: var(--pixel); font-size: 10px; color: var(--mut); }
.sec-more { font-size: 13px; color: var(--mut); transition: color .3s; }
.sec-more:hover { color: var(--p-200); }
.sec-d { margin: 8px 0 0; max-width: 420px; font-size: 14px; line-height: 1.55; color: var(--mut); text-wrap: pretty; }

/* Espaço de imagem vazio (a imagem entra depois) */
.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--pixel);
  font-size: 9px;
  letter-spacing: .04em;
  color: var(--mut);
  opacity: .6;
  text-align: center;
  line-height: 1.8;
}

/* Produtos */
.cards { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  transition: transform .45s var(--ease), box-shadow .45s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -24px rgba(var(--p-rgb), .55); }
.card-img { position: relative; aspect-ratio: 1954 / 863; background: var(--chip); }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-b { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.card-txt { position: relative; min-width: 0; }
.card-t { font-size: 15px; font-weight: 500; }
.card-s { margin-top: 2px; font-size: 12px; color: var(--mut); }
.btn {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--p-500);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

/* Links numerados */
.rows { margin-top: 44px; display: flex; flex-direction: column; gap: 10px; animation-delay: .25s; }
.row {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform .4s var(--ease), background .3s;
}
.row:hover { transform: translateY(-2px); background: var(--cardh); }
.row-n {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--chip);
  border: 1px solid var(--line);
  font-family: var(--pixel);
  font-size: 11px;
  color: var(--p-200);
}
[data-theme="light"] .row-n { color: var(--p-500); }
.row-txt { position: relative; flex: 1 1 0%; min-width: 0; }
.row-t { display: block; font-size: 16px; font-weight: 500; letter-spacing: -.01em; }
.row-s { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--mut); }
.row-arr {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--chip);
  color: var(--fg);
}

/* Portfólio (carrossel) */
.scroller {
  margin: 16px -18px 0;
  padding: 0 18px 6px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 18px;
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.work { flex: 0 0 auto; width: 78%; max-width: 380px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; }
.work-img { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--chip); }
.work-img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: transform .7s var(--ease); }
.work-img img:hover { transform: scale(1.05); }
.work-c { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; }
.work-t { font-size: 14px; font-weight: 500; }
.work-s { font-size: 12px; color: var(--mut); }
/* Feedbacks: todos no formato da imagem (1080×1184), vídeos cortados no centro */
.fb .work-img { aspect-ratio: 1080 / 1184; }
.fb .work-img img, .fb .work-img video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; background: #000; }
.fb .work-img img:hover { transform: none; }

/* Rodapé */
.foot {
  margin-top: 56px;
  padding: 28px 22px 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.foot-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.foot-brand { display: flex; flex-direction: column; gap: 12px; max-width: 260px; }
.foot-brand .logo img { height: 22px; }
.foot-brand p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--mut); text-wrap: pretty; }
.foot-soc { display: flex; gap: 8px; }
.foot-soc a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--fg);
  transition: background .3s, color .3s;
}
.foot-soc a:hover { background: var(--p-500); color: #fff; }
.foot-links { margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.foot-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--chip);
  font-size: 13px;
  font-weight: 500;
  transition: color .3s;
}
.foot-links a:hover, .foot-bot a:hover { color: var(--p-200); }
.foot-bot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--mut);
}
.foot-bot a { transition: color .3s; }

:focus-visible { outline: 2px solid var(--p-200); outline-offset: 2px; }

@media (max-width: 340px) {
  .lang svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
