/* ============================================================
   AcomGest Links — página /links
   Independente do css/style.css do site para carregar rápido.
   ============================================================ */

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

:root {
  color-scheme: dark;

  /* Identidade AcomGest */
  --petroleo: #0f4f55;
  --menta: #3fae8a;
  --menta-claro: #7fd6b8;
  --marinho: #16324f;
  --branco: #ffffff;

  /* Superfícies sobre a foto */
  --fundo: #071f22;
  --vidro: rgba(8, 40, 44, 0.62);
  --vidro-forte: rgba(10, 52, 57, 0.72);
  --vidro-ativo: rgba(15, 79, 85, 0.82);
  --borda: rgba(127, 214, 184, 0.22);
  --borda-forte: rgba(127, 214, 184, 0.6);

  --texto: #f3f8f6;
  --texto-suave: rgba(226, 238, 234, 0.8);
  --texto-fraco: rgba(214, 230, 225, 0.66);

  --raio: 16px;
  --fonte: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Sistema de movimento */
  --t-rapida: 140ms;
  --t-media: 220ms;
  --suave: cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.5;
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

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

/* ---------- Acessibilidade ---------- */
.pular {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--branco);
  color: var(--petroleo);
  font-weight: 700;
  text-decoration: none;
}

.pular:focus {
  top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--menta-claro);
  outline-offset: 3px;
}

/* ---------- Fundo: foto + véu + curvas de nível ---------- */
.fundo-foto {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--fundo);
}

.fundo-foto::before {
  content: "";
  position: absolute;
  inset: -2%;
  background: url("/assets/links-fundo-pasto-900.webp") center 40% / cover no-repeat;
  animation: aproximar 60s ease-in-out infinite alternate;
  will-change: transform;
}

@media (min-width: 901px) {
  .fundo-foto::before {
    background-image: url("/assets/links-fundo-pasto-1600.jpg");
    background-image: image-set(
      url("/assets/links-fundo-pasto-1600.webp") type("image/webp"),
      url("/assets/links-fundo-pasto-1600.jpg") type("image/jpeg")
    );
  }
}

/* Véu escuro: garante contraste do texto branco sobre a foto */
.fundo-foto::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 50% 45%, rgba(5, 26, 29, 0.55), transparent 75%),
    linear-gradient(180deg, rgba(5, 28, 31, 0.78) 0%, rgba(6, 32, 35, 0.6) 38%, rgba(5, 26, 29, 0.84) 72%, rgba(4, 22, 25, 0.96) 100%);
}

@keyframes aproximar {
  from { transform: scale(1); }
  to   { transform: scale(1.07) translate(-1%, -1%); }
}

.fundo {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  pointer-events: none;
}

.fundo use {
  fill: none;
  stroke-width: 1;
}

.fundo__relevo {
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform;
}

.fundo__relevo--a use { stroke: rgba(127, 214, 184, 0.22); }
.fundo__relevo--b use { stroke: rgba(127, 214, 184, 0.18); }
.fundo__relevo--c use { stroke: rgba(255, 255, 255, 0.08); }

.fundo__relevo--a { animation: deriva-a 52s ease-in-out infinite alternate; }
.fundo__relevo--b { animation: deriva-b 64s ease-in-out infinite alternate; }
.fundo__relevo--c { animation: deriva-c 46s ease-in-out infinite alternate; }

@keyframes deriva-a {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(-18px, 22px) rotate(7deg); }
}

@keyframes deriva-b {
  from { transform: translate(0, 0) rotate(0deg) scale(1); }
  to   { transform: translate(20px, -16px) rotate(-6deg) scale(1.04); }
}

@keyframes deriva-c {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(12px, 14px) rotate(9deg); }
}

/* ---------- Frases dos cantos (só em telas largas) ---------- */
.canto {
  display: none;
}

@media (min-width: 1024px) {
  .canto {
    display: block;
    position: absolute;
    top: 36px;
    z-index: 1;
    margin: 0;
    padding-top: 14px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.75;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--menta-claro);
  }

  .canto::before {
    content: "";
    position: absolute;
    top: 0;
    width: 36px;
    height: 2px;
    background: var(--menta);
  }

  .canto--esquerda { left: 44px; }
  .canto--esquerda::before { left: 0; }
  .canto--direita { right: 44px; text-align: right; }
  .canto--direita::before { right: 0; }
}

/* ---------- Estrutura ---------- */
.pagina {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: calc(44px + env(safe-area-inset-top, 0px)) 20px 32px;
}

/* ---------- Cabeçalho ---------- */
.perfil {
  text-align: center;
  margin-bottom: 32px;
}

.perfil__marca {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
}

.perfil__logo {
  position: relative;
  width: 88px;
  height: 88px;
  padding: 14px;
  border-radius: 22px;
  background: #0a3236;
  border: 1px solid var(--borda);
}

/* Eco: ondas que saem do logo, em referência à ultrassonografia */
.perfil__eco span {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px solid rgba(127, 214, 184, 0.5);
  opacity: 0;
  animation: eco 7s cubic-bezier(0.2, 0.6, 0.35, 1) infinite;
}

.perfil__eco span:nth-child(2) {
  animation-delay: 3.5s;
}

@keyframes eco {
  0%   { transform: scale(0.75); opacity: 0; }
  12%  { opacity: 0.7; }
  100% { transform: scale(2); opacity: 0; }
}

.perfil__nome {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--branco);
}

.perfil__slogan {
  max-width: 36ch;
  margin: 10px auto 0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--texto);
}

.perfil__traco {
  display: block;
  width: 44px;
  height: 3px;
  margin: 20px auto;
  border-radius: 2px;
  background: var(--menta);
}

.perfil__intro {
  max-width: 34ch;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--texto-suave);
}

/* ---------- Links ---------- */
.links__grupo + .links__grupo {
  margin-top: 28px;
}

.links__rotulo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--texto);
}

.links__rotulo::before,
.links__rotulo::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--borda);
}

.links__lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

@media (min-width: 640px) {
  .links__grupo--discreto .links__lista {
    grid-template-columns: repeat(2, 1fr);
  }
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--vidro);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition:
    border-color var(--t-media) var(--suave),
    background-color var(--t-media) var(--suave),
    transform var(--t-rapida) var(--suave);
}

.link--destaque {
  min-height: 100px;
  padding: 18px 18px 18px 18px;
  background: var(--vidro-forte);
}

/* Recorte da própria foto no cartão principal, como no modelo */
.link--destaque::before {
  content: "";
  position: absolute;
  inset: 0 0 0 52%;
  background: url("/assets/links-fundo-pasto-900.webp") 70% 60% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
  mask-image: linear-gradient(90deg, transparent, #000 70%);
  opacity: 0.55;
  pointer-events: none;
}

.link--discreto {
  min-height: 68px;
  padding: 12px 14px;
}

.link > * {
  position: relative;
}

.link__icone {
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--branco);
}

.link--destaque .link__icone {
  width: 56px;
  height: 56px;
  background: rgba(63, 174, 138, 0.28);
  border: 1px solid var(--borda);
}

.link--discreto .link__icone {
  width: 42px;
  height: 42px;
  background: rgba(4, 24, 27, 0.6);
  border: 1px solid var(--borda);
}

.link__icone svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link--discreto .link__icone svg {
  width: 22px;
  height: 22px;
}

.link__icone img {
  width: 28px;
  height: 28px;
}

.link__texto {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link__titulo {
  font-weight: 700;
  line-height: 1.3;
  color: var(--branco);
}

.link--destaque .link__titulo {
  font-size: 1.1875rem;
}

.link--discreto .link__titulo {
  font-size: 0.9375rem;
}

.link__descricao {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--texto-suave);
}

.link--destaque .link__descricao {
  max-width: 30ch;
}

.link--discreto .link__descricao {
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link__seta {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--texto);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--t-media) var(--suave), color var(--t-media) var(--suave);
}

.link--destaque .link__seta {
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 50%;
  background: rgba(4, 24, 27, 0.72);
  border: 1px solid var(--borda-forte);
}

/* Hover só em dispositivos com cursor — evita "hover preso" no toque */
@media (hover: hover) and (pointer: fine) {
  .link:hover {
    border-color: var(--borda-forte);
    background-color: var(--vidro-ativo);
    transform: translateY(-2px);
  }

  .link:hover .link__seta {
    color: var(--menta-claro);
    transform: translateX(3px);
  }
}

/* Feedback ao toque/clique */
.link:active {
  transform: scale(0.985);
  background-color: var(--vidro-ativo);
  border-color: var(--menta);
}

/* ---------- Compartilhar / copiar ---------- */
.acoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.acao {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--texto);
  background: rgba(4, 24, 27, 0.45);
  border: 1px solid var(--borda);
  border-radius: 999px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition:
    border-color var(--t-media) var(--suave),
    background-color var(--t-rapida) ease-out,
    transform var(--t-rapida) var(--suave);
}

.acao svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) and (pointer: fine) {
  .acao:hover {
    border-color: var(--borda-forte);
    background: var(--vidro-ativo);
  }
}

.acao:active {
  transform: scale(0.97);
  background: var(--vidro-ativo);
}

.acao[data-estado="copiado"] {
  border-color: var(--menta);
  color: var(--menta-claro);
}

/* ---------- Rodapé ---------- */
.rodape {
  position: relative;
  z-index: 1;
  padding: 0 20px calc(24px + env(safe-area-inset-bottom, 0px));
}

.rodape__conteudo {
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--borda);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--texto-fraco);
}

.rodape__marca {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.rodape__marca img {
  width: 32px;
  height: 32px;
}

.rodape__nome {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--branco);
}

.rodape__slogan {
  padding-left: 6px;
  font-size: 0.5625rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--texto-suave);
}

.rodape__legal {
  margin: 0;
}

.rodape__legal > span {
  display: block;
}

.rodape__legal a {
  color: var(--menta-claro);
  text-underline-offset: 3px;
}

.rodape__sep {
  margin: 0 8px;
}

.rodape__redes {
  list-style: none;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.rodape__redes a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--branco);
  border: 1px solid var(--borda);
  background: rgba(4, 24, 27, 0.45);
  transition: border-color var(--t-rapida) ease-out, background-color var(--t-rapida) ease-out;
}

.rodape__redes svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) and (pointer: fine) {
  .rodape__redes a:hover {
    border-color: var(--borda-forte);
    background: var(--vidro-ativo);
  }
}

.rodape__redes a:active {
  background: var(--vidro-ativo);
}

@media (min-width: 900px) {
  .rodape__conteudo {
    flex-direction: row;
    justify-content: center;
    gap: 40px;
    text-align: left;
  }

  .rodape__legal {
    padding-left: 40px;
    border-left: 1px solid var(--borda);
  }
}

/* ---------- Aviso (toast) ---------- */
.aviso {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--branco);
  color: var(--petroleo);
  font-size: 0.875rem;
  font-weight: 700;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity var(--t-media) ease-out, transform var(--t-media) var(--suave);
}

.aviso.visivel {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Telas maiores ---------- */
@media (min-width: 640px) {
  .pagina {
    padding-top: 72px;
  }

  .perfil__nome {
    font-size: 2.75rem;
  }
}

/* ---------- Reduzir movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  .fundo-foto::before,
  .fundo__relevo,
  .perfil__eco span {
    animation: none;
  }

  .perfil__eco {
    display: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .link:hover,
  .link:active,
  .acao:active {
    transform: none;
  }
}
