/* DePaiva Advocacia — página de links
   Tokens, fontes e curvas iguais às do site (Site/depaiva-site/src/app/globals.css). */

@font-face {
  font-family: "League Spartan";
  src: url("../fonts/LeagueSpartan-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("../fonts/Lato-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("../fonts/Lato-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Paleta v2 */
  --black-navy: #05070d;
  --navy-night: #0b1020;
  --navy-deep: #131a2f;
  --navy: #1a243f;
  --navy-soft: #232f52;
  --navy-light: #2c3d6b;
  --cream: #f1faee;
  --cream-soft: rgba(241, 250, 238, 0.78);
  --cream-faint: rgba(241, 250, 238, 0.6);
  --bronze: #b07c4b;
  --bronze-light: #c08a57;
  --sand: #be9d7c;
  --gold-grad: linear-gradient(135deg, #96683d 0%, #c08a57 45%, #dcc19f 100%);

  --hairline: rgba(190, 157, 124, 0.24);
  --hairline-strong: rgba(190, 157, 124, 0.55);
  --surface: rgba(241, 250, 238, 0.035);
  --surface-hover: rgba(241, 250, 238, 0.07);

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--black-navy);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Lato", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--cream);
  /* Degradê da marca: quase preto no topo, azul mais claro embaixo. */
  background: linear-gradient(
    180deg,
    var(--black-navy) 0%,
    var(--navy-night) 22%,
    var(--navy-deep) 46%,
    var(--navy) 70%,
    var(--navy-light) 100%
  );
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* ───────────── Fundo ───────────── */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* Skyline do hero do site, bem apagado e sumindo em direção ao degradê. */
.backdrop__skyline {
  position: absolute;
  inset: -4% -4% auto;
  height: 62vh;
  background: url("../img/skyline.webp") center 30% / cover no-repeat;
  opacity: 0.16;
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 20%, transparent 100%);
  animation: drift 28s var(--ease-in-out) infinite alternate;
}

/* Brilho dourado atrás do título — "respira" devagar. */
.backdrop__glow {
  position: absolute;
  top: 8vh;
  left: 50%;
  width: min(720px, 140vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(176, 124, 75, 0.2), transparent 70%);
  animation: breathe 9s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to   { transform: scale(1) translate3d(-1.5%, 1%, 0); }
}

@keyframes breathe {
  from { opacity: 0.55; }
  to   { opacity: 1; }
}

/* ───────────── Layout ───────────── */

.page {
  width: min(100% - 32px, 480px);
  margin-inline: auto;
  padding: clamp(40px, 9vh, 72px) 0 calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* ───────────── Entrada ───────────── */

/* Cada elemento sobe, ganha nitidez e aparece — em cascata via --d.
   Só CSS: roda fora da main thread e funciona sem JavaScript. */
.anim {
  /* `backwards`, não `both`: depois de terminar a animação não pode
     continuar segurando `transform`, senão o :active (scale) para de valer. */
  animation: rise 800ms var(--ease-out) backwards;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/* ───────────── Cabeçalho ───────────── */

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.intro__logo {
  width: 184px;
}

.intro__logo img {
  width: 100%;
  height: auto;
}

/* Eyebrow com travessões que ecoam o "— ADVOCACIA —" do logotipo. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  font-family: "League Spartan", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sand);
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  animation: draw 700ms var(--ease-out) both;
  animation-delay: calc(var(--d, 0ms) + 250ms);
}
.eyebrow::before { transform-origin: right; }
.eyebrow::after  { transform-origin: left; }

@keyframes draw {
  to { transform: scaleX(1); }
}


/* ───────────── Links ───────────── */

.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Base comum: superfície de vidro, fio dourado e resposta ao toque. */
.feature,
.link {
  position: relative;
  isolation: isolate;
  display: flex;
  border: 1px solid var(--hairline);
  background: var(--surface);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition:
    border-color 250ms ease,
    background-color 250ms ease,
    transform 160ms var(--ease-out);
}

.feature:active,
.link:active {
  transform: scale(0.98);
}

.feature:focus-visible,
.link:focus-visible {
  outline: 2px solid var(--bronze-light);
  outline-offset: 3px;
}

/* Luz que acompanha o cursor (desktop). --x/--y vêm do main.js. */
.feature::after,
.link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(
    240px circle at var(--x, 50%) var(--y, 50%),
    rgba(192, 138, 87, 0.14),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 300ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .feature:hover,
  .link:hover {
    border-color: var(--hairline-strong);
    background-color: var(--surface-hover);
  }
  .feature:hover::after,
  .link:hover::after {
    opacity: 1;
  }
}

/* ── Destaque: site ── */

.feature {
  flex-direction: column;
  gap: 16px;
  padding: 12px 12px 18px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(192, 138, 87, 0.08), transparent 55%),
    var(--surface);
}

/* Fio dourado no topo do card. */
.feature::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bronze-light), transparent);
}

.feature__browser {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(241, 250, 238, 0.08);
  background: var(--black-navy);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}

.feature__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(241, 250, 238, 0.04);
  border-bottom: 1px solid rgba(241, 250, 238, 0.06);
}

.feature__dots {
  display: flex;
  gap: 5px;
}
.feature__dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(241, 250, 238, 0.18);
}

.feature__url {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-right: 29px; /* compensa os pontos: URL fica centralizada no card */
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(241, 250, 238, 0.05);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--cream-faint);
  white-space: nowrap;
}

.feature__shot {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1200 / 611;
}

.feature__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 30% 40%;
  transition: transform 900ms var(--ease-out);
}

/* Reflexo que atravessa a prévia de tempos em tempos. */
.feature__shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(241, 250, 238, 0.14) 50%,
    transparent 65%
  );
  transform: translateX(-100%);
  animation: shine 6s var(--ease-in-out) 1.6s infinite;
}

@keyframes shine {
  0%        { transform: translateX(-100%); }
  30%, 100% { transform: translateX(100%); }
}

@media (hover: hover) and (pointer: fine) {
  .feature:hover .feature__shot img {
    transform: scale(1.04);
  }
}

.feature__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 8px;
}

.feature__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.feature__kicker {
  font-family: "League Spartan", sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sand);
}

.feature__title {
  margin-top: 4px;
  font-family: "League Spartan", sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.feature__desc {
  margin-top: 2px;
  text-wrap: pretty;
  font-size: 0.875rem;
  color: var(--cream-faint);
}

.feature__go {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold-grad);
  color: var(--navy-deep);
  box-shadow: 0 8px 24px -8px rgba(176, 124, 75, 0.7);
  transition: transform 250ms var(--ease-out);
}

.feature__go svg {
  transition: transform 250ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .feature:hover .feature__go {
    transform: scale(1.06);
  }
  .feature:hover .feature__go svg {
    transform: translate(1px, -1px);
  }
}

/* ── Links comuns ── */

.link {
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 18px 12px 12px;
  border-radius: 18px;
}

/* Os ícones enviados são discos com o símbolo vazado: usados como máscara,
   viram discos dourados e o símbolo mostra o fundo do card. */
.link__icon {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  background: var(--gold-grad);
  -webkit-mask: var(--mask) center / contain no-repeat;
  mask: var(--mask) center / contain no-repeat;
  animation: pop 600ms var(--ease-out) backwards;
  animation-delay: calc(var(--d, 0ms) + 180ms);
  transition: transform 250ms var(--ease-out);
}

.link__icon--whatsapp  { --mask: url("../icons/whatsapp.png"); }
.link__icon--instagram { --mask: url("../icons/instagram.png"); }
.link__icon--linkedin  { --mask: url("../icons/linkedin.png"); }
.link__icon--tiktok    { --mask: url("../icons/tiktok.png"); }

@keyframes pop {
  from { opacity: 0; transform: scale(0.8) rotate(-12deg); }
  to   { opacity: 1; transform: none; }
}

/* WhatsApp é o contato direto: um anel dourado pulsa discretamente. */
.link--whatsapp::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border-radius: 50%;
  border: 1px solid var(--bronze-light);
  opacity: 0;
  animation: ring 2.8s var(--ease-out) 1.4s infinite;
}

@keyframes ring {
  0%   { opacity: 0.7; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.45); }
}

.link__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.link__name {
  font-family: "League Spartan", sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
}

.link__meta {
  font-size: 0.8125rem;
  color: var(--cream-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link__arrow {
  flex: none;
  color: var(--cream-faint);
  transition:
    transform 250ms var(--ease-out),
    color 250ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .link:hover .link__arrow {
    color: var(--bronze-light);
    transform: translate(2px, -2px);
  }
  .link:hover .link__icon {
    transform: scale(1.06);
  }
}

/* ───────────── Rodapé ───────────── */

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-top: 8px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--cream-faint);
}

.footer__column {
  margin-bottom: 10px;
  color: var(--bronze-light);
}

/* ───────────── Movimento reduzido ───────────── */

/* Menos movimento não é zero: as entradas viram só fade; loops param. */
@media (prefers-reduced-motion: reduce) {
  .anim {
    animation-name: fade;
    animation-duration: 400ms;
  }
  .link__icon {
    animation-name: fade;
  }
  .eyebrow::before,
  .eyebrow::after {
    animation: none;
    transform: none;
  }
  .backdrop__skyline,
  .backdrop__glow,
  .feature__shot::after,
  .link--whatsapp::before {
    animation: none;
  }
  .feature__shot img,
  .feature:hover .feature__shot img {
    transform: none;
  }
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
